/ban CMD
#4

pawn Код:
CMD:ban(playerid,params[])

{
    new Target,Reason;
    if(!sscanf(params,"us[124]",Target,Reason))
    {
        if(IsPlayerConnected(Target))
        {
            if(pInfo[Target][Admin] > pInfo[playerid][Admin])
            {
                SendClientMessage(playerid,-1,"WARNING: An error occured. [Reason: Banning higher level admins is forbidden.");
            }
            else
            {
                new String[124],Name[MAX_PLAYER_NAME];
                GetPlayerName(Target,Name,sizeof(Name));
                format(String,sizeof(String),"%s has been banned. [Reason: %s]",Name,Reason);
                SendClientMessageToAll(-1,String);
                Ban(Target);
            }
        }
        else
        {
            SendClientMessage(playerid,-1,"WARNING: An error occured. [Reason: Player is not connected.");
        }
    }
    else
    {
        SendClientMessage(playerid,-1,"USAGE: /Ban [Playerid] [Reason]");
    }
    return 1;
}
Reply


Messages In This Thread
/ban CMD - by Louris - 20.11.2012, 15:55
Re: /ban CMD - by vernz - 20.11.2012, 15:56
Re: /ban CMD - by Louris - 20.11.2012, 16:00
Re: /ban CMD - by tyler12 - 20.11.2012, 16:02
Re: /ban CMD - by vernz - 20.11.2012, 16:02
Re: /ban CMD - by Anthony © - 20.11.2012, 16:08
Re: /ban CMD - by gtakillerIV - 20.11.2012, 16:09
Re: /ban CMD - by Louris - 20.11.2012, 16:54
Re: /ban CMD - by Bicentric - 20.11.2012, 16:59
Re: /ban CMD - by Louris - 20.11.2012, 17:08

Forum Jump:


Users browsing this thread: 1 Guest(s)