Quote:
Originally Posted by Nero_3D
you could do it like that
pawn Код:
CMD:help(playerid, params[]) { new type[32] ; if (sscanf(params, "s[32]S()[128]", type, 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 (strcmp(type, "general", true) == 0) { SendClientMessage(playerid, COL_LIGHTBLUE, ".:| General help |:."); SendClientMessage(playerid, COL_ORANGE, "Helpme"); SendClientMessage(playerid, COL_LIGHTBLUE, ".:| General help |:."); } return 1; }
That will extract the first word from params and copy it into type
Lets say I think it does, I didn't test that
|
Can you explain this line
pawn Код:
if (sscanf(params, "s[32]S()[128]", type, params))
fully?