Exports
client
Whether the menu is on screen right now.
client
Throws away the cached headshot so the next open renders a new one. Call it after a clothing change, which is the one thing the cache cannot see: the ped and the model are both unchanged.
Events
Fires with
true when the menu opens and false when it closes.The event form of
RefreshPortrait, for a resource that would rather not reach for an export.State bag
LocalPlayer.state.pauseMenuOpen is set for as long as the menu is up. This is the one to reach for in a resource you do not want to add a dependency to.
Most HUDs hide themselves when
IsPauseMenuActive() is true. That never becomes true once this resource is running, because the native pause menu is exactly what it replaces. Swapping that check for the state bag above is usually a one line change.Hooks
client/hooks.lua ships readable and is the place for anything that does not fit an export or an event. It survives updates in the sense that it is yours to edit, but replacing the folder overwrites it, so keep a copy.
client/hooks.lua
Keybinds from other resources
ox_inventory is handled for you. The menu setsLocalPlayer.state.invBusy, which is what its own keybind checks before opening, and clears it again only if this menu was what set it.
A framework we do not support
server/adapters.lua ships readable. Define a function there and it is asked before the bridge; return nil from one and the bridge answers instead, so you can override one answer and leave the rest alone.
server/adapters.lua
PlayerName, JobInfo, Balance and ItemCount.