Jump to content
  • 0

Earplugs for vehicles...


Angrygargamel

Question

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

Recommended Posts

  • 0

 

Here you go dude, I finished testing it out earlier today.

 

Copy this to your onPlayerRestart.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" !="onPlayerResawn.sqf" !="earplugs.sqf"

 

 

If I rename the files as you indicated, start the script not.

onPlayerRestart.sqf

earplugs.sqf

But if I rename onPlayerRestart.sqf in onPlayerRespawn.sqf, then starts the script and I still get an auto ban.

Link to comment
Share on other sites

  • 0

LMAO, sorry dude, I did wrote that down wrong, must have been in a daze when I typed it... restart... ugh.

 

Yeah, it should be "onPlayerRespawnsqf"

 

I will setup a vanilla test server today to see whats up with these autobans.  

 

You may want to do the battleeye filter again, ther was a typo there too, sigh.

!="onPlayerRespawn.sqf" !="earplugs.sqf"
Link to comment
Share on other sites

  • 0

Okay guys, I think I understand what you mean by auto-ban. I was looking at the Epoch admin menu, and under the hackerlog, I had 500 hits coming from my headlessclient and random players. No one was kicked, but the "banned" was logged. SO, I am not sure how to move forward with this, but I will investigate why my players don't get kicked using the default epochah.

Link to comment
Share on other sites

  • 0

antihack_cfgPatchesCfg[] = {0}; // 0 == BAN - 1 = LOG

 

You've probably log on and not ban, so the log records with you

 

Maybe need to add exceptions here

antihack_whitelistedCfgPatches[] = {"AiA_Worlds_Author","AiA_Worlds_Grid","AiA_BaseConfig_F","AiA_A1AlwaysDummy",...................,"AiA_StandaloneTerrainPack_Core","AiA_StandaloneTerrainPack_Core_Faction","AiA_StandaloneTerrainPack_Core_VehicleClass"}; //whitelisted cfgPatches for AiA TP

Link to comment
Share on other sites

  • 0
antihack_checkFiles[] = { //script check, leave it blank to disable it
	{"\x\addons\a3_epoch_code\compile\setup\EPOCH_clientInit.sqf", "EPOCH_clientInit"},
	{"\x\addons\a3_epoch_code\compile\EPOCH_onEachFrame.sqf", "EPOCH_onEachFrame"},
	{"\x\addons\a3_epoch_code\compile\setup\EPOCH_masterLoop.sqf", "EPOCH_masterLoop"},
	{"\x\addons\a3_epoch_code\compile\setup\EPOCH_client_rejectPlayer.sqf", "EPOCH_client_rejectPlayer"},
	{"\x\addons\a3_epoch_code\compile\setup\EPOCH_clientRespawn.sqf", "EPOCH_clientRespawn"},
	{"\x\addons\a3_epoch_code\compile\interface_event_handlers\EPOCH_KeyDown.sqf", "EPOCH_KeyDown"}
};

What about the last line? 

Maybe we have to whitelist F3 when using Scoo's script.

 

Greez

Link to comment
Share on other sites

  • 0
antihack_checkFiles[] = { //script check, leave it blank to disable it
	{"\x\addons\a3_epoch_code\compile\setup\EPOCH_clientInit.sqf", "EPOCH_clientInit"},
	{"\x\addons\a3_epoch_code\compile\EPOCH_onEachFrame.sqf", "EPOCH_onEachFrame"},
	{"\x\addons\a3_epoch_code\compile\setup\EPOCH_masterLoop.sqf", "EPOCH_masterLoop"},
	{"\x\addons\a3_epoch_code\compile\setup\EPOCH_client_rejectPlayer.sqf", "EPOCH_client_rejectPlayer"},
	{"\x\addons\a3_epoch_code\compile\setup\EPOCH_clientRespawn.sqf", "EPOCH_clientRespawn"},
	{"\x\addons\a3_epoch_code\compile\interface_event_handlers\EPOCH_KeyDown.sqf", "EPOCH_KeyDown"}
};

What about the last line? 

Maybe we have to whitelist F3 when using Scoo's script.

 

Greez

 

 

I have Infistar and only our admins can use the script, the normal players can´t use it.

 

Same problem with the normal epoch anti hack on our server.

I think phenomax is right.

Link to comment
Share on other sites

  • 0

Update: I have finished my Epoch Antihack-Safe Earplugs script... I will be testing some more and cleaning up the code, and will share in the future. But there is good news for those that want this script but want to keep their Epoch Antihack turned on. The BE filters are easy, and the code is fairly simple, but I don't want to share it yet until I have refined it. I will give those of you working on addaction stuff a huge tip if your trying to play nice with epoch antihack. You can't addaction it to a player... but...

