diff --git a/dayz_code/actions/cook.sqf b/dayz_code/actions/cook.sqf index 2f8e2eaf8..fbc4612ac 100644 --- a/dayz_code/actions/cook.sqf +++ b/dayz_code/actions/cook.sqf @@ -68,12 +68,12 @@ _cookedmeat = meatcooked; } else { r_interrupt = false; - [objNull, player, rSwitchMove,""] call RE; - player playActionNow "stop"; + if (vehicle player == player) then { + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + }; cutText [format["Canceled cooking %1",_textraw], "PLAIN DOWN"]; - - // player addMagazine "ItemBandage"; }; }; } forEach _rawmeat; diff --git a/dayz_code/actions/fill_nearestVehicle.sqf b/dayz_code/actions/fill_nearestVehicle.sqf index 7f5bdada1..15582c3f9 100644 --- a/dayz_code/actions/fill_nearestVehicle.sqf +++ b/dayz_code/actions/fill_nearestVehicle.sqf @@ -66,8 +66,11 @@ if(_IsNearVehicle >= 1) then { if(!_finished) then { r_interrupt = false; - [objNull, player, rSwitchMove,""] call RE; - player playActionNow "stop"; + + if (vehicle player == player) then { + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + }; _abort = true; }; diff --git a/dayz_code/actions/fill_startGenerator.sqf b/dayz_code/actions/fill_startGenerator.sqf index 5729f19f6..4c646b1b3 100644 --- a/dayz_code/actions/fill_startGenerator.sqf +++ b/dayz_code/actions/fill_startGenerator.sqf @@ -41,8 +41,10 @@ r_doLoop = false; if(!_finished) then { r_interrupt = false; - [objNull, player, rSwitchMove,""] call RE; - player playActionNow "stop"; + if (vehicle player == player) then { + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + }; cutText ["Canceled." , "PLAIN DOWN"] }; diff --git a/dayz_code/actions/gather_meat.sqf b/dayz_code/actions/gather_meat.sqf index 8b2a78666..32736e220 100644 --- a/dayz_code/actions/gather_meat.sqf +++ b/dayz_code/actions/gather_meat.sqf @@ -49,8 +49,10 @@ if ((_hasKnife or _hasKnifeBlunt) and !_hasHarvested) then { if (!_finished) exitWith { r_interrupt = false; - [objNull, player, rSwitchMove,""] call RE; - player playActionNow "stop"; + if (vehicle player == player) then { + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + }; cutText ["Canceled gutting." , "PLAIN DOWN"]; //_abort = true; }; diff --git a/dayz_code/actions/gather_zparts.sqf b/dayz_code/actions/gather_zparts.sqf index 61f9cc086..94d1d6a7e 100644 --- a/dayz_code/actions/gather_zparts.sqf +++ b/dayz_code/actions/gather_zparts.sqf @@ -50,8 +50,10 @@ if ((_hasKnife or _hasKnifeBlunt) and !_hasHarvested) then { if (!_finished) exitWith { r_interrupt = false; - [objNull, player, rSwitchMove,""] call RE; - player playActionNow "stop"; + if (vehicle player == player) then { + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + }; cutText ["Canceled gutting." , "PLAIN DOWN"]; //_abort = true; }; diff --git a/dayz_code/actions/jerry_fill.sqf b/dayz_code/actions/jerry_fill.sqf index 06ccb24c6..c62a44763 100644 --- a/dayz_code/actions/jerry_fill.sqf +++ b/dayz_code/actions/jerry_fill.sqf @@ -55,8 +55,10 @@ for "_x" from 1 to _qty do { if (!_finished) exitWith { r_interrupt = false; - [objNull, player, rSwitchMove,""] call RE; - player playActionNow "stop"; + if (vehicle player == player) then { + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + }; cutText ["Canceled siphon." , "PLAIN DOWN"]; _abort = true; }; diff --git a/dayz_code/actions/player_copyKey.sqf b/dayz_code/actions/player_copyKey.sqf index 6a2c1ede8..2a4050add 100644 --- a/dayz_code/actions/player_copyKey.sqf +++ b/dayz_code/actions/player_copyKey.sqf @@ -69,8 +69,10 @@ if(_finished) then { }; } else { r_interrupt = false; - [objNull, player, rSwitchMove,""] call RE; - player playActionNow "stop"; + if (vehicle player == player) then { + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + }; cutText ["Canceled Key Crafting." , "PLAIN DOWN"]; }; TradeInprogress = false; diff --git a/dayz_code/actions/player_craftItem.sqf b/dayz_code/actions/player_craftItem.sqf index f05455f64..f6278d598 100644 --- a/dayz_code/actions/player_craftItem.sqf +++ b/dayz_code/actions/player_craftItem.sqf @@ -183,8 +183,10 @@ if (_canDo) then { } else { r_interrupt = false; - [objNull, player, rSwitchMove,""] call RE; - player playActionNow "stop"; + if (vehicle player == player) then { + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + }; cutText ["Canceled crafting.", "PLAIN DOWN"]; }; diff --git a/dayz_code/actions/player_craftItem1.sqf b/dayz_code/actions/player_craftItem1.sqf index 87ba34c20..00c387550 100644 --- a/dayz_code/actions/player_craftItem1.sqf +++ b/dayz_code/actions/player_craftItem1.sqf @@ -183,8 +183,10 @@ if (_canDo) then { } else { r_interrupt = false; - [objNull, player, rSwitchMove,""] call RE; - player playActionNow "stop"; + if (vehicle player == player) then { + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + }; cutText ["Canceled crafting.", "PLAIN DOWN"]; }; diff --git a/dayz_code/actions/player_craftItem2.sqf b/dayz_code/actions/player_craftItem2.sqf index 35653a05e..c8486f751 100644 --- a/dayz_code/actions/player_craftItem2.sqf +++ b/dayz_code/actions/player_craftItem2.sqf @@ -183,8 +183,10 @@ if (_canDo) then { } else { r_interrupt = false; - [objNull, player, rSwitchMove,""] call RE; - player playActionNow "stop"; + if (vehicle player == player) then { + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + }; cutText ["Canceled crafting.", "PLAIN DOWN"]; }; diff --git a/dayz_code/actions/player_craftItem3.sqf b/dayz_code/actions/player_craftItem3.sqf index 66c1e3752..f1c0e006b 100644 --- a/dayz_code/actions/player_craftItem3.sqf +++ b/dayz_code/actions/player_craftItem3.sqf @@ -183,8 +183,10 @@ if (_canDo) then { } else { r_interrupt = false; - [objNull, player, rSwitchMove,""] call RE; - player playActionNow "stop"; + if (vehicle player == player) then { + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + }; cutText ["Canceled crafting.", "PLAIN DOWN"]; }; diff --git a/dayz_code/actions/player_craftItem4.sqf b/dayz_code/actions/player_craftItem4.sqf index a85513197..bb93f1672 100644 --- a/dayz_code/actions/player_craftItem4.sqf +++ b/dayz_code/actions/player_craftItem4.sqf @@ -183,8 +183,10 @@ if (_canDo) then { } else { r_interrupt = false; - [objNull, player, rSwitchMove,""] call RE; - player playActionNow "stop"; + if (vehicle player == player) then { + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + }; cutText ["Canceled crafting.", "PLAIN DOWN"]; }; diff --git a/dayz_code/actions/refuel.sqf b/dayz_code/actions/refuel.sqf index 1d6390ba3..ac46cd7f1 100644 --- a/dayz_code/actions/refuel.sqf +++ b/dayz_code/actions/refuel.sqf @@ -67,14 +67,19 @@ _availableCans = ["ItemJerrycan","ItemFuelBarrel"]; if (r_interrupt) then { r_doLoop = false; }; + if (vehicle player == player) then { + r_doLoop = false; + }; sleep 0.1; }; r_doLoop = false; if(!_finished) then { r_interrupt = false; - [objNull, player, rSwitchMove,""] call RE; - player playActionNow "stop"; + if (vehicle player == player) then { + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + }; }; } else { diff --git a/dayz_code/actions/remove.sqf b/dayz_code/actions/remove.sqf index 014ae3aaa..3f4d1d6d8 100644 --- a/dayz_code/actions/remove.sqf +++ b/dayz_code/actions/remove.sqf @@ -160,7 +160,9 @@ if (_proceed) then { } else { r_interrupt = false; - [objNull, player, rSwitchMove,""] call RE; - player playActionNow "stop"; + if (vehicle player == player) then { + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + }; }; TradeInprogress = false; \ No newline at end of file diff --git a/dayz_code/actions/repair.sqf b/dayz_code/actions/repair.sqf index 9be170397..348201335 100644 --- a/dayz_code/actions/repair.sqf +++ b/dayz_code/actions/repair.sqf @@ -87,8 +87,10 @@ if (_section and _hasToolbox) then { } else { r_interrupt = false; - [objNull, player, rSwitchMove,""] call RE; - player playActionNow "stop"; + if (vehicle player == player) then { + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + }; cutText ["Canceled Repair.", "PLAIN DOWN"]; }; diff --git a/dayz_code/actions/siphonFuel.sqf b/dayz_code/actions/siphonFuel.sqf index 2aeecaa72..1764507c9 100644 --- a/dayz_code/actions/siphonFuel.sqf +++ b/dayz_code/actions/siphonFuel.sqf @@ -82,8 +82,10 @@ _availableCansEmpty = ["ItemJerrycanEmpty","ItemFuelBarrelEmpty"]; if(!_finished) then { r_interrupt = false; - [objNull, player, rSwitchMove,""] call RE; - player playActionNow "stop"; + if (vehicle player == player) then { + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + }; }; } else { diff --git a/dayz_code/actions/stopGenerator.sqf b/dayz_code/actions/stopGenerator.sqf index 67b030008..ec7b3b377 100644 --- a/dayz_code/actions/stopGenerator.sqf +++ b/dayz_code/actions/stopGenerator.sqf @@ -41,8 +41,10 @@ r_doLoop = false; if(!_finished) then { r_interrupt = false; - [objNull, player, rSwitchMove,""] call RE; - player playActionNow "stop"; + if (vehicle player == player) then { + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + }; cutText ["Canceled." , "PLAIN DOWN"] }; diff --git a/dayz_code/actions/trade_backpacks.sqf b/dayz_code/actions/trade_backpacks.sqf index ce72ee5b9..7cfdf97a0 100644 --- a/dayz_code/actions/trade_backpacks.sqf +++ b/dayz_code/actions/trade_backpacks.sqf @@ -60,8 +60,10 @@ if (_qty >= _qty_in) then { if (!_finished) exitWith { r_interrupt = false; - [objNull, player, rSwitchMove,""] call RE; - player playActionNow "stop"; + if (vehicle player == player) then { + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + }; cutText ["Canceled Trade." , "PLAIN DOWN"]; }; diff --git a/dayz_code/actions/trade_items.sqf b/dayz_code/actions/trade_items.sqf index e80a7f46d..53c9b3f80 100644 --- a/dayz_code/actions/trade_items.sqf +++ b/dayz_code/actions/trade_items.sqf @@ -83,8 +83,10 @@ for "_x" from 1 to _total_trades do { if (!_finished) exitWith { r_interrupt = false; - [objNull, player, rSwitchMove,""] call RE; - player playActionNow "stop"; + if (vehicle player == player) then { + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + }; cutText ["Canceled Trade." , "PLAIN DOWN"]; }; diff --git a/dayz_code/actions/trade_items_wo_db.sqf b/dayz_code/actions/trade_items_wo_db.sqf index 8133d6b49..5084a61f1 100644 --- a/dayz_code/actions/trade_items_wo_db.sqf +++ b/dayz_code/actions/trade_items_wo_db.sqf @@ -69,8 +69,10 @@ for "_x" from 1 to _total_trades do { if (!_finished) exitWith { r_interrupt = false; - [objNull, player, rSwitchMove,""] call RE; - player playActionNow "stop"; + if (vehicle player == player) then { + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + }; cutText ["Canceled Trade." , "PLAIN DOWN"]; }; diff --git a/dayz_code/actions/trade_weapons.sqf b/dayz_code/actions/trade_weapons.sqf index 955a202e1..38611ed73 100644 --- a/dayz_code/actions/trade_weapons.sqf +++ b/dayz_code/actions/trade_weapons.sqf @@ -61,8 +61,10 @@ if (_qty >= _qty_in) then { if (!_finished) exitWith { r_interrupt = false; - [objNull, player, rSwitchMove,""] call RE; - player playActionNow "stop"; + if (vehicle player == player) then { + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + }; cutText ["Canceled Trade." , "PLAIN DOWN"]; }; diff --git a/dayz_code/medical/bandage.sqf b/dayz_code/medical/bandage.sqf index 713fa189e..4776f0e84 100644 --- a/dayz_code/medical/bandage.sqf +++ b/dayz_code/medical/bandage.sqf @@ -51,7 +51,9 @@ if (_finished) then { _unit setVariable ["USEC_injured",false,true]; } else { r_interrupt = false; - [objNull, player, rSwitchMove,""] call RE; - player playActionNow "stop"; + if (vehicle player == player) then { + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + }; player addMagazine "ItemBandage"; }; \ No newline at end of file diff --git a/dayz_code/medical/morphine.sqf b/dayz_code/medical/morphine.sqf index f325e8126..679ad3cdd 100644 --- a/dayz_code/medical/morphine.sqf +++ b/dayz_code/medical/morphine.sqf @@ -50,6 +50,8 @@ if (_finished) then { }; } else { r_interrupt = false; - [objNull, player, rSwitchMove,""] call RE; - player playActionNow "stop"; + if (vehicle player == player) then { + [objNull, player, rSwitchMove,""] call RE; + player playActionNow "stop"; + }; }; \ No newline at end of file