From 0bbf4d41287eff523ba8e09bd260d9d97873b155 Mon Sep 17 00:00:00 2001
From: jonpas <jonpas33@gmail.com>
Date: Wed, 2 Sep 2015 22:24:46 +0200
Subject: [PATCH] Prevent Cargo opening if vehicle is locked

---
 addons/cargo/functions/fnc_initVehicle.sqf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/addons/cargo/functions/fnc_initVehicle.sqf b/addons/cargo/functions/fnc_initVehicle.sqf
index b817688336..efb3b9a5cf 100644
--- a/addons/cargo/functions/fnc_initVehicle.sqf
+++ b/addons/cargo/functions/fnc_initVehicle.sqf
@@ -41,7 +41,7 @@ if (getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(hasCargo)) != 1) ex
 private ["_text", "_condition", "_statement", "_icon", "_action"];
 _condition = {
     params ["_target", "_player"];
-    GVAR(enable) && {[_player, _target, []] call EFUNC(common,canInteractWith)}
+    GVAR(enable) && {locked _target < 2} && {[_player, _target, []] call EFUNC(common,canInteractWith)}
 };
 _text = localize LSTRING(openMenu);
 _statement = {GVAR(interactionVehicle) = _target; createDialog QGVAR(menu);};