Custom Scroll Wheel - Toggle Debug

Liam

New Member
I was wondering If anyone knows of a method of making a script for toggling a debug menu in a scroll wheel.

Here is what I have done so far:

1. Created 3 Files for Custom Scroll wheel (I know the scroll wheel works).
and placed them into a file created: "ActionMenu". Within the mission.pbo

actionmenu_activate.sqf - Contains:
waituntil {!isnull (finddisplay 46)};
sleep 15;
wardrobe = player addaction [("<t color=""#ff8810"">" + ("Action Menu") +"</t>"),"actionmenu\actionmenu_execute.sqf","",5,false,true,"",""];

actionmenu_execute.sqf - Contains:
[] execVM "actionmenu\actionmenu_main.sqf";

actionmenu_menu.sqf - Contains:
pathtoscripts = "actionmenu\tools\";
EXECscript1 = 'player execVM "'+pathtoscripts+'%1"';
Actionmenu =

[
["",true],
["Action Menu", [2], "#USER:ActionMenu2", -5, [["expression", ""]], "1", "1"],
["", [-1], "", -5, [["expression", ""]], "1", "0"],
["Exit", [13], "", -3, [["expression", ""]], "1", "1"]


];} else {
ActionMenu =
[
["",true],
["Debug Monitor", [5], "#USER:DebugMenu", -5, [["expression", ""]], "1", "1"],
["", [-1], "", -5, [["expression", ""]], "1", "0"],
["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];
};
DebugMenu =
[
["",true],
["Debug 1", [2], "", -5, [["expression", format[EXECscript1 ,"debug.sqf"]]], "1", "1"],
["Remove Debug", [2], "", -5, [["expression", format[EXECscript1 ,"removedebug.sqf"]]], "1", "1"],
["", [-1], "", -5, [["expression", ""]], "1", "0"],
["Exit", [13], "", -3, [["expression", ""]], "1", "1"]
];

showCommandingMenu "#USER:ActionMenu";
2. In -> Mission.pbo -> Actionmenu -> Tools
I have my file for activating the debug (Labeled: Debug 1), which contains the activation for my debug:
if (isNil "custom_monitor") then {custom_monitor = true;} else {custom_monitor = !custom_monitor;};

while {custom_monitor} do
{
_kills = player getVariable["zombieKills",0];
_killsH = player getVariable["humanKills",0];
_killsB = player getVariable["banditKills",0];
_humanity = player getVariable["humanity",0];
_headShots = player getVariable["headShots",0];
_zombies = count entities "zZombie_Base";
_zombiesA = {alive _x} count entities "zZombie_Base";
_banditCount = {(isPlayer _x) && ((_x getVariable ["humanity",0]) < 0)} count playableUnits;
_heroCount = {(isPlayer _x) && ((_x getVariable ["humanity",0]) >= 5000)} count playableUnits;
_pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture'));
if (player == vehicle player) then
{
_pic = (gettext (configFile >> 'cfgWeapons' >> (currentWeapon player) >> 'picture'));
}
else
{
_pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture'));
};
hintSilent parseText format ["
<t size='1'font='Bitstream'align='left' color='#00FF00' >%1</t><br/>
<t size='1'font='Bitstream'align='left' color='#FFFFFF' >Blood Left:</t><t size='1' font='Bitstream'align='right' color='#FFFFFF' >%2</t><br/>
<t size='1'font='Bitstream'align='left' color='#FFFFFF' >Humanity:</t><t size='1'font='Bitstream'align='right' color='#FFFFFF' >%3</t><br/>
<t size='1'font='Bitstream'align='left' color='#FFFFFF' >Players Killed:</t><t size='1'font='Bitstream'align='right' color='#FFFFFF' >%4</t><br/>
<t size='1'font='Bitstream'align='left' color='#FFFFFF' >Bandits Killed:</t><t size='1'font='Bitstream'align='right' color='#FFFFFF' >%5</t><br/>
<t size='1'font='Bitstream'align='left' color='#FFFFFF' >Zombies Killed:</t><t size='1'font='Bitstream'align='right' color='#FFFFFF' >%6</t><br/>
<t size='1'font='Bitstream'align='left' color='#FFFFFF' >Headshots:</t><t size='1'font='Bitstream'align='right' color='#FFFFFF' >%7</t><br/>
<t size='1' font='Bitstream' align='left' color='#FFFFFF' >Zombies (alive/total): </t><t size='1' font='Bitstream' align='right' color='#FFFFFF' >%9/%8</t><br/>
<t size='1'font='Bitstream'align='left' color='#FFFFFF' >Current Bandit Count:</t><t size='1'font='Bitstream'align='right' color='#FFFFFF' >%12</t><br/>
<t size='1'font='Bitstream'align='left' color='#FFFFFF' >Current Hero Count:</t><t size='1'font='Bitstream'align='right' color='#FFFFFF' >%11</t><br/>
<t size='1' font='Bitstream' align='left' color='#FFFFFF' >FPS: </t><t size='1' font='Bitstream' align='right' color='#FFFFFF' >%10</t><br/>
<img size='3' image='%13'/><br/>
<t size='1'font='Bitstream'align='left' color='#00FF00' > Server Name </t><br/>
<t size='1' font='Bitstream'align='center' color='#00FF00'>*Teamspeak*</t><br/>
<t size='1' font='Bitstream'align='center' color='#00FF00'>*Website Name*</t><br/>

",dayz_playerName,r_player_blood,round _humanity,_killsH,_killsB,_kills,_headShots,count entities "zZombie_Base",{alive _x} count entities "zZombie_Base",diag_fps,_banditCount,_heroCount,_pic];
sleep 1;

};
If this activates my debug using the toggle menu in the scroll wheel. How would I then make a script to make another scroll wheel option for remove/toggling the debug menu?
 
Back
Top