Skip to content
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

'onPlayerCommand' event for client-side #3160

Open
1 task done
PlatinMTA opened this issue Aug 15, 2023 · 1 comment
Open
1 task done

'onPlayerCommand' event for client-side #3160

PlatinMTA opened this issue Aug 15, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@PlatinMTA
Copy link
Contributor

PlatinMTA commented Aug 15, 2023

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.
@PlatinMTA PlatinMTA added the enhancement New feature or request label Aug 15, 2023
@JeViCo
Copy link

JeViCo commented Aug 23, 2023

Kinda related to #3014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants