Disable all commands on YCMD
#1

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
Reply
#2

About error message.
Find OnPlayerCommandText and where its says:
pawn Код:
return 0;
or
pawn Код:
return 1;
type something like this:
pawn Код:
return SendClientMessage(playerid, COLOR_RED, "Command doesn't exist. Type /help to see commands!);
Reply
#3

create a variables
Reply
#4

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
Reply
#5

Ranama the compiler says: warning 235: public function lacks forward declaration (symbol "OnPlayerCommandPerformed")
Reply
#6

UP!UP!UP!
Reply
#7

pawn Код:
#include zcmd //top of script
Reply
#8

Ok, it's the same thing? It works even with YCMD? It says that I redifine the macros CMD and COMMAND in zcmd.inc.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)