- 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:
pawn Код:
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;
}