⚙️Exports & Events
Open Inventory Exports
Clientside Export: openInventory
openInventory
Description: Opens the inventory of the player.
Clientside Export: openTrunk
openTrunk
Description: Opens the trunk or glovebox of the nearest car.
Vehicle Inventory Functions
Export: vehicleInventoryAddItem
vehicleInventoryAddItem
Description: Adds an item to a vehicle's trunk or glovebox.
Parameters:
plate
(string
): The plate of the vehicle.type
(string
): Either"trunk"
or"glovebox"
.itemname
(string
): The name of the item to add.count
(number
): The amount of the item to add.
Export: vehicleInventoryRemoveItem
vehicleInventoryRemoveItem
Description: Removes an item from a vehicle's trunk or glovebox.
Parameters:
plate
(string
): The plate of the vehicle.type
(string
): Either"trunk"
or"glovebox"
.itemname
(string
): The name of the item to remove.count
(number
): The amount of the item to remove.
Job Storage Functions
Export: jobInventoryAddItem
jobInventoryAddItem
Description: Adds an item to a job-specific storage.
Parameters:
jobname
(string
): The name of the job which owns the inventory.itemname
(string
): The name of the item to add.count
(number
): The amount of the item to add.
Export: jobInventoryRemoveItem
jobInventoryRemoveItem
Description: Removes an item from a job-specific storage.
Parameters:
jobname
(string
): The name of the job which owns the inventory.itemname
(string
): The name of the item to remove.count
(number
): The amount of the item to remove.
External Storage (Stash) Functions
Export: externalInventoryOpen
externalInventoryOpen
Event: hc_inventory:openExternalStash
Description: Opens an external stash inventory, intended for systems outside of player or vehicle inventories.
Parameters:
source
(player
): Player ID to open the inventory for.uniqueid
(string
): A unique identifier for this stash.data
(table
): Configuration table with:title
(string
): Title of the inventory.maxweight
(number
): Maximum allowed weight.slots
(number
): Maximum number of slots.
Export: externalInventoryAddItem
externalInventoryAddItem
Description: Adds an item to an external stash.
Parameters:
uniqueid
(string
): A unique identifier for the stash.itemname
(string
): The name of the item to add.count
(number
): The amount of the item to add.
Export: externalInventoryRemoveItem
externalInventoryRemoveItem
Description: Removes an item from an external stash.
Parameters:
uniqueid
(string
): A unique identifier for the stash.itemname
(string
): The name of the item to remove.count
(number
): The amount of the item to remove.
Frisk / search players
Clientside Export: friskPlayer
friskPlayer
Description: Opens the inventory of another player as second inventory. Allows the player to take items from the other player.
Parameters:
source
(player
): Local Player ID to open the inventory for.
Last updated