Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update fn_houseCleanup.sqf #730

Open
wants to merge 4 commits into
base: v5.X.X
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update fn_houseCleanup.sqf
Fix House Cleanup Dupe #729
#729
TaktischerSpeck committed Jul 22, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 132b5bc8b23b6eed2208e8c9e6b9b60de5ee88ed
19 changes: 19 additions & 0 deletions life_server/Functions/Housing/fn_houseCleanup.sqf
Original file line number Diff line number Diff line change
@@ -16,6 +16,25 @@ private _containers = [_query,2,true] call DB_fnc_asyncCall;
_x params ["_pos"];
_pos = parseSimpleArray _pos;
{
_x setPos [8417.31,25137.8,0.000846863];
_x setVariable ["trunk_in_use",true,true];

_trunkData = _x getVariable ["Trunk",[[],0]];
_containerID = _x getVariable ["container_id",-1];
_trunkData = [_trunkData] call DB_fnc_mresArray;
_query = format ["UPDATE containers SET inventory='%1' WHERE id='%2'",_trunkData,_containerID];
[_query,1] call DB_fnc_asyncCall;

_containerID = _x getVariable ["container_id",-1];
_vehItems = getItemCargo _x;
_vehMags = getMagazineCargo _x;
_vehWeapons = getWeaponCargo _x;
_vehBackpacks = getBackpackCargo _x;
_cargo = [_vehItems,_vehMags,_vehWeapons,_vehBackpacks];
_cargo = [_cargo] call DB_fnc_mresArray;
_query = format ["UPDATE containers SET gear='%1' WHERE id='%2'",_cargo,_containerID];
[_query,1] call DB_fnc_asyncCall;

deleteVehicle _x;
} forEach (nearestObjects[_pos,["Box_IND_Grenades_F","B_supplyCrate_F"],12]);
} forEach _containers;