zcmd kick command
#9

pawn Код:
COMMAND:kick(playerid, params[])
{
    new pid, reason[105];
    if(PlayerInfo[playerid][pAdminlevel] >= 1) return SendClientMessage(playerid, 0xAAAAAAAA, "You are not admin or the required level.");
    if(sscanf(params, "uS(No Reason Given)[128]", pid, reason)) return SendClientMessage(playerid,  0xFFFFFFFF, "/kick [playerid/name] [reason]");
    if(IsPlayerConnected(pid) && pid != INVALID_PLAYER_ID && pid != playerid)
    {
        new adminname[MAX_PLAYER_NAME], paramname[MAX_PLAYER_NAME], string[180];
        GetPlayerName(pid, paramname, sizeof(paramname));
        GetPlayerName(playerid, adminname, sizeof(adminname));
        format(string, sizeof(string), "%s has been kicked by %s for: %s", paramname, adminname, reason);
        SendClientMessageToAll(AdminColor, string);
        Kick(pid);
    }
    else return SendClientMessage(playerid, 0xFFFFFFFF, "This player is not connected Or Is Yourself.");
    return 1;
}
Edit: i've added optnl reason.
Reply


Messages In This Thread
zcmd kick command - by Omecken - 23.02.2011, 10:16
Re: zcmd kick command - by XFlawless - 23.02.2011, 10:20
Re: zcmd kick command - by Omecken - 23.02.2011, 10:23
Re: zcmd kick command - by Gh0sT_ - 23.02.2011, 10:29
Re: zcmd kick command - by Omecken - 23.02.2011, 10:38
Re: zcmd kick command - by DevilG - 23.02.2011, 10:53
Re: zcmd kick command - by Omecken - 23.02.2011, 10:55
Re: zcmd kick command - by xir - 23.02.2011, 11:01
Re: zcmd kick command - by HyperZ - 23.02.2011, 12:47

Forum Jump:


Users browsing this thread: 3 Guest(s)