SA-MP Forums Archive
Kick - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP (https://sampforum.blast.hk/forumdisplay.php?fid=3)
+--- Forum: Client Support (https://sampforum.blast.hk/forumdisplay.php?fid=16)
+--- Thread: Kick (/showthread.php?tid=446544)



Kick - Chris_Morrison - 26.06.2013

Guys, Every server I play when I get kicked banned or stuff like that the reason isn't showing up


Re: Kick - Vin Diesel - 26.06.2013

This Problem Not in you its Script problems i fixed that problems on my script and some others did


Re: Kick - Chris_Morrison - 26.06.2013

Quote:
Originally Posted by Vin Diesel
Посмотреть сообщение
This Problem Not in you its Script problems i fixed that problems on my script and some others did
LS-RP NG-RP PR-RP everyone has it, I think something is wrong here


Re: Kick - MarTaTa - 26.06.2013

Quote:
Originally Posted by Chris_Morrison
Посмотреть сообщение
LS-RP NG-RP PR-RP everyone has it, I think something is wrong here
Because of the new update, it kicks you before it display the reason.
It's simply being fixed with 1 second timer. That's the solution

EDIT: Btw I've notieced on NGG servers, that they've added 3 - 4 secs timer, which is a bit annoying, 1 sec or max 2 is enough


Re: Kick - Anak - 26.06.2013

Here you go
pawn Код:
//In order to display a message (eg. reason) for the player before the connection is closed you have to use a delay:
 
forward KickPublic(playerid);
public KickPublic(playerid) { Kick(playerid); }
 
stock KickWithMessage(playerid, color, message[])
{
    SendClientMessage(playerid, color, message);
    SetTimerEx("KickPublic", 1000, 0, "d", playerid);   //Delay of 1 second before kicking the player so he recieves the message
}
 
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/kickme", true) == 0)
    {
        //Kicks the player who the executed this command
        KickWithMessage(playerid, 0xFF0000FF, "You have been kicked.");
        return 1;
    }
    return 0;
}