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

tweak(system_resources/chat): Hide invalid command in chat #2980

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

outsider31000
Copy link
Contributor

Goal of this PR

users often type invalid commands and this fallback allows to still be posted as message and everyone can see it.
it will fill the whole chat just with these and can become quite annoying
many users in my community ask how to remove this.

How is this PR achieving the goal

removes the fallback message when a command is not valid

This PR applies to the following area(s)

RedM/FiveM

Successfully tested on

Game builds: ..

Platforms: Windows, Linux

Checklist

  • Code compiles and has been tested successfully.
  • Code explains itself well and/or is documented.
  • My commit message explains what the changes do and what they are for.
  • No extra compilation warnings are added by these changes.

Fixes issues

@github-actions github-actions bot added the invalid Requires changes before it's considered valid and can be (re)triaged label Dec 4, 2024
@outsider31000 outsider31000 changed the title tweak(system_resources/chat):Hide invalid command in chat tweak(system_resources/chat): Hide invalid command in chat Dec 4, 2024
@titanium-cfx
Copy link

Hey, you can use the registerMessageHook export to achieve the same result by checking if the message starts with a / and if so, cancel it.

@outsider31000
Copy link
Contributor Author

This commit is for messages typed directly in the chat script.

If I understood correctly the export is to be used on other scripts?

The idea is to avoid telling everyone what they need to do to avoid it, if it can be done in the default.

Not sure what this fallback is for, But in live servers I don't see the purpose of spamming a chat with invalid commands because users often don't know how to follow chat suggestions xD

@outsider31000
Copy link
Contributor Author

I guess I could add the export in our framework to do this. But then not everyone would benefit from it, if that makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid Requires changes before it's considered valid and can be (re)triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants