09.05.2012, 22:08
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;
}