Disable all commands on YCMD - 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: Disable all commands on YCMD (
/showthread.php?tid=365802)
Disable all commands on YCMD -
FiReAlEx - 04.08.2012
Hi! I've a little question: how can I disable all YCMD commands and not one at once? And how can I send an error message when a command doesn't exist? Thanks
Re: Disable all commands on YCMD -
RedJohn - 04.08.2012
About error message.
Find
OnPlayerCommandText and where its says:
or
type something like this:
pawn Код:
return SendClientMessage(playerid, COLOR_RED, "Command doesn't exist. Type /help to see commands!);
Re: Disable all commands on YCMD -
Devilxz97 - 04.08.2012
create a variables
Re: Disable all commands on YCMD -
Ranama - 04.08.2012
If you are using YCMD this is the callback that gets called everytime someone uses a command: i use this in my script
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success){
if(success == 0)return SendClientMessage(playerid, COLOR_GRAY2, "SERVER: Unknown command, use /help for further help.");
}
I think you maybe should be able to de activate all the commands with this to, read more about YCMD
here
Re: Disable all commands on YCMD -
FiReAlEx - 04.08.2012
Ranama the compiler says: warning 235: public function lacks forward declaration (symbol "OnPlayerCommandPerformed")
Re: Disable all commands on YCMD -
FiReAlEx - 06.08.2012
UP!UP!UP!
Re: Disable all commands on YCMD -
Devilxz97 - 06.08.2012
pawn Код:
#include zcmd //top of script
Re: Disable all commands on YCMD -
FiReAlEx - 06.08.2012
Ok, it's the same thing? It works even with YCMD? It says that I redifine the macros CMD and COMMAND in zcmd.inc.