Angrygargamel Posted December 30, 2014 Report Share Posted December 30, 2014 Hi&Hello... i tried to implement this little but functional earplug script on my epoch server... i have tried 3 different variants now... but the mousewheel actions never show up http://www.armaholic.com/page.php?id=26624 any suggestions? who doesnt know what this script does... when you fly in a heli you cant understand anything of the VON or teamspeak unless you turn the ingame volume down this script does this for you instant... put the earplugs in... sound is lowered to x percent take the earplugs out... sound is back to normal mgm and Home Sweet Home 2 Link to comment Share on other sites More sharing options...
0 Talib Posted January 28, 2015 Report Share Posted January 28, 2015 hi, huge thank you (earplugs) B) I look for the way to the rules of my server and also the range of vision. (all with the mouse) :huh: If you have any information please let me know, thank you in advance . Link to comment Share on other sites More sharing options...
0 computermancer Posted January 28, 2015 Report Share Posted January 28, 2015 okay, i had some time to try a few things. I am rewriting the first part of the script so that it initiates in every situation possible. I will upload the completed work when I am satisfied with the results :P Link to comment Share on other sites More sharing options...
0 Talib Posted January 28, 2015 Report Share Posted January 28, 2015 okay, i had some time to try a few things. I am rewriting the first part of the script so that it initiates in every situation possible. I will upload the completed work when I am satisfied with the results :P :) Link to comment Share on other sites More sharing options...
0 computermancer Posted January 30, 2015 Report Share Posted January 30, 2015 Joyous day all, I have finished my script with satisfactory results. Everyone should get the menu now, regardless of server restart, fresh spawn to a server that just restarted, all situations should be good to go. Here is the link to the RAR with all the files you need for a vanilla server. https://www.dropbox.com/s/sze9g3a8izghc7j/EARPLUGS.rar?dl=0 Make sure to change out this line in your Battley scripts.txt filter 7 exec !="<execute expression=" !"RscDebugConsole_execute" !"execFSM" !"_executeStackedEventHandler" !"fn_execVM" !"fn_moduleExecute" !"fn_execRemote" !"fn_MPexec" !"bis_fnc_moduleExecute_activate" !"fn_tridentExecute" !"randomize_civ1" !"executed from" !"EPOCH_DebugGUI_exec" !"_handle = [_display] execVM _script;" !"finddisplay" !"execVM \"\A3\Structures_F\scripts" !="execVM \"\A3\Structures_F_EPC\Civ\PlayGround\scripts\Carousel_spin.sqf\"" Hope this works out for you guys. :) Link to comment Share on other sites More sharing options...
0 Sporny Posted January 30, 2015 Report Share Posted January 30, 2015 how to activate the menu just in vehicles? Link to comment Share on other sites More sharing options...
0 computermancer Posted January 30, 2015 Report Share Posted January 30, 2015 you would have to make a variable array for the vehicles you want to have the addaction applied to, then I believe you just replace "player" with your vehicle variable array ....not sure though :P Link to comment Share on other sites More sharing options...
0 Humpabry Posted January 30, 2015 Report Share Posted January 30, 2015 Joyous day all, I have finished my script with satisfactory results. Everyone should get the menu now, regardless of server restart, fresh spawn to a server that just restarted, all situations should be good to go. Here is the link to the RAR with all the files you need for a vanilla server. https://www.dropbox.com/s/sze9g3a8izghc7j/EARPLUGS.rar?dl=0 Make sure to change out this line in your Battley scripts.txt filter 7 exec !="<execute expression=" !"RscDebugConsole_execute" !"execFSM" !"_executeStackedEventHandler" !"fn_execVM" !"fn_moduleExecute" !"fn_execRemote" !"fn_MPexec" !"bis_fnc_moduleExecute_activate" !"fn_tridentExecute" !"randomize_civ1" !"executed from" !"EPOCH_DebugGUI_exec" !"_handle = [_display] execVM _script;" !"finddisplay" !"execVM \"\A3\Structures_F\scripts" !="execVM \"\A3\Structures_F_EPC\Civ\PlayGround\scripts\Carousel_spin.sqf\"" Hope this works out for you guys. :) works fine for admins but not normal players...they are automaticaly on and u cant turn them off (no scroll wheel option) ok now have the scroll option as normal player..but even with your BE line changed i get white screen as normal player Link to comment Share on other sites More sharing options...
0 cheech420now Posted January 30, 2015 Report Share Posted January 30, 2015 Humpabry Do you use the alternate Anti Hack? Link to comment Share on other sites More sharing options...
0 second_coming Posted January 30, 2015 Report Share Posted January 30, 2015 I use the standard Epoch antihack and with this script enabled players get autobanned (usually after a server restart), when I look at the ban reason it mentions addactions as being the reason but I can't see a line in the scripts.txt file relating to addactions. Link to comment Share on other sites More sharing options...
0 Sporny Posted January 30, 2015 Report Share Posted January 30, 2015 waitUntil {alive player};hint "Adding Menu";earplugsout=true;execVM "custom\easymenu.sqf"; this "alive player" ? Link to comment Share on other sites More sharing options...
0 cheech420now Posted January 30, 2015 Report Share Posted January 30, 2015 I use infistar and it works great! Thank you Computermancer!! Link to comment Share on other sites More sharing options...
0 cheech420now Posted January 30, 2015 Report Share Posted January 30, 2015 I use the standard Epoch antihack and with this script enabled players get autobanned (usually after a server restart), when I look at the ban reason it mentions addactions as being the reason but I can't see a line in the scripts.txt file relating to addactions. The epoch auto bans wont be in the scripts.txt Its in a setting we cant access for some reason Link to comment Share on other sites More sharing options...
0 second_coming Posted January 30, 2015 Report Share Posted January 30, 2015 The epoch auto bans wont be in the scripts.txt Its in a setting we cant access for some reason It's weird, I've added both earplugs and the Explosives to Vehicle script on my server, both of which use addactions and both of which cause the autoban (they are also hit and miss as to whether they load at all). I have IgiLoad installed which also uses addaction but which works flawlessly. I have ended up removing the earplugs and EtV script for the time being as after every server restart people get auto banned. Link to comment Share on other sites More sharing options...
0 Scoo Posted January 30, 2015 Report Share Posted January 30, 2015 It's weird, I've added both earplugs and the Explosives to Vehicle script on my server, both of which use addactions and both of which cause the autoban (they are also hit and miss as to whether they load at all). I have IgiLoad installed which also uses addaction but which works flawlessly. I have ended up removing the earplugs and EtV script for the time being as after every server restart people get auto banned. The basic script for earplugs i'm using doesn't require an "addaction", if you want to give a try: You only need earplugs.sqf (root of your mpmission folder): if(isNil "EarPlugsOn") then {EarPlugsOn = true;} else {EarPlugsOn = !EarPlugsOn}; ToggleEarPlugs = { if (soundVolume != 1) then { 1 fadeSound 1; cutText ['Ear plugs taken off', 'PLAIN']; } else { 1 fadeSound 0.2; cutText ['Ear plugs put on', 'PLAIN']; }; }; if(EarPlugsOn) then { Press_F3 = (findDisplay 46) displayAddEventHandler ["KeyDown","if ((_this select 1) == 61) then {call ToggleEarPlugs;};"]; }; if(!EarPlugsOn) then { (findDisplay 46) displayRemoveEventHandler ["KeyDown", Press_F3]; }; and initplayerlocal.sqf, in your mpsission root aswell: while {true} do { waitUntil {alive vehicle player}; Sleep 10; [] execVM "earplugs.sqf"; waitUntil {!alive player}; [] execVM "earplugs.sqf"; }; then don't forget to add filters to scripts.txt in your battleye folder: (add this at the end of line 53: displayAddEventHandler) !"Press_F3 = (findDisplay 46) displayAddEventHandler [\"KeyDown\",\"if ((_this select 1) == 61) then {call T" (add this at the end of line 59: displayRemoveEventHandler) !"(findDisplay 46) displayRemoveEventHandler [\"KeyDown\", Press_F3];" Caveman1, Korwiin and second_coming 3 Link to comment Share on other sites More sharing options...
0 second_coming Posted January 30, 2015 Report Share Posted January 30, 2015 The basic script for earplugs i'm using doesn't require an "addaction", if you want to give a try: You only need earplugs.sqf (root of your mpmission folder): if(isNil "EarPlugsOn") then {EarPlugsOn = true;} else {EarPlugsOn = !EarPlugsOn}; ToggleEarPlugs = { if (soundVolume != 1) then { 1 fadeSound 1; cutText ['Ear plugs taken off', 'PLAIN']; } else { 1 fadeSound 0.2; cutText ['Ear plugs put on', 'PLAIN']; }; }; if(EarPlugsOn) then { Press_F3 = (findDisplay 46) displayAddEventHandler ["KeyDown","if ((_this select 1) == 61) then {call ToggleEarPlugs;};"]; }; if(!EarPlugsOn) then { (findDisplay 46) displayRemoveEventHandler ["KeyDown", Press_F3]; }; and initplayerlocal.sqf, in your mpsission root aswell: while {true} do { waitUntil {alive vehicle player}; Sleep 10; [] execVM "earplugs.sqf"; waitUntil {!alive player}; [] execVM "earplugs.sqf"; }; then don't forget to add filters to scripts.txt in your battleye folder: (add this at the end of line 53: displayAddEventHandler) !"Press_F3 = (findDisplay 46) displayAddEventHandler [\"KeyDown\",\"if ((_this select 1) == 61) then {call T" (add this at the end of line 59: displayRemoveEventHandler) !"(findDisplay 46) displayRemoveEventHandler [\"KeyDown\", Press_F3];" Brilliant, thank you :) Link to comment Share on other sites More sharing options...
0 computermancer Posted January 30, 2015 Report Share Posted January 30, 2015 Would you mind sharing your mission folder so I can see your files? I created that script on a blank server, with no admins setup. I also had a friend of mine join to confirm that it triggers at the right time. I am curious to see if your files differ from mine in anyway. I spent a great deal of time confirming that the techniques I used were stable. I will see what I can do, I have run the code on my test server with no issues, as well as my live server. Try joining my live server as that has a shit ton of scripts. let me know if it autobans you. Thanks for the feedback, it helps me evolve. :) Link to comment Share on other sites More sharing options...
0 ulli_123 Posted January 30, 2015 Report Share Posted January 30, 2015 In my case, all player will be kicked with a Autoban.In addition to the admins. Link to comment Share on other sites More sharing options...
0 computermancer Posted January 31, 2015 Report Share Posted January 31, 2015 In my case, all player will be kicked with a Autoban. In addition to the admins. I am not sure how that is happening... please share your logs and mission folder so I can see whats going on. My code should be good to go on a vanilla server. Link to comment Share on other sites More sharing options...
0 computermancer Posted January 31, 2015 Report Share Posted January 31, 2015 Here is a video demonstrating the earplugs script in my SUPERFUNMENU , join my server and let me know if you get kicked, and if so, what message it gives you. So far, my friends have not had any issues joining. Fingers crossed. http://youtu.be/leRa-zxNaN0?t=3m52s Link to comment Share on other sites More sharing options...
0 ulli_123 Posted January 31, 2015 Report Share Posted January 31, 2015 I once tested a little without a mission, there is no ban, but with missions SEM and VEMF there is a ban Link to comment Share on other sites More sharing options...
0 ulli_123 Posted January 31, 2015 Report Share Posted January 31, 2015 The basic script for earplugs i'm using doesn't require an "addaction", if you want to give a try: You only need earplugs.sqf (root of your mpmission folder): if(isNil "EarPlugsOn") then {EarPlugsOn = true;} else {EarPlugsOn = !EarPlugsOn}; ToggleEarPlugs = { if (soundVolume != 1) then { 1 fadeSound 1; cutText ['Ear plugs taken off', 'PLAIN']; } else { 1 fadeSound 0.2; cutText ['Ear plugs put on', 'PLAIN']; }; }; if(EarPlugsOn) then { Press_F3 = (findDisplay 46) displayAddEventHandler ["KeyDown","if ((_this select 1) == 61) then {call ToggleEarPlugs;};"]; }; if(!EarPlugsOn) then { (findDisplay 46) displayRemoveEventHandler ["KeyDown", Press_F3]; }; and initplayerlocal.sqf, in your mpsission root aswell: while {true} do { waitUntil {alive vehicle player}; Sleep 10; [] execVM "earplugs.sqf"; waitUntil {!alive player}; [] execVM "earplugs.sqf"; }; then don't forget to add filters to scripts.txt in your battleye folder: (add this at the end of line 53: displayAddEventHandler) !"Press_F3 = (findDisplay 46) displayAddEventHandler [\"KeyDown\",\"if ((_this select 1) == 61) then {call T" (add this at the end of line 59: displayRemoveEventHandler) !"(findDisplay 46) displayRemoveEventHandler [\"KeyDown\", Press_F3];" For me it does not work, nothing happens. Link to comment Share on other sites More sharing options...
0 computermancer Posted January 31, 2015 Report Share Posted January 31, 2015 how to activate the menu just in vehicles? Here you go dude, I finished testing it out earlier today. Copy this to your onPlayerRespawn.sqf file in your root mission folder. (if you don't have it, create it. waituntil {!isnull (finddisplay 46)}; private ["_hintTitle","_hintText","_hintInfo","_hintOut","_cm_die","_guydude","_cmtrig","_cmbreathing","_cm_startingpos","_cm_position","_cm_stationary"]; _cmbreathing = alive player; _cmtrig=true; _guydude = player; while {_cmtrig} do { sleep 0.5; if (_cmbreathing) then { _cm_startingpos = position player; sleep 0.5; _cm_position = position _guydude; _cm_stationary = _cm_startingpos select 0 == _cm_position select 0 && _cm_startingpos select 1 == _cm_position select 1; if (_cm_stationary) then { hint "Spawned in... Standing around..."; } else { hint "Starting up scripts..."; _cmtrig=false; }; }; }; UISLEEP 5; [] execVM "earplugs.sqf"; And copy this code to your earplugs.sqf file in your root folder. (if you don't have it, make it) //created by computermancer //Inspitration for code structure came from // v1g Fast Rope by [STELS]Zealot //========================================================================================= //=== Awesome Earplugs Scripts================================== //---by computermancer----- superfunserver.com------------------ #define CM_ADD_TITLE1 "Earplugs" earplugsout=true; // the vehicles in which you can addAction cm_allowed_array = ["O_Heli_Light_02_unarmed_F","O_Heli_Light_02_F","B_Heli_Transport_01_F","B_Heli_Transport_01_camo_F","O_Heli_Attack_02_F","O_Heli_Attack_02_black_F","I_Heli_Transport_02_F","B_Heli_Light_01_F","C_Offroad_01_EPOCH","C_Quadbike_01_EPOCH","C_Hatchback_01_EPOCH","C_Hatchback_02_EPOCH","C_SUV_01_EPOCH","C_Rubberboat_EPOCH","C_Rubberboat_02_EPOCH","C_Rubberboat_03_EPOCH","C_Rubberboat_04_EPOCH","C_Van_01_box_EPOCH","C_Van_01_transport_EPOCH","C_Boat_Civil_01_EPOCH","C_Boat_Civil_01_police_EPOCH","C_Boat_Civil_01_rescue_EPOCH","B_Heli_Light_01_EPOCH","B_SDV_01_EPOCH","B_MRAP_01_EPOCH","B_Truck_01_transport_EPOCH","B_Truck_01_covered_EPOCH","B_Truck_01_mover_EPOCH","B_Truck_01_box_EPOCH","O_Truck_02_covered_EPOCH","O_Truck_02_transport_EPOCH","O_Truck_03_covered_EPOCH","O_Truck_02_box_EPOCH","I_Heli_light_03_unarmed_EPOCH","O_Heli_Light_02_unarmed_EPOCH","I_Heli_Transport_02_EPOCH","O_Heli_Transport_04_EPOCH","O_Heli_Transport_04_bench_EPOCH","O_Heli_Transport_04_box_EPOCH","O_Heli_Transport_04_covered_EPOCH","B_Heli_Transport_03_unarmed_EPOCH","jetski_epoch","K01","K02","K03","K04","ebike_epoch","mosquito_epoch"]; cm_addaction_req = { private ["_veh","_cm_req"]; _veh = vehicle player; _cm_req = (_veh != player) and { (typeof _veh) in cm_allowed_array } and {alive _veh}; _cm_req; }; cm_FUNc_earplugs = { if (earplugsout) then { hint "Earplugs have been put in."; 1 fadeSound 0.25; earplugsout=false; } else { hint "Earplugs have been taken out."; 1 fadeSound 1; earplugsout=true; }; }; player addAction["<t color='#00ffff'>"+CM_ADD_TITLE1+"</t>", cm_FUNc_earplugs, [], -1, false, false, '','[] call cm_addaction_req']; cutText [format["You can now wear earplugs when in certain vehicles."], "PLAIN DOWN",1]; As for battle eye filters, just add this to your scripts.txt file. Look for the "execvm" line and at the end of it, add this... !="finddisplay" !="onPlayerRespawn.sqf" !="earplugs.sqf" should look something like this 7 exec !="<execute expression=" !"RscDebugConsole_execute" !"execFSM" !"_executeStackedEventHandler" !"fn_execVM" !"fn_moduleExecute" !"fn_execRemote" !"fn_MPexec" !"bis_fnc_moduleExecute_activate" !"fn_tridentExecute" !"randomize_civ1" !"executed from" !"EPOCH_DebugGUI_exec" !"_handle = [_display] execVM _script;" !"execVM \"\A3\Structures_F\scripts" !="execVM \"\A3\Structures_F_EPC\Civ\PlayGround\scripts\Carousel_spin.sqf\"" !="HC\init.sqf" !="aoa\DCL\init.sqf;" !="IgiLoad" !="R3F_ARTY_AND_LOG" !="HC" !="FuMs" !="NameTags" !="SFM" !="superfun" !="randomize_colors" !="clock.sqf" !="randomize_gue" !="finddisplay" !="onPlayerRespawn.sqf" !="earplugs.sqf" Link to comment Share on other sites More sharing options...
0 prue420 Posted February 1, 2015 Report Share Posted February 1, 2015 I did what Scoo did but it only works for me no one else gets the options anyone have a fix for this? Link to comment Share on other sites More sharing options...
0 phenomax Posted February 1, 2015 Report Share Posted February 1, 2015 Scoo's script is now working fine for me, since i increased the sleep value from 10 to 30. Maybe some datas need to be loaded before the EarPlugs can be initialized. Greez Link to comment Share on other sites More sharing options...
0 Scoo Posted February 1, 2015 Report Share Posted February 1, 2015 For me it does not work, nothing happens. You should increase the sleep value like Phenomax suggested, Scoo's script is now working fine for me, since i increased the sleep value from 10 to 30. Maybe some datas need to be loaded before the EarPlugs can be initialized. Greez I'm not sure about it but I noticed players loading doesn't last the same on every server, so earplugs script triggers when player is still in loading... most probably. Link to comment Share on other sites More sharing options...
Question
Angrygargamel
Hi&Hello...
i tried to implement this little but functional earplug script on my epoch server...
i have tried 3 different variants now... but the mousewheel actions never show up
http://www.armaholic.com/page.php?id=26624
any suggestions?
who doesnt know what this script does...
when you fly in a heli you cant understand anything of the VON or teamspeak unless you turn the ingame volume down
this script does this for you instant... put the earplugs in... sound is lowered to x percent
take the earplugs out... sound is back to normal
Link to comment
Share on other sites
Top Posters For This Question
40
14
8
8
Popular Days
Dec 30
16
Jan 30
15
Feb 4
10
Jan 1
10
Top Posters For This Question
computermancer 40 posts
ulli_123 14 posts
mgm 8 posts
Talib 8 posts
Popular Days
Dec 30 2014
16 posts
Jan 30 2015
15 posts
Feb 4 2015
10 posts
Jan 1 2015
10 posts
Popular Posts
vbawol
You can simply use the internal sound volume system we added CTRL and - or +
RIE_JACKTE(new)
all well and good untill you accidental scroll too far on the action menu and click eject
Scoo
I had this problem with another script, (alive vehicle player) seems to trigger when player is still in loading. Try to change the "Sleep 8" to a bigger number, this could help... Sure you
174 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now