11.07.2015, 22:44
Alright i'll give you few ideas..
first , on top :
OnGameModeInit()
OnPlayerConnect :
Now when the player types the command, you need to add this :
Now somewhere but not under any callback :
Just edit it if needed, i just gave few ideas on how to make it. Good luck!
first , on top :
PHP код:
new cmdpossible[MAX_PLAYERS]
PHP код:
cmdpossible[playerid] = 1;
PHP код:
cmdpossible[playerid] = 1;
PHP код:
if(cmdpossible[playerid] == 1)
{
// your codes here etc.. then add the following :
cmdpossible[playerid] = 0;
SetTimerEx("waittimer", 300000, false, "i", playerid); //here i made it for you 5minutes you can change it.
}
else
{
SendClientMessage(playerid, COLOR_RED, "You need to wait 5 minutes before using this command again."
PHP код:
forward waittimer(playerid);
public waittimer(playerid)
{
cmdpossible[playerid] = 1;
}