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