20.02.2012, 16:34
OK, I've done it this way:
Writing PERMISSION_{permission} everytime in the command definition.
Hey, that's shorter then writing the following everytime:
And it's flexible enough to easily change the permission check code in the future.
Thanks for the helpful replies!
Writing PERMISSION_{permission} everytime in the command definition.
Код:
ACMD:makeadmin(playerid, params[], PERMISSION_COMMAND_MAKEADMIN)
Код:
CMD:makeadmin(playerid, params[]) { if (!HasPermission(playerid, PERMISSION_COMMAND_MAKEADMIN)) return COMMAND_PERMISSION_DENIED; // My code }
Thanks for the helpful replies!