SA-MP Forums Archive
Spam - 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)
+--- Thread: Spam (/showthread.php?tid=438826)



Spam - CurlyPwn - 22.05.2013

it kicks the player but doesnt show him why and also it shows the other players but spams them how i make it show up only once, also it says Has been kicked....... and doesnt say the players name. can someone help sorry

Quote:

if(gPlayerLogTries[playerid] == 3)
{
new string[128];
format(string, sizeof(string), "%s has been kicked for 3 incorrect password attemps.");
SendClientMessageToAll(0xF81414, string);
Kick(playerid);




Re: Spam - Xoomer - 22.05.2013

this should work

pawn Код:
if(gPlayerLogTries[playerid] == 3)
{
new string[128];
new name[MAX_PLAYER_NAME+1];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s has been kicked for 3 incorrect password attemps.",name);
SendClientMessageToAll(0xF81414, string);
Kick(playerid);



Re: Spam - CurlyPwn - 22.05.2013

The name bit works but the spamming still happens


Re: Spam - Xoomer - 22.05.2013

change this
pawn Код:
new string[256];



Re: Spam - CurlyPwn - 22.05.2013

Still does it but less then before


Re: Spam - Dj_maryo1993 - 22.05.2013

pawn Код:
if(gPlayerLogTries[playerid] == 3)
{
new string[128];
new name[MAX_PLAYER_NAME+1];
gPlayerLogTries[playerid] =0;
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s has been kicked for 3 incorrect password attemps.",name);
SendClientMessageToAll(0xF81414, string);
SetTimerEx("KickEx", 500, false, "i", playerid);
As for the not showing text problem
pawn Код:
forward KickEx(playerid);
public KickEx(playerid)
{
 Kick(playerid);
}



Re: Spam - CurlyPwn - 22.05.2013

Its weird still doesnt show the text to the player the spamming stop