SA-MP Forums Archive
How do i script this? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How do i script this? (/showthread.php?tid=70175)



How do i script this? - Drift_04 - 22.03.2009

Hey, on my server when i do some of the commands i made it says unknown command, bu the command works, so how do i make it so it dpesnt say that?

like, how do i just completely get rid of that sentence? so even if i do a wrong command it doesnt say wrong command. TY!!

~~[Drift]~~


Re: How do i script this? - ICECOLDKILLAK8 - 22.03.2009

Search next time
To fix the commands that work but still say Unknown Command return 1 at the end of them
To make a custom Unknown Command message, Instead of using return 0 at the end of OnPlayerCommandText use somthing like
return SendClientMessage(playerid, COLOR_GREY, "That aint a command");


Re: How do i script this? - Drift_04 - 22.03.2009

loli do have that at the end of them, it still says that. =(


Re: How do i script this? - Drift_04 - 22.03.2009

sorry for the DP, but i just want to know how to get rid of that message all together, can you tell me plz?


Re: How do i script this? - MenaceX^ - 22.03.2009

If you return with false the OnPlayerCommandText public, it will say "SERVER: Unknown command" when a player enters an unknown command.

If you have a known command and it keeps saying it. Something is wrong with this specific command.


Re: How do i script this? - Drift_04 - 22.03.2009

yeah i know that but uhh, can i make it so it doesnt say SERVER: UNKNOWN COMMAND? no matter what u type?, see what i think is, it is saying that because the command itself works but the prompt says it has errors, even though it works, so yeah, is there any way i can get rid of that message? or maybe make the pawno ignore the error?


Re: How do i script this? - MenaceX^ - 22.03.2009

Yes. Return the public with 1.