26.09.2018, 13:23
Use tickcount:
PHP код:
new
tick,
commandtick;
// somewhere under gamemode/fs init
tick = tickcount();
// Your command
CMD: example (playerid, params [])
{
SendClientMessage (playerid, -1, "Hello");
commandtick = tickcount(); // Get the milliseconds
return 1;
}
// somewhere in your code
if(tick - commandtick) >= 300000 /* 300 seconds = 5 mins */ {
// Your things
}