Help | What's the problem in this command? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help | What's the problem in this command? (
/showthread.php?tid=395995)
Help | What's the problem in this command? -
Alon_S - 28.11.2012
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
Re: Help | What's the problem in this command? -
Alon_S - 28.11.2012

..
Re: Help | What's the problem in this command? -
GiamPy. - 29.11.2012
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.
Re: Help | What's the problem in this command? -
Alon_S - 29.11.2012
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.
Re: Help | What's the problem in this command? -
Alon_S - 30.11.2012

?