Jump to content
  • 0

pomoc error 004: function "S@@_OnPlayerPickUpPickup" is not implemented


LafreSK

Dotaz

takže dobrý deň mam problem ktorý sa my od čias pawnenia nestal takže sa chcem stym obratit na vas :)

predovšetkym diky za help

----------------------------------------------------------------------------------------------------------------------------------------------------------------

public OnPlayerPickUpPickup(playerid, pickupid)
{
new string[256];
DestroyPickup(meatDrops[playerid]);
if(team[playerid] == TEAM_ZOMBIE)
    {
 
if(pInfo[playerid][isPlayerInfected] == 0)
{
new slot, weap, ammo;
for ( slot = 0; slot < 14; slot++ )
{
GetPlayerWeaponData(playerid,slot,weap,ammo);
if(IsValidWeapon(weap))
{
new randomselect = random(2);
switch(randomselect)
{
case 0:
{
new randomammo = random(50);
GivePlayerWeapon(playerid,weap,randomammo);
format(string,sizeof(string),"~g~Nasiel si~w~: %d ammo",randomammo);
GameTextForPlayer(playerid,string,4000,5);
DestroyPickup(meatDrops[playerid]);
}
case 1:
{
new randomxp = random(35);
format(string,sizeof(string),"~g~Nasiel si~w~: %d XP",randomxp);
GameTextForPlayer(playerid,string,4000,5);
pInfo[playerid][pXP] += randomxp;
DestroyPickup(meatDrops[playerid]);
}
}
}
}
}
}
}
 
    return 1;
}
 
errory: C:\Users\Adam\Downloads\ZA.pwn(335) : error 002: only a single statement (or expression) can follow each "case"
C:\Users\Adam\Downloads\ZA.pwn(335) : error 004: function "S@@_OnPlayerPickUpPickup" is not implemented
 
radek 335: je public
 
dakujem za help
Link to comment
Share on other sites

2 odpovědí na tuto otázku

Recommended Posts

  • 0

Zkus to takto a pak napiš jak to dopadlo

public OnPlayerPickUpPickup(playerid, pickupid)
{
new string[256];
  DestroyPickup(meatDrops[playerid]);
    if(team[playerid] == TEAM_ZOMBIE)
    {
      if(pInfo[playerid][IsPlayerInfected] == 0)
      {
        new slot, weap, ammo;
          for ( slot = 0; slot < 14; slot++ )
          {
            GetPlayerWeaponData(playerid,slot,weap,ammo);
              if(IsValidWeapon(weap))
              {
                new randomselect = random(2);
                  switch(randomselect)
                  {
                  case 0:
                  {
                    new randomammo = random(50);
                    GivePlayerWeapon(playerid,weap,randomammo);
                    format(string,sizeof(string),"~g~Nasiel si~w~: %d ammo",randomammo);
                    GameTextForPlayer(playerid,string,4000,5);
                    DestroyPickup(meatDrops[playerid]);
                  }
                  case 1:
                  {
                    new randomxp = random(35);
                    format(string,sizeof(string),"~g~Nasiel si~w~: %d XP",randomxp);
                    GameTextForPlayer(playerid,string,4000,5);
                    pInfo[playerid][pXP] += randomxp;
                    DestroyPickup(meatDrops[playerid]);
                  }
                  }
              }
          }
      }
    } 
return 1;
}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...