Quote:
Originally Posted by jlalt
Can you add a function to check if a command exists?
ex:
PHP код:
CommandExist(cmd[]);
returns 1 if exist 0 if not, it would be useful to block the existing commands from being used by non registered / logged in users while they yet can use the unknow commands....
btw Good job.
|
OnPlayerCommandReceived could help you achieve that, it will be called if a command that hasn't been performed yet exists. If you return 0 in the callback, the command will not proceed to execute. Take advantage of the
cmd argument.
Please note that
cmd does not include the slash "/".
I'm planning on adding a built-in command list, so that function will most like be introduced later on without you having to do anything with
OnPlayerCommandReceived.