Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // WARNING: inGameUISetEventHandler script may replace any other scripts that is using "inGameUISetEventHandler" or this script may not work.
- FDLC_GETIN = {
- params ["_args"];
- _args params ["_object","_player"];
- _lildelay = 0.1;
- // if the _object is a DLC vehicle
- _dlc_obj_number = getObjectDLC _object;
- systemChat str(typeOf _object);
- if (typeName _dlc_obj_number == "SCALAR") then {
- // if the player doesn't own the DLC
- if (!(_dlc_obj_number in getDLCs 1)) then {
- [] spawn {
- _allDisps = allDisplays;
- {
- if (str(_x) == "Display #169") then {
- _x closeDisplay 1;
- };
- } forEach _allDisps;
- };
- // Where magic happens
- _txt =_args select 4;
- if (_txt find "Pilot" != -1) then {
- _player moveInDriver _object;
- };
- if (_txt find "Pilot's" != -1) then {
- _player setpos getpos _object;
- sleep _lildelay;
- _player moveInTurret [_object,[0]];
- };
- if (_txt find "Copilot" != -1) then {
- _player moveInTurret [_object,[0]];
- };
- if (_txt find "Copilot's" != -1) then {
- _player setpos getpos _object;
- sleep _lildelay;
- _player moveInTurret [_object,[0]];
- };
- if (_txt find "Gunner" != -1) then {
- _player moveInGunner _object;
- };
- if (_txt find "Gunner's" != -1) then {
- _player setpos getpos _object;
- sleep _lildelay;
- _player moveInGunner _object;
- };
- if (typeOf _object in ["B_Heli_Transport_03_F","B_T_VTOL_01_armed_F","B_T_VTOL_01_infantry_F","B_T_VTOL_01_vehicle_F"]) then {
- if (_txt find "Right door gunner" != -1) then {
- _player moveInTurret [_object,[2]];
- };
- if (_txt find "Left door gunner" != -1) then {
- _player moveInTurret [_object,[1]];
- };
- if (_txt find "Right door gunner's" != -1) then {
- _player setpos getpos _object;
- sleep _lildelay;
- _player moveInTurret [_object,[2]];
- };
- if (_txt find "Left door gunner's" != -1) then {
- _player setpos getpos _object;
- sleep _lildelay;
- _player moveInTurret [_object,[1]];
- };
- };
- if (typeOf _object in ["O_Heli_Transport_04_F","O_Heli_Transport_04_ammo_F","O_Heli_Transport_04_bench_F","O_Heli_Transport_04_box_F","O_Heli_Transport_04_fuel_F","O_Heli_Transport_04_medevac_F","O_Heli_Transport_04_repair_F","O_Heli_Transport_04_covered_F"]) then {
- if (_txt find "Loadmaster" != -1) then {
- _player moveInTurret [_object,[1]];
- };
- if (_txt find "Loadmaster's" != -1) then {
- _player setpos getpos _object;
- sleep _lildelay;
- _player moveInTurret [_object,[1]];
- };
- };
- // Land Vehicles
- if (_txt find "Driver" != -1) then {
- _player moveInDriver _object;
- };
- if (_txt find "Driver's" != -1) then {
- _player setpos getpos _object;
- sleep _lildelay;
- _player moveInDriver _object;
- };
- if (_txt find "Commander" != -1) then {
- _player moveInCommander _object;
- };
- if (_txt find "Commander's" != -1) then {
- _player setpos getpos _object;
- sleep _lildelay;
- _player moveInCommander _object;
- };
- };
- }
- };
- inGameUISetEventHandler ["Action", "[_this] call FDLC_GETIN"];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement