Skip to content
Atlas

Docs

Inventory API

The one inventory door — Atlas.Inventory.

Import

Any Atlas resource:

lua
shared_script '@atlas_core/imports.lua'

Facade calls

Never dig into ox_inventory from random scripts:

lua
Atlas.IsReady()
Atlas.Players.Get(source)
Atlas.Characters.Get(source)
Atlas.Permissions.Has(source, 'atlas.admin.health')

Atlas.Inventory.Add(source, 'water', 1)
Atlas.Inventory.Remove(source, 'water', 1)
Atlas.Inventory.GetCount(source, 'water')
Atlas.Inventory.CanCarry(source, 'water', 5)

Inventory returns { ok = true, data = ... } or { ok = false, error = '...' }. Restart-safe. No crash-loops because a dependency blinked.