Jump to content

computermancer

Recommended Posts

 

Did you copy over the cmEarplugs code from the init.sqf file to your init.sqf file?

//cmEARPLUGS CODE START
//////////////////////////////////////////////////////////////////////////
call compile preProcessFileLineNumbers "cmEarplugs\cm_veh_fun.sqf";
//cmEARPLUGS CODE END
//////////////////////////////////////////////////////////////////////////

Works wonderfully. Thanks for this helpful contribution. Players love it so far.

 

One suggestion: Add this last step to the install instructions.

Link to comment
Share on other sites

  • 2 weeks later...

cmEARPLUGS SCRIPT

 

 

This is where I will share my EPAH-safe earplugs script.

 

Here is a link to the github files.

 

cmearplugs has been updated as of 02-27-2015 ... will call this initial version 1.0 to keep track going forward

 

https://github.com/computermancer/cmEarplugs

 

B) INSTRUCTIONS:

 

 - COPY the folder "cmEarplugs" to your mission folder (where your init.sqf file is located)

 

COPY the file "onPlayerRespawn.sqf" to the same folder as above

 

-Edit your battleye stuff....

 

-That's it.

 

:angry: YOU DO NOT NEED TO EDIT YOUR INIT.SQF 

so you dont confuse noobs like me ^^ you should remove that : YOU DO NOT NEED TO EDIT YOUR INIT.SQF  since you need to add : call compile preProcessFileLineNumbers "cmEarplugs\cm_veh_fun.sqf"; to the init.sqf

i got it to work now. ohh woow !! gotta love this mate <3 this should be standard in all arma :D best script ever ! Thanks !

Link to comment
Share on other sites

so you dont confuse noobs like me ^^ you should remove that : YOU DO NOT NEED TO EDIT YOUR INIT.SQF  since you need to add : call compile preProcessFileLineNumbers "cmEarplugs\cm_veh_fun.sqf"; to the init.sqf

i got it to work now. ohh woow !! gotta love this mate <3 this should be standard in all arma :D best script ever ! Thanks !

oops, good eye, thanks!

Link to comment
Share on other sites

hmmm...I followed the install instructions twice and still get this in the rpt:

 

4:07:17 Error: Wheel reference not initialized

 

Don't get any auto insert or a wheel menu?

Not sure what that error is, doesn't seem like it would be caused by this.

 

Link your misison pbo and I can take a look

Link to comment
Share on other sites

Computermancer, I have been using this for a while and only implemented the newer version with auto insert recently. 

 

I just came here to say that you sir are absolutely a genius! This script works without flaws and in such a smooth way I sometimes forget its there. Previously we had a problem with the menu not always showing up or whatever, but now it works better than ever expected. 

 

Thank you for your hard work dude!

Link to comment
Share on other sites

Not to start a fight but I didn't need to change anything in the init.sqf file to get this one running. The instructions were the easiest and simplest to install. I do agree this script, the player status bar, SEM Missions and the A3EAI roaming AI should be added to the standard epoch as must haves. In my opinion. Good work Computermancer.

Link to comment
Share on other sites

Not sure what that error is, doesn't seem like it would be caused by this.

Link your misison pbo and I can take a look

It also stopped my logistics scripts working. Soon as removed the earplugs logistics worked again.

Will run it again on a test server and see what happens

Link to comment
Share on other sites

Excellent work CM, and as simple as it is to install, I can understand why people get confuzzled reading through this thread. Looks like the installation steps changed somewhat.

 

However...

 

You don't mention in any of the installations about copying the onplayerkilled.sqf file over, but you do mention adding in the BE filter. Is this file needed or not?

Link to comment
Share on other sites

how?

You can't do it with a "quick" hack (by removing/adding one line).

This is because of the way it is currently added. It is using addAction command which basically "attach"s the menuOption to the vehicle object.

To make it work, a player must be at a certain distance (I can't remember now, 15 meters I think) to the object.

summary of this chapter above => no vehicle = no menu.

 

I also read "Epoch AntiHack blocks all requests to  addAction to players", I think this is the reason why cm added the addAction menu option to the vehicle instead of player.

summary of this chapter above =>  you cannot add mouseWheel option to the player.

[that is if my intel is correct event then it only matters to you if you're actually using Epoch antihack (champions' choice)]

 

One potential solution I can think of is: you can assign a keyboard shortcut and install a keyDown eventHandler in client side init file. When the key is pressed it will 'toggle' the status of ear plugs. This can be added to a nice colorful shiny hint message so that player can get a feedback.

 

You can either write the above from scratch or re-use somebody elses work. Search for keydown eventhandler scripts.

If you can't find anything working: I already have the code described above written for my Transport for Arma script but on keyPress it orders a taxi (it does not put in/remove earplugs obviously). I can share the code and you can take cm's earplug code's heart (which is basically one line: set sound level 0.25 or set sound level 1.00) and wrap around my keyDown code.

 

if you know nothing about scripting this is not for the quick and lazy you.

if you know nothing about scripting but if you set your mind to it I'm sure you'll get it done in a few days.

 

the other option is ask cm to do it for you. dude is like scripting Rambo.

Link to comment
Share on other sites

I get this error with 0.3.0.1-b22

 


18:04:00 Error in expression <adeSound 1;
earplugsout=true;
[] spawn cm_EP_LOOP;
 
>
18:04:00   Error position: <cm_EP_LOOP;
 
>
18:04:00   Error Undefined variable in expression: cm_ep_loop
18:04:00 File mpmissions\__CUR_MP.Altis\onPlayerRespawn.sqf, line 7
Link to comment
Share on other sites

I get this error with 0.3.0.1-b22

Arma has been kind enough to tell us what's wrong: "Error Undefined variable in expression: cm_ep_loop"

Look for cm_ep_loop in the files. free grepWin software can help you find all occurences easily across multiple files with a nice single window overview.

 

You have to have a script file which initializes the aforementinoed variable. If you can't see it, perhaps re-install from a new package (in case yours is corrupted).

Link to comment
Share on other sites

Okay guys, I added the option to press F4 to toggle earplugs at any given moment.

 

I also added a config file so you can customize some messages and timers.

 

Let me know how it goes!  B)

 

Install instructions have been updated on first page of this thread as well as on github.

 

https://github.com/computermancer/cmEarplugs

Link to comment
Share on other sites

Okay guys, I added the option to press F4 to toggle earplugs at any given moment.

 

I also added a config file so you can customize some messages and timers.

 

Let me know how it goes!  B)

 

Install instructions have been updated on first page of this thread as well as on github.

 

https://github.com/computermancer/cmEarplugs

that's nice and quick turnaround too! ;)

 

one thing comes to mind though, some antihacks block Function keys so people can't use it as is - would be good to pick another hotkey.

but then again every server admin will request a different key and you will need to provide several options so I suggest you make it a config option so any (serverAdmin) dude can easily change their key setup with 2-3 characters only.

I already have working code on this thanks to my never ending and never releasing work on Transport for Arma script.

 

sharing below my working code if you want to reuse...

//// server-side			in master configuration file
// Define the key to be used for the action: "Call-a-Taxi-to-my-position"		// This is used for Click-N-Go Taxi Service Mode
// 		https://resources.bisimulations.com/wiki/DIK_KeyCodes
//DIK_INSERT 	[Ins] 	0xD2 	210 	[Insert] on arrow keypad 
mgmTfA_configgv_clickNGoCallATaxiHotkeyDIKCodeNumber											= 210									;





//// server-side			in PV export file
publicVariable "mgmTfA_configgv_clickNGoCallATaxiHotkeyDIKCodeNumber"																			;





//// client-side			in EH installer file
private ["_execmgmTfA_fnc_client_clickNGoRequestTaxi"];
mgmTfA_EHInsertKeyDown				= (findDisplay 46) displayAddEventHandler ["KeyDown", "if (_this select 1 == mgmTfA_configgv_clickNGoCallATaxiHotkeyDIKCodeNumber) then	{_execmgmTfA_fnc_client_clickNGoRequestTaxi	= [] spawn mgmTfA_fnc_client_clickNGoRequestTaxi;}"];

Link to comment
Share on other sites

Ah, yes, I suppose that would be a good idea. I will add a config option to choose which key.

 

So Insert seems to be a good non-func key?

 

All my keys are setup as non-default, so I have no idea what keys I can take over... 

 

I just know that EPAH uses F1. F2 and F5 ... and my cmConsole uses F3 :P

 

EDIT: I want to use your taxi service as a trader delivery service!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...