28.09.2011, 08:16
guys how can i add a time limiter in this code?
I mean that, i want when someone /rob a place, then he must wait 60 minutes for the next /rob, how to add this to the script?
Thanks
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/rob", true) == 0) // If they type /rob
{
if(IsPlayerInCheckpoint(playerid)) // Check if they are in a checkpoint
{
GivePlayerMoney(playerid, random(2000+1)); // Give the player the money!
}
return 1; //return one to prevent "SERVER: Unknown command"
}
return 0;
}
Thanks


