-
-
Notifications
You must be signed in to change notification settings - Fork 425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new onClientCoreCommand event #2554
Add new onClientCoreCommand event #2554
Conversation
What is the use case for this? I see point in triggering such event for commands like "showchat", "showhud" or "shownametags" but why for all commands? |
I personally would use it for "showchat" and "time", but I figured other people could have a use for the other commands as well. |
I don't see the point in this. |
You can't really add command handlers for hardcoded commands. For example if I want to make a command using /ver I can't, I need to name it differently. This should help. |
You would have to blacklist certain commands like login/register as you could simply build a keylogger for them. |
https://wiki.multitheftauto.com/wiki/Client_Commands login/register aren't client commands, and register isn't even an MTA command, it's built into the admin panel resource. The only client command that pontentially exposes a password is It would be useful to detect when the player uses /help or /time to display other stuff in the chatbox or in some UI. |
I think it can be useful with side scripting with those commands to add extra functionality to them |
MTA has a few built-in clientside commands, however there is currently no way for scripts to know if any of those commands were executed. All existing ways of retrieving such info don't work for various reasons, namely: onPlayerCommand, addCommandHandler and onClientConsole. This pull request adds a new clientside event onClientCoreCommand which gets triggered for those specific commands, with one parameter: string command.
FYI: There are a lot of built-in client commands,, some are written here as reference: