What is this?
#1

Hello,
What is "help" parameter on YCMD?
I've command like this:
Код:
YCMD:givemoney(playerid, params[], help)
{
	if(help)
	{
		SCM(playerid, "Give player money", "HELP");
		return 1;
	}
        // Other code ...
}
I don't know what is help mean on third argument, and i can't access it with any command.
Can anyone tell me what is that?
Sorry for my bad english.
Reply
#2

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.
Reply
#3

Quote:
Originally Posted by Vince
Посмотреть сообщение
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.
No, when i use /help givemoney it gives an unknown command, and /givemoney help give me message :
Код:
"Usage: /givemoney <playerid> <value>"
because params on sscanf.
Reply
#4

This in an example:
pawn Код:
YCMD:weapons(playerid, params[], help)
{
    if (help) return SendClientMessage(playerid, -1, "Displays a menu for a weapon shop.");

    // code..
    return 1;
}
And here's a quote about /help command:
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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)