Анти ip спам в чате

Moderator: SJplayer

Александр
Topic author
Avatar
Александр
Topic author
Reputation: 0
Posts: 3
Joined: 15 May 2013
With us: 6 years 2 months

#1by Александр » 15 May 2013, 12:51

Ищем public OnPlayerText(playerid, text[]) и в начало втравляем:

Code: Select all

for(new txt=0;txt<256;txt++)if(txt=='1'||txt=='2'||txt=='3'||txt=='4'||txt=='5'||txt=='6'||txt=='7'||txt=='8'||txt=='9'||txt=='0'){  
SetPVarInt(playerid,"Text",GetPVarInt(playerid,"Text")+1);  
if(
GetPVarInt(playerid,"Text")==10){  
SendClientMessage(playerid,-1,"Вы слижком много использовали цифр.");  
return 
false;}}  
//После как игрок напишет в текст ставим ему.  
SetPVarInt(playerid,"Text",0);  
 

Вот и все.

Автор-legenda

! ! !


Return to “Античиты”