Posts: 83
Threads: 44
Joined: Apr 2016
hello guys i have a gamemode in that there is gang system + registration/login ..... but guys i cant create admin cmd with level so you can just ........ make level of enum and do all ..... and just i will make admin cmd only you make those level ....... and tell me what i have to put while makeCMD mean iike this cod..... CMD:GOD
If(playeradminlvl<3 ... something this code telll me and create those level in gamemode please
pastebin
http://pastebin.com/KvkTMR0a
Posts: 1,266
Threads: 6
Joined: Oct 2014
according to your script you can do this define
PHP код:
#define IsPlayerLevel(%0,%1);\
if(PlayerInfo[%1][pAdmin] < %0) {\
new LevelString[128];\
format(LevelString, sizeof LevelString,"ERROR: You need to be administrator level %d to use this command!",%0);\
SendClientMessage(%1, -1, LevelString);\
return 1;\
}
and use this function on your commands to check if player is admin
PHP код:
IsPlayerLevel(level, playerid);
example:
PHP код:
CMD:ban(playerid, params[])
{
IsPlayerLevel(4, playerid);
//....
return 1;
}
Posts: 83
Threads: 44
Joined: Apr 2016
What .? Can you put those line at my ...? script
Posts: 1,266
Threads: 6
Joined: Oct 2014
Posts: 83
Threads: 44
Joined: Apr 2016
thnx but how to this in this CMD
etlevel.? + it will have in my Scriptfile USer.? if player will be admin .?