fivem
fivem copied to clipboard
feat(resources/chat): Add `toggleChat` for RedM and extra parameter to set chat state
This pr aims to allow the use of toggleChat command for RedM users.
It also allows an extra argument to use for chat states, for example when players have left session with state as visible since it uses ResourceKvp when they re enter it shows visble, this extra parameter allows to manipulate chat state in other resources
example:
ExecuteCommand("toggleChat hidden")
In summary:
- use of toggleChat command for RedM users
- extra parameter to allow resources to manipulate chat states
- adds a chat suggestion so players are aware of what states are supported
- smal optimisation on the look up for input for rdr gtav that was done inside the while loop
- removed isRDR check in the future if RegisterKeymapping is implemented in RedM the check for
if RegisterKeymappingshould and is enough, and a future pr wont be needed here.