How to use gettime to prevent spamming?
#2

PHP код:
new p_LastHealMe[MAX_PLAYERS]; // to save time in it 
PHP код:
CMD:healme(playeridparams[]) 
{
    if(( 
gettime() - p_LastHealMe[playerid] ) < 10)
    {
        
// error message
    
}
    else 
    {
        
// stuff
        
p_LastHealMe[playerid] = gettime();
    }

Reply


Messages In This Thread
How to use gettime to prevent spamming? - by DuyDang2412 - 21.03.2017, 05:59
Re: How to use gettime to prevent spamming? - by jlalt - 21.03.2017, 06:11
Re: How to use gettime to prevent spamming? - by DuyDang2412 - 21.03.2017, 07:06
Re: How to use gettime to prevent spamming? - by jlalt - 22.03.2017, 04:56
Re: How to use gettime to prevent spamming? - by LetsOWN[PL] - 22.03.2017, 13:44
Re: How to use gettime to prevent spamming? - by Kraeror - 22.03.2017, 15:13
Re: How to use gettime to prevent spamming? - by OneDay - 22.03.2017, 16:50
Re: How to use gettime to prevent spamming? - by DuyDang2412 - 23.03.2017, 10:23
Re: How to use gettime to prevent spamming? - by Sew_Sumi - 23.03.2017, 13:58
Re: How to use gettime to prevent spamming? - by DuyDang2412 - 24.03.2017, 11:33

Forum Jump:


Users browsing this thread: 3 Guest(s)