Admin lvl .? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Admin lvl .? (
/showthread.php?tid=616097)
Admin lvl .? -
Stop - 31.08.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
Re: Admin lvl .? -
Shinja - 31.08.2016
Add "Level" to enum _player
and use it like
PHP код:
Player[playerid][Level]
Re: Admin lvl .? -
jlalt - 31.08.2016
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;
}
Re: Admin lvl .? -
Stop - 31.08.2016
What .? Can you put those line at my ...? script
Re: Admin lvl .? -
jlalt - 31.08.2016
here you go
http://pastebin.com/rvrcdd6p
Re: Admin lvl .? -
Stop - 31.08.2016
thnx but how to this in this CMD

etlevel.? + it will have in my Scriptfile USer.? if player will be admin .?