Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ARQUIVO fn_sirenLights.sqf
- #include "..\..\script_macros.hpp"
- /*
- File: fn_sirenLights.sqf
- Author: Bryan "Tonic" Boardwine
- Description:
- Lets play a game! Can you guess what it does? I have faith in you, if you can't
- then you have failed me and therefor I lose all faith in humanity.. No pressure.
- */
- private _vehicle = param [0,objNull,[objNull]];
- if (isNull _vehicle) exitWith {}; //Bad entry!
- 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.
- private _trueorfalse = _vehicle getVariable ["lights",false];
- if (_trueorfalse) then {
- _vehicle setVariable ["lights",false,true];
- } else {
- _vehicle setVariable ["lights",true,true];
- [_vehicle,0.22] remoteExec ["life_fnc_copLights",RCLIENT];
- };
- TECLA:
- //L Key?
- case 38: {
- //If cop run checks for turning lights on.
- if (_shift && playerSide in [west,independent,civilian] && {(license_civ_CopCiv)}) then {
- 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 {
- if (!isNil {vehicle player getVariable "lights"}) then {
- if (playerSide isEqualTo [west,civilian] && {(license_civ_CopCiv)}) then {
- [vehicle player] call life_fnc_sirenLights;
- } else {
- [vehicle player] call life_fnc_medicSirenLights;
- };
- _handled = true;
- };
- };
- };
- if (!_alt && !_ctrlKey) then { [] call life_fnc_radar; };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement