28.11.2012, 19:38
On top of OnPlayerCommandText:
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
Код:
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;
}
on top of the public.. I've changed /Help to /Mode and it did not work, but it printed it good.)
Help


