Opens an inventory using the passed data. Forces a player to open an inventory, without usual security checks (groups, coords).
exports.ox_inventory:forceOpenInventory(playerId, invType, data)
- playerId:
number
- invType:
string
'player'
'stash'
'container'
'drop'
'glovebox'
'trunk'
'dumpster'
- data:
number
orstring
ortable
Open the target player's inventory.
exports.ox_inventory:forceOpenInventory(1, 'player', 3)
Admin command to open a player's inventory.
RegisterCommand('openplayerinv', function(source, args)
exports.ox_inventory:forceOpenInventory(source, 'player', tonumber(args[1]))
end, true)