Advertisement
RamireDu06

Untitled

Oct 11th, 2020
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.09 KB | None | 0 0
  1. [[_container, _veh_type_of], {
  2. _container = _this select 0;
  3. _veh_type_of = _this select 1;
  4.  
  5. _container addAction
  6. [
  7. format ["<t color='#FF0000'>Ouvrir Ce(tte) %1</t>", getText (configFile >> "CfgVehicles" >> _veh_type_of >> "DisplayName")],
  8. {
  9. params ["_target", "_caller", "_actionId", "_arguments"];
  10.  
  11. _target = _this select 0;
  12.  
  13. _container_pos = getPos _target;
  14. _container_dir = getDir _target;
  15. _container_up = surfaceNormal (getPos _target);
  16.  
  17. _container_classname = _target getVariable ["vehicle_enclosed_classname", ""];
  18. _container_customization = _target getVariable ["vehicle_enclosed_customization", []];
  19. _container_loadouts = _target getVariable ["vehicle_enclosed_loadouts", []];
  20.  
  21. deleteVehicle _target;
  22.  
  23. _veh_in_container = createVehicle [_container_classname, [0,0,0], [], 0, "NONE"];
  24.  
  25. [_veh_in_container, true] call add_objects_to_all_zeus;
  26.  
  27. [[_veh_in_container, _container_customization, _container_loadouts, _container_pos, _container_dir, _container_up], {
  28. _veh_in_container = _this select 0;
  29. _container_customization = _this select 1;
  30. _container_loadouts = _this select 2;
  31. _container_pos = _this select 3;
  32. _container_dir = _this select 4;
  33. _container_up = _this select 5;
  34.  
  35. [_veh_in_container, (_container_customization select 0), (_container_customization select 1)] call BIS_fnc_initVehicle;
  36.  
  37. if ((count _container_loadouts) > 0) then {
  38. _compteur = 1;
  39. {
  40. _veh_in_container setPylonLoadout [_compteur, _x, true];
  41. _compteur = _compteur + 1;
  42. }forEach _container_loadouts;
  43. };
  44.  
  45. _veh_in_container setDir _container_dir;
  46. _veh_in_container setVectorUp _container_up;
  47. _veh_in_container setPos [(_container_pos select 0), (_container_pos select 1),(_container_pos select 2) + 0.5];
  48. }] remoteExec ["BIS_fnc_spawn", 0];
  49. },
  50. nil,
  51. 1.5,
  52. true,
  53. true,
  54. "",
  55. "true", // _target, _this, _originalTarget
  56. 5,
  57. false,
  58. "",
  59. ""
  60. ];
  61. }] remoteExec ["BIS_fnc_spawn", 0];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement