Jump to content
  • 0

Custom Earplugs


rentiger1112

Question

15 answers to this question

Recommended Posts

  • 1

Edit your description.ext. Be sure RscStructuredText is inside your Define.hpp. Be sure to change the paths as you see i got them "Path\To\FileName" as a example

#include "Path\To\defines.hpp"
class RscTitles {
    class EarPlugs {
	    idd = -1;
	    fadeout=0;
	    fadein=0;
	    onLoad = "uiNamespace setVariable ['EarPlugs', _this select 0]";
	    duration = 10e10;
	    name= "EarPlugs";
	    controlsBackground[] = {};
	    objects[] = {};
	    class controls {
		    class EarPlugs : RscStructuredText{
			    idc = 1;
			    size = 0.040;
			    text = "";
			    colorBackground[] = { 0,0,0,0 };
			    x = 0.85 * safezoneW + safezoneX;
			    y = 0.91 * safezoneH + safezoneY;
			    w = 0.2; 
			    h = 0.2;
		    };
	    };
    };
};

 

Edit your dayz_spaceInterrupt.sqf. Add this code right below the // Disable ESC after death block of code

if (_dikCode == 0x16) then {
	if (isNil 'EARPLUGS') then {
		EARPLUGS = false;
	};
	EARPLUGS = !EARPLUGS;
	if (EARPLUGS) then {
		1 fadeSound 0.25;
		((uiNamespace getVariable "EarPlugs") displayCtrl 1) ctrlSetStructuredText parseText "<t size='4' align='right' valign='middle'><img image='Path\To\earplugs.paa' /></t>";
	} else {
		3 fadeSound 1;
		((uiNamespace getVariable "EarPlugs") displayCtrl 1) ctrlSetStructuredText parseText "";
	};
};

 

Edit to your init.sqf. Add this inside the  if (!isDedicated) then  block of code.

	[] spawn {
	waitUntil { sleep 1; !isNil ("PVDZE_plr_LoginRecord") };
	6 cutRsc ["EarPlugs", "PLAIN"];
    };

 

Now all you need to do is get the earplugs.paa.

Link to comment
Share on other sites

  • 0

This looks like its off my server. Same icon and same spot on the screen. Are you trying to rip code/files out of my PBO's?

 

Maybe if you ask me and not try to get others to help you to get something to work that you got off another server i might give you the right code to make this work.

Link to comment
Share on other sites

  • 0

you know i would be interested in this if you dont mind sharing :)  I have a few little goodies too lol

i have the earplugs already....just the icon would be awesome :)

Edited by theduke
Link to comment
Share on other sites

  • 0

This looks like its off my server. Same icon and same spot on the screen. Are you trying to rip code/files out of my PBO's?

 

Maybe if you ask me and not try to get others to help you to get something to work that you got off another server i might give you the right code to make this work.

looks like he doesnt want to share...

Link to comment
Share on other sites

  • 0

player removeAction s_clothes;
s_clothes = -1;
player remove>
  Error position: <s_clothes;
s_clothes = -1;
player remove>
  Error Undefined variable in expression: s_clothes
File mpmissions\__CUR_MP.chernarus\dayz_code\Compile\fn_selfActions.sqf, line 1281
Warning Message: Resource title EarPlugs not found

Link to comment
Share on other sites

  • 0

Be sure RscStructuredText is inside your Define.hpp

Be sure you #include your defines before RscTitles in description.ext.

Post your description.ext, Define.hpp, dayz_spaceInterrupt.sqf and init.sqf around the code that needed to be edited for this script.

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
  • Discord

×
×
  • Create New...