??? anti-spam aint working anymore
#1

Код:
	SetPVarInt(playerid,"textspam",GetPVarInt(playerid,"textspam")+1);
	SetTimerEx("clearspam",5000,false,"d",playerid);
	if(GetPVarInt(playerid,"textspam") == 5) {
		new string[128];
		new tname[MAX_PLAYER_NAME];
		GetPlayerName(playerid,tname,sizeof(tname));
		format(string,sizeof(string),"AdmCmd: %s was kicked. Reason: spamming", tname,playerid);
		SendClientMessageToAll(COLOR_RED,string);
  		CallRemoteFunction("KickIncrease","d",playerid);
		Kick(playerid);
	}
	return 1;
}
It was working perfect.. but then it stopped to work ? why ? Did any sa:mp functions changed ?
Reply
#2

What is not exactly working? Post the rest of the code in that callback, KickIncrease(playerid) and clearspam(playerid) functions.
Reply
#3

Код:
forward clearspam(playerid);
public clearspam(playerid)
{
	SetPVarInt(playerid,"textspam",0);
}
KickIncrease(playerid) ?? i never had it and it was working without it


It dont kick's the player if he/she spams
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)