31.05.2015, 14:01
This in an example:
And here's a quote about /help command:
pawn Код:
YCMD:weapons(playerid, params[], help)
{
if (help) return SendClientMessage(playerid, -1, "Displays a menu for a weapon shop.");
// code..
return 1;
}
Quote:
Originally Posted by ******
Help - The command system, as shown above, has inbuilt support for a help system. You define the help for a command with that command, making managing your script VASTLY easier. To use this feature from your help command simply do something like:
Код:
YCMD:help(playerid, params[], help) { if (help) { SendClientMessage(playerid, 0xFF0000AA, "Displays help about your mode."); } else { if (isnull(params)) { new str[128]; SendClientMessage(playerid, 0xFF0000AA, "Welcome to my mode."); format(str, sizeof (str), "Type \"/%s [command]\" for more help on a command", Command_GetDisplayNamed("help", playerid)); SendClientMessage(playerid, 0xFF0000AA, str); } else { Command_ReProcess(playerid, params, true); } } return 1; } |