I’m might have done it all wrong, but what I’ve done is I’ve made a lua script which opens the menu when I press E, it works without any problems. When I need to close the menu I can’t use the ingame controls to get the key so I’ve used document.body.onkeydown in my JS which also works and it’s closing the menu (setting the display to none) but the problem is I doesn’t disable SetNuiFocus.
I’m trying to use
I’m not sure that’s the right URL.
the RegisterNUICallback is located in testing/client.lua
Anyway I’m trying to use it to trigger this
RegisterNUICallback("event", function(data, cb) SetNuiFocus(false,false) cb() end)
I have no idea how to use the callback thing, I would appreciate it if you could explain it a bit.