19.02.2012, 21:08
Код:
Under OnPlayerText if(stringContainsIP(text)) { new string[128] ; GetPlayerName(playerid, string, 20); format(string, sizeof(string), "[!] \"%s\" named player has been banned from the server! [Reason: IP advertisements]", string); SendClientMessageToAll(0xFFFFFFFF, string); return Ban(playerid), false; } //anywhere stock stringContainsIP(string[]) { new dotCount ; 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); } this func by Ryder` :D