Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- /////////////////////////////////////////////////////////////
- Strobe 2 Vehicle
- Credits:
- -Modified version of original EtV by Stealthstick and zooloo75
- to allow attaching IR strobe to vehicles.
- -Also used Vehicle IR script by Lala14 and Tajin as reference
- for creating specific attaching points on vehicle classes.
- -Modified by READTHESCROLL
- /////////////////////////////////////////////////////////////
- INSTALL:
- Copy script and place into editor of choice. Save as S2V.sqf
- Place script in your mission file in a folder called "addons".
- Paste this at the VERY BOTTOM of init.sqf. Merge with existing
- and move to bottom of init.sqf if you already have a
- if (!isDedicated and hasInterface) then block.
- if (!isDedicated and hasInterface) then {
- // waitUntil Client Is Actually Loaded In Game
- waitUntil {!isNil "ExileClientLoadedIn"};
- [] execVM "addons\S2V.sqf";
- // waitUntil S2VInitialized is populated by S2V.sqf
- waitUntil {!isNil "S2VInitialized"};
- [player] call S2V_actions;
- };
- BE FILTERS - Line 1 createvehicle.txt - !="NVG_TargetW"
- /////////////////////////////////////////////////////////////
- */
- S2V_StrobeCheck =
- {
- _irGrenade = _this select 0;
- _unit = _this select 1;
- _hasIt = _irGrenade in (magazines _unit);
- _nearVehs = nearestObjects [_unit,["Air","Ship","LandVehicle"],5];
- _return = (_hasIt && count _nearVehs > 0 && alive _unit); // Add " && !ExilePlayerInSafezone" to disable placing strobe on vehicles in safe zone
- _return
- };
- S2V_AttachStrobe =
- {
- _array = _this select 3;
- _irGrenade = _array select 0;
- _unit = _array select 1;
- private "_class";
- _unit removeMagazine _irGrenade;
- _unit playMove "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon";
- switch _irGrenade do
- {
- case "B_IR_Grenade":
- {
- _class = "NVG_TargetW";
- };
- };
- _nearVehicle = (nearestObjects [_unit,["Air","Ship","LandVehicle"],5]) select 0;
- _irStrobe = _class createVehicle getPos (_nearVehicle);
- _unit setVariable ["irStrobe",_irStrobe,true];
- (_unit getVariable "irStrobe") attachTo [_nearVehicle,[0,0,0]];
- _pos = [0,0,0];
- //CARS
- if (_nearVehicle isKindOf "B_MRAP_01_hmg_F") then { _pos = [0,-1,0]; }; //Hunter HMG
- if (_nearVehicle isKindOf "MRAP_01_base_F") then { _pos = [0,-4.5,0.5]; }; //Hunter
- if (_nearVehicle isKindOf "O_MRAP_02_hmg_F") then { _pos = [0,-4,0.2]; }; //Ifrit HMG
- if (_nearVehicle isKindOf "MRAP_02_base_F") then { _pos = [0,-5,0.5]; }; //Ifrit
- if (_nearVehicle isKindOf "I_MRAP_03_hmg_F") then { _pos = [0,-3.08,0.3]; }; //Strider HMG
- if (_nearVehicle isKindOf "MRAP_03_base_F") then { _pos = [0,-3.08,0.3]; }; //Strider
- if (_nearVehicle isKindOf "Quadbike_01_base_F") then { _pos = [0.3,0.3,-0.5]; };
- if ((_nearVehicle isKindOf "Offroad_01_base_f") OR (_nearVehicle isKindOf "Offroad_01_armed_base_F")) then { _pos = [0,-.4,0.45]; };
- if (_nearVehicle isKindOf "Hatchback_01_base_F") then { _pos = [0,-1.5,0.3]; };
- if (_nearVehicle isKindOf "SUV_01_base_F") then { _pos = [0,0,0.5]; };
- if (_nearVehicle isKindOf "Van_01_base_F") then { _pos = [0,0,1]; };
- if (_nearVehicle isKindOf "Truck_01_base_F") then { _pos = [0,-10,-3]; }; //Zamak
- if (_nearVehicle isKindOf "Truck_02_base_F") then { _pos = [0,2.9,0.5]; }; //Tempest
- if (_nearVehicle isKindOf "Truck_03_base_F") then { _pos = [0,3.2,0.9]; }; //HEMMT
- //HELIS
- if (_nearVehicle isKindOf "Heli_Light_01_base_F") then { _pos = [0,-4.1,-0.2]; }; //Pawnee
- if ((_nearVehicle isKindOf "I_Heli_light_03_unarmed_base_F") OR (_nearVehicle isKindOf "I_Heli_light_03_base_F")) then { _pos = [0,-9,2]; }; //Hellcat
- if ((_nearVehicle isKindOf "Heli_Light_02_base_F") OR (_nearVehicle isKindOf "I_Heli_Transport_02_F")) then { _pos = [0,-9,0]; }; //Orca
- if (_nearVehicle isKindOf "Heli_Transport_04_base_F") then { _pos = [0,-8.95,0]; }; //Taru
- if (_nearVehicle isKindOf "Heli_Transport_02_base_F") then { _pos = [0,-9,0]; }; //Mohawk
- if (_nearVehicle isKindOf "Heli_Transport_01_base_F") then { _pos = [0,-8,0.6]; }; //Ghosthawk
- if (_nearVehicle isKindOf "Heli_Transport_03_base_F") then { _pos = [0,-5.4,0]; }; //Huron
- (_unit getVariable "irStrobe") attachTo [_nearVehicle,_pos];
- };
- S2V_Actions =
- {
- private ["_unit"];
- _unit = _this select 0;
- _unit addAction ["<t color=""#FFE496"">" +"Attach IR Strobe", S2V_AttachStrobe, ["B_IR_Grenade",_unit], 1, true, true, "","['B_IR_Grenade',_target] call S2V_StrobeCheck"];
- };
- [player] call S2V_Actions;
- S2VInitialized = true;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement