24.03.2017, 05:58
Why don't do it like this?
300 will set it to 300 seconds. The player cant use the command for the next 5 minutes
Edit:
You can save it like this:
But i doubt that will actually be useful, unless you make it save every second.
It will be useful against re-logging to restore the timer.
Код:
CMD:rob(playerid, params[])
{
Temp[playerid] = gettime();
if(gettime() - Temp[playerid] < 300)
{
// do things here
}else return SendClientMessage(playerid, -1, "Please wait before doing this again");
}
Edit:
You can save it like this:
Код:
INI_WriteInt(File,"RobTime",Temp[playerid]);
It will be useful against re-logging to restore the timer.

