// для NAPF (Observatory)
if (isServer) then {
_vehicle_0 = objNull;
if (true) then
{
_this = createVehicle ["Land_Ind_Oil_Tower_EP1", [16631.457, 18509.262, -0.0089469124], [], 0, "CAN_COLLIDE"];
_vehicle_0 = _this;
_this setDir -21.144699;
_this setPos [16631.457, 18509.262, -0.0089469124];
};
_vehicle_1 = objNull;
if (true) then
{
_this = createVehicle ["Land_Ind_Oil_Pump_EP1", [16627.26, 18523.248, -0.38578352], [], 0, "CAN_COLLIDE"];
_vehicle_1 = _this;
_this setDir 67.465546;
_this setPos [16627.26, 18523.248, -0.38578352];
};
_vehicle_2 = objNull;
if (true) then
{
_this = createVehicle ["Barrels", [16625.332, 18521.629, 0.17259257], [], 0, "CAN_COLLIDE"];
_vehicle_2 = _this;
_this setDir -23.203114;
_this setPos [16625.332, 18521.629, 0.17259257];
};
_vehicle_3 = objNull;
if (true) then
{
_this = createVehicle ["Barrels", [16630.93, 18510.822, 5.1769428], [], 0, "CAN_COLLIDE"];
_vehicle_3 = _this;
_this setDir -21.676802;
_this setPos [16630.93, 18510.822, 5.1769428];
};
};
processInitCommands;
// для Origins (Taviana Oilfields)
if (isServer) then {
_vehicle_0 = objNull;
if (true) then
{
_this = createVehicle ["Barrels", [8482.333, 16683.791, 0.00020122528], [], 0, "CAN_COLLIDE"];
_vehicle_0 = _this;
_this setDir 78.419907;
_this setPos [8482.333, 16683.791, 0.00020122528];
};
_vehicle_1 = objNull;
if (true) then
{
_this = createVehicle ["Barrels", [8494.0107, 16689.762, -0.00042533875], [], 0, "CAN_COLLIDE"];
_vehicle_1 = _this;
_this setPos [8494.0107, 16689.762, -0.00042533875];
};
_vehicle_2 = objNull;
if (true) then
{
_this = createVehicle ["Barrels", [8483.1904, 16717.623, -1.9073486e-006], [], 0, "CAN_COLLIDE"];
_vehicle_2 = _this;
_this setPos [8483.1904, 16717.623, -1.9073486e-006];
};
_vehicle_3 = objNull;
if (true) then
{
_this = createVehicle ["Barrels", [8597.915, 16543.994, 1.9073486e-005], [], 0, "CAN_COLLIDE"];
_vehicle_3 = _this;
_this setPos [8597.915, 16543.994, 1.9073486e-005];
};
_vehicle_4 = objNull;
if (true) then
{
_this = createVehicle ["Barrels", [8584.5352, 16531.689, 5.7220459e-005], [], 0, "CAN_COLLIDE"];
_vehicle_4 = _this;
_this setPos [8584.5352, 16531.689, 5.7220459e-005];
};
_vehicle_5 = objNull;
if (true) then
{
_this = createVehicle ["Barrels", [8586.7373, 16563.609, 9.5367432e-006], [], 0, "CAN_COLLIDE"];
_vehicle_5 = _this;
_this setPos [8586.7373, 16563.609, 9.5367432e-006];
};
_vehicle_6 = objNull;
if (true) then
{
_this = createVehicle ["Barrels", [8534.0771, 16387.494, -7.0095062e-005], [], 0, "CAN_COLLIDE"];
_vehicle_6 = _this;
_this setPos [8534.0771, 16387.494, -7.0095062e-005];
};
_vehicle_7 = objNull;
if (true) then
{
_this = createVehicle ["Barrels", [8548.874, 16390.488, 0.00013113022], [], 0, "CAN_COLLIDE"];
_vehicle_7 = _this;
_this setPos [8548.874, 16390.488, 0.00013113022];
};
_vehicle_8 = objNull;
if (true) then
{
_this = createVehicle ["Barrels", [8522.1768, 16420.061, -0.00015115738], [], 0, "CAN_COLLIDE"];
_vehicle_8 = _this;
_this setPos [8522.1768, 16420.061, -0.00015115738];
};
_vehicle_9 = objNull;
if (true) then
{
_this = createVehicle ["Barrels", [8409.2129, 16328.884, 3.5524368e-005], [], 0, "CAN_COLLIDE"];
_vehicle_9 = _this;
_this setPos [8409.2129, 16328.884, 3.5524368e-005];
};
_vehicle_10 = objNull;
if (true) then
{
_this = createVehicle ["Barrels", [8410.1475, 16322.804, -5.0544739e-005], [], 0, "CAN_COLLIDE"];
_vehicle_10 = _this;
_this setPos [8410.1475, 16322.804, -5.0544739e-005];
};
_vehicle_11 = objNull;
if (true) then
{
_this = createVehicle ["Barrels", [8868.8203, 15483.096, 4.5776367e-005], [], 0, "CAN_COLLIDE"];
_vehicle_11 = _this;
_this setPos [8868.8203, 15483.096, 4.5776367e-005];
};
_vehicle_12 = objNull;
if (true) then
{
_this = createVehicle ["Barrels", [8864.6143, 15481.8, 4.5776367e-005], [], 0, "CAN_COLLIDE"];
_vehicle_12 = _this;
_this setPos [8864.6143, 15481.8, 4.5776367e-005];
};
_vehicle_13 = objNull;
if (true) then
{
_this = createVehicle ["Barrels", [8861.1914, 15479.081, -1.5258789e-005], [], 0, "CAN_COLLIDE"];
_vehicle_13 = _this;
_this setPos [8861.1914, 15479.081, -1.5258789e-005];
};
_vehicle_14 = objNull;
if (true) then
{
_this = createVehicle ["Barrels", [8857.0898, 15476.922, -9.5367432e-005], [], 0, "CAN_COLLIDE"];
_vehicle_14 = _this;
_this setPos [8857.0898, 15476.922, -9.5367432e-005];
};
_vehicle_15 = objNull;
if (true) then
{
_this = createVehicle ["Barrels", [8851.543, 15473.568, 0.00011825562], [], 0, "CAN_COLLIDE"];
_vehicle_15 = _this;
_this setPos [8851.543, 15473.568, 0.00011825562];
};
_vehicle_16 = objNull;
if (true) then
{
_this = createVehicle ["Barrels", [8859.5107, 15472.936, 1.5258789e-005], [], 0, "CAN_COLLIDE"];
_vehicle_16 = _this;
_this setPos [8859.5107, 15472.936, 1.5258789e-005];
};
_vehicle_17 = objNull;
if (true) then
{
_this = createVehicle ["Barrels", [8865.5488, 15475.983, 3.0517578e-005], [], 0, "CAN_COLLIDE"];
_vehicle_17 = _this;
_this setPos [8865.5488, 15475.983, 3.0517578e-005];
};
_vehicle_18 = objNull;
if (true) then
{
_this = createVehicle ["Barrels", [8871.1602, 15478.94, 0], [], 0, "CAN_COLLIDE"];
_vehicle_18 = _this;
_this setPos [8871.1602, 15478.94, 0];
};
_vehicle_19 = objNull;
if (true) then
{
_this = createVehicle ["Barrels", [8853.9941, 15468.681, 6.8664551e-005], [], 0, "CAN_COLLIDE"];
_vehicle_19 = _this;
_this setPos [8853.9941, 15468.681, 6.8664551e-005];
};
};
processInitCommands;
private["_random","_barrels","_hasBarrelEmpty","_oilBarrelEmpty","_dis","_sfx","_oilbarrel","_addOil"];
_random = random 10;
_barrels = _this select 3;
_hasBarrelEmpty = {_x == "ItemFuelBarrelEmpty"} count magazines player;
_oilbarrel = "ItemOilBarrel";
if (DZE_ActionInProgress) exitWith { cutText ["Бочка уже наполняется!" , "PLAIN DOWN"]; };
if(_hasBarrelEmpty >= 1) then {
DZE_ActionInProgress = true;
player playActionNow "Medic";
_dis=50;
_sfx = "refuel";
[player,_sfx,0,false,_dis] call dayz_zombieSpeak;
[player,_dis,true,(getPosATL player)] spawn player_alertZombies;
sleep 6;
_oilBarrelEmpty = _barrels getVariable ["oilBarrelEmpty",false];
if(!_oilBarrelEmpty) then {
player removeMagazine "ItemFuelBarrelEmpty";
_addOil = [player,_oilbarrel] call BIS_fnc_invAdd;
if (_addOil) then {
if (_random > 2) then {
DZE_ActionInProgress = false;
cutText ["Вы наполнили бочку нефтью.","PLAIN DOWN"];
player removeAction s_player_filloil;
s_player_filloil = -1;
} else {
DZE_ActionInProgress = false;
_barrels setVariable ["oilBarrelEmpty",true,true];
cutText ["Запас нефти исчерпан...", "PLAIN DOWN"];
player removeAction s_player_filloil;
s_player_filloil = -1;
};
} else {
cutText ["Недостаточно места в снаряжении...", "PLAIN DOWN"];
DZE_ActionInProgress = false;
player removeAction s_player_filloil;
s_player_filloil = -1;
};
} else {
cutText ["Запас нефти исчерпан...", "PLAIN DOWN"];
DZE_ActionInProgress = false;
player removeAction s_player_filloil;
s_player_filloil = -1;
};
} else {
DZE_ActionInProgress = false;
cutText ["Требуется пустая бочка...", "PLAIN DOWN"];
};