[HELP] String errors..
#7

Whole Code thing with additions like string[100]

pawn Код:
if(strfind(cmdtext, "|", true) != -1)
    {
        SendClientMessageEx(playerid, COLOR_RED, "You cannot use the '|' character in commands.");
        return 0;
    }
        new string[100];
        if(strfind(cmdtext, "duffelswithbags", true) != -1)
        format(string, sizeof(string), "AdmCmd: %s has been auto-banned, reason: Trying to /duffelswithbags... <-- dumbass", GetPlayerNameEx(playerid));
        ABroadCast(COLOR_YELLOW,string,2);
 {
    PlayerInfo[playerid][pBanned] = 1;
    new ip[32];
    GetPlayerIp(playerid,ip,sizeof(ip));
    AddBan(ip);
    Kick(playerid);
                return 1;
        return 1;
    }

    if(PlayerInfo[playerid][pAdmin] < 1)
    {
        if(strfind(cmdtext, ":", true) != -1)
        {

            new
                i_numcount,
                i_period,
                i_pos;

            while(cmdtext[i_pos]) {
                if('0' <= cmdtext[i_pos] <= '9') i_numcount++;
                else if(cmdtext[i_pos] == '.') i_period++;
                i_pos++;
            }
            if(i_numcount >= 8 && i_period >= 5) {
                new string[128];
                format(string,sizeof(string),"Warning: %s may be server advertising: '%s'.", GetPlayerNameEx(playerid),cmdtext);
                SendAdminMessage(COLOR_RED, string);
                return 0;
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread
[HELP] String errors.. - by Oscii - 09.05.2012, 21:01
Re: [HELP] String errors.. - by ViniBorn - 09.05.2012, 21:11
Re: [HELP] String errors.. - by Oscii - 09.05.2012, 21:30
Re: [HELP] String errors.. - by ViniBorn - 09.05.2012, 21:35
Re: [HELP] String errors.. - by Oscii - 09.05.2012, 21:51
Re: [HELP] String errors.. - by Face9000 - 09.05.2012, 22:07
Re: [HELP] String errors.. - by Oscii - 09.05.2012, 22:08
Re: [HELP] String errors.. - by ViniBorn - 09.05.2012, 22:14
Re: [HELP] String errors.. - by Face9000 - 09.05.2012, 22:17
Re: [HELP] String errors.. - by Snipa - 09.05.2012, 22:41

Forum Jump:


Users browsing this thread: 2 Guest(s)