04.11.2016, 14:12
(
Последний раз редактировалось Yashas; 06.11.2016 в 18:03.
)
Update:
v0.3 beta November 4th
Adds command states/modes
View the include
This update requires you to return CMD_SUCCESS/CMD_FAILURE in all the commands to avoid tag mismatch warnings.
v0.3 beta November 4th
Adds command states/modes
View the include
This update requires you to return CMD_SUCCESS/CMD_FAILURE in all the commands to avoid tag mismatch warnings.
Код:
CMD:report[help](cmdid, playerid, params[]) return SendClientMessage(playerid, -1, "Reports the player to an administrator."); CMD:report(cmdid, playerid, params[]) {...} CMD:pm[help](cmdid, playerid, params[]) return SendClientMessage(playerid, -1, "Sends a private message to the given player."); CMD:pm(cmdid, playerid, params[]) {...} CMD:help[help](cmdid, playerid, params[]) return SendClientMessage(playerid, -1, "Access server help topics."); CMD:help(cmdid, playerid, params[]) { new success; ExecuteCommand(params, "help", playerid, success, ""); switch(success) { case INVALID_COMMAND_ID: return SendClientMessage(playerid, RED, "The specified command does not exist."); case cellmin: return SendClientMessage(playerid, RED, "The specified command does not have a help description."); case 0: return SendClientMessage(playerid, RED, "Oops! Failed to fetch the description of the given command."); //case 1: handled by the command which was executed, i.e: a description message was sent to the player } return CMD_SUCCESS; }