Hi, can someone here help me ?? This script have an system to auto kick player who flooding on mainchat. I dont like that system, so can someone here help me to change the system from autokick to auto muted for 60 minutes. Below the script i give to you who want to help me :D Thanks a lot.
Code:
new count = GetTickCount2();
if (count-cflood[playerid][1] < 1000) {
cflood[playerid][0] ++;
if (cflood[playerid][0] == 5) {
if (cdata[playerid][2] == 0 || text[0] == '!') {
printf("[chat] [%s]: %s", playername, text);
}
else {
GetPlayerName(cdata[playerid][0], string, MAX_PLAYER_NAME);
printf("[phonecall] [%s - %s]: %s", playername, string, text);
}
cflood[playerid][0] = 0;
SendClientMessage2(playerid, COLOR_WHITE, "~ You have been auto kicked for flooding.");
pkicktimer[playerid] = SetTimerEx("KickBanTimer", 50, 0, "dd", playerid, 1);
format(string, 128, "~ %s has been auto kicked from the server (Flooding).", playername);
SendClientMessageToAll2(COLOR_WHITE, string);
printf("[kicked] %s has been auto kicked from the server (Flooding).", playername);
return 0;
}
}
else
{
cflood[playerid][0] = 1;
}
cflood[playerid][1] = count;