{"name":"lockInventory","operator":null,"title":"lockInventory","type":"command","url":"https://community.bistudio.com/wiki/lockInventory","revid":370883,"updated":"2025-02-21T10:44:04Z","groups":["Unit Inventory"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"2.00"}],"since":{"game":"arma3","name":"Arma 3","version":"2.00"},"arma3_since":"2.00","branch":null,"locality":{"argument":"global","effect":"local","server_exec":false},"exec":null,"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","since":null,"effect":null,"exec":null,"params":[{"name":"vehicle","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"vehicle: Object"},{"name":"lock","type":"Boolean","optional":false,"default":null,"description":null,"types":["Boolean"],"since":null,"text":"lock: Boolean"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"binary","operator":null,"left":{"text":"vehicle","types":["Object"]},"right":{"text":"lock","types":["Boolean"]}}],"examples":[{"text":"```sqf\nvehicle player lockInventory true;\n```","code":["vehicle player lockInventory true;"]},{"text":"```sqf\nbackpackContainer player lockInventory true;\n```","code":["backpackContainer player lockInventory true;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["lockedInventory"],"notes":[{"user":"PierreMGI","date":"","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."}],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Unit Inventory","Introduced with Arma 3 version 2.00","Scripting Commands","Scripting Commands: Local Effect"]}