Unkown 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: Unkown Command (
/showthread.php?tid=326346)
Unkown Command -
nmader - 17.03.2012
Alright, so I am using the Vortex Gamemode which I have edited the hell out of, I do not get an Unkown Command when the command is not valid. How could I get that message, and edit it to what I want the error message to say.
Re: Unkown Command -
[XST]O_x - 17.03.2012
You've probably changed the return 0 at the end of OnPlayerCommandText to return 1;
Change it to return 0;
If you want a custom message, change return 0; to return SendClientMessage(playerid, color, message);
Re: Unkown Command -
nmader - 17.03.2012
Well, the original Vortex Roleplay does not use OnPlayerCommandText but rather Command(help, playerid, params[])
Re: Unkown Command -
Daddy Yankee - 17.03.2012
OnPlayerCommandText is a samp function and all the commands are added under it. In the end of OnPlayerCommandText you have a return, exactly what [XST]O_x said.
Re: Unkown Command -
nmader - 17.03.2012
Daddy Yankee, you are not playing attention,
My script does not us the OnPlayerCommandText Callback!