diff --git a/CHANGE LOG 1.0.5.txt b/CHANGE LOG 1.0.5.txt index 021b5d71a..d5a884608 100644 --- a/CHANGE LOG 1.0.5.txt +++ b/CHANGE LOG 1.0.5.txt @@ -5,6 +5,7 @@ [CHANGED] PBOPREFIX to $PBOPREFIX$ @Fank [CHANGED] Consum Eat/Drink in vehicle will add empty food/drink cans into vehicle inventory. @SilvDev +[CHANGED] Lootsystem based on DayZ 1.8 [INFO] Models/textures by Paul Tomany. @Sequisha. [INFO] Special thanks to http://verthosting.com for hosting our development server. \ No newline at end of file diff --git a/SQF/dayz_code/actions/player_drink.sqf b/SQF/dayz_code/actions/player_drink.sqf index ae4783c7d..5d88c7a66 100644 --- a/SQF/dayz_code/actions/player_drink.sqf +++ b/SQF/dayz_code/actions/player_drink.sqf @@ -46,20 +46,15 @@ if (["ItemSoda",_itemorignal] call fnc_inString) then { _dis=10; [player,_sfx,0,false,_dis] call dayz_zombieSpeak; [player,_dis,true,(getPosATL player)] spawn player_alertZombies; -}; +}; -if (_hasoutput) then { +if (_hasoutput && !_invehicle) then { // Selecting output _itemtodrop = drink_output select (drink_with_output find _itemorignal); - if (_invehicle) exitWith { - sleep 2; - (vehicle player) addMagazineCargoGlobal [_itemtodrop,1]; - }; - sleep 3; _nearByPile= nearestObjects [(getPosATL player), ["WeaponHolder","WeaponHolderBase"],2]; - if (count _nearByPile ==0) then { + if (count _nearByPile ==0) then { _iPos = getPosATL player; _radius = 0.0; _item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"]; @@ -70,11 +65,12 @@ if (_hasoutput) then { _item addMagazineCargoGlobal [_itemtodrop,1]; }; +if (_invehicle) then { + sleep 2; + (vehicle player) addMagazineCargoGlobal [_itemtodrop,1]; +}; - - - -//add infection chance for "ItemWaterbottle", +//add infection chance for "ItemWaterbottle", if ((random 15 < 1) and (_itemorignal == "ItemWaterbottle")) then { r_player_infected = true; player setVariable["USEC_infected",true,true]; diff --git a/SQF/dayz_code/actions/player_eat.sqf b/SQF/dayz_code/actions/player_eat.sqf index 8d08e6176..4b2938c50 100644 --- a/SQF/dayz_code/actions/player_eat.sqf +++ b/SQF/dayz_code/actions/player_eat.sqf @@ -42,24 +42,19 @@ _sfx = "eat"; [player,_sfx,0,false,_dis] call dayz_zombieSpeak; [player,_dis,true,(getPosATL player)] spawn player_alertZombies; -if (dayz_lastMeal < 3600) then { +if (dayz_lastMeal < 3600) then { if (_itemorignal == "FoodSteakCooked") then { //_regen = _regen * (10 - (10 max ((time - _Cookedtime) / 3600))); }; }; -if (_hasoutput) then { +if (_hasoutput && !_invehicle) then { // Selecting output _itemtodrop = food_output select (food_with_output find _itemorignal); - if (_invehicle) exitWith { - sleep 2; - (vehicle player) addMagazineCargoGlobal [_itemtodrop,1]; - }; - sleep 3; _nearByPile= nearestObjects [(getposATL player), ["WeaponHolder","WeaponHolderBase"],2]; - if (count _nearByPile ==0) then { + if (count _nearByPile ==0) then { _iPos = getPosATL player; _radius = 0.0; _item = createVehicle ["WeaponHolder", _iPos, [], _radius, "CAN_COLLIDE"]; @@ -70,6 +65,11 @@ if (_hasoutput) then { _item addMagazineCargoGlobal [_itemtodrop,1]; }; +if (_invehicle) then { + sleep 2; + (vehicle player) addMagazineCargoGlobal [_itemtodrop,1]; +}; + if (_rawfood and !_rawexceptions and (random 15 < 1)) then { r_player_infected = true; player setVariable["USEC_infected",true,true];