31.08.2016, 12:56
according to your script you can do this define
and use this function on your commands to check if player is admin
example:
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;\
}
PHP код:
IsPlayerLevel(level, playerid);
PHP код:
CMD:ban(playerid, params[])
{
IsPlayerLevel(4, playerid);
//....
return 1;
}
