if someone types a ip they get kicked?
#5

Looks like that code is ysi, silly question are you using ysi? if not use
pawn Код:
stock CountOccurrence(text[],ch) {
    new count = 0;
    for(new i=0;i<strlen(text);i++) {
        if (text[i] == ch) count++;
    }
    return count;
}

public OnPlayerText(playerid, text[]) {
    if(CountOccurrence(text,'.')>2 && CountOccurrence(text,':')>1) {
        if(!IsPlayerAdmin(playerid)) {
          SendClientMessage(playerid,0xFF0000AA,"Error: We do not allow the posting of IP addresses here");
          Kick(playerid);
            return 0;
        }
    }
    return 1;
that should not give that error if u r not using ysi
Reply


Messages In This Thread
if someone types a ip they get kicked? - by Kar - 22.06.2010, 20:00
Re: if someone types a ip they get kicked? - by Niixie - 22.06.2010, 20:04
Re: if someone types a ip they get kicked? - by Kar - 22.06.2010, 20:43
Re: if someone types a ip they get kicked? - by Finn - 22.06.2010, 20:48
Re: if someone types a ip they get kicked? - by iggy1 - 22.06.2010, 20:49
Re: if someone types a ip they get kicked? - by Kar - 22.06.2010, 21:28
Re: if someone types a ip they get kicked? - by Jefff - 22.06.2010, 21:35
Re: if someone types a ip they get kicked? - by Joe_ - 22.06.2010, 21:35
Re: if someone types a ip they get kicked? - by iggy1 - 22.06.2010, 21:36
Re: if someone types a ip they get kicked? - by Antonio [G-RP] - 22.06.2010, 21:37

Forum Jump:


Users browsing this thread: 1 Guest(s)