[Ajuda] Bug
#6

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, message[])
{
    SendClientMessage(playerid, 0xFF4444FF, 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, "You have been kicked.");
        return 1;
    }
    return 0;
}
//by Kye
Kick - SA-MP Wiki
Reply


Messages In This Thread
Bug - by Th4 L&noN! - 02.03.2013, 02:09
Re: Bug - by SeV_ - 02.03.2013, 02:14
Re: Bug - by Delete_ - 02.03.2013, 02:18
Re: Bug - by HumildadeAgain - 02.03.2013, 03:15
Re: Bug - by Delete_ - 02.03.2013, 03:30
Re: Bug - by Nill.Oliveira - 02.03.2013, 04:00
Re: Bug - by paulor - 02.03.2013, 11:22

Forum Jump:


Users browsing this thread: 1 Guest(s)