🎒Inventory integration

Example setups

ox_inventory

ox_inventory/data/items.lua

['hitab'] = {
	label = 'Hi-Racing tablet',
	stack = false,
	weight = 500,
	client = {
		export = 'hi_racing.OpenTablet',
		image = 'tablet.png',
	}
},

qb_inventory

qb-core/shared/items.lua

 hitab = { name = 'hitab', label = 'Hi-Racing tablet', weight = 500, type = 'item', image = 'tablet.png', unique = true, useable = true, shouldClose = true, description = 'Hi-tech stuff' },

In a server-side resource add:

QBCore.Functions.CreateUseableItem("hitab", function(source, item)    
    TriggerClientEvent('hi_racing:openTablet', source)
end)

Custom / other inventories

For other inventories use:

exports['hi_racing']:OpenTablet()

Icon

Last updated