How can I add a timer to make it so players cant get armor every second?
#2

new gotarmour[500];

As soon as the player buys the armour. Which is at case 8, do this: "case 8:{SetPlayerArmour(playerid, 100); gotarmour[playerid] = 1;SetTimerEx("ArmourUpdate", 300000, 0, "i", playerid);};
forward ArmourUpdate(playerid);
public ArmourUpdate(playerid)
{
if(gotarmour[playerid] == 1)gotarmour[playerid] = 0;
}
public OnPlayerDisconnect(playerid)
{
gotarmour[playerid] = 0;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)