How to create admin levels
#8

Quote:
Originally Posted by Calg00ne
View Post
With zcmd:

pawn Code:
CMD:admincommand(playerid, params[]) {
   if(/* your admin level variable */ >= 3) {
      SendClientMessage(playerid, 0, "You can use this command, you're a level 3+ admin, but it does nothing other than send this message.");
   }
   return 1;
}
You need to replace '/* your admin level variable */' with the variable you created for admin levels.
My example was ZCMD.

Okay.

I will give you an example.


pawn Code:
if(PlayerInfo[playerid][pAdminLevel] >=1)
Do you see that? What that does it says, If the person who is trying to activate the command inst a admin level 1- what ever. He cannot use the command.

So, Annother command.

pawn Code:
CMD:flip(playerid,params[])
{
    if(PlayerInfo[playerid][pAdminLevel] >=1)
    {
        if (IsPlayerInAnyVehicle(playerid))
            {
                new VehicleID, Float:X, Float:Y, Float:Z;
                GetPlayerPos(playerid, X, Y, Z);
                VehicleID = GetPlayerVehicleID(playerid);
                SetVehiclePos(VehicleID, X, Y, Z);
                SetVehicleZAngle(VehicleID, 0);
                return 1;
            }
                else return SendClientMessage(playerid, 0xD8D8D8FF, "You are not in any vehicle");
         }
            else return SendClientMessage(playerid, COLOR_RED, " You are not allowed to use this command");
    }
This command says if the player isnt a admin, he cannot use the flip command and he will be sent a message saying "You are not allowed to use this command"
Reply


Messages In This Thread
How to create admin levels - by nilanjay - 02.08.2011, 16:57
Re: How to create admin levels - by Calgon - 02.08.2011, 16:59
Re: How to create admin levels - by nilanjay - 02.08.2011, 17:01
Re: How to create admin levels - by Shockey HD - 02.08.2011, 17:02
Re: How to create admin levels - by nilanjay - 02.08.2011, 17:03
Re: How to create admin levels - by Calgon - 02.08.2011, 17:03
Re: How to create admin levels - by nilanjay - 02.08.2011, 17:06
Re: How to create admin levels - by Shockey HD - 02.08.2011, 17:10
Re: How to create admin levels - by nilanjay - 02.08.2011, 17:10
Re: How to create admin levels - by nilanjay - 02.08.2011, 17:13
Re: How to create admin levels - by Calgon - 02.08.2011, 17:15
Re: How to create admin levels - by Tigerkiller - 02.08.2011, 17:16
Re: How to create admin levels - by Shockey HD - 02.08.2011, 17:16
Re: How to create admin levels - by Tigerkiller - 02.08.2011, 17:19
Re: How to create admin levels - by nilanjay - 02.08.2011, 17:20
Re: How to create admin levels - by Tigerkiller - 02.08.2011, 17:22
Re: How to create admin levels - by nilanjay - 02.08.2011, 17:38
Re: How to create admin levels - by Tigerkiller - 02.08.2011, 18:56

Forum Jump:


Users browsing this thread: 3 Guest(s)