One Studios
Introduction

Statebags

Replicated player state bags exposed by One Inventory.

One Inventory replicates a handful of values onto Player(src).state / LocalPlayer.state so other resources (qb-target, qb-doorlock, custom scripts, ...) can read them without coupling to our exports. All values are replicated to every client.

-- Server
local isBusy = Player(src).state.inv_busy

-- Client
if LocalPlayer.state.inv_busy then return end

Bags

inv_busy
boolean
true while ANY inventory UI is open (player / stash / shop / crafting / dumpster / vehicle).
inv_open
boolean
Alias of inv_busy. Some QB-ecosystem scripts check this name instead.
inv_hotkeys
boolean
true when the inventory hotbar (1-5) keybinds are active. false while the inventory is open or the player is dead.
weapons_allowed
boolean
true when weapon-related inputs should be honoured. false while the inventory is open, the player is dead, or the player is cuffed.
dead
boolean
Mirrors the framework's death flag (ESX isDead / QB metadata.isdead). Set by One Inventory's framework integration.
cuffed
boolean
Mirrors the framework's cuff flag (QB metadata.ishandcuffed). Set by One Inventory's framework integration.
handsup
boolean
true while the player has their hands up. Set by your hands-up script.
instance
number | string
Current inventory routing bucket. Used so two players in different instances cannot interact across them.