-
-
Notifications
You must be signed in to change notification settings - Fork 472
Description
Is your feature request related to a problem? Please describe.
We don't have an official way to cancel commands from the clientside. onClientConsole
will show all commands being executed, regardless of where they were executed (chat or console), but this information is only useful to know which commands are being executed because you can't cancel them.
My case use in this case would be to make a safe-state in which users can't execute clientsided commands. I understand that cancelling serversided commands should be done on the serverside, and that's already possible.
Some of my commands are made on the clientside, in which the client checks a bunch of things and, if all goes well, then triggers an event on the server which checks whatever it needs to check.
Instead of implementing a switch in every single resource in which a clientsided command is added to determine if the user can or cannot use the command, it would be easier to just disable clientsided commands entirely with an event whenever it's necessary.
Just to be clear, my use case can be done already with the tools given, but it's more hassle than it's worth.
Describe the solution you'd like
Add an event called onClientCommand
or onClientPlayerCommand
with a possibility of cancelling the event so it won't execute any clientsided commands. Serversided commands should be mantain like before.
Describe alternatives you've considered
Add the cancel event to onClientConsole
, altought I think that name is misleading since it won't just execute for console input but for all input (chat & console).
Additional context
#2615 is related
Security Policy
- I have read and understood the Security Policy and this issue is not about a cheat or security vulnerability.