Skip to main content
Grid Inventory

Client state bags

Read the inventory interface state and control the quick-access slots.

LocalPlayer.state.inventoryOpenedboolean (read-only)

Indicates whether the local inventory is currently open.

LocalPlayer.state.shortkeysboolean

Enables or disables the inventory quick-access slots.

Read-only state

Use inventoryOpened only as a getter. Do not set the inventory open state through this value.

Configuration

Check the inventory state

Run logic while the local inventory is open.

if LocalPlayer.state.inventoryOpened then
-- DO SOMETHING
end
Configuration

Control quick-access slots

Disable the slots while the player is cuffed and enable them again after release.

AddEventHandler("onPlayerCuffed", function()
LocalPlayer.state.shortkeys = false
end)

AddEventHandler("onPlayerUnCuffed", function()
LocalPlayer.state.shortkeys = true
end)