01.07.2013, 11:07
So I have made an Anti-Server Advertise but I can't make it possible for someone that is not Level 2 Admin and less to write http://etc etc.I want it possible to write http:// as I need it for my Boombox system.Can anyone help me?Here is the code:
pawn Код:
if(PlayerInfo[playerid][pAdmin] < 2) {
if(strfind(text, ":", true) != -1) {
new
i_numcount,
i_period,
i_pos;
while(text[i_pos]) {
if('0' <= text[i_pos] <= '9') i_numcount++;
else if(text[i_pos] == '.') i_period++;
i_pos++;
}
if(i_numcount >= 8 && i_period >= 3) {
format(string,sizeof(string),"Warning: %s may be server advertising: '%s'.", GetPlayerNameEx(playerid),text);
SendAdminMessage(COLOR_RED, string);
return 0;
}
}
}