friquentin

Untitled

Jan 2nd, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. #include "..\..\script_macros.hpp"
  2. /*
  3. File: fn_copSiren.sqf
  4. Author: Bryan "Tonic" Boardwine
  5.  
  6. Description:
  7. Starts the cop siren sound for other players.
  8. */
  9. private ["_vehicle"];
  10. _vehicle = param [0,objNull,[objNull]];
  11.  
  12. if (isNull _vehicle) exitWith {};
  13. if (isNil {_vehicle getVariable "siren"}) exitWith {};
  14.  
  15. for "_i" from 0 to 1 step 0 do {
  16. if (!(_vehicle getVariable "siren")) exitWith {};
  17. if (count crew _vehicle isEqualTo 0) then {_vehicle setVariable ["siren",false,true]};
  18. if (!alive _vehicle) exitWith {};
  19. if (isNull _vehicle) exitWith {};
  20. _vehicle say3D ["sirenLong"];
  21. sleep 4.870;//Exactly matches the length of the audio file.
  22. if (!(_vehicle getVariable "sirenLong")) exitWith {};
  23. };
Advertisement
Add Comment
Please, Sign In to add comment