Advertisement
Guest User

sdad

a guest
May 24th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.70 KB | None | 0 0
  1. #include "..\..\script_macros.hpp"
  2. /*
  3. * File: fn_keyHandler.sqf
  4. * Author: Bryan "Tonic" Boardwine
  5. *
  6. * Description:
  7. * Main key handler for event 'keyDown'.
  8. */
  9. private ["_handled","_shift","_alt","_code","_ctrl","_alt","_ctrlKey","_veh","_locked","_interactionKey","_mapKey","_interruptionKeys"];
  10. _ctrl = _this select 0;
  11. _code = _this select 1;
  12. _shift = _this select 2;
  13. _ctrlKey = _this select 3;
  14. _alt = _this select 4;
  15. _speed = speed cursorObject;
  16. _handled = false;
  17.  
  18. _interactionKey = if (count (actionKeys "User10") isEqualTo 0) then {219} else {(actionKeys "User10") select 0};
  19. _mapKey = (actionKeys "ShowMap" select 0);
  20. //hint str _code;
  21. _interruptionKeys = [17,30,31,32]; //A,S,W,D
  22.  
  23. //Vault handling...
  24. if ((_code in (actionKeys "GetOver") || _code in (actionKeys "salute") || _code in (actionKeys "SitDown") || _code in (actionKeys "Throw") || _code in (actionKeys "GetIn") || _code in (actionKeys "GetOut") || _code in (actionKeys "Fire") || _code in (actionKeys "ReloadMagazine") || _code in [5,6,7,16,18,21]) && ((player getVariable ["restrained",false]) || (player getVariable ["playerSurrender",false]) || (player getVariable ["ziptied",false]) || life_isknocked || life_istazed)) exitWith {
  25. true;
  26. };
  27.  
  28. if (life_action_inUse) exitWith {
  29. if (!life_interrupted && _code in _interruptionKeys) then {life_interrupted = true;};
  30. _handled;
  31. };
  32.  
  33. //Hotfix for Interaction key not being able to be bound on some operation systems.
  34. if (!(count (actionKeys "User10") isEqualTo 0) && {(inputAction "User10" > 0)}) exitWith {
  35. //Interaction key (default is Left Windows, can be mapped via Controls -> Custom -> User Action 10)
  36. if (!life_action_inUse) then {
  37. [] spawn {
  38. private "_handle";
  39. _handle = [] spawn life_fnc_actionKeyHandler;
  40. waitUntil {scriptDone _handle};
  41. life_action_inUse = false;
  42. };
  43. };
  44. true;
  45. };
  46.  
  47. if (life_container_active) then {
  48. switch (_code) do {
  49. //space key
  50. case 57: {
  51. [] spawn life_fnc_placestorage;
  52. };
  53. };
  54. true;
  55. };
  56.  
  57. if (life_barrier_active) then {
  58. switch (_code) do {
  59. //Backspace key
  60. case 14: {
  61. [] spawn life_fnc_placeableCancel;
  62. _handled = true;
  63. };
  64. };
  65. true;
  66. };
  67.  
  68. switch (_code) do {
  69. // -- Disable commander/tactical view
  70. if (LIFE_SETTINGS(getNumber,"disableCommanderView") isEqualTo 1) then {
  71. private _CommandMode = actionKeys "tacticalView";
  72.  
  73. if (_code in _CommandMode) then {
  74. hint localize "STR_NOTF_CommanderView";
  75. _handled = true;
  76. };
  77. };
  78. //Space key for Jumping
  79. case 57: {
  80. if (!_shift && life_barrier_active) then {
  81. 0 spawn life_fnc_placeablesPlaceComplete;
  82. };
  83. if (isNil "jumpActionTime") then {jumpActionTime = 0;};
  84. if (_shift && {!(animationState player isEqualTo "AovrPercMrunSrasWrflDf")} && {isTouchingGround player} && {stance player isEqualTo "STAND"} && {speed player > 2} && {!life_is_arrested} && {((velocity player) select 2) < 2.5} && {time - jumpActionTime > 1.5}) then {
  85. if (life_barrier_active) then { [true] call life_fnc_placeableCancel; };
  86. jumpActionTime = time; //Update the time.
  87. [player] remoteExec ["life_fnc_jumpFnc",RANY]; //Global execution
  88. _handled = true;
  89. };
  90. };
  91. //Surrender (Shift + B)
  92. case 48: {
  93. if (_shift) then {
  94. if (player getVariable ["playerSurrender",false]) then {
  95. player setVariable ["playerSurrender",false,true];
  96. } else {
  97. [] spawn life_fnc_surrender;
  98. };
  99. _handled = true;
  100. };
  101.  
  102. if( _alt ) then {
  103. if( playerSide isEqualTo west && { time - life_cooldown > 1 } ) then {
  104. life_cooldown = time;
  105. call life_fnc_seizeObjects;
  106. };
  107. _handled = true;
  108. };
  109. };
  110. //Map Key
  111. case _mapKey: {
  112. switch (playerSide) do {
  113. case west: {if (!visibleMap) then {[] spawn life_fnc_copMarkers;}};
  114. case independent: {if (!visibleMap) then {[] spawn life_fnc_medicMarkers;}};
  115. case civilian: {if (!visibleMap) then {[] spawn life_fnc_civMarkers;}};
  116. case east: {if (!visibleMap) then {[] spawn life_fnc_thwMarkers;}};
  117. };
  118. };
  119. case 64: {
  120. if(!(life_idcard_data isEqualto [])) then {
  121. if(!isnull cursorTarget) then {
  122. if(alive cursorTarget) then {
  123. if(cursorTarget isKindOf "Man") then {
  124. [life_idcard_data,getplayeruid player,player] remoteExec ["life_fnc_show_idcard",cursorTarget];
  125. hint localize "STR_capps_cur_error_success";
  126. } else {
  127. [life_idcard_data,getplayeruid player,player] spawn life_fnc_show_idcard;
  128. hint localize "STR_capps_cur_error_no_target";
  129. };
  130. } else {
  131. [life_idcard_data,getplayeruid player,player] spawn life_fnc_show_idcard;
  132. hint localize "STR_capps_cur_error_not_alive";
  133. };
  134. } else {
  135. [life_idcard_data,getplayeruid player,player] spawn life_fnc_show_idcard;
  136. hint localize "STR_capps_cur_error_no_target";
  137. };
  138. } else {
  139. hint localize "STR_capps_cur_error_no_idcard";
  140. };
  141. };
  142. case 65: {
  143. if(!(playerSide isEqualto CIVILIAN)) then {
  144. if(!(life_idcard_data isEqualto [])) then {
  145. if(!isnull cursorTarget) then {
  146. if(alive cursorTarget) then {
  147. if(cursorTarget isKindOf "Man") then {
  148. [life_idcard_data,getplayeruid player,player,playerSide,(call life_coplevel) + (call life_mediclevel) + (call life_thwlevel)] remoteExec ["life_fnc_show_idcard",cursorTarget];
  149. hint localize "STR_capps_cur_error_success_card";
  150. } else {
  151. [life_idcard_data,getplayeruid player,player,playerSide,(call life_coplevel) + (call life_mediclevel) + (call life_thwlevel)] spawn life_fnc_show_idcard;
  152. hint localize "STR_capps_cur_error_no_target";
  153. };
  154. } else {
  155. [life_idcard_data,getplayeruid player,player,playerSide,(call life_coplevel) + (call life_mediclevel) + (call life_thwlevel)] spawn life_fnc_show_idcard;
  156. hint localize "STR_capps_cur_error_not_alive";
  157. };
  158. } else {
  159. [life_idcard_data,getplayeruid player,player,playerSide,(call life_coplevel) + (call life_mediclevel) + (call life_thwlevel)] spawn life_fnc_show_idcard;
  160. hint localize "STR_capps_cur_error_no_target";
  161. };
  162. } else {
  163. hint localize "STR_capps_cur_error_no_idcard";
  164. };
  165. };
  166. };
  167. case 207: {
  168. switch (player getVariable["Earplugs",0]) do {
  169. case 0: {hint composeText [ image "icons\sound.paa"," 90% Leiser"]; 1 fadeSound 0.1; player setVariable ["Earplugs", 10];life_fadeSound = true; [] call life_fnc_hudUpdate;};
  170. case 10: {hint composeText [ image "icons\sound.paa"," 60% Leiser"]; 1 fadeSound 0.4; player setVariable ["Earplugs", 40];life_fadeSound = true; [] call life_fnc_hudUpdate;};
  171. case 40: {hint composeText [ image "icons\sound.paa"," 30% Leiser"]; 1 fadeSound 0.7; player setVariable ["Earplugs", 70];life_fadeSound = true; [] call life_fnc_hudUpdate;};
  172. case 70: {hint composeText [ image "icons\sound_new.paa"," Normaler Sound"]; 1 fadeSound 1; player setVariable ["Earplugs", 0]; life_fadeSound = false; [] call life_fnc_hudUpdate;};
  173. };
  174. };
  175. //Holster / recall weapon. (Shift + H)
  176. case 35: {
  177. if (_shift && !_ctrlKey && !(currentWeapon player isEqualTo "")) then {
  178. life_curWep_h = currentWeapon player;
  179. player action ["SwitchWeapon", player, player, 100];
  180. player switchCamera cameraView;
  181. };
  182.  
  183. if (!_shift && _ctrlKey && !isNil "life_curWep_h" && {!(life_curWep_h isEqualTo "")}) then {
  184. if (life_curWep_h in [primaryWeapon player,secondaryWeapon player,handgunWeapon player]) then {
  185. player selectWeapon life_curWep_h;
  186. };
  187. };
  188. };
  189. //Interaction key (default is Left Windows, can be mapped via Controls -> Custom -> User Action 10)
  190. case _interactionKey: {
  191. if (!life_action_inUse) then {
  192. [] spawn {
  193. private "_handle";
  194. _handle = [] spawn life_fnc_actionKeyHandler;
  195. waitUntil {scriptDone _handle};
  196. life_action_inUse = false;
  197. };
  198. };
  199. };
  200. //Restraining (Shift + R)
  201. case 19: {
  202. if ((_alt) && (vehicle player == player)) then {
  203. [] call life_fnc_useredgull;
  204. };
  205.  
  206. if (_shift) then {_handled = true;};
  207. if (_shift && playerSide isEqualTo west && {!isNull cursorObject} && {cursorObject isKindOf "Man"} && {(isPlayer cursorObject)} && {(side cursorObject in [civilian,independent,east])} && {alive cursorObject} && {cursorObject distance player < 3.5} && {!(cursorObject getVariable "Escorting")} && {!(cursorObject getVariable "restrained")} && {speed cursorObject < 1}) then {
  208. [] call life_fnc_restrainAction;
  209. } else {
  210. [] call zipties_fnc_zip_tieAction;
  211. };
  212. };
  213. //O Key
  214. case 24: {
  215. if (!_shift && !_alt && !_ctrlKey && !(playerSide isEqualTo civilian) && (vehicle player != player)) then {
  216. [] call life_fnc_gateOpener;
  217. };
  218. _handled = true;
  219. };
  220. //Ö-Key
  221. case 39: {
  222. if ((isNull(findDisplay 20000)) && (!(playerSide isEqualTo civilian))) then {
  223. 0 spawn life_fnc_placeablesMenu;
  224. _handled = true;
  225. };
  226. _handled = true;
  227. };
  228. //ENTF-Key
  229. case 211: {
  230. if ((!(playerSide isEqualTo civilian)) && ((typeOf cursorTarget) in life_definePlaceables)) then {
  231. deleteVehicle cursorTarget;
  232. hintSilent "Die Absperrung wurde entfernt";
  233. };
  234. };
  235. //Knock out, this is experimental and yeah... (Shift + G)
  236. case 34: {
  237. if (_shift) then {_handled = true;};
  238. if (_shift && playerSide isEqualTo civilian && !isNull cursorObject && cursorObject isKindOf "Man" && isPlayer cursorObject && alive cursorObject && cursorObject distance player < 4 && speed cursorObject < 1) then {
  239. if ((animationState cursorObject) != "Incapacitated" && (currentWeapon player == primaryWeapon player || currentWeapon player == handgunWeapon player) && currentWeapon player != "" && !life_knockout && !(player getVariable ["restrained",false]) && !life_istazed && !life_isknocked) then {
  240. [cursorObject] spawn life_fnc_knockoutAction;
  241. };
  242. };
  243. if!(_shift) then {
  244. if ((vehicle player getVariable "side") isEqualTo "cop" && !(vehicle player isKindOf "Air")) then {
  245. if (!isNil {vehicle player getVariable "lights"}) then {
  246. if ((vehicle player != player) && {!life_warningcop_active} && {((driver vehicle player) == player)}) then {
  247. [] spawn {
  248. life_warningcop_active = true;
  249. sleep 0.2;
  250. life_warningcop_active = false;
  251. };
  252. _veh = vehicle player;
  253. if (isNil {_veh getVariable "warningcop"}) then {_veh setVariable ["warningcop",false,true];};
  254. if ((_veh getVariable "warningcop")) then {
  255. _veh setVariable["warningcop",false,true];
  256. } else {
  257. _veh setVariable["warningcop",true,true];
  258. [_veh,"warningcop"] remoteExec ["life_fnc_say3D",RANY];
  259. };
  260. };
  261. };
  262. };
  263. };
  264. };
  265. //T Key (Trunk)
  266. case 20: {
  267. // Feind Device
  268. _itsOk = if
  269. (
  270. !isNil {cursorObject getVariable "process"} || !isNil {vehicle player getVariable "process"}
  271. || DeviceProcess_inAction || MedicSystem_inAction
  272. ) then {false} else {true};
  273. if (!_alt && !_ctrlKey && !dialog && {!life_action_inUse} && _itsOk) then {
  274.  
  275. /* [MdF] Feindflug Crafting Box */
  276. _nearestCraftBox = nearestObjects[player,["Land_WoodenCrate_01_stack_x5_F"],5];
  277.  
  278. if(count _nearestCraftBox > 0) then
  279. {
  280. _nearBox = (_nearestCraftBox select 0);
  281. if(!isNil "_nearBox") then {[_nearBox] spawn life_fnc_openInventory;};
  282. /* ############################ */
  283.  
  284. } else {
  285.  
  286. if (!(isNull objectParent player) && alive vehicle player) then {
  287. if ((vehicle player) in life_vehicles) then {
  288. [vehicle player] spawn life_fnc_openInventory;
  289. };
  290. } else {
  291. private "_list";
  292. _list = ((ASLtoATL (getPosASL player)) nearEntities [["Box_IND_Grenades_F","B_supplyCrate_F"], 2.5]) select 0;
  293. if (!(isNil "_list")) then {
  294. _house = nearestObject [(ASLtoATL (getPosASL _list)), "House"];
  295. if (_house getVariable ["locked", false]) then {
  296. hint localize "STR_House_ContainerDeny";
  297. } else {
  298. [_list] spawn life_fnc_openInventory;
  299. };
  300. } else {
  301. _list = ["landVehicle","Air","Ship"];
  302. if (KINDOF_ARRAY(cursorObject,_list) && {player distance cursorObject < 7} && {isNull objectParent player} && {alive cursorObject} && {!life_action_inUse}) then {
  303. if (cursorObject in life_vehicles || {locked cursorObject isEqualTo 0}) then {
  304. [cursorObject] spawn life_fnc_openInventory;
  305. };
  306. };
  307. };
  308. };
  309. };
  310. };
  311. };
  312. //EMP Konsole - K
  313. case 37: {
  314. if (!_shift && !_alt && !_ctrlKey && (playerSide == west) && ((vehicle player getVariable "side") isEqualTo "cop") && (vehicle player != player) && (typeOf vehicle player) in ["O_Heli_Light_02_unarmed_F","I_Heli_light_03_unarmed_F"]) then {
  315. [] call life_fnc_openEmpMenu; [_this] call life_fnc_isEmpOperator;
  316. };
  317. };
  318. //L Key?
  319. case 38: {
  320. //If cop run checks for turning lights on.
  321. if (_shift) then {
  322. if (!isNil {vehicle player getVariable "lights"}) then {
  323. switch (vehicle player getVariable "side") do {
  324. case "cop": {[vehicle player] call life_fnc_sirenLights;};
  325. case "med": {[vehicle player] call life_fnc_medicSirenLights;};
  326. case "thw": {[vehicle player] call life_fnc_thwSirenLights;};
  327. };
  328. _handled = true;
  329. };
  330. };
  331.  
  332. if (!_alt && !_ctrlKey) then { [] call life_fnc_radar; };
  333. };
  334. //Y Player Menu
  335. case 21: {
  336. if (!_alt && !_ctrlKey && !dialog && !(player getVariable ["restrained",false]) && !(player getVariable ["ziptied",false]) && {!life_action_inUse || MedicSystem_inAction}) then {
  337. [] call life_fnc_p_openMenu;
  338. };
  339. };
  340.  
  341. //F Key
  342. case 33: {
  343. if(!_shift) then {
  344. if ((vehicle player != player) && !(vehicle player isKindOf "Air") && {!life_siren_active} && {((driver vehicle player) == player)}) then {
  345. if (!isNil {vehicle player getVariable "lights"}) then {
  346. [] spawn {
  347. life_siren_active = true;
  348. sleep 4.7;
  349. life_siren_active = false;
  350. };
  351.  
  352. _veh = vehicle player;
  353. if (isNil {_veh getVariable "siren"}) then {_veh setVariable ["siren",false,true];};
  354. if ((_veh getVariable "siren")) then {
  355. titleText [localize "STR_MISC_SirensOFF","PLAIN"];
  356. _veh setVariable ["siren",false,true];
  357. } else {
  358. titleText [localize "STR_MISC_SirensON","PLAIN"];
  359. _veh setVariable ["siren",true,true];
  360. switch (_veh getVariable "side") do {
  361. case "cop": {[_veh] remoteExec ["life_fnc_copSiren",RCLIENT];};
  362. case "med": {[_veh] remoteExec ["life_fnc_medicSiren",RCLIENT];};
  363. case "thw": {[_veh] remoteExec ["life_fnc_thwSiren",RCLIENT];};
  364. };
  365. };
  366. };
  367. };
  368. };
  369. };
  370.  
  371. //Q Key
  372. case 16: {
  373. if(!_shift) then {
  374. if ((vehicle player getVariable "side") in ["thw","med"] && !(vehicle player isKindOf "Air")) then {
  375. if (!isNil {vehicle player getVariable "lights"}) then {
  376. if ((vehicle player != player) && {!life_thwhorn_active} && {((driver vehicle player) == player)}) then {
  377. [] spawn {
  378. life_thwhorn_active = true;
  379. sleep 0.2;
  380. life_thwhorn_active = false;
  381. };
  382. _veh = vehicle player;
  383. if (isNil {_veh getVariable "thwhorn"}) then {_veh setVariable ["thwhorn",false,true];};
  384. if ((_veh getVariable "thwhorn")) then {
  385. _veh setVariable["thwhorn",false,true];
  386. } else {
  387. _veh setVariable["thwhorn",true,true];
  388. [_veh,"thwhorn"] remoteExec ["life_fnc_say3D",RANY];
  389. };
  390. };
  391. };
  392. };
  393.  
  394. if ((vehicle player getVariable "side") isEqualTo "cop" && !(vehicle player isKindOf "Air")) then {
  395. if (!isNil {vehicle player getVariable "lights"}) then {
  396. if ((vehicle player != player) && {!life_copstopCar_active} && {((driver vehicle player) == player)}) then {
  397. [] spawn {
  398. life_copstopCar_active = true;
  399. sleep 0.2;
  400. life_copstopCar_active = false;
  401. };
  402. _veh = vehicle player;
  403. if (isNil {_veh getVariable "copstopCar"}) then {_veh setVariable ["copstopCar",false,true];};
  404. if ((_veh getVariable "copstopCar")) then {
  405. _veh setVariable["copstopCar",false,true];
  406. } else {
  407. _veh setVariable["copstopCar",true,true];
  408. [_veh,"copstopCar"] remoteExec ["life_fnc_say3D",RANY];
  409. };
  410. };
  411. };
  412. };
  413. };
  414. };
  415.  
  416. //U Key
  417. case 22: {
  418. if (!_alt && !_ctrlKey) then {
  419. if (isNull objectParent player) then {
  420. _veh = cursorObject;
  421. } else {
  422. _veh = vehicle player;
  423. };
  424.  
  425. if (_veh isKindOf "House_F" && {playerSide isEqualTo civilian}) then {
  426. if (_veh in life_vehicles && {player distance _veh < 20}) then {
  427. _door = [_veh] call life_fnc_nearestDoor;
  428. if (_door isEqualTo 0) exitWith {hint localize "STR_House_Door_NotNear"};
  429. _locked = _veh getVariable [format ["bis_disabled_Door_%1",_door],0];
  430.  
  431. if (_locked isEqualTo 0) then {
  432. _veh setVariable [format ["bis_disabled_Door_%1",_door],1,true];
  433. _veh animateSource [format ["Door_%1_source", _door], 0];
  434. systemChat localize "STR_House_Door_Lock";
  435. } else {
  436. _veh setVariable [format ["bis_disabled_Door_%1",_door],0,true];
  437. _veh animateSource [format ["Door_%1_source", _door], 1];
  438. systemChat localize "STR_House_Door_Unlock";
  439. };
  440. };
  441. } else {
  442. _locked = locked _veh;
  443. if (_veh in life_vehicles && {player distance _veh < 20}) then {
  444. if (_locked isEqualTo 2) then {
  445. if (local _veh) then {
  446. _veh lock 0;
  447.  
  448. // BI
  449. _veh animateDoor ["door_back_R",1];
  450. _veh animateDoor ["door_back_L",1];
  451. _veh animateDoor ['door_R',1];
  452. _veh animateDoor ['door_L',1];
  453. _veh animateDoor ['Door_L_source',1];
  454. _veh animateDoor ['Door_rear',1];
  455. _veh animateDoor ['Door_rear_source',1];
  456. _veh animateDoor ['Door_1_source',1];
  457. _veh animateDoor ['Door_2_source',1];
  458. _veh animateDoor ['Door_3_source',1];
  459. _veh animateDoor ['Door_LM',1];
  460. _veh animateDoor ['Door_RM',1];
  461. _veh animateDoor ['Door_LF',1];
  462. _veh animateDoor ['Door_RF',1];
  463. _veh animateDoor ['Door_LB',1];
  464. _veh animateDoor ['Door_RB',1];
  465. _veh animateDoor ['DoorL_Front_Open',1];
  466. _veh animateDoor ['DoorR_Front_Open',1];
  467. _veh animateDoor ['DoorL_Back_Open',1];
  468. _veh animateDoor ['DoorR_Back_Open ',1];
  469. } else {
  470. [_veh,0] remoteExecCall ["life_fnc_lockVehicle",_veh];
  471.  
  472. _veh animateDoor ["door_back_R",1];
  473. _veh animateDoor ["door_back_L",1];
  474. _veh animateDoor ['door_R',1];
  475. _veh animateDoor ['door_L',1];
  476. _veh animateDoor ['Door_L_source',1];
  477. _veh animateDoor ['Door_rear',1];
  478. _veh animateDoor ['Door_rear_source',1];
  479. _veh animateDoor ['Door_1_source',1];
  480. _veh animateDoor ['Door_2_source',1];
  481. _veh animateDoor ['Door_3_source',1];
  482. _veh animateDoor ['Door_LM',1];
  483. _veh animateDoor ['Door_RM',1];
  484. _veh animateDoor ['Door_LF',1];
  485. _veh animateDoor ['Door_RF',1];
  486. _veh animateDoor ['Door_LB',1];
  487. _veh animateDoor ['Door_RB',1];
  488. _veh animateDoor ['DoorL_Front_Open',1];
  489. _veh animateDoor ['DoorR_Front_Open',1];
  490. _veh animateDoor ['DoorL_Back_Open',1];
  491. _veh animateDoor ['DoorR_Back_Open ',1];
  492. };
  493. //systemChat localize "STR_MISC_VehUnlock";
  494. hint localize "STR_MISC_VehUnlock";
  495. [_veh,"unlockCarSound"] remoteExec ["life_fnc_say3D",RANY];
  496. } else {
  497. if (local _veh) then {
  498. _veh lock 2;
  499.  
  500. _veh animateDoor ["door_back_R",0];
  501. _veh animateDoor ["door_back_L",0];
  502. _veh animateDoor ['door_R',0];
  503. _veh animateDoor ['door_L',0];
  504. _veh animateDoor ['Door_L_source',0];
  505. _veh animateDoor ['Door_rear',0];
  506. _veh animateDoor ['Door_rear_source',0];
  507. _veh animateDoor ['Door_1_source',0];
  508. _veh animateDoor ['Door_2_source',0];
  509. _veh animateDoor ['Door_3_source',0];
  510. _veh animateDoor ['Door_LM',0];
  511. _veh animateDoor ['Door_RM',0];
  512. _veh animateDoor ['Door_LF',0];
  513. _veh animateDoor ['Door_RF',0];
  514. _veh animateDoor ['Door_LB',0];
  515. _veh animateDoor ['Door_RB',0];
  516. _veh animateDoor ['DoorL_Front_Open',0];
  517. _veh animateDoor ['DoorR_Front_Open',0];
  518. _veh animateDoor ['DoorL_Back_Open',0];
  519. _veh animateDoor ['DoorR_Back_Open ',0];
  520. } else {
  521. [_veh,2] remoteExecCall ["life_fnc_lockVehicle",_veh];
  522.  
  523. _veh animateDoor ["door_back_R",0];
  524. _veh animateDoor ["door_back_L",0];
  525. _veh animateDoor ['door_R',0];
  526. _veh animateDoor ['door_L',0];
  527. _veh animateDoor ['Door_L_source',0];
  528. _veh animateDoor ['Door_rear',0];
  529. _veh animateDoor ['Door_rear_source',0];
  530. _veh animateDoor ['Door_1_source',0];
  531. _veh animateDoor ['Door_2_source',0];
  532. _veh animateDoor ['Door_3_source',0];
  533. _veh animateDoor ['Door_LM',0];
  534. _veh animateDoor ['Door_RM',0];
  535. _veh animateDoor ['Door_LF',0];
  536. _veh animateDoor ['Door_RF',0];
  537. _veh animateDoor ['Door_LB',0];
  538. _veh animateDoor ['Door_RB',0];
  539. _veh animateDoor ['DoorL_Front_Open',0];
  540. _veh animateDoor ['DoorR_Front_Open',0];
  541. _veh animateDoor ['DoorL_Back_Open',0];
  542. _veh animateDoor ['DoorR_Back_Open ',0];
  543. };
  544. //systemChat localize "STR_MISC_VehLock";
  545. hint localize "STR_MISC_VehLock";
  546. [_veh,"unlockCarSound"] remoteExec ["life_fnc_say3D",RANY];
  547. };
  548. };
  549. };
  550. };
  551. };
  552.  
  553. //4 Hi
  554. case 5: {
  555. if(vehicle player isEqualTo player) then {
  556. if(!life_action_inUse) then {
  557. player playActionNow "gestureHi";
  558. };
  559. };
  560. };
  561.  
  562. //5 Hi low
  563. case 6: {
  564. if(vehicle player isEqualTo player) then {
  565. if(!life_action_inUse) then {
  566. player playActionNow "gestureHiC";
  567. };
  568. };
  569. };
  570.  
  571. //6 Finger
  572. case 7: {
  573. if(vehicle player isEqualTo player) then {
  574. if(!life_action_inUse) then {
  575. player playActionNow "gestureHiB";
  576. };
  577. };
  578. };
  579.  
  580. //7 nicken
  581. case 8: {
  582. if(vehicle player isEqualTo player) then {
  583. if(!life_action_inUse) then {
  584. player playActionNow "gesturenod";
  585. };
  586. };
  587. };
  588. };
  589.  
  590. _handled;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement