{"name":"lockInventory","title":"lockInventory","type":"command","url":"https://community.bistudio.com/wiki/lockInventory","revid":370883,"updated":"2025-02-21T10:44:04Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"2.00"},"since":"arma3 2.00","arma3_since":"2.00","locality":{"argument":"global","effect":"local"},"description":"Lock or unlock a vehicle's inventory access.\nThis command can also lock backpack a unit is wearing to prevent access by a third party.\nIf set to true (locked), the inventory cannot be accessed via hotkey or action menu.","syntaxes":[{"syntax":"vehicle lockInventory lock","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"lock","type":"Boolean","type_expr":"Boolean"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"lock"}}],"examples":[{"code":["vehicle player lockInventory true;"]},{"code":["backpackContainer player lockInventory true;"]}],"see_also":["lockedInventory"],"notes":[{"user":"PierreMGI","text":"This command works only on alive unit. No matter you run it before or after death, on due backpackContainer unit, the backpack will be accessible on corpse."}]}