SA-MP Forums Archive
Player Kick - 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: Player Kick (/showthread.php?tid=439001)



Player Kick - CurlyPwn - 23.05.2013

Quote:

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(0xFF0000FF, string);
SetTimerEx("KickEx", 500, false, "i", playerid);
}

its doesnt show the player getting kicked but it shows the other players


Re: Player Kick - mahdi499 - 23.05.2013

Try Adding SendClientMessage(playerid,string); After SendClientMessageToAll


Re: Player Kick - DaRk_RaiN - 23.05.2013

Am pretty sure that 500 ms for the timer isn't enough, i had the same problem, make it 1000 and everything should work fine
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(0xFF0000FF, string);
SetTimerEx("KickEx", 1000, false, "i", playerid);
}



Re: Player Kick - Guest123 - 23.05.2013

can you make

[PAWN]

[ /PAWN]

its easy than to read it


Re: Player Kick - CurlyPwn - 23.05.2013

None Worked

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(0xFF0000FF, string);
SetTimerEx("KickEx", 500, false, "i", playerid);
}



Re: Player Kick - CurlyPwn - 23.05.2013

None Worked How i make it show to the player that got banned?


AW: Player Kick - HurtLocker - 23.05.2013

did you add these lines? :
pawn Код:
forward KickEx(playerid);
public KickEx(playerid)
{
Kick(playerid);
}



Re: Player Kick - Revo - 23.05.2013

Could you show us the KickEx function.
Also, you definitely want to use a timer >800ms to cover up for that. 500 is slightly too little.


AW: Re: Player Kick - HurtLocker - 23.05.2013

Quote:
Originally Posted by Revo
Посмотреть сообщение
Also, you definitely want to use a timer >800ms to cover up for that. 500 is slightly too little.
There's no problem with that. Even if you enter a 50 ms timer, the message is sent.


Re: AW: Re: Player Kick - Revo - 23.05.2013

Quote:
Originally Posted by HurtLocker
Посмотреть сообщение
There's no problem with that. Even if you enter a 50 ms timer, the message is sent.
It is sent, but at times not received in time.

I remember testing it a while ago and 800 ms seemed to be an accurate number to go from.