#Add items on spawned vehicle trunk
1 messages · Page 1 of 1 (latest)
Documentation for Community Ox's resources for FiveM/RedM
trunkid will be 'trunk' .. plate
exports.ox_inventory:AddItem('trunk'..plate, 'bread', 4)
Like this ??
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
im having an confusion why i can only spawn vehicle on location closer to me and wont spawn when its far to me