Timer within command
#4

Use tickcount:
PHP код:

new 
tick,
commandtick;
// somewhere under gamemode/fs init
tick tickcount();
// Your command
CMDexample (playeridparams [])
{
    
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

Reply


Messages In This Thread
Timer within command - by Alexis17 - 26.09.2018, 13:00
Re: Timer within command - by Banditul18 - 26.09.2018, 13:05
Re: Timer within command - by Alexis17 - 26.09.2018, 13:06
Re: Timer within command - by v1k1nG - 26.09.2018, 13:23
Re: Timer within command - by Alexis17 - 26.09.2018, 13:33
Re: Timer within command - by v1k1nG - 26.09.2018, 13:36
Re: Timer within command - by Alexis17 - 26.09.2018, 13:38

Forum Jump:


Users browsing this thread: 1 Guest(s)