Admin command help D:
#10

pawn Код:
CMD:kick(playerid, params[])
{
    new giveid, reason[128];
    if(PData[playerid][Level] < 2) return SendClientMessage(playerid, COLOR_RED, "You are not authorized to perform this command.");
    else if(sscanf(params, "rs[128]", giveid, reason)) return SCM(playerid, yellow, "SYNTAX: /kick <name/id> <reason>");
    else if(giveid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "[ERROR] That player isn't online!");
    else
    {
        if(PData[giveid][Level] == 0)
        {
            new name2[MAX_PLAYER_NAME];
            GetPlayerName(giveid, name2, sizeof(name2));
            GetPlayerName(playerid, pname, sizeof(pname));
            format(str2, sizeof(str2), "%s was kicked by an Administrator. (REASON: %s)", name2, reason);
            MessagePlayers(red, str2);
            format(str2, sizeof(str2), "%s was kicked by %s. (REASON: %s)", name2, pname, reason);
            MessageAdmins(red, str2);
            format(str3, sizeof(str3),"{FFFFFF}Kick information:\r\n{FF0000}Kicked by:{FFFFFF} %s\r\n{FF0000}Reason:{FFFFFF} %s\r\n{FFFFFF}Feel free to rejoin!", pname, reason);
            ShowPlayerDialog(giveid, 13337, DIALOG_STYLE_MSGBOX, "{FF0000}You have been kicked.", str3, "Close", "");
            Kick(giveid);
        }
    }
    return 1;
}
pawn Код:
if(PData[giveid][Level] == 0)
Admins cannot be kicked, it shows only the message
Reply


Messages In This Thread
Admin command help D: - by vassilis - 02.11.2011, 13:58
Re: Admin command help D: - by KaleOtter - 02.11.2011, 14:05
Re: Admin command help D: - by SmiT - 02.11.2011, 14:06
Re: Admin command help D: - by SuperViper - 02.11.2011, 14:07
Re: Admin command help D: - by vassilis - 02.11.2011, 14:10
Re: Admin command help D: - by SmiT - 02.11.2011, 14:11
Re: Admin command help D: - by vassilis - 02.11.2011, 14:13
Re: Admin command help D: - by SmiT - 02.11.2011, 14:15
Re: Admin command help D: - by vassilis - 02.11.2011, 15:44
Re: Admin command help D: - by Kostas' - 02.11.2011, 16:08

Forum Jump:


Users browsing this thread: 2 Guest(s)