This commit is contained in:
[VB]AWOL
2014-06-07 18:05:19 -05:00
parent d4bfc2e4c1
commit c9c6f0309a

View File

@@ -48,26 +48,31 @@ if (["ItemSoda",_itemorignal] call fnc_inString) then {
[player,_dis,true,(getPosATL player)] spawn player_alertZombies; [player,_dis,true,(getPosATL player)] spawn player_alertZombies;
}; };
if (_hasoutput && !_invehicle) then { if (_hasoutput) then{
// Selecting output _itemtodrop = drink_output select(drink_with_output find _itemorignal);
_itemtodrop = drink_output select (drink_with_output find _itemorignal);
sleep 3; if (!_invehicle) then {
_nearByPile= nearestObjects [(getPosATL player), ["WeaponHolder","WeaponHolderBase"],2]; // Selecting output
if (count _nearByPile ==0) then { _itemtodrop = drink_output select (drink_with_output find _itemorignal);
_iPos = getPosATL player;
_radius = 0.0; sleep 3;
_item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"]; _nearByPile= nearestObjects [(getPosATL player), ["WeaponHolder","WeaponHolderBase"],2];
_item setposATL _iPos; if (count _nearByPile ==0) then {
} else { _iPos = getPosATL player;
_item = _nearByPile select 0; _radius = 0.0;
}; _item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"];
_item addMagazineCargoGlobal [_itemtodrop,1]; _item setposATL _iPos;
}; } else {
_item = _nearByPile select 0;
};
_item addMagazineCargoGlobal [_itemtodrop,1];
};
if (_invehicle) then {
sleep 2;
(vehicle player) addMagazineCargoGlobal [_itemtodrop,1];
};
if (_hasoutput && _invehicle) then {
sleep 2;
(vehicle player) addMagazineCargoGlobal [_itemtodrop,1];
}; };
//add infection chance for "ItemWaterbottle", //add infection chance for "ItemWaterbottle",