From 86b1f294aa2ccf379f5a34c43b33c08f40ed34a2 Mon Sep 17 00:00:00 2001 From: SilvDev Date: Sun, 16 Feb 2014 20:21:03 +0000 Subject: [PATCH] Update player_drink.sqf Add empty food/drink cans into vehicle inventory. Falls out if theres no inventory space. --- SQF/dayz_code/actions/player_drink.sqf | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/SQF/dayz_code/actions/player_drink.sqf b/SQF/dayz_code/actions/player_drink.sqf index 4494a8689..ae4783c7d 100644 --- a/SQF/dayz_code/actions/player_drink.sqf +++ b/SQF/dayz_code/actions/player_drink.sqf @@ -48,10 +48,15 @@ if (["ItemSoda",_itemorignal] call fnc_inString) then { [player,_dis,true,(getPosATL player)] spawn player_alertZombies; }; -if (_hasoutput and !_invehicle) then { +if (_hasoutput) 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 { @@ -84,4 +89,4 @@ dayz_thirst = 0; _display = uiNamespace getVariable 'DAYZ_GUI_display'; (_display displayCtrl 1302) ctrlShow true; -cutText [format[(localize "str_player_consumed"),_text], "PLAIN DOWN"]; \ No newline at end of file +cutText [format[(localize "str_player_consumed"),_text], "PLAIN DOWN"];