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
#2

..
Reply
#3

As far as I know, you cannot change a command in-game and honestly there is no point of doing it when you can just edit the command on your gamemode and then restarting the server.
Reply
#4

Quote:
Originally Posted by GiamPy.
Посмотреть сообщение
As far as I know, you cannot change a command in-game and honestly there is no point of doing it when you can just edit the command on your gamemode and then restarting the server.
I don't really change it, I just make another command that does the same action.
Reply
#5

?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)