09.07.2015, 15:36
Hello!
Can anyone help me with a tutorial on how to make timers!
Thanks!
Ironmen!
Can anyone help me with a tutorial on how to make timers!
Thanks!
Ironmen!
Sets a timer to call a function after the specified interval. This variant ('Ex') can pass parameters (such as a player ID) to the function. |
forward SaveUser(playerid); public SaveUser(playerid) { //code blabla }
SetTimerEx("SaveUser", 10000, false, "i", playerid);
CMD:saveuser(playerid, params[]) { SetTimerEx("SaveUser", 30000, false, "i", playerid); (sets timer to call "SaveUser" after 30000 ms(30 seconds), doesn't repeat, sets the parameter as an "i"nteger and the integer would be "playerid) SendClientMessage(playerid, -1, "Your account will save in 30 seconds."); return 1; }
forward SaveUser(playerid); public SaveUser(playerid) { INI_ParseFile(blabla... //code return 1; }