Admin lvl .?
#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


Messages In This Thread
Admin lvl .? - by Stop - 31.08.2016, 12:31
Re: Admin lvl .? - by Shinja - 31.08.2016, 12:34
Re: Admin lvl .? - by jlalt - 31.08.2016, 12:56
Re: Admin lvl .? - by Stop - 31.08.2016, 13:04
Re: Admin lvl .? - by jlalt - 31.08.2016, 13:09
Re: Admin lvl .? - by Stop - 31.08.2016, 13:34

Forum Jump:


Users browsing this thread: 1 Guest(s)