Open CrosRoad95 opened 6 years ago
Low priority but returning false seems reasonable.
Can you give an example of why this might be useful? Most people don't check the return value of addCommandHandler but I agree it should not return true if it wasn't a success.
This is also not implementable server-side as the server doesn't know what client commands there are.
the server doesn't know what client commands there are.
know, you can make blacklist for client and server with showmemstat
and other functions
that's not really a clean solution imo
servers shouldn't apply. It's enough for client to prepare a table with commands available to client and omit them (return false). Its my solution.
Describe the bug If you trying to add command example for
showmemstat
command, addCommandHandler returningtrue
even command isn't added.To Reproduce clientside
if you execute command
showmemstat
, only mem stat window appear.Expected behavior Should return false for some exeptions
Screenshots
MTA Client (please complete the following information): Multi Theft Auto v1.5.5-release-13968
MTA Server (please complete the following information): MTA:SA Server v1.5.5-release-11751
Additional context