MasterPuffin 21 Posted March 4, 2017 This script is best used with a keyhandler, however if you have a bit of experience with coding you can get it also work with addaction. This script works in MP ******************************** Download the sounds here (or use your own ones) Make a folder called sounds and put the two files inside this folder Put the following code in your description.ext class CfgSounds { class Siren { name = "Siren"; sound[] = {"sounds\Siren.ogg", 5.0, 1}; titles[] = {1, ""}; }; class Yelp { name = "Yelp"; sound[] = {"sounds\Yelp.ogg", 5.0, 1}; titles[] = {1, ""}; }; }; Put the following code in your keyhandler: case 33: {//F key if (_shift) then { _vehicle = (vehicle player); if (isNil {_vehicle getVariable "EmergencyVeh"}) then { _vehicle setVariable ["EmergencyVeh", false, true]; }; _ComVeh = _vehicle getVariable "EmergencyVeh"; if (vehicle player != player && (driver _vehicle == player && _ComVeh isEqualTo true)) then { if (isNil {_vehicle getVariable "siren"}) then { _vehicle setVariable ["siren", false, true]; }; _SirenState = _vehicle getVariable "siren"; if (_SirenState isEqualTo true) then { _vehicle setVariable ["siren", false, true]; } else { [[[_vehicle],"scripts\siren.sqf"],"BIS_fnc_execVM",true,false,false] call BIS_fnc_MP; _vehicle setVariable ["siren", true, true]; }; }; }; if (_ctrl) then { _vehicle = (vehicle player); if (isNil {_vehicle getVariable "EmergencyVeh"}) then { _vehicle setVariable ["EmergencyVeh", false, true]; }; _ComVeh = _vehicle getVariable "EmergencyVeh"; if (vehicle player != player && (driver _vehicle == player && _ComVeh isEqualTo true)) then { [[[_vehicle],"scripts\yelp.sqf"],"BIS_fnc_execVM",true,false,false] call BIS_fnc_MP; }; }; }; Create a folder called scripts. Inside this folder create a file called siren.sqf and put the following code into it: Private ["_vehicle"]; _vehicle = _this select 0; _repeat = true; while{ (alive _vehicle) && (_repeat isEqualTo true)} do { _vehicle say3D "Siren"; sleep 5.5; _repeat = _vehicle getVariable "Siren"; }; Inside the folder scripts create a file called yelp.sqf and put the following code into it: Private ["_vehicle"]; _vehicle = _this select 0; _vehicle say3D "Yelp"; Thats it! As always, if you have any questions feel free to ask! Cheers Puffin 1 Share this post Link to post Share on other sites
Midnighters 152 Posted March 16, 2017 interesting, this is a neat way to do this Share this post Link to post Share on other sites
Awilliam92 0 Posted January 17, 2018 Ok so ive done all that now how do I designate the vehicle as an emergency vehicle or whatever else needs to be done to make this work? Share this post Link to post Share on other sites