Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 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. private ["_vehicle","_trueorfalse"];
  11. _vehicle = param [0,ObjNull,[ObjNull]];
  12. if (isNull _vehicle) exitWith {}; //Bad entry!
  13. if (!(typeOf _vehicle in ["C_Offroad_01_F","C_SUV_01_F","C_Hatchback_01_sport_F","C_Heli_Light_01_civil_F","O_Heli_Light_02_unarmed_F"])) exitWith {}; //Last chance check to prevent something from defying humanity and creating a monster.
  14.  
  15. _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_medicLights",RCLIENT];
  22. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement