mute help anti spam
#1

PHP Code:
    SpamCheck[playerid] = GetTickCount();
    if(
GetTickCount() - SpamCheck[playerid] < 1000 && SpamCheck[playerid] != 0)
    { 
    
SpamTimes[playerid]++; 
    if(
SpamTimes[playerid] == 5)  
    { 
        
PlayerData[playerid][Muted] = 1
        
PlayerData[playerid][MutedTime] += 20
        new 
str[128]; // blah blah 
        
mysql_format(SQLstr,128,"UPDATE `users` SET `Muted`='1' ,`MutedTime`='%d' WHERE `id` = '%d' LIMIT 1",PlayerData[playerid][MutedTime],PlayerData[playerid][ID]); 
        
mysql_tquery(SQLstr""""); 
        
SendClientMessage(playeridCOLOR_GREY"You have been auto-muted for spamming. You will be unmuted in 20 seconds.");     
        
SpamTimes[playerid] = 0;
        return 
0;   
    }  
    } else return 
SpamTimes[playerid] = 0
the problem is,i wanted to make if he writes messages too fast he`ll eventually get muted at the fifth message.

the problem is you get muted even if you write 5 messages with 1 hours between them.
Reply


Messages In This Thread
mute help anti spam - by PepsiCola23 - 02.02.2018, 16:15
Re: mute help anti spam - by Inn0cent - 04.02.2018, 16:48
Re: mute help anti spam - by PepsiCola23 - 04.02.2018, 16:55
Re: mute help anti spam - by Inn0cent - 04.02.2018, 17:02
Re: mute help anti spam - by Sew_Sumi - 04.02.2018, 17:04
Re: mute help anti spam - by Inn0cent - 04.02.2018, 17:06
Re: mute help anti spam - by RogueDrifter - 04.02.2018, 17:08

Forum Jump:


Users browsing this thread: 1 Guest(s)