Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. ARQUIVO fn_sirenLights.sqf
  2.  
  3. #include "..\..\script_macros.hpp"
  4. /*
  5. File: fn_sirenLights.sqf
  6. Author: Bryan "Tonic" Boardwine
  7. Description:
  8. Lets play a game! Can you guess what it does? I have faith in you, if you can't
  9. then you have failed me and therefor I lose all faith in humanity.. No pressure.
  10. */
  11. private _vehicle = param [0,objNull,[objNull]];
  12. if (isNull _vehicle) exitWith {}; //Bad entry!
  13. if !(typeOf _vehicle in ["C_Offroad_01_F","I_MRAP_03_F","C_SUV_01_F","C_Hatchback_01_sport_F","B_Heli_Light_01_F","O_Heli_Light_02_unarmed_F"]) exitWith {}; //Last chance check to prevent something from defying humanity and creating a monster.
  14.  
  15. private _trueorfalse = _vehicle getVariable ["lights",false];
  16.  
  17. if (_trueorfalse) then {
  18. _vehicle setVariable ["lights",false,true];
  19. } else {
  20. _vehicle setVariable ["lights",true,true];
  21. [_vehicle,0.22] remoteExec ["life_fnc_copLights",RCLIENT];
  22. };
  23.  
  24.  
  25. TECLA:
  26.  
  27. //L Key?
  28. case 38: {
  29. //If cop run checks for turning lights on.
  30. if (_shift && playerSide in [west,independent,civilian] && {(license_civ_CopCiv)}) then {
  31. if (vehicle player != player && (typeOf vehicle player) in ["C_Offroad_01_F","O_MRAP_02_F","I_MRAP_03_F","C_SUV_01_F","C_Hatchback_01_sport_F","B_Heli_Light_01_F","O_Heli_Light_02_unarmed_F"]) then {
  32. if (!isNil {vehicle player getVariable "lights"}) then {
  33. if (playerSide isEqualTo [west,civilian] && {(license_civ_CopCiv)}) then {
  34. [vehicle player] call life_fnc_sirenLights;
  35. } else {
  36. [vehicle player] call life_fnc_medicSirenLights;
  37. };
  38. _handled = true;
  39. };
  40. };
  41. };
  42.  
  43. if (!_alt && !_ctrlKey) then { [] call life_fnc_radar; };
  44. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement