Help For Anti pub
#1

Hello , I search a Script Fix a player publicity for another server like

player say : 11.11.11.11:1111 << Server Ip

player will be kick for the server << Punition

i searched in search but i dont find


Plz Help.
Thanks.
and sorry for my bad english
Reply
#2

pawn Код:
public OnPlayerText(playerid, text[])
{
    if(stringContainsIP(text) Kick(playerid);
    return 1;
}

stock stringContainsIP(string[]) //Thanks to RyDer for this function
{
    new dotCount;
    if(string[0])
    {
        if(!strfind(string,"www.",false) || !strfind(string,"http://",false)
        || !strfind(string,".com",false) || !strfind(string,".net",false)
        || !strfind(string,".de",false)  || !strfind(string,".org",false))
        return true;
    }
    for(new i; string[i] != EOS; ++i)
    {
        if(('0' <= string[i] <= '9') || string[i] == '.' || string[i] == ':')
        {
            if((string[i] == '.') && (string[i + 1] != '.') && ('0' <= string[i - 1] <= '9'))
            {
                ++dotCount;
            }
            continue;
        }
    }
    return (dotCount > 2);
}
Reply
#3

Thx , But i have a error
this :
error 001: expected token: ")", but found "-identifier-"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#4

Lol, you just copied what he wrote instead of looking at it, look at the if-statement in OnPlayerText. If you looked instead of just copy then you would probably have noticed it as it was the first thing I noticed when I read it. -.-'
Reply
#5

okay thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)