Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [[_container, _veh_type_of], {
- _container = _this select 0;
- _veh_type_of = _this select 1;
- _container addAction
- [
- format ["<t color='#FF0000'>Ouvrir Ce(tte) %1</t>", getText (configFile >> "CfgVehicles" >> _veh_type_of >> "DisplayName")],
- {
- params ["_target", "_caller", "_actionId", "_arguments"];
- _target = _this select 0;
- _container_pos = getPos _target;
- _container_dir = getDir _target;
- _container_up = surfaceNormal (getPos _target);
- _container_classname = _target getVariable ["vehicle_enclosed_classname", ""];
- _container_customization = _target getVariable ["vehicle_enclosed_customization", []];
- _container_loadouts = _target getVariable ["vehicle_enclosed_loadouts", []];
- deleteVehicle _target;
- _veh_in_container = createVehicle [_container_classname, [0,0,0], [], 0, "NONE"];
- [_veh_in_container, true] call add_objects_to_all_zeus;
- [[_veh_in_container, _container_customization, _container_loadouts, _container_pos, _container_dir, _container_up], {
- _veh_in_container = _this select 0;
- _container_customization = _this select 1;
- _container_loadouts = _this select 2;
- _container_pos = _this select 3;
- _container_dir = _this select 4;
- _container_up = _this select 5;
- [_veh_in_container, (_container_customization select 0), (_container_customization select 1)] call BIS_fnc_initVehicle;
- if ((count _container_loadouts) > 0) then {
- _compteur = 1;
- {
- _veh_in_container setPylonLoadout [_compteur, _x, true];
- _compteur = _compteur + 1;
- }forEach _container_loadouts;
- };
- _veh_in_container setDir _container_dir;
- _veh_in_container setVectorUp _container_up;
- _veh_in_container setPos [(_container_pos select 0), (_container_pos select 1),(_container_pos select 2) + 0.5];
- }] remoteExec ["BIS_fnc_spawn", 0];
- },
- nil,
- 1.5,
- true,
- true,
- "",
- "true", // _target, _this, _originalTarget
- 5,
- false,
- "",
- ""
- ];
- }] remoteExec ["BIS_fnc_spawn", 0];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement