Player reconnect after Kick() in OnPlayerConnect()
#7

robintjeh,
Code:
CMD:kick(playerid, params[])
{
    if(IsPlayerAdmin(playerid) == 0)
        return 0;

	new player,
        powod[64]; //powod == reason
        
    if(sscanf(params, "ds[64]", player, powod))
        return SCM(playerid, 0xFFFFFFFF, "/kick [id] [powуd]");

    if(!IsPlayerConnected(player) || IsPlayerNPC(player))
        return SCM(playerid, 0xEE0000FF, "Ten gracz nie jest podłączony!");

	format(str, sizeof str, "Gracz {D9D9D9}%s{EE0000} zostal wyrzucony przez administratora {D9D9D9}%s{EE0000}.", PlayerName(player),PlayerName(playerid));
    SCM_All(0xEE0000FF, str);
    format(str, sizeof str, "Powуd: {D9D9D9}%s", powod);
    SCM_All(0xEE0000FF, str);
	Kick(player);
    return 1;
}
This can be tested by giving the function Kick () in the loop.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)