17.01.2015, 09:31
Hey, I'm working on different commands, not just the one in the title and my problem is.
I can't set a specific level for the admin, I can only increase it by one.
I use ZCMD, sscanf, enumerators.
Basically I have an enum
PlayerInfo[playerid][pAdmin]
Up until now I just used the command like, if the player using it is PlayerInfo[playerid][pAdmin] >= 6
he'll set the other player ID(PID) an admin lvl ++
Like;
PlayerInfo[playerid][pAdmin]++;
However I want to make it so that it works like this:
/setadmin (playerid) (admin level(1-4)
But I don't know how to make it so that the Enum increases by a set number and not always by 1.
Help :/?
I can't set a specific level for the admin, I can only increase it by one.
I use ZCMD, sscanf, enumerators.
Basically I have an enum
PlayerInfo[playerid][pAdmin]
Up until now I just used the command like, if the player using it is PlayerInfo[playerid][pAdmin] >= 6
he'll set the other player ID(PID) an admin lvl ++
Like;
PlayerInfo[playerid][pAdmin]++;
However I want to make it so that it works like this:
/setadmin (playerid) (admin level(1-4)
But I don't know how to make it so that the Enum increases by a set number and not always by 1.
Help :/?