Jump to content

computermancer

Member
  • Posts

    255
  • Joined

  • Last visited

Reputation Activity

  1. Like
    computermancer got a reaction from Fragile in Earplugs Script   
    Hey guys, I updated the files on github with a working version.
     
    It doesn't have keypress option though, just auto-insert/remove.
     
    I should have time this week to get a highly-config version  B)
  2. Like
    computermancer got a reaction from Axle in Earplugs Script   
    cmEARPLUGS SCRIPT ver 2.0
     
    B) WHAT IT DOES:
    Earplugs script for Arma 3 Epoch (EPAH safe)   - This script allows you to put in "earplugs". - Config.sqf will let you configure almost every possible aspect of the script. - You can now insert and remove the earplugs by pressing a key of your choice.  - Current available keys are : F4, F5, INSERT, NUMPADMULTIPLY, NUMPADDIVIDE - You can toggle the hotkey in case you use EPAH and wont be ablt to use hotkeys. - Auto-insert and remove earplugs when getting in and out of vehicles. - Inserting earplugs reduces volume down to about 25 percent. - Removing earplugs restores volume to 100 percent.   -Thanks to mgm on epochmod.com for helping with keypress config technique.  
    Here is a link to the github files.
    https://github.com/computermancer/cmEarplugs
     
    B) INSTRUCTIONS:
    1. Copy the cmEarplugs folder to your mission folder (altis.Epoch)
    2. If you have init.sqf, copy the code in this init.sqf to yours.
    2a. If you do not have an init.sqf, copy this one over to your mission folder.
    3. Copy onPlayerKilled.sqf and onPlayerRespawn.sqf to your mission folder.
    4. Config your personal settings in the config.sqf file in the cmEarplgus folder.
    5. Edit your battleye filters.

    Edit the following in your battleye filters.
     
      ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// scripts.txt (at the end of the line add the following) /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////                                         (BIS_fnc_)  First Line:  !"bis_fnc_initVehicle" !"BIS_fnc_setVehicleMass_fsm" !"BIS_fnc_arsenal_type"                         (displayAddEventHandler        )  Line 53 (54 on notepad++) :               !"EP_LOOP"  (displayAddEventHandler        )  Line 53 (54 on notepad++)                 !"cmKeyPress"  (              exec                             )  Line 22 (23 on notepad++) :               !"clock.sqf"  (    removeAllActions                 )   Line 31 (32 on notepad++) :              !"onplayerkilled.sqf"  (displayRemoveEventHandler)   Line 59 (60 on notepad++) :               !"cmKeyPress"  (removeAllEventHandlers)           Line 59 (60 on notepad++) :               !"cmKeyPress"   ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// PublicVariable.txt (at the end of the line add the following) ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// First Line:                                            !"cmEarplugs_hotkeyDIKCodeNumber" First Line:                                            !"PLAYER_REJECT_NotReady1" ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// B) WHAT TO KNOW:   If you use Epoch Anti Hack, the script will work except for the keypress option. EPAH seems to disable keydown eventhandlers. But auto insert and menu inside vehicle work fine. If you disable EPAH, you can use the keypress toggle as well.
  3. Like
    computermancer reacted to CharlesDarwin in Earplugs Script   
    Thank you very much for a must-have script, IMO.  Excellent work, easy install, clear instructions.
     
    A big thank you!
  4. Like
    computermancer got a reaction from DirtySanchez in Earplugs Script   
    cmEARPLUGS SCRIPT ver 2.0
     
    B) WHAT IT DOES:
    Earplugs script for Arma 3 Epoch (EPAH safe)   - This script allows you to put in "earplugs". - Config.sqf will let you configure almost every possible aspect of the script. - You can now insert and remove the earplugs by pressing a key of your choice.  - Current available keys are : F4, F5, INSERT, NUMPADMULTIPLY, NUMPADDIVIDE - You can toggle the hotkey in case you use EPAH and wont be ablt to use hotkeys. - Auto-insert and remove earplugs when getting in and out of vehicles. - Inserting earplugs reduces volume down to about 25 percent. - Removing earplugs restores volume to 100 percent.   -Thanks to mgm on epochmod.com for helping with keypress config technique.  
    Here is a link to the github files.
    https://github.com/computermancer/cmEarplugs
     
    B) INSTRUCTIONS:
    1. Copy the cmEarplugs folder to your mission folder (altis.Epoch)
    2. If you have init.sqf, copy the code in this init.sqf to yours.
    2a. If you do not have an init.sqf, copy this one over to your mission folder.
    3. Copy onPlayerKilled.sqf and onPlayerRespawn.sqf to your mission folder.
    4. Config your personal settings in the config.sqf file in the cmEarplgus folder.
    5. Edit your battleye filters.

    Edit the following in your battleye filters.
     
      ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// scripts.txt (at the end of the line add the following) /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////                                         (BIS_fnc_)  First Line:  !"bis_fnc_initVehicle" !"BIS_fnc_setVehicleMass_fsm" !"BIS_fnc_arsenal_type"                         (displayAddEventHandler        )  Line 53 (54 on notepad++) :               !"EP_LOOP"  (displayAddEventHandler        )  Line 53 (54 on notepad++)                 !"cmKeyPress"  (              exec                             )  Line 22 (23 on notepad++) :               !"clock.sqf"  (    removeAllActions                 )   Line 31 (32 on notepad++) :              !"onplayerkilled.sqf"  (displayRemoveEventHandler)   Line 59 (60 on notepad++) :               !"cmKeyPress"  (removeAllEventHandlers)           Line 59 (60 on notepad++) :               !"cmKeyPress"   ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// PublicVariable.txt (at the end of the line add the following) ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// First Line:                                            !"cmEarplugs_hotkeyDIKCodeNumber" First Line:                                            !"PLAYER_REJECT_NotReady1" ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// B) WHAT TO KNOW:   If you use Epoch Anti Hack, the script will work except for the keypress option. EPAH seems to disable keydown eventhandlers. But auto insert and menu inside vehicle work fine. If you disable EPAH, you can use the keypress toggle as well.
  5. Like
    computermancer got a reaction from Morphy in Earplugs Script   
    cmEARPLUGS SCRIPT ver 2.0
     
    B) WHAT IT DOES:
    Earplugs script for Arma 3 Epoch (EPAH safe)   - This script allows you to put in "earplugs". - Config.sqf will let you configure almost every possible aspect of the script. - You can now insert and remove the earplugs by pressing a key of your choice.  - Current available keys are : F4, F5, INSERT, NUMPADMULTIPLY, NUMPADDIVIDE - You can toggle the hotkey in case you use EPAH and wont be ablt to use hotkeys. - Auto-insert and remove earplugs when getting in and out of vehicles. - Inserting earplugs reduces volume down to about 25 percent. - Removing earplugs restores volume to 100 percent.   -Thanks to mgm on epochmod.com for helping with keypress config technique.  
    Here is a link to the github files.
    https://github.com/computermancer/cmEarplugs
     
    B) INSTRUCTIONS:
    1. Copy the cmEarplugs folder to your mission folder (altis.Epoch)
    2. If you have init.sqf, copy the code in this init.sqf to yours.
    2a. If you do not have an init.sqf, copy this one over to your mission folder.
    3. Copy onPlayerKilled.sqf and onPlayerRespawn.sqf to your mission folder.
    4. Config your personal settings in the config.sqf file in the cmEarplgus folder.
    5. Edit your battleye filters.

    Edit the following in your battleye filters.
     
      ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// scripts.txt (at the end of the line add the following) /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////                                         (BIS_fnc_)  First Line:  !"bis_fnc_initVehicle" !"BIS_fnc_setVehicleMass_fsm" !"BIS_fnc_arsenal_type"                         (displayAddEventHandler        )  Line 53 (54 on notepad++) :               !"EP_LOOP"  (displayAddEventHandler        )  Line 53 (54 on notepad++)                 !"cmKeyPress"  (              exec                             )  Line 22 (23 on notepad++) :               !"clock.sqf"  (    removeAllActions                 )   Line 31 (32 on notepad++) :              !"onplayerkilled.sqf"  (displayRemoveEventHandler)   Line 59 (60 on notepad++) :               !"cmKeyPress"  (removeAllEventHandlers)           Line 59 (60 on notepad++) :               !"cmKeyPress"   ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// PublicVariable.txt (at the end of the line add the following) ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// First Line:                                            !"cmEarplugs_hotkeyDIKCodeNumber" First Line:                                            !"PLAYER_REJECT_NotReady1" ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// B) WHAT TO KNOW:   If you use Epoch Anti Hack, the script will work except for the keypress option. EPAH seems to disable keydown eventhandlers. But auto insert and menu inside vehicle work fine. If you disable EPAH, you can use the keypress toggle as well.
  6. Like
    computermancer got a reaction from Shadow Moses in Is it just me?   
    I am typing on my keyboard.
  7. Like
    computermancer got a reaction from mgm in Earplugs Script   
    Haven't had a chance to try this new technique. But I am excited to add to my scripting arsenal!  :wub:
  8. Like
    computermancer reacted to mgm in Earplugs Script   
    Here is the code that should work for you, give it a try buddy...
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // 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 cmEarplugs_myHotkeyChoice = 1; // //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // DO NOT CHANGE THE VALUES BELOW cmEarplugs_hotkeyDIKCodeNumberINSERT = 210; cmEarplugs_hotkeyDIKCodeNumberNUMPADMULTIPLY = 55; cmEarplugs_hotkeyDIKCodeNumberNUMPADDIVIDE = 181; switch cmEarplugs_myHotkeyChoice do { case 1: { cmEarplugs_hotkeyDIKCodeNumber = cmEarplugs_hotkeyDIKCodeNumberINSERT }; case 2: { cmEarplugs_hotkeyDIKCodeNumber = cmEarplugs_hotkeyDIKCodeNumberNUMPADMULTIPLY }; case 3: { cmEarplugs_hotkeyDIKCodeNumber = cmEarplugs_hotkeyDIKCodeNumberNUMPADDIVIDE }; case 0; default { cmEarplugs_hotkeyDIKCodeNumber = cmEarplugs_hotkeyDIKCodeNumberINSERT }; }; publicVariable "cmEarplugs_hotkeyDIKCodeNumber"; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  9. Like
    computermancer reacted to mgm in Earplugs Script   
    BTW you have a multitude of BOOLs above.
    later in the code, are you evaluating 12 conditions?
    even with lazy eval syntax, a lot of typing to do, no?

    if so, an optimization idea is doing evaluation just once, as such:

    ///////////////////////
    // config_file.sqf

    //DEAR ADMIN, PLEASE SEE THE TABLE BELOW AND SET THE DESIRED HOTKEY
    // keyIsUpArrow is 1;
    // keyIsInsert is 2;
    // keyIsHome is 3;

    // Your choice goes here dear admin
    hotkey = 3;





    //// process configured value and assign chosen DIK
    switchcase:
    hotkey
    '1': dikCodeIs = 210;
    '2': dikCodeIs = 114:



    P.S.: Posting from mobile, this is just PoC.
    DIK codes and switchcase syntax above is not accurate and need GoogleFu correction :)
  10. Like
    computermancer reacted to mgm in Earplugs Script   
    cm,
    so I throw an idea, went to bed, and by the time I get up you got a new release? awesome man!

    one day, they will teach your dedication to continuous improvement as case study in Harvard School of Scripting! :D

    thanks, my Transport for Arma script coming along really well, hopefully I will have a initial Public Alpha release will be out soon - I just need to write one last module (pay as you go payment system).
    I will be glad if you choose to use it as a base for some of your future work!
  11. Like
    computermancer got a reaction from Fragile in Earplugs Script   
    cmEARPLUGS SCRIPT ver 2.0
     
    B) WHAT IT DOES:
    Earplugs script for Arma 3 Epoch (EPAH safe)   - This script allows you to put in "earplugs". - Config.sqf will let you configure almost every possible aspect of the script. - You can now insert and remove the earplugs by pressing a key of your choice.  - Current available keys are : F4, F5, INSERT, NUMPADMULTIPLY, NUMPADDIVIDE - You can toggle the hotkey in case you use EPAH and wont be ablt to use hotkeys. - Auto-insert and remove earplugs when getting in and out of vehicles. - Inserting earplugs reduces volume down to about 25 percent. - Removing earplugs restores volume to 100 percent.   -Thanks to mgm on epochmod.com for helping with keypress config technique.  
    Here is a link to the github files.
    https://github.com/computermancer/cmEarplugs
     
    B) INSTRUCTIONS:
    1. Copy the cmEarplugs folder to your mission folder (altis.Epoch)
    2. If you have init.sqf, copy the code in this init.sqf to yours.
    2a. If you do not have an init.sqf, copy this one over to your mission folder.
    3. Copy onPlayerKilled.sqf and onPlayerRespawn.sqf to your mission folder.
    4. Config your personal settings in the config.sqf file in the cmEarplgus folder.
    5. Edit your battleye filters.

    Edit the following in your battleye filters.
     
      ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// scripts.txt (at the end of the line add the following) /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////                                         (BIS_fnc_)  First Line:  !"bis_fnc_initVehicle" !"BIS_fnc_setVehicleMass_fsm" !"BIS_fnc_arsenal_type"                         (displayAddEventHandler        )  Line 53 (54 on notepad++) :               !"EP_LOOP"  (displayAddEventHandler        )  Line 53 (54 on notepad++)                 !"cmKeyPress"  (              exec                             )  Line 22 (23 on notepad++) :               !"clock.sqf"  (    removeAllActions                 )   Line 31 (32 on notepad++) :              !"onplayerkilled.sqf"  (displayRemoveEventHandler)   Line 59 (60 on notepad++) :               !"cmKeyPress"  (removeAllEventHandlers)           Line 59 (60 on notepad++) :               !"cmKeyPress"   ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// PublicVariable.txt (at the end of the line add the following) ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// First Line:                                            !"cmEarplugs_hotkeyDIKCodeNumber" First Line:                                            !"PLAYER_REJECT_NotReady1" ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// B) WHAT TO KNOW:   If you use Epoch Anti Hack, the script will work except for the keypress option. EPAH seems to disable keydown eventhandlers. But auto insert and menu inside vehicle work fine. If you disable EPAH, you can use the keypress toggle as well.
  12. Like
    computermancer reacted to xD3MONx in Earplugs Script   
    Really thx for the update
  13. Like
    computermancer reacted to mgm in Earplugs Script   
    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;}"];
  14. Like
    computermancer got a reaction from mgm in Earplugs Script   
    I'm on it.  :ph34r:
  15. Like
    computermancer got a reaction from mgm in Earplugs Script   
    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
  16. Like
    computermancer reacted to mgm in Earplugs Script   
    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.
  17. Like
    computermancer reacted to second_coming in [Server Addon] ZCP - Zupa's Capture Points 2.0 Updated for Epoch 0.3   
    I made the following changes to stop the cap points spawning near player bases (checks for 'PlotPole_EPOCH' within 500 meters), near spawn points (checks for 'ProtectionZone_Invisible_F' which I add to all static traders within 500 meters) or too close together (checks for 'Flag_Green_F' within 1000 meters).
     
    Edit fn_findPosition.sqf in the functions folder in the pbo
    private ["_i","_safepos","_validspot","_position"]; _safepos = [getMarkerPos "center",0,8500,(_this select 0),0,0.5,0]; _validspot = false; _i = 1; while{!_validspot} do { sleep 1; _position = _safepos call BIS_fnc_findSafePos; _i = _i + 1; _validspot = true; if (_position call ZCP_fnc_inDebug) then {  _validspot = false;  };      //Check if near another capture point // Get nearest Flag_Green_F (used in the cap base and nowhere else) _nearOtherCap = (nearestObjects [_position,["Flag_Green_F"],1000]) select 0; _nearestCap = _position distance _nearOtherCap; if (_nearestCap < 1000) then { _validspot = false;  };     //Check if near player base // Get nearest player jammer _nearJammer = (nearestObjects [_position,["PlotPole_EPOCH"],500]) select 0; _nearestJammer = _position distance _nearJammer; if (_nearestJammer < 500) then { _validspot = false;  };   //Check if near protected zone (spawn points or trader base) // Get nearest player jammer _nearProtectedZone = (nearestObjects [_position,["ProtectionZone_Invisible_F"],500]) select 0; _nearestTrader = _position distance _nearProtectedZone; if (_nearestTrader < 500) then { _validspot = false;  };   if(_validspot ) then { if ([_position,10] call ZCP_fnc_nearWater) then {  _validspot = false; };  }; }; _position set [2, 0]; _position  
  18. Like
    computermancer got a reaction from CharlesDarwin in Earplugs Script   
    cmEARPLUGS SCRIPT ver 2.0
     
    B) WHAT IT DOES:
    Earplugs script for Arma 3 Epoch (EPAH safe)   - This script allows you to put in "earplugs". - Config.sqf will let you configure almost every possible aspect of the script. - You can now insert and remove the earplugs by pressing a key of your choice.  - Current available keys are : F4, F5, INSERT, NUMPADMULTIPLY, NUMPADDIVIDE - You can toggle the hotkey in case you use EPAH and wont be ablt to use hotkeys. - Auto-insert and remove earplugs when getting in and out of vehicles. - Inserting earplugs reduces volume down to about 25 percent. - Removing earplugs restores volume to 100 percent.   -Thanks to mgm on epochmod.com for helping with keypress config technique.  
    Here is a link to the github files.
    https://github.com/computermancer/cmEarplugs
     
    B) INSTRUCTIONS:
    1. Copy the cmEarplugs folder to your mission folder (altis.Epoch)
    2. If you have init.sqf, copy the code in this init.sqf to yours.
    2a. If you do not have an init.sqf, copy this one over to your mission folder.
    3. Copy onPlayerKilled.sqf and onPlayerRespawn.sqf to your mission folder.
    4. Config your personal settings in the config.sqf file in the cmEarplgus folder.
    5. Edit your battleye filters.

    Edit the following in your battleye filters.
     
      ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// scripts.txt (at the end of the line add the following) /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////                                         (BIS_fnc_)  First Line:  !"bis_fnc_initVehicle" !"BIS_fnc_setVehicleMass_fsm" !"BIS_fnc_arsenal_type"                         (displayAddEventHandler        )  Line 53 (54 on notepad++) :               !"EP_LOOP"  (displayAddEventHandler        )  Line 53 (54 on notepad++)                 !"cmKeyPress"  (              exec                             )  Line 22 (23 on notepad++) :               !"clock.sqf"  (    removeAllActions                 )   Line 31 (32 on notepad++) :              !"onplayerkilled.sqf"  (displayRemoveEventHandler)   Line 59 (60 on notepad++) :               !"cmKeyPress"  (removeAllEventHandlers)           Line 59 (60 on notepad++) :               !"cmKeyPress"   ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// PublicVariable.txt (at the end of the line add the following) ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// First Line:                                            !"cmEarplugs_hotkeyDIKCodeNumber" First Line:                                            !"PLAYER_REJECT_NotReady1" ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// B) WHAT TO KNOW:   If you use Epoch Anti Hack, the script will work except for the keypress option. EPAH seems to disable keydown eventhandlers. But auto insert and menu inside vehicle work fine. If you disable EPAH, you can use the keypress toggle as well.
  19. Like
    computermancer got a reaction from mazix in Earplugs Script   
    cmEARPLUGS SCRIPT ver 2.0
     
    B) WHAT IT DOES:
    Earplugs script for Arma 3 Epoch (EPAH safe)   - This script allows you to put in "earplugs". - Config.sqf will let you configure almost every possible aspect of the script. - You can now insert and remove the earplugs by pressing a key of your choice.  - Current available keys are : F4, F5, INSERT, NUMPADMULTIPLY, NUMPADDIVIDE - You can toggle the hotkey in case you use EPAH and wont be ablt to use hotkeys. - Auto-insert and remove earplugs when getting in and out of vehicles. - Inserting earplugs reduces volume down to about 25 percent. - Removing earplugs restores volume to 100 percent.   -Thanks to mgm on epochmod.com for helping with keypress config technique.  
    Here is a link to the github files.
    https://github.com/computermancer/cmEarplugs
     
    B) INSTRUCTIONS:
    1. Copy the cmEarplugs folder to your mission folder (altis.Epoch)
    2. If you have init.sqf, copy the code in this init.sqf to yours.
    2a. If you do not have an init.sqf, copy this one over to your mission folder.
    3. Copy onPlayerKilled.sqf and onPlayerRespawn.sqf to your mission folder.
    4. Config your personal settings in the config.sqf file in the cmEarplgus folder.
    5. Edit your battleye filters.

    Edit the following in your battleye filters.
     
      ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// scripts.txt (at the end of the line add the following) /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////                                         (BIS_fnc_)  First Line:  !"bis_fnc_initVehicle" !"BIS_fnc_setVehicleMass_fsm" !"BIS_fnc_arsenal_type"                         (displayAddEventHandler        )  Line 53 (54 on notepad++) :               !"EP_LOOP"  (displayAddEventHandler        )  Line 53 (54 on notepad++)                 !"cmKeyPress"  (              exec                             )  Line 22 (23 on notepad++) :               !"clock.sqf"  (    removeAllActions                 )   Line 31 (32 on notepad++) :              !"onplayerkilled.sqf"  (displayRemoveEventHandler)   Line 59 (60 on notepad++) :               !"cmKeyPress"  (removeAllEventHandlers)           Line 59 (60 on notepad++) :               !"cmKeyPress"   ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// PublicVariable.txt (at the end of the line add the following) ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// First Line:                                            !"cmEarplugs_hotkeyDIKCodeNumber" First Line:                                            !"PLAYER_REJECT_NotReady1" ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// B) WHAT TO KNOW:   If you use Epoch Anti Hack, the script will work except for the keypress option. EPAH seems to disable keydown eventhandlers. But auto insert and menu inside vehicle work fine. If you disable EPAH, you can use the keypress toggle as well.
  20. Like
    computermancer reacted to R4ziel in Earplugs Script   
    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!
  21. Like
    computermancer reacted to Finuix in Earplugs Script   
    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 !
  22. Like
    computermancer got a reaction from boomstick in Earplugs Script   
    cmEARPLUGS SCRIPT ver 2.0
     
    B) WHAT IT DOES:
    Earplugs script for Arma 3 Epoch (EPAH safe)   - This script allows you to put in "earplugs". - Config.sqf will let you configure almost every possible aspect of the script. - You can now insert and remove the earplugs by pressing a key of your choice.  - Current available keys are : F4, F5, INSERT, NUMPADMULTIPLY, NUMPADDIVIDE - You can toggle the hotkey in case you use EPAH and wont be ablt to use hotkeys. - Auto-insert and remove earplugs when getting in and out of vehicles. - Inserting earplugs reduces volume down to about 25 percent. - Removing earplugs restores volume to 100 percent.   -Thanks to mgm on epochmod.com for helping with keypress config technique.  
    Here is a link to the github files.
    https://github.com/computermancer/cmEarplugs
     
    B) INSTRUCTIONS:
    1. Copy the cmEarplugs folder to your mission folder (altis.Epoch)
    2. If you have init.sqf, copy the code in this init.sqf to yours.
    2a. If you do not have an init.sqf, copy this one over to your mission folder.
    3. Copy onPlayerKilled.sqf and onPlayerRespawn.sqf to your mission folder.
    4. Config your personal settings in the config.sqf file in the cmEarplgus folder.
    5. Edit your battleye filters.

    Edit the following in your battleye filters.
     
      ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// scripts.txt (at the end of the line add the following) /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////                                         (BIS_fnc_)  First Line:  !"bis_fnc_initVehicle" !"BIS_fnc_setVehicleMass_fsm" !"BIS_fnc_arsenal_type"                         (displayAddEventHandler        )  Line 53 (54 on notepad++) :               !"EP_LOOP"  (displayAddEventHandler        )  Line 53 (54 on notepad++)                 !"cmKeyPress"  (              exec                             )  Line 22 (23 on notepad++) :               !"clock.sqf"  (    removeAllActions                 )   Line 31 (32 on notepad++) :              !"onplayerkilled.sqf"  (displayRemoveEventHandler)   Line 59 (60 on notepad++) :               !"cmKeyPress"  (removeAllEventHandlers)           Line 59 (60 on notepad++) :               !"cmKeyPress"   ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// PublicVariable.txt (at the end of the line add the following) ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// First Line:                                            !"cmEarplugs_hotkeyDIKCodeNumber" First Line:                                            !"PLAYER_REJECT_NotReady1" ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// B) WHAT TO KNOW:   If you use Epoch Anti Hack, the script will work except for the keypress option. EPAH seems to disable keydown eventhandlers. But auto insert and menu inside vehicle work fine. If you disable EPAH, you can use the keypress toggle as well.
  23. Like
    computermancer reacted to Zupa in [Release] ZHB - Zupa's Hud & Builder. V1.2   
    ZHB - Zupa's Hud & Builder. V1.2 Hotfix
     

    This is a selfbooting addon inside your mission pbo with easy installation. 
    It will add a hud and hud builder on your server. Default pressing 8 for hud builder and 9 to toggle on and of.
     
     
    Future plans
    Opacity on images. More options. Saving to redis. Config to allow hud builder or to disable it Define your own keybinds.  
    Changelog
     
    V1.2
    Fixed a wrongly named variable Infistar should work now correctly.  
    Commits
    https://github.com/DevZupa/ZHB-A3/commit/070b15162a10c475d2872c564fb73a22a8e377d8
    https://github.com/DevZupa/ZHB-A3/commit/abb6e4da1d32d953528fd27f5302fa83388dae16
    https://github.com/DevZupa/ZHB-A3/commit/afc50e71910c4ab684b41aea444cff6c981055d6
     
    V1.1
    KeyUp Handlers.  
    Download

     
    https://github.com/DevZupa/ZHB-A3
     
    Feel free to push fixes/addition to the git.
     
    Installation
     
    Battleye Filters in Scripts.txt
     
    Edit the following exceptions to the 7 xxx , only copy the part that starts with !
    Search for the tag word and place the rest behind it.

    7 displayAddEventHandler !"ZupaKeyUpWorking = (findDisplay 46) displayAddEventHandler ['KeyUp', '_this call ZHB_fnc_handleKey'];" 7 displayRemoveEventHandler !"(findDisplay 46) displayRemoveEventHandler ['KeyUp',ZupaKeyUpWorking];" 7 createDialog !="createDialog \"Z_HUD_Builder\";" 7 playableUnits  !",count playableUnits ,_align,_valign" Edit your filters as stated above. Place the ZHB folder in your mission pbo. Place the folowing on the bottom of your description.ext If you already have a RscTiles or CfgFunctions, place the includes in there ofcourse.

    #include "ZHB\ZHudBuilder.hpp" class RscTitles { #include "ZHB\ZHud.hpp" }; class CfgFunctions { #include "ZHB\ZHB_Functions.hpp" }; 4. Add the following in your antihack as exception.
    Z_HUD_Builder 5001, -3 5. DONE - Change the fn_initVariables to your likings.
     
    You can edit the default hud in the initVariables.sqf
     
    // Starting positions Z_HUD_pos = [ 0,0,0,0,0,0,0,0, // Bottom SIde -> left to right 0,0,3,4,5,6,0,0, // Right Side -> bottom to top 0,0,0,0,0,0,0,0, // Top side -> right to left 0,0,0,0,0,0,0,0 // Left side -> top to bottom ];  
    Numbers are as following:
     
    // 0 = Nothing/ Blank // 1 fps // 2 players // 3 damage // 4 crypto // 5 hunger // 6 thirst // 7 grid // 8 fatique // 9 Restart // 10 Toxicity // 11 Stamina // 12 Energy Extra
    Restart timer is default disabled to be picked ( change in initVariables.sqf) icons are 6 kb paa's, CAN U BELIEVE IT? SO SMALL  
    Screenshot
     

     

  24. Like
    computermancer reacted to RimBlock in [TUTORIAL] How to use Public Variables   
    Nope.
     
    Both iterate through an array and use _x as the current array element inside the loop.
     
    forEach allows a second special variable called _forEachIndex which contains the index of the current array element in the loop.  Count does not have this special vairiable but runs faster.  If you do not use this second special variable then they are both interchangable.
  25. Like
    computermancer reacted to vbawol in What you can expect from future major milestone updates   
    There have many bugfixes since the initial release of the 0.3.x client files and we will have more fixes to come soon. A Client side hotfix build will likely be released in about 2 weeks to roll up any client side fixes.   Now for the best part, A small taste of what you can expect from future major milestone updates (0.4,0.5,...): Advanced crafting with total UI overhaul fully extensible and customizable. [Released] Refined P2P and NPC trade systems. More Custom Base building objects and base building refinements. More server and user configurable options. [Released] Documentation on backend DLL calls and usage. [Released] More antagonists and AI refinements. CRC check and server file obfuscation removed. [Released] Custom Vehicles, Weapons, Uniforms and apparel. Custom map based in America. Linux server support. [Released] Bugfixes and much more. Download server files here: http://epochmod.com/download_server.php
×
×
  • Create New...