Admin lvl .?
#1

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
Reply
#2

Add "Level" to enum _player
and use it like
PHP код:
Player[playerid][Level
Reply
#3

according to your script you can do this define
PHP код:
#define IsPlayerLevel(%0,%1);\
    
if(PlayerInfo[%1][pAdmin] < %0) {\
        new 
LevelString[128];\
        
format(LevelStringsizeof LevelString,"ERROR: You need to be administrator level %d to use this command!",%0);\
        
SendClientMessage(%1, -1LevelString);\
        return 
1;\
    } 
and use this function on your commands to check if player is admin
PHP код:
IsPlayerLevel(levelplayerid); 
example:
PHP код:
CMD:ban(playeridparams[])
{
    
IsPlayerLevel(4playerid);
    
//.... 
    
return 1;

Reply
#4

What .? Can you put those line at my ...? script
Reply
#5

here you go
http://pastebin.com/rvrcdd6p
Reply
#6

thnx but how to this in this CMDetlevel.? + it will have in my Scriptfile USer.? if player will be admin .?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)