Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

mute help anti spam

$
0
0
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.

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>