Jump to content

Recommended Posts

I'm trying to get this to work in Multiplayer, but getting nowhere so far.

I am using beno_83au's MIL_CAS script in my mission.

 

This uses the mouse scroll wheel to call for a Gun Run (guns only) followed by a playsound3D (with custom ogg file) and a 180 second cooldown with the hint to player to wait for the cooldown. This works very well in Singlepayer, but not in Multiplayer. Also having issues with other players in the same team not being able to hear that custom ogg audio at times.

 

initPlayerServer.sqf

if (playerunit == JTAC) then {
	_id = playerunit addAction [
      "<t color='#FF0000'>Call for Gun Run</t>", 
      {
      params ["_target","","_id"]; 
if (diag_tickTime < (uiNamespace getVariable ['tag_cooldown',-1])) exitWith { hint (format ['CAS Pilots are busy doing runs. Please wait %1 more seconds.',(round ((uiNamespace getVariable ['tag_cooldown',-1]) -diag_tickTime))]);}; _cooldown = 180; uiNamespace setVariable ['tag_cooldown',(diag_tickTime + _cooldown)]; 
      nul = [screenToWorld [0.5,0.5],200,"B_Plane_CAS_01_F",0] execVM "MIL_CAS.sqf";
      		_soundPath = [(str missionConfigFile), 0, -15] call BIS_fnc_trimString; 
      		_soundToPlay = _soundPath + "sounds\radio4guns.ogg"; 
      		playSound3D [_soundToPlay,soundSource]; 
      }, 
      nil, 
      0, 
      true, 
      true, 
      "", 
      "alive _target",
      -1, 
      false 
    ]; 
   };

 

btw, my ogg files in description.ext are 100% fine, so I know that is not the issue:

class CfgSounds
{
	sounds[] = {};
	class gunrun
	{
		name = "gunrun";
		sound[] = {"sounds\radio4guns.ogg", db+2, 1.0};
		titles[] = {0,""};
}

 

Here are all the files in case you'll want to try it for yourself: https://drive.google.com/file/d/10WkdJCVeuuCuxOPJlDkUcVCqV44VUolB/view?usp=sharing

And the modlist: https://drive.google.com/file/d/11st38ojvCu_g7yJw3rJoXByvnVIgl9CM/view?usp=sharing

Share this post


Link to post
Share on other sites

 

Ask your question in this tread don't start a new one with a question when the tread isn't closed.

 

Cheers play3r

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×