SA-MP Forums Archive
??? anti-spam aint working anymore - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: ??? anti-spam aint working anymore (/showthread.php?tid=262057)



??? anti-spam aint working anymore - Jimbo01 - 16.06.2011

Код:
	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 ?


Re: ??? anti-spam aint working anymore - Simon - 16.06.2011

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


Re: ??? anti-spam aint working anymore - Jimbo01 - 16.06.2011

Код:
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