Help | What's the problem in this command?
#1

On top of OnPlayerCommandText:
Код:
for(new i=1; i<51; i++) if(!strcmp(newCmd[i][0], cmdtext, true) && strlen(newCmd[i][0]) > 0) return OnPlayerCommandText(playerid, newCmd[i][1]);
Код:
	
if(!strcmp("/changecmd", cmd, true))
{
    assert(IsPlayerAdmin(playerid));
    cmd = strtok(cmdtext, idx);
    tmp = strtok(cmdtext, idx);
    format(newCmd[++cmds][0], strlen(tmp), tmp);
    format(newCmd[cmds][1], strlen(cmd), cmd);
    printf("Command: %s has changed to %s", cmd, tmp);
    return 1;
}
It returns "Unknown Command" when I change a command name and use the new name. (It's inside of my mode,
on top of the public.. I've changed /Help to /Mode and it did not work, but it printed it good.)

Help
Reply


Messages In This Thread
Help | What's the problem in this command? - by Alon_S - 28.11.2012, 19:38
Re: Help | What's the problem in this command? - by Alon_S - 28.11.2012, 21:11
Re: Help | What's the problem in this command? - by GiamPy. - 29.11.2012, 00:14
Re: Help | What's the problem in this command? - by Alon_S - 29.11.2012, 16:28
Re: Help | What's the problem in this command? - by Alon_S - 30.11.2012, 10:07

Forum Jump:


Users browsing this thread: 1 Guest(s)