Arma 2 Dayz Overpoch Earplugs

Discussion in 'Script/Addon help' started by Phantom-Pain, Jul 18, 2016.

  1. Phantom-Pain

    Phantom-Pain New Member

    Joined:
    Jul 18, 2016
    Messages:
    6
    Likes Received:
    0
    Can someone please help me. I been looking for a earplugs script for Arma 2 Dayz Overpoch and can't find one. I have seen them on several servers and wanted to try it on mine.
     
  2. Inkko

    Inkko Valued Member!

    Joined:
    Jan 12, 2013
    Messages:
    693
    Likes Received:
    82
    dayz_spaceInterrupt.sqf:
    Code:
    //0x16 = letter U
    if (_dikCode == 0x16) then {
        execVM "scripts\earplugs.sqf";
    };
    earplugs.sqf:
    Code:
    if (isnil "var_earplugs") then {
        var_earplugs= false;
    };
    if (!var_earplugs) then {
        1 fadeSound 0.1;
        1 fadeMusic 0.1;
        var_earplugs = true;
        systemchat 'You have put Earplugs in!';
    } else {
        1 fadeSound 1;
        1 fadeMusic 1;
        var_earplugs = false;
        systemchat 'You have taken out your Earplugs!';
    };
    
     
  3. Phantom-Pain

    Phantom-Pain New Member

    Joined:
    Jul 18, 2016
    Messages:
    6
    Likes Received:
    0
    I tried it but it didn't work. Can you please give me some simple instructions on how to make this work. I am still a noob at installing scripts if they don't come with instructions. Thank you.
     
  4. Inkko

    Inkko Valued Member!

    Joined:
    Jan 12, 2013
    Messages:
    693
    Likes Received:
    82
    do you have a compiles.sqf that is already in the mission pbo?
     
  5. Phantom-Pain

    Phantom-Pain New Member

    Joined:
    Jul 18, 2016
    Messages:
    6
    Likes Received:
    0
    Yes but its in a custom folder. I forgot what script it came with. This is how its setup:

    [​IMG]


    [​IMG]
     
  6. Inkko

    Inkko Valued Member!

    Joined:
    Jan 12, 2013
    Messages:
    693
    Likes Received:
    82
    In your compiles.sqf do you see dayz_spaceInterrupt.sqf at all?
     
  7. Phantom-Pain

    Phantom-Pain New Member

    Joined:
    Jul 18, 2016
    Messages:
    6
    Likes Received:
    0
  8. Inkko

    Inkko Valued Member!

    Joined:
    Jan 12, 2013
    Messages:
    693
    Likes Received:
    82
    Change
    Code:
    dayz_spaceInterrupt =            compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\dayz_spaceInterrupt.sqf";
    to
    Code:
    dayz_spaceInterrupt =            compile preprocessFileLineNumbers "custom\dayz_spaceInterrupt.sqf";
    Then you need to unpack dayz_code in the epoch mod files and copy dayz_spaceInterrupt.sqf and paste it right next to your compiles.sqf

    Open the dayz_spaceInterrupt.sqf that is in your mission file now and add the line I linked above into it around the middle somewhere. Save and create a new file called earplugs.sqf and paste the code for it above and put it in a folder called scripts.
     
  9. Phantom-Pain

    Phantom-Pain New Member

    Joined:
    Jul 18, 2016
    Messages:
    6
    Likes Received:
    0
    I just tried that also but it still didn't work. I am guessing some other script is blocking this script from working. I do have infistar installed. Could that be the reason why its not working?
     
  10. Inkko

    Inkko Valued Member!

    Joined:
    Jan 12, 2013
    Messages:
    693
    Likes Received:
    82
    I have infistar as well and it works just fine. Can you link your mission pbo and I'll take a look? You press the U key to toggle the action.
     
  11. Phantom-Pain

    Phantom-Pain New Member

    Joined:
    Jul 18, 2016
    Messages:
    6
    Likes Received:
    0
    Okay I sent you a link to the files in a conversation.
     
  12. machete

    machete New Member

    Joined:
    Dec 27, 2016
    Messages:
    2
    Likes Received:
    0
    hi
    i add the scrip to my dayz_spaceInterrupt.sqf and made the earplug.sqf but still wound work.
    do you need to add the u key to a custom key
     
  13. Zeehond23

    Zeehond23 Valued Member!

    Joined:
    Mar 7, 2013
    Messages:
    589
    Likes Received:
    52
    Did you edit the compiles.sqf?
     
  14. machete

    machete New Member

    Joined:
    Dec 27, 2016
    Messages:
    2
    Likes Received:
    0
    yes i already have a dayz_spaceinterrup.sqf in it that im using for other addons
     

Share This Page