#Add items on spawned vehicle trunk

1 messages · Page 1 of 1 (latest)

wind dew
#

How can i add items on trunk on a spawned vehicle that will be a temporary vehicle for my script

outer spire
#

trunkid will be 'trunk' .. plate

wind dew
#

exports.ox_inventory:AddItem('trunk'..plate, 'bread', 4)

outer spire
#

yea should work
also try to keep your code clean so instead of doing exports.ox_inventory:AddItem('trunk'..plate, 'bread', 4)
you can do

local trunkId = 'trunk' .. plate

local success, response = exports.ox_inventory:AddItem(trunkId , 'bread', 4)

--- i used the success and response as it will help debug things in case of problems 
#

just read the docs will help you understand more

wind dew