Advertisement
Guest User

Untitled

a guest
May 14th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. #include "..\..\script_macros.hpp"
  2. /*
  3. File: fn_sirenLights.sqf
  4. Author: Bryan "Tonic" Boardwine
  5.  
  6. Description:
  7. Lets play a game! Can you guess what it does? I have faith in you, if you can't
  8. then you have failed me and therefor I lose all faith in humanity.. No pressure.
  9. */
  10. params [
  11. ["_vehicle",objNull,[objNull]]
  12. ];
  13. if (isNull _vehicle) exitWith {}; //Bad entry!
  14. if !(typeOf _vehicle in ["C_Offroad_01_F","B_MRAP_01_F","C_SUV_01_F","C_Hatchback_01_sport_F","C_Van_02_medevac_F","O_MRAP_02_F"]) exitWith {}; //Last chance check to prevent something from defying humanity and creating a monster.
  15.  
  16. private _trueorfalse = _vehicle getVariable ["lights",false];
  17.  
  18. if (_trueorfalse) then {
  19. _vehicle setVariable ["lights",false,true];
  20. if !(isNil {(_vehicle getVariable "lightsJIP")}) then {
  21. private _jip = _vehicle getVariable "lightsJIP";
  22. _vehicle setVariable ["lightsJIP",nil,true];
  23. remoteExec ["",_jip]; //remove from JIP queue
  24. };
  25. } else {
  26. _vehicle setVariable ["lights",true,true];
  27. private _jip = [_vehicle,0.22] remoteExec ["life_fnc_copLights",RCLIENT,true];
  28. _vehicle setVariable ["lightsJIP",_jip,true];
  29. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement