diff --git a/SQF/dayz_code/actions/refuel.sqf b/SQF/dayz_code/actions/refuel.sqf index 6ca52fc5e..a6f7a3ac0 100644 --- a/SQF/dayz_code/actions/refuel.sqf +++ b/SQF/dayz_code/actions/refuel.sqf @@ -16,7 +16,7 @@ _curFuel = ((fuel _vehicle) * _capacity); _newFuel = (_curFuel + _canSize); _fueling = player getVariable ["fueling",false]; -if (fuel _vehicle == 1) exitWith {dayz_actionInProgress = false;}; +if (fuel _vehicle == 1 || !(_canType in magazines player)) exitWith {dayz_actionInProgress = false;}; player removeAction s_player_fillfuel + _capacity; player setVariable ["fueling", true]; diff --git a/SQF/dayz_code/compile/fn_selfActions.sqf b/SQF/dayz_code/compile/fn_selfActions.sqf index a730c0fcd..87a8af8b9 100644 --- a/SQF/dayz_code/compile/fn_selfActions.sqf +++ b/SQF/dayz_code/compile/fn_selfActions.sqf @@ -297,7 +297,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur //Allow player to fill vehicle 210L if (_hasBarrel && {!_isMan} && {_isVehicle} && {fuel _cursorTarget < 1} && {!_isDisallowRefuel}) then { if (s_player_fillfuel210 < 0) then { - s_player_fillfuel210 = player addAction [format[localize "str_actions_medical_10",_text,"210"], "\z\addons\dayz_code\actions\refuel.sqf",["ItemFuelBarrel",_cursorTarget], 0, true, true, "", "'ItemFuelBarrel' in magazines player"]; + s_player_fillfuel210 = player addAction [format[localize "str_actions_medical_10",_text,"210"], "\z\addons\dayz_code\actions\refuel.sqf",["ItemFuelBarrel",_cursorTarget], 0, true, true]; }; } else { player removeAction s_player_fillfuel210; @@ -307,7 +307,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur //Allow player to fill vehicle 20L if (_hasFuel20 && {!_isMan} && {_isVehicle} && {fuel _cursorTarget < 1} && {!_isDisallowRefuel}) then { if (s_player_fillfuel20 < 0) then { - s_player_fillfuel20 = player addAction [format[localize "str_actions_medical_10",_text,"20"], "\z\addons\dayz_code\actions\refuel.sqf",["ItemJerrycan",_cursorTarget], 0, true, true, "", "'ItemJerrycan' in magazines player"]; + s_player_fillfuel20 = player addAction [format[localize "str_actions_medical_10",_text,"20"], "\z\addons\dayz_code\actions\refuel.sqf",["ItemJerrycan",_cursorTarget], 0, true, true]; }; } else { player removeAction s_player_fillfuel20; @@ -317,7 +317,7 @@ if (!isNull _cursorTarget && !_inVehicle && !_isPZombie && (player distance _cur //Allow player to fill vehicle 5L if (_hasFuel5 && {!_isMan} && {_isVehicle} && {fuel _cursorTarget < 1} && {!_isDisallowRefuel}) then { if (s_player_fillfuel5 < 0) then { - s_player_fillfuel5 = player addAction [format[localize "str_actions_medical_10",_text,"5"], "\z\addons\dayz_code\actions\refuel.sqf",["ItemFuelcan",_cursorTarget], 0, true, true, "", "'ItemFuelcan' in magazines player"]; + s_player_fillfuel5 = player addAction [format[localize "str_actions_medical_10",_text,"5"], "\z\addons\dayz_code\actions\refuel.sqf",["ItemFuelcan",_cursorTarget], 0, true, true]; }; } else { player removeAction s_player_fillfuel5;