Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Fuel Pump
- if(_typeOfCursorTarget in dayz_fuelpumparray) then {
- if (isNil "BanditOil") then { BanditOil = 0;};
- if (BanditOil > 0) then {
- s_player_fuelauto = player addAction ["<t color='#ff0000'>Bandits have control of oil supply!</t>", "",[], 0, false, true, "",""];
- } else {
- if (s_player_fuelauto < 0) then {
- // check if Generator_DZ is running within 30 meters
- _findNearestGens = nearestObjects [player, ["Generator_DZ"], 30];
- _findNearestGen = [];
- {
- if (alive _x && (_x getVariable ["GeneratorRunning", false])) then {
- _findNearestGen set [(count _findNearestGen),_x];
- };
- } count _findNearestGens;
- _IsNearRunningGen = count (_findNearestGen);
- // show that pump needs power if no generator nearby.
- if(_IsNearRunningGen > 0) then {
- s_player_fuelauto = player addAction [localize "STR_EPOCH_ACTIONS_FILLVEH", "\z\addons\dayz_code\actions\fill_nearestVehicle.sqf",objNull, 0, false, true, "",""];
- } else {
- s_player_fuelauto = player addAction [format["<t color='#ff0000'>%1</t>",localize "STR_EPOCH_ACTIONS_NEEDPOWER"], "",[], 0, false, true, "",""];
- };
- }; };
- } else {
- player removeAction s_player_fuelauto;
- s_player_fuelauto = -1;
- };
- //Fuel Pump on truck
- if(_typeOfCursorTarget in DZE_fueltruckarray && alive _cursorTarget) then {
- if (s_player_fuelauto2 < 0) then {
- // show that fuel truck pump needs power.
- if(isEngineOn _cursorTarget) then {
- s_player_fuelauto2 = player addAction [localize "STR_EPOCH_ACTIONS_FILLVEH", "\z\addons\dayz_code\actions\fill_nearestVehicle.sqf",_cursorTarget, 0, false, true, "",""];
- } else {
- s_player_fuelauto2 = player addAction [format["<t color='#ff0000'>%1</t>",localize "STR_EPOCH_ACTIONS_NEEDPOWER"], "",[], 0, false, true, "",""];
- };
- };
- } else {
- player removeAction s_player_fuelauto2;
- s_player_fuelauto2 = -1;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement