Two SA-MP questions (scripting)
#5

Lol, you only define one callback, and put everything under it

No need for several, do it like below:

pawn Код:
//Health pickups
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if (pickupid == Health)
    {
    SetPlayerHealth(playerid,100);
    GameTextForPlayer(playerid, "~y~You have found some health!", 5000, 3);
    }
    if (pickupid == Armour)
    {
    SetPlayerArmour(playerid,100);
    GameTextForPlayer(playerid, "~y~You have found an armor!", 5000, 3);
    }
    return 1;
}
Reply


Messages In This Thread
Two SA-MP questions (scripting) - by Libra - 26.04.2010, 15:37
Re: Two SA-MP questions (scripting) - by dcmd_crash - 26.04.2010, 16:01
Re: Two SA-MP questions (scripting) - by Libra - 26.04.2010, 17:39
Re: Two SA-MP questions (scripting) - and one other (last) - by Libra - 26.04.2010, 18:10
Re: Two SA-MP questions (scripting) - by dcmd_crash - 26.04.2010, 19:27
Re: Two SA-MP questions (scripting) - by Libra - 26.04.2010, 19:32
Re: Two SA-MP questions (scripting) - by dcmd_crash - 26.04.2010, 19:37

Forum Jump:


Users browsing this thread: 2 Guest(s)