Jump to content

Recommended Posts

Posted

I'd firstly recommend basic debugging. So your code doesn't work, did you check the logic inside your if statement? Does `mp.gui.chat.show(true)` return what you think it returns? Did you do a simple debug where you output what `mp.gui.chat.show(true)` returns? If not this is how you would of solved the issue in 10 seconds.

`mp.gui.chat.show()` is a function that doesn't return true/false and therefore it's always 'undefined' and therefore only going to hide your chat always. You'd have to create your own method to see if the chat is open, there is this example on the wiki https://wiki.rage.mp/index.php?title=Chat.open

TLDR mp.gui.chat.show() returns undefined, so your code won't ever work.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...