28.01.2015, 20:04
I want to create a help command with different categories.
If you type help without params it says the categories.
If you type help with any of the params it will say all commands for that category.
I tried something, but it didn't work.
When I type /help general, then the SendClientMessage messages doesn't show up, but it doesn't say that the command isn't recognized.
If you type help without params it says the categories.
If you type help with any of the params it will say all commands for that category.
I tried something, but it didn't work.
pawn Код:
CMD:help(playerid, params[])
{
if (isnull(params))
{
SendClientMessage(playerid, COL_LIGHTBLUE, ".:| Help |:.");
SendClientMessage(playerid, COL_ORANGE, "How to use: /Help [NAME]");
SendClientMessage(playerid, COL_ORANGE, "General|Vehicle|Player|Properties");
SendClientMessage(playerid, COL_LIGHTBLUE, ".:| Help |:.");
}
else if (params == "general")
{
SendClientMessage(playerid, COL_LIGHTBLUE, ".:| General help |:.");
SendClientMessage(playerid, COL_ORANGE, "Helpme");
SendClientMessage(playerid, COL_LIGHTBLUE, ".:| General help |:.");
}
return 1;
}