05.07.2012, 17:42
I use this for usage/syntax messages:
(it could probably be made better with string concatenation or something but I made this about a year ago and it works so yeah)
Consistency is good.
Usage of usage:
pawn Код:
stock ShowSyntax(playerid, cmd[], func[], example[]="")
{
new syntax[144];
format(syntax, sizeof(syntax), "USAGE: {FFFFFF}%s", cmd);
SendClientMessage(playerid, COLOR_RED, syntax);
format(syntax, sizeof(syntax), "FUNCTION: {FFFFFF}%s", func);
SendClientMessage(playerid, COLOR_ORANGE, syntax);
if(!isnull(example))
{
format(syntax, sizeof(syntax), "EXAMPLE: {FFFFFF}%s", func);
SendClientMessage(playerid, COLOR_DARKGREEN, syntax);
}
return 1;
}
Consistency is good.
Usage of usage:
pawn Код:
CMD:weapon(playerid, params[])
{
if(isnull(params)) return ShowSyntax(playerid, "/WEAPON [PART OF WEAPON NAME]", "Give yourself a weapon.", "/weapon minigun or /weapon mini");
// rest of command