Jump to content
handlebar

Simple Ear Plugs Script.

Recommended Posts

Hello!

Recently I had found this script that lets you essentially change the volume levels from the action menu from a "put in ear plugs/remove". It is extremely useful when getting in helos and cars so you can hear your team talk. Why this is not a standard thing in Vanilla I have no idea. Plus the ability to do it via script without an addon is awesome.

However in mp once being revived I lose this option. The ear plug option disappears from the action menu.

http://www.armaholic.com/page.php?id=26624

This is the script. I could not find a post for this script.

Credit: 654wak654

SimpleEP.sqf

_u = _this select 0;
_p = ["<t color='#ffff33'>Put on ear plugs</t>",{
_s = _this select 0;
_i = _this select 2;
if (soundVolume != 1) then {
	1 fadeSound 1;
	_s setUserActionText [_i,"<t color='#ffff33'>Put on ear plugs</t>"];
} else {
	1 fadeSound 0.02;
	_s setUserActionText [_i,"<t color='#ffff33'>Take off ear plugs</t>"];
}
},[],-90,false,true,"","_target == vehicle player"];
_u addAction _p;
_u addEventHandler ["Respawn",{
1 fadeSound 1;
(_this select 0) addAction _p;
}];

How it is executed in Init.

[player] execVM "scripts\simpleEP.sqf";

What can I do to check and see if a player has this action, if not then give the player the action?

Edited by Handlebar

Share this post


Link to post
Share on other sites

You'll also have to worry about situations where they take control of another unit, such as using UAVs. You'd be much better off using a hotkey instead of a menu item. Solves the problem entirely.

Share this post


Link to post
Share on other sites

after install how to use it press which key to use earplug or how to edit key

Share this post


Link to post
Share on other sites
On 05/02/2015 at 10:25 PM, mr_shadow said:

Make an EH - respawned and then add the action.

Yes, same for teamswitch on SP, so often forgotten (by BI themselves).

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

×