[FilterScript] sbBan - Advanced MySQL Ban System
#12

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
Reply


Messages In This Thread
sbBan - Advanced MySQL Ban System - by SecretBoss - 28.10.2015, 15:17
Re: sbBan - Advanced MySQL Ban System - by Pottus - 28.10.2015, 15:19
Re: sbBan - Advanced MySQL Ban System - by SecretBoss - 28.10.2015, 15:25
Re: sbBan - Advanced MySQL Ban System - by Gammix - 28.10.2015, 15:30
Re: sbBan - Advanced MySQL Ban System - by SecretBoss - 28.10.2015, 15:33
Re: sbBan - Advanced MySQL Ban System - by Gammix - 28.10.2015, 15:37
Re: sbBan - Advanced MySQL Ban System - by SecretBoss - 28.10.2015, 15:43
Re: sbBan - Advanced MySQL Ban System - by Gammix - 28.10.2015, 15:58
Re: sbBan - Advanced MySQL Ban System - by SecretBoss - 28.10.2015, 16:13
Re: sbBan - Advanced MySQL Ban System - by jlalt - 28.10.2015, 17:10
Re: sbBan - Advanced MySQL Ban System - by Gammix - 28.10.2015, 17:11
Re: sbBan - Advanced MySQL Ban System - by SecretBoss - 28.10.2015, 17:13
Re: sbBan - Advanced MySQL Ban System - by N0FeaR - 01.11.2015, 13:00
Re: sbBan - Advanced MySQL Ban System - by Kevln - 01.11.2015, 14:20

Forum Jump:


Users browsing this thread: 2 Guest(s)