04.10.2016, 22:51
I did not understand how to use the flags
I have a player enum data, obtaining data from mysql
if I want to see if a user is not an administrator used a command as you would?
Good? or have a problem?
Sorry my bad english
I have a player enum data, obtaining data from mysql
if I want to see if a user is not an administrator used a command as you would?
Quote:
enum Datainfo { Admin } new PlayerInfo[MAX_PLAYERS][Datainfo]; public OnPlayerCommandReceived (playerid, cmd[], params[], flags) { if ((flags & CMD_ADMIN) && !PlayerInfo[playerid][Admin]) return SendClientMessage(playerid, x0FF0000FF, "Not Authorized"); return 1; } |
Sorry my bad english