Player Kick
#1

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
Reply
#2

Try Adding SendClientMessage(playerid,string); After SendClientMessageToAll
Reply
#3

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);
}
Reply
#4

can you make

[PAWN]

[ /PAWN]

its easy than to read it
Reply
#5

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);
}
Reply
#6

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

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

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.
Reply
#9

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.
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)