Browse docs
Inventory
Read or remove player inventory items through Base's configured framework bridge.
Server only · sky_base. source is a player server ID and itemName is the internal inventory item key.
| Export | Returns |
|---|---|
GetInventoryItemCount(source, itemName) | Non-negative item count; 0 for invalid input or an unavailable item lookup |
RemoveInventoryItem(source, itemName, amount) | Removed quantity; 0 when removal does not succeed or the player lacks the requested quantity |
server.lua
local count = exports["sky_base"]:GetInventoryItemCount(playerId, "radio")
-- Run only after your server has authorized this removal.
local removed = exports["sky_base"]:RemoveInventoryItem(playerId, "radio", 1)
Pass a positive integer quantity. The export checks the count, calls the configured item-removal bridge and checks the result. It does not authorize a search, confiscation or purchase on behalf of your resource.
For station storage, use Jobs Base storage exports, which take a storage ID and job/grade context.