10.09.2013, 15:16
(
Последний раз редактировалось NathNathii; 10.09.2013 в 15:51.
)
// Fixed, thanks.
static szText[128], numerosNochat, pontosNochat, j;
numerosNochat = -1, pontosNochat = -1, j = 0, szText[0] = EOS;
for(new i; text[i]; i++) {
if(text[i] >= '0' && '9' >= text[i] || (text[i] == '.' || text[i] == ':')) {
if(text[i] == '.' || text[i] == ':') pontosNochat++;
else numerosNochat++;
if(numerosNochat >= 8 && pontosNochat >= 3) {
new Name[MAX_PLAYER_NAME], Msg[130];
APlayerData[playerid][BanTime] = 2147483640;
SendClientMessage(playerid, 0x808080FF, "You have been banned! - Reason: Attempted to advertise!");
GetPlayerName(playerid, Name, sizeof(Name));
format(Msg, 128, "{FF0000}%s has been banned - Reason: Attempted to advertise", Name);
SendClientMessageToAll(0xFF0000FF, Msg);
Kick(playerid);
#if defined INVALID_CHAT_BLOCK
return false;
#else
break;
#endif
}
}
Kick(playerid);
GetPlayerName(playerid, Name, sizeof(Name));
format(Msg, 128, "{FF0000}%s has been banned - Reason: Attempted to advertise", Name);
SendClientMessageToAll(0xFF0000FF, Msg);
SetTimerEx("KickDelay", 1000, 0, "i", playerid); // At the end of your script above.
// And this at the end of your whole script.
forward KickDelay(playerid);
public KickDelay(playerid)
{
Kick(playerid);
return 1;
}