Cant Ban Admin.
#5

You answered your own question.

pawn Код:
if(IsPlayerAdmin(changethistoyourTARGETvariable)) return 0;

Here I'll make you a quick CMD.

pawn Код:
CMD:ban(playerid,params[])
{
    if(IsPlayerAdmin(playerid))
    {
        new target;
        if(sscanf(params,"u",target)) return SendClientMessage(playerid,-1,"/ban id/partofname"); // Checking if the TARGET is a valid player.
        if(!IsPlayerConnected(target)) return 0; // If the target isn't online this command will stop.
        if(IsPlayerAdmin(target)) return SendClientMessage(playerid,-1,"You can't ban an RCON administrator."); // If the entered ID is an RCON logged in admin you can't ban him.
        if(target == playerid) return SendClientMessage(playerid,-1,"You can't ban yourself.");
        Ban(target);
    }
}
If I am missed something I am sorry as I said it's a quick CMD.
Reply


Messages In This Thread
Cant Ban Admin. - by Akcent_Voltaj - 27.07.2014, 13:51
Re: Cant Ban Admin. - by SHE790 - 27.07.2014, 13:54
Re: Cant Ban Admin. - by Akcent_Voltaj - 27.07.2014, 13:55
Re: Cant Ban Admin. - by sammp - 27.07.2014, 13:58
Re: Cant Ban Admin. - by DaniceMcHarley - 27.07.2014, 14:29
Re: Cant Ban Admin. - by Threshold - 27.07.2014, 14:37
Re: Cant Ban Admin. - by Akcent_Voltaj - 31.07.2014, 01:05
Re: Cant Ban Admin. - by Akcent_Voltaj - 31.07.2014, 01:12
Re: Cant Ban Admin. - by Stanford - 31.07.2014, 02:07

Forum Jump:


Users browsing this thread: 1 Guest(s)