Once per Death [HELP]
#2

Pretty simple:
1. Create a boolean array of all players
pawn Код:
new bool:ArmourUsed[MAX_PLAYERS char] = { false, ... };
2. When player buys armour, set his state
pawn Код:
ArmourUsed{playerid} = true;
3. When player wants to buy armour again, check if he already did it
pawn Код:
if (ArmourUsed{player}) return rejectOrSomething();
4. Reset his state on spawn or wherever you want
pawn Код:
public OnPlayerSpawn(playerid)
{
    // (...)
    ArmourUsed{playerid} = false;
    // (...)
}
And you are done!
Reply


Messages In This Thread
Once per Death [HELP] - by Sting. - 02.08.2017, 15:47
Re: Once per Death [HELP] - by Misiur - 02.08.2017, 16:14
Re: Once per Death [HELP] - by jlalt - 02.08.2017, 16:51
Re: Once per Death [HELP] - by Sting. - 02.08.2017, 17:12
Re: Once per Death [HELP] - by Misiur - 02.08.2017, 18:24
Re: Once per Death [HELP] - by Misiur - 02.08.2017, 18:29

Forum Jump:


Users browsing this thread: 2 Guest(s)