Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. /*
  2. Author: Bryan "Tonic" Boardwine
  3.  
  4. Description:
  5. Cleans up containers inside the house.
  6. */
  7. private["_query","_houses"];
  8. _query = format["SELECT pid, pos, inventory, containers FROM houses WHERE pid='%1' AND owned='1'",_this];
  9. waitUntil{!DB_Async_Active};
  10. _houses = [_query,2,true] call DB_fnc_asyncCall;
  11.  
  12. if(count _houses == 0) exitWith {};
  13. {
  14. _pos = call compile format["%1",_x select 1];
  15. //_house = nearestBuilding _pos; // Old Line
  16. _house = nearestObject [_pos,"house_F"]; // New Line
  17.  
  18. if(!isNil {(_house getVariable "containers")}) then {
  19. {if(!isNull _x) then {deleteVehicle _x;};} foreach (_house getVariable "containers");
  20. _house setVariable["containers",nil,true];
  21. };
  22. } foreach _houses;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement