27.07.2014, 13:51
hi how can I make so admins cant ban them.. only isplayeradmin can ban them!plz help.
if(pInfo[playerid][Admin] < pInfo[id][Admin]) return SendClientMessage(playerid, COLOR_RED,"You cannot use this command on higher admin!");
if(IsPlayerAdmin(changethistoyourTARGETvariable)) return 0;
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(PlayerInfo[targetid][pAdmin] && !IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Only RCON Administrators can ban other Administrators.");
pawn Код:
|
if(!strcmp(ReturnName(playerid), "ALEX", false))