08-22-2009, 02:46 PM
Hello, I have looked at it and it seems that I'm doing it wrong.
I tried to add it but it failed. I really don't know what to do.
This are my codes where I set the timer:
I'm sure I did it wrong. See This under OnPlayerText:
If I type 5 lines I will be kicked. I'm currently testing it in my own server which I can't get it online.
NO ERRORS/WARNINGS found...
I tried to add it but it failed. I really don't know what to do.
This are my codes where I set the timer:
Code:
public OnPlayerConnect(playerid) {
SetTimerEx("Chat", 5000, false, "is", 1, "string to pass");
SendClientMessage(playerid, yellow, "Welcome. To see the new commands that are added in CAS, use /mycolor help");
return 1;
}I'm sure I did it wrong. See This under OnPlayerText:
Code:
Chat[playerid]++;
if(Chat[playerid] == 5) {
new playername[MAX_PLAYER_NAME],
string[128];
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "%s has been kicked from the game. (Reason: Spam)", playername);
SendClientMessageToAll(yellow, string);
SendClientMessage(playerid, COLOR_GREEN1, "------------------------");
SendClientMessage(playerid, red, "You have been kicked");
SendClientMessage(playerid, red, "Reason: Spam");
SendClientMessage(playerid, red, "Kicked by: Anti-spam");
SendClientMessage(playerid, COLOR_GREEN1, "------------------------");
Kick(playerid);
}
return 1;
}If I type 5 lines I will be kicked. I'm currently testing it in my own server which I can't get it online.
NO ERRORS/WARNINGS found...
![[Image: default.png]](http://module.game-monitor.com/94.23.26.10:8350/image/default/default.png)