YCMD:givemoney(playerid, params[], help) { if(help) { SCM(playerid, "Give player money", "HELP"); return 1; } // Other code ... }
It's probably activated if you use /help givemoney or /givemoney help or something like that. Never used YCMD so can't say for sure.
|
"Usage: /givemoney <playerid> <value>"
YCMD:weapons(playerid, params[], help)
{
if (help) return SendClientMessage(playerid, -1, "Displays a menu for a weapon shop.");
// code..
return 1;
}
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; } |