Link to comment
Share on other sites

  • 0

The problem with the AH is addactions

 

Check this thread out.

 

 

 

 

vbawol

We do not allow addactions in our AH due to the fact we do not use them for anything. I can see how this could be a problem and will see what we can do to either disable the check or provide a way to whitelist the actions.

 

 

Maybe if we make more noise the dev's will give us away to whitelist.

Link to comment
Share on other sites

  • 0

The problem with the AH is addactions

 

Check this thread out.

 

 

 

Maybe if we make more noise the dev's will give us away to whitelist.

 Yeah, the ablility to create our own whitelist would be great. I have a ton of custom BE filters, why can't I have some EPAH filters too? 

 

I will show you guys later today how to get my SUPERFUNMENU -VEHICLE EDITION to work properly.  :)

Link to comment
Share on other sites

  • 0

 Yeah, the ablility to create our own whitelist would be great. I have a ton of custom BE filters, why can't I have some EPAH filters too? 

 

I will show you guys later today how to get my SUPERFUNMENU -VEHICLE EDITION to work properly.  :)

Sounds great!

Link to comment
Share on other sites

  • 0

 addactions on re spawn or re logging  don't work for my players i have zones around that map that if a player goes into it it will reactivate the addaction script and give them scroll option, The Onrespawn is unreliable and when a player logs they have to die to get it back so having Zones that reactivate works out nicely the only down side is when they walk in and out of it it keeps re adding the addaction make it 1 long list so i toke a page from computermancer and have it do you can disable the addaction.

Link to comment
Share on other sites

  • 0

In order to stop the players from getting a bunch of scroll options generating, have the player setVariable on himself so next time it tries to trigger the script, it checks if player has a tag saying "already has menu". And if htey remove the menu, have it set another variable on them saying "removed menu"... also, try out my OPR script that requires player to move before scripts get triggered... helps prevent the respawn delay issues...

 

example:

player setVariable ["status","no menu"];

//then when they activate the menu...

player setVariable ["status","has menu"];

//and to check their variable do this...

_checking = player getVariable "status";

if (_checking == "has menu" ) then { ....}; //player has variable "has menu"
if (_checking != "has menu" ) then { ....}; //player has variable that does NOT say "has menu"
or
if (_checking == "no menu" ) then { ....}; //player has variable "no menu"
Link to comment
Share on other sites

  • 0

addactions and works flawlessly, how does he manage it?

 

He adds the actions to the vehicles not the player, that's the secret. 

 

I have my SFM working in vehicles now without triggering EPAH. But I am refining my loops before I share the SFM script, I will most likely share the SafeEarplugs script first... most likely next few days. I am way too OCD to give you guys my current, funky code. :P

Link to comment
Share on other sites

  • 0
Happy days my friends! I have finished my public version of my EPAH-friendly Earplugs script.
 
It will allow you to use earplugs at any vehicle. It may need an update in the future for when players buy vehicles, it may not get applied to that vehicle until the next restart. I will update as I move forward.
 
Here is the link to all the files you need. 
 
Just download it, extract the folder to you missions folder, and add the following line to your init.sqf file.

[] execVM "SFM_VEH_EP\cm_veh_init.sqf";

NOTE: You have to add one exception to your battleye filters. The info is in a txt file in the rar.

Link to comment
Share on other sites

  • 0

The script works, but I can not get no kick, not as a player and as admin, as in the manual is
It is supposed to wait for the first kick

 

Can you change the script so please be near a vehicle or the earplugs rei or take out can.
Because if you forget to take off before the earplugs out, you have to get into the vehicle again so that the sign is returned.

Link to comment
Share on other sites

  • 0

The script works, but I can not get no kick, not as a player and as admin, as in the manual is

It is supposed to wait for the first kick

 

Can you change the script so please be near a vehicle or the earplugs rei or take out can.

Because if you forget to take off before the earplugs out, you have to get into the vehicle again so that the sign is returned.

 

I have added some code so that it auto-removes the earplugs when you get out. I will upload that later this weekend when I can put it together nicely.

 

Im not sure I understood the first part...

 

Are you getting autobans from the Epoch Anti-Hack, if so, I don't think it's from my script.

 

When I upload the next SFM_VEH_EP version, I will also record a video of me setting up a vanilla server, adding my script, and logging, restarting server to confirm no issues.

 

I will also post a link to a demo video of my latest version of SFM, it now has a car radio!  :P

 

Just an FYI, if you have EPAH turned on, you CANNOT addactions to player, it will cause autobans. 

 

I am waiting for the next update... hoping they add some filters to toggle like Battleye , so EPAH doesn't autoban my stuff.  :rolleyes:

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
×
×
  • Create New...