Quote:
Originally Posted by Gammix
Timers should always be created with the right way.
Here is an example:
pawn Код:
//create a variable for a timer //set it to "-1" as default new time = -1 ;
//now check if the timer is already existing if (timer != -1) { //this means the timer is already existing, destroy it KillTimer(timer); } //set the timer now timer = SetTimer("OnTimerComplete", ...);
//when your timer complete forward OnTimerComplete(); public OnTimerComplete() { //set the variable back to "-1" which means the timer is invalid timer = -1; }
So you can check the timer is existing through that method.
pawn Код:
public OnPlayerCOmmandReceived(playerid, sucess) { if (timer != -1) { return 0; } }
You can still read the fix_kick.inc code.
|
Thanks I will update it on next version