Advertisement
Guest User

Untitled

a guest
Mar 24th, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.45 KB | None | 0 0
  1.  
  2. opec_fnc_garageNew = {
  3. disableSerialization;
  4. uiNamespace setVariable [ "current_garage", ( _this select 0 ) ];
  5. _fullVersion = missionNamespace getVariable [ "BIS_fnc_arsenal_fullGarage", false ];
  6. if !( isNull ( uiNamespace getVariable [ "BIS_fnc_arsenal_cam", objNull ] ) ) exitwith { "Garage Viewer is already running" call bis_fnc_logFormat; };
  7. { deleteVehicle _x; } forEach nearestObjects [ getMarkerPos ( _this select 0 ), [ "AllVehicles" ], 10 ];
  8. _veh = createVehicle [ "Land_HelipadEmpty_F", getMarkerPos ( _this select 0 ), [], 0, "CAN_COLLIDE" ];
  9. uiNamespace setVariable [ "garage_pad", _veh ];
  10. missionNamespace setVariable [ "BIS_fnc_arsenal_fullGarage", [ true, 0, false, [ false ] ] call bis_fnc_param ];
  11. with missionNamespace do { BIS_fnc_garage_center = [ true, 1, _veh, [ objNull ] ] call bis_fnc_param; };
  12. with uiNamespace do {
  13. _displayMission = [] call ( uiNamespace getVariable "bis_fnc_displayMission" );
  14. if !( isNull findDisplay 312 ) then { _displayMission = findDisplay 312; };
  15. _displayMission createDisplay "RscDisplayGarage";
  16. uiNamespace setVariable [ "running_garage", true ];
  17. waitUntil { sleep 0.25; isNull ( uiNamespace getVariable [ "BIS_fnc_arsenal_cam", objNull ] ) };
  18. _marker = uiNamespace getVariable "current_garage";
  19. _pad = uiNamespace getVariable "garage_pad";
  20. deleteVehicle _pad;
  21. _veh_list = ( getMarkerPos _marker ) nearEntities 5;
  22. {
  23. _vehType = typeOf _x;
  24. _textures = getObjectTextures _x;
  25.  
  26. _crew = crew _x;
  27. {
  28. _x spawn {
  29. _this action [ "Eject", vehicle _this ];
  30. sleep ( random 2 );
  31. _this setDamage 1;
  32. sleep ( random 5 );
  33. deleteVehicle _this;
  34. };
  35. } forEach _crew;
  36. deleteVehicle _x;
  37. sleep 0.5;
  38. _new_veh = createVehicle [ _vehType, getMarkerPos _marker, [], 0, "CAN_COLLIDE" ];
  39. _new_veh setPosATL [ ( position _new_veh select 0 ), ( position _new_veh select 1 ), 0.25 ];
  40. _vehDir = markerDir _marker;
  41. _new_veh setDir _vehDir;
  42. _count = 0;
  43. {
  44. _new_veh setObjectTexture [ _count, _x ];
  45. _count = _count + 1;
  46. } forEach _textures;
  47. } forEach _veh_list;
  48. };
  49. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement