ReDBaroN Posted April 11, 2016 Report Share Posted April 11, 2016 I'm wondering if this could be the order of the init problem.... Can anyone remind me which blocks should go where in the init? if (isServer) then , if(hasInterface)then etc Thanks for the help Link to comment Share on other sites More sharing options...
Grahame Posted April 11, 2016 Report Share Posted April 11, 2016 Works for me with this at the bottom of my mission init.sqf: ////////////////////////////////////////////////////////////////////////// //cmEARPLUGS CODE START call compile preProcessFileLineNumbers "cmEarplugs\config.sqf"; [] execVM "earplugsfix.sqf"; //cmEARPLUGS CODE END ////////////////////////////////////////////////////////////////////////// If it matters I use InfiStar now so I don't know whether that would make a difference but auto inserting and removing are working on my server ReDBaroN and Brian Soanes 2 Link to comment Share on other sites More sharing options...
ReDBaroN Posted April 11, 2016 Report Share Posted April 11, 2016 Triffic, thanks guys. Moved it to the bottom of the init and now all is working. Well, all except the hotkey F4.... but, I'll take that! :) Ghostrider-GRG 1 Link to comment Share on other sites More sharing options...
Ghostrider-GRG Posted April 11, 2016 Report Share Posted April 11, 2016 5 hours ago, ReDBaroN said: Triffic, thanks guys. Moved it to the bottom of the init and now all is working. Well, all except the hotkey F4.... but, I'll take that! :) I wonder if the antihack is blocking the added keypress handler. See lines 59-61 in Configs\epoch_config\CfgEpochClient.hpp. displayAddEventHandler[] = {"keyDown","keyUp"}; keyDown = "(_this call EPOCH_KeyDown)"; keyUp = "(_this call EPOCH_KeyUp)"; Link to comment Share on other sites More sharing options...
82ndAB_Bravo17 Posted April 12, 2016 Report Share Posted April 12, 2016 You can also change respawnOnStart = -1; in epoch_config/sandbox_config.hpp to respawnOnStart = 0; and the respawn script will run again as before. mgm 1 Link to comment Share on other sites More sharing options...
ReDBaroN Posted April 12, 2016 Report Share Posted April 12, 2016 4 hours ago, 82ndAB_Bravo17 said: You can also change respawnOnStart = -1; in epoch_config/sandbox_config.hpp to respawnOnStart = 0; and the respawn script will run again as before. What's the advantage of that though? Link to comment Share on other sites More sharing options...
82ndAB_Bravo17 Posted April 12, 2016 Report Share Posted April 12, 2016 2 hours ago, ReDBaroN said: What's the advantage of that though? The Script will run exactly as it did before 0.3.8.0 without any extra scripts being involved. Link to comment Share on other sites More sharing options...
Grahame Posted April 12, 2016 Report Share Posted April 12, 2016 But with Brian's new script you don't need to remember to have another edit (that may, I don't know for sure, effect other things) in sandbox_config.hpp each time. The new fix seems more elegant, just line added in init.sqf, a file that is rarely effected by new versions of Epoch... Link to comment Share on other sites More sharing options...
Tarabas Posted April 12, 2016 Report Share Posted April 12, 2016 Thank you for that information with respawnOnStart = 0; auto-earplugs work fine again for everyone without any script changes. only button F4 again just works for admin, not for players Link to comment Share on other sites More sharing options...
mgm Posted May 8, 2016 Report Share Posted May 8, 2016 On 4/12/2016 at 10:11 PM, Tarabas said: Thank you for that information with respawnOnStart = 0; auto-earplugs work fine again for everyone without any script changes. only button F4 again just works for admin, not for players I just run some more testing on this, situation is the same, as it was a year ago. Epoch AntiHack still blocks the KeyDown event for normal players. So annoying. Link to comment Share on other sites More sharing options...
mgm Posted May 8, 2016 Report Share Posted May 8, 2016 On 4/11/2016 at 10:29 PM, Ghostrider-DbD- said: I wonder if the antihack is blocking the added keypress handler. See lines 59-61 in Configs\epoch_config\CfgEpochClient.hpp. displayAddEventHandler[] = {"keyDown","keyUp"}; keyDown = "(_this call EPOCH_KeyDown)"; keyUp = "(_this call EPOCH_KeyUp)"; yes it is EPAH that's blocking the hotkey for non-admins. as discussed few pages back - I'm surprised almost a year later it's still an issue. Link to comment Share on other sites More sharing options...
arc7r7 Posted May 8, 2016 Report Share Posted May 8, 2016 With 0.3.8 infiSTAR is blocking the manual key function now also. It was working prior to the last patch. Link to comment Share on other sites More sharing options...
Grahame Posted May 8, 2016 Report Share Posted May 8, 2016 I'm guessing that that's an InfiStar issue. Hasn't been available with standard Epoch AH for a while and when I migrated to InfiStar at 0.3.8 it didn't work either. You can still add/remove via the scroll wheel action menu though. I do when I'm out on a boat... Link to comment Share on other sites More sharing options...
mgm Posted May 8, 2016 Report Share Posted May 8, 2016 2 minutes ago, Grahame said: I'm guessing that that's an InfiStar issue. Hasn't been available with standard Epoch AH for a while and when I migrated to InfiStar at 0.3.8 it didn't work either. You can still add/remove via the scroll wheel action menu though. I do when I'm out on a boat... Is earplug auto in/out function not working for you for some reason? Link to comment Share on other sites More sharing options...
Grahame Posted May 8, 2016 Report Share Posted May 8, 2016 No. Auto-in and out and action menu in and out work fine. Hot key doesn't work - just like in your taxi script :) (See I do read other people's posts... what is it, thirteen or fifteen months ) Link to comment Share on other sites More sharing options...
mgm Posted May 8, 2016 Report Share Posted May 8, 2016 2 minutes ago, Grahame said: No. Auto-in and out and action menu in and out work fine. Hot key doesn't work - just like in your taxi script :) (See I do read other people's posts... what is it, thirteen or fifteen months ) Okay cool then. I just reinstalled this mod to my local play server, hotkey still working fine for admin and still not working fine in vanilla player mode. hear us Skaronator, give us a fix... Link to comment Share on other sites More sharing options...
Grahame Posted May 8, 2016 Report Share Posted May 8, 2016 3 minutes ago, mgm said: hear us Skaronator, give us a fix... I'd rather have persistent minefields first arc7r7 1 Link to comment Share on other sites More sharing options...
mgm Posted May 8, 2016 Report Share Posted May 8, 2016 3 minutes ago, Grahame said: I'd rather have persistent minefields first keyDown affects so many things. minefields affect only one aspect of the game. keydown > minefield Grahame 1 Link to comment Share on other sites More sharing options...
Grahame Posted May 8, 2016 Report Share Posted May 8, 2016 1 minute ago, mgm said: keyDown affects so many things. minefields affect only one aspect of the game. keydown > minefield But I don't need any of those things dammit! Taxis, schmaxis... earplugs (action menu), smoke dispenser... who needs smoke? I'll just light up another Murshun and obscure my vehicle... Minefields on the other hand.... sweet glorious minefields.... sweet glorious bouncing APERS mines... Link to comment Share on other sites More sharing options...
mgm Posted May 8, 2016 Report Share Posted May 8, 2016 3 minutes ago, Grahame said: But I don't need any of those things dammit! Taxis, schmaxis... earplugs (action menu), smoke dispenser... who needs smoke? I'll just light up another Murshun and obscure my vehicle... Minefields on the other hand.... sweet glorious minefields.... sweet glorious bouncing APERS mines... how do you not need taxis. do you never die in this game or when you die do you always have a friend to pick you up? I just died 4 times in the last 4 hours due to silly army3 collision mechanics. "pushing" my boat and 2 centimeters too close and I die. yea sure could be more careful but still things happen and you occasionally die. I hate to run in DayZ SA, and in Epoch you can't even run more than n minutes due to realistic-ish stamina behavior. I rather just call a damn taxi. taxi gets expensive after a while though! the final solution => public buses - free for all!! Grahame 1 Link to comment Share on other sites More sharing options...
Grahame Posted May 8, 2016 Report Share Posted May 8, 2016 2 minutes ago, mgm said: the final solution => public buses - free for all!! Thirteen months and counting... Link to comment Share on other sites More sharing options...
mgm Posted May 8, 2016 Report Share Posted May 8, 2016 25 minutes ago, Grahame said: Thirteen months and counting... downloading Arma2 as we speak!! there's no bus in Arma3, not my fault now, is it Link to comment Share on other sites More sharing options...
Grahame Posted May 8, 2016 Report Share Posted May 8, 2016 Yep, I was hoping CUP would get to this by now, but you know you really want to use this: The ARMA3 Battle Bus (I know it uses CUP, but so do I... and I guess this conversation probably belongs in your taxi script thread) Link to comment Share on other sites More sharing options...
mgm Posted May 9, 2016 Report Share Posted May 9, 2016 21 hours ago, Grahame said: Yep, I was hoping CUP would get to this by now, but you know you really want to use this: The ARMA3 Battle Bus (I know it uses CUP, but so do I... and I guess this conversation probably belongs in your taxi script thread) can't. already asked the author of that project, he said no "due to licensing model of assets his work is built on". I will try and get a bus somewhere else. /thread hijack Link to comment Share on other sites More sharing options...
Hux Posted May 26, 2016 Report Share Posted May 26, 2016 I can't seem to get this to work. I think I've installed it correctly. I have my cmEarplugs folder in my altis mission pbo. Also the onPlayerKilled.sqf and onPlayerRespawn.sqf are in my mission pbo. This is my init: Spoiler call compile preProcessFileLineNumbers "cmEarplugs\config.sqf"; [] execVM "trader\init.sqf"; [] execVM "trader\HALV_takegive_crypto_init.sqf"; [] execVM "trader\resetvehicleammo.sqf"; [] execVM "IgiLoad\IgiLoadInit.sqf"; // Welcome Credits [] execVM "welcome\welcome.sqf"; [] execVM "addons\messages\init.sqf"; if(hasInterface) then{ [] execVM "addons\service_point\service_point.sqf"; }; Config: Spoiler //============================================ // cmEarplugs Script // written by computermancer // superfunserver.com //switch technique inspired by mgm //============================================ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // CONFIG : CHOOSE YOUR BEHAVIOR //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //DO YOU WANT EARPLUGS HOTKEY TO WORK? // if you are using EPAH you should disable for peace of mind. cmEarplugsKeyPressEnabled = false; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // HOTKEY CONFIGURATION FOR: TOGGLE EARPLUG IN/OUT VIA KEYPRESS FUNCTION // List of Available Hotkey Options // To use INSERT as your hotkey, please choose: 1 in the variable below // To use NumPadMultiply as your hotkey, please choose: 2 in the variable below // To use NumPadDivide as your hotkey, please choose: 3 in the variable below // To use F4 as your hotkey, please choose: 4 in the variable below // To use F5 as your hotkey, please choose: 5 in the variable below cmEarplugs_myHotkeyChoice = 4; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // CHOOSE INSERT & REMOVE BEHAVIOR ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // FIRST NUMBER : Choose how LONG it takes until sound is REDUCED // SECOND NUMBER:" Choose how LOUD the sound is when it is REDUCED cmManMuteSound = {1 fadeSound 0.25;}; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //FIRST NUMBER : Choose how LONG it takes until sound RETURNS //SECOND NUMBER:" Choose how LOUD the sound is when it is done RETUNRNING cmManReturnSound = {1 fadeSound 1;}; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //CHOOSE YOUR INSERT MESSAGE: cmManMuteMessage = { hint "You have inserted your earplugs."; systemchat "You have inserted your earplugs."; }; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //CHOOSE YOUR REMOVE MESSAGE: cmManReturnSoundMsg = { hint "You have removed your earplugs."; systemchat "You have removed your earplugs."; }; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // CHOOSE IF YOU WANT AUTOINSERT & AUTOREMOVE OF EARPLUGS: InsertAutoEarplugs=true; RemoveAutoEarplugs=true; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // CHOOSE AUTO-INSERT & REMOVE BEHAVIOR ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // FIRST NUMBER : Choose how LONG it takes until sound is REDUCED // SECOND NUMBER:" CHoose how LOUD the sound is when it is REDUCED cmMuteSound = {5 fadeSound 0.25;}; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //FIRST NUMBER : Choose how LONG it takes until sound RETURNS //SECOND NUMBER:" CHoose how LOUD the sound is when it is done RETUNRNING cmReturnSound = {10 fadeSound 1;}; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //CHOOSE YOUR AUTO-INSERT MESSAGE cmMuteMessage = { hint "Earplugs have been auto-inserted..."; systemchat "Earplugs have been auto-inserted..."; }; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //CHOOSE YOUR AUTO-REMOVE MESSAGE cmReturnSoundMsg = { hint "Earplugs have been auto-removed."; systemchat "Earplugs have been auto-removed."; }; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // END CONFIGURABLES ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// EP_req_1 = { private ["_cm_trigger2"]; _cm_trigger2 = vehicle player != player; _cm_trigger2 }; cm_EP_LOOP = { while {true} do { waitUntil {uisleep 0.5; vehicle player != player}; _cm_whatImInATM = vehicle player; inCaseofDeath = _cm_whatImInATM; if (InsertAutoEarplugs) then { if (earplugsout) then { [] call cmMuteSound; [] call cmMuteMessage; earplugsout=false; }; }; //_cm_whatImInATM addEventHandler ["GetOut", {[_this] call cmGetOut}]; if (isNil {_cm_whatImInATM getVariable "HasEarplugMenu"}) then {_cm_whatImInATM setVariable["HasEarplugMenu", "hasNoMenu"];}; _checkington = (_cm_whatImInATM getVariable "HasEarplugMenu"); if (_checkington == "hasNoMenu") then { _null = _cm_whatImInATM addaction ["<img image='cmEarplugs\earplugs.paa' /><t color=""#38eeff""> Earplugs</t>","[] call cm_Earplugs_FUNc","",0,false,false,"","[] call EP_req_1"]; _cm_whatImInATM setVariable ["HasEarplugMenu","hasMenu"]; systemChat "Earplugs menu has been added."; }; waitUntil {uisleep 0.5; vehicle player == player}; //_feedME = _this select 0; //_fedTrueName = _feedME select 0; theOneTrueName = _cm_whatImInATM; theOneTrueName setVariable ["HasEarplugMenu","hasMenu"]; if (RemoveAutoEarplugs) then { if (!earplugsout) then { [] call cmReturnSound; [] call cmReturnSoundMsg; earplugsout=true; }; }; }; }; cm_Earplugs_FUNc = { if (earplugsout) then { [] call cmManMuteMessage; [] call cmManMuteSound; earplugsout=false; } else { [] call cmManReturnSoundMsg; [] call cmManReturnSound; earplugsout=true; }; }; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // DO NOT CHANGE THE VALUES BELOW //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// cmEarplugs_hotkeyDIKCodeNumberINSERT = 210; cmEarplugs_hotkeyDIKCodeNumberNUMPADMULTIPLY = 55; cmEarplugs_hotkeyDIKCodeNumberNUMPADDIVIDE = 181; cmEarplugs_hotkeyDIKCodeNumberF4 = 62; cmEarplugs_hotkeyDIKCodeNumberF5 = 63; switch cmEarplugs_myHotkeyChoice do { case 1: { cmEarplugs_hotkeyDIKCodeNumber = cmEarplugs_hotkeyDIKCodeNumberINSERT}; case 2: { cmEarplugs_hotkeyDIKCodeNumber = cmEarplugs_hotkeyDIKCodeNumberNUMPADMULTIPLY}; case 3: { cmEarplugs_hotkeyDIKCodeNumber = cmEarplugs_hotkeyDIKCodeNumberNUMPADDIVIDE}; case 4: { cmEarplugs_hotkeyDIKCodeNumber = cmEarplugs_hotkeyDIKCodeNumberF4}; case 5: { cmEarplugs_hotkeyDIKCodeNumber = cmEarplugs_hotkeyDIKCodeNumberF5}; case 0; default { cmEarplugs_hotkeyDIKCodeNumber = cmEarplugs_hotkeyDIKCodeNumberINSERT}; }; publicVariable "cmEarplugs_hotkeyDIKCodeNumber"; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //END ALL ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Server rpt: http://pastebin.com/CcwWhhLK I use Epoch Anti Hack but I have auto insert enabled. I have key press set to false: cmEarplugsKeyPressEnabled = false; I see no option in action menu when I'm in a vehicle. Have I missed something? Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now