In Search of a custom menu for my server (not debug monitor)

DangerRuss

OpenDayZ Rockstar!
Ive seen some servers that have a nice menu that you can open with a specific key (lets say F5 or something like that). In that menu they have things like server rules, lists of script and admins, or whatever they want. This would be very useful but Ive not seen any tutorials or releases for something like this. Does anyone out there have something like this and would be willing to share it?
 
I have a standard debug menu that opens with F10. When you press F9 it opens a 'help page' instead.
This won't work if you have your debug monitor displayed constantly because when it updates after 15 seconds or so it will close your info screen and redisplay the debug.
So set your debug monitor to open with a keypress and it will fade automatically after 30 seconds or so.

so place this in your compiles sqf at the bottom of the _dikcode list. notice the location of the _handled variable to help you put it in the correct place. here is the arma page showing all the key codes, replace my F10/F9 with whatever you want. You can also use the control, alt and shift modifiers
https://community.bistudio.com/wiki/DIK_KeyCodes

Code:
//----------------------------DEBUG MONITOR F10 TOGGLE FUNCTION----------------------          
    if (_dikCode == 0x44) then {
              [] spawn fnc_debug;
             };
//----------------------------Help menu F9----------------------     
       if (_dikCode == 0x43) then {
            [] spawn fnc_help;
     
        };
    _handled
    };

now right below the above code insert your fnc_debug and fnc_help .. of course you can omit the debug if you already have a good one.
Code:
fnc_debug = {
 
        _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];
        _closestTown = (nearestLocations [getpos player,["namecitycapital","NameCity","NameVillage"],2000]) select 0;
        _town_name = text _closestTown;
        _level = round ((_headShots + _kills + (_killsB * 50) - (_killsH * 100)));
        _blood =  round((r_player_blood / 12000)*100);
        _tL = (((27000 - time) / 60)-2);// 5 hours subtract the 2 minutes it took to restart last time ..
        _tL = round(_tL);
        diag_log format["Time %1 _tL %2",time,_tL];
        if (_tL < 30) then { _tL = "Just a few";};
        _Survivors = playersNumber west;
        //####----####----BB 1.3 Flag Count----####----####
        _flagCount = 0;
        _allFlags = nearestObjects [player, [BBTypeOfFlag], 25000];
        {
            if (typeOf(_x) == BBTypeOfFlag) then {
                _authorizedUID = _x getVariable ["AuthorizedUID", []];
                _authorizedPUID = if (count _authorizedUID > 0) then {_authorizedUID select 1;};
                if ((getPlayerUid player) in _authorizedPUID) then {
                    _flagCount = _flagCount + 1;
                };
            };
        } foreach _allFlags;
        //####----####----BB 1.3 Flag Count----####----####
     
        hintSilent parseText format ["
        <t size='1'font='Bitstream'align='left'>Nearest City:</t><t size='1'font='Bitstream'align='right'>%11</t><br/>
        <t size='1'font='Bitstream'align='left' color='#EE0000' >Health:</t><t size='1' font='Bitstream'align='right' color='#EE0000' >%1 pct</t><br/>
        <t size='1'font='Bitstream'align='left'>Humanity:</t><t size='1'font='Bitstream'align='right'>%2</t><br/>
        <t size='1'font='Bitstream'align='left' >Survivors Killed:</t><t size='1'font='Bitstream'align='right'>%3</t><br/>
        <t size='1'font='Bitstream'align='left' >Bandits Killed:</t><t size='1'font='Bitstream'align='right'>%4</t><br/>
        <t size='1'font='Bitstream'align='left'>Zombies Killed:</t><t size='1'font='Bitstream'align='right'>%5</t><br/>
        <t size='1'font='Bitstream'align='left' >HeadShots:</t><t size='1'font='Bitstream'align='right'>%6</t><br/>
        <t size='1'font='Bitstream'align='left' >Bases(Owned/Max):</t><t size='1'font='Bitstream'align='right'>%12/%13</t><br/>
        <t size='1'font='Bitstream' align='left' color='#FFCC00'>Restart in </t><t size='1'font='Bitstream' align='right' color='#FFCC00'>%7 minutes</t><br/>
        <t size='1' font='Bitstream' align='left'>%8 Survivors</t><t size='1' font='Bitstream' align='right'>%9 FPS</t><br/>
        <t size='1'font='Bitstream'align='left' color='#FFCC00'>F9-Help</t><t size='1'font='Bitstream' align='right' color='#FFCC00'>F10-Stats</t>
        ",_blood,round _humanity,_killsH,_killsB,_kills,_headShots,_tL,_Survivors,(floor(diag_fps)),_level,_town_name,_flagCount,BBMaxPlayerFlags];

    };
// uncomment this if you want this to display when the player joins
//    [] spawn fnc_debug;


    fnc_help = {
        hintsilent parseText format ["
     
        <t size='1'font='Bitstream'align='left' color='#FFCC00'>www.killonsight.us</t><br/>
        <t size='1'font='Bitstream'align='right' color='#FFCC00'>ts3.killonsight.us</t><br/><br/>
 
        <t size='1'font='Bitstream'align='left'>The military controlled bases are at Jilavur, Garmsar, Loy Manera and Rasman. Authorized Personel ONLY mean not you!. They have medical tents, planes and helicopters there but you
        will have to either assault the bases or sneak in.</t><br/><br/>

        <t size='1'font='Bitstream'align='left'>Looking for a group? Recruit a team at the U.N. Refugee camp in Feruz Abad. Use the BACKSPACE and ~ keys to give orders.</t><br/><br/>

        <t size='1'font='Bitstream'align='left'>Secure Private Bases can be built outside of the cities.  You need a Toolbox and sometimes a shovel(Etool) and then create a CAMPFIRE to create your base.
        Then you can add in Gates, Walls, Buildings, Tents and give base access to your friends.  Base building materials are Scrap metal, Tanktraps, Woodpile, Sandbags, Duct Tape, Camo Nets, Grenades.
        <br/><br/>F8 to show your current Base locations on the map.</t><br/>
        <t size='1'font='Bitstream'align='left' color='#FFCC00'>F9-Help</t><t size='1'font='Bitstream' align='right' color='#FFCC00'>F10-Stats</t>

        ",getPlayerUID player,side player];
    };
// uncomment this if you want it to display when the player first joins
//[] spawn fnc_help;

//********************************************************************
 
Im currently using a debug monitor being called through my compiles.sqf which uses F11 to close the debug monitor. It looks a bit different than yours though
Code:
dayz_spaceInterrupt = {
        private "_handled";
        _dikCode = _this select 1;
        _shiftState = _this select 2;
        _ctrlState = _this select 3;
        _altState = _this select 4;
        _handled = false;
 
        // Disable ESC after death (not sure if needed but it's here to make sure)
        if (_dikCode == 0x01 && r_player_dead) then {
            _handled = true;
        };
 
        if (_dikCode == 0x57) then {
        if (debugMonitor) then {
            debugMonitor = false;
            hintSilent "";
        } else {[] spawn fnc_debug;};
        };

could I just theoretically add
Code:
//----------------------------Help menu F9----------------------  
       if (_dikCode == 0x43) then {
            [] spawn fnc_help;
  
        };
    _handled
    };
beneath that? My debug monitor doesn't fade, it's always on until you press F11 would this interfere? Thanks for this information my friend.

Also, my actual debug monitor is posted considerably further down in my compiles.sqf

Code:
ayz_originalPlayer = player;
   
    fnc_debug = {
    debugMonitor = true;
    while {debugMonitor} do
    {
        _killsH =        player getVariable["humanKills",0];
        _killsB =        player getVariable["banditKills",0];
        _humanity =      player getVariable["humanity",0];
        _clientfps =round diag_fps;
        _tL = ((14280 - time) / 60);
        _tL = round(_tL);
        hintSilent parseText format ["
        <t size='2'font='Bitstream'align='center'color='#660000'>W.I.C.K.E.D.</t><br/>
        <t size='1'font='Bitstream'align='left'color='#CC0000'>Blood:</t><t size='1' font='Bitstream'align='right'color='#CC0000'>%1</t><br/>
        <t size='1'font='Bitstream'align='left'color='#0066FF'>Humanity:</t><t size='1'font='Bitstream'align='right'color='#0066FF'>%2</t><br/>
        <t size='1'font='Bitstream'align='left'color='#FF9900'>Murders:</t><t size='1'font='Bitstream'align='right'color='#FF9900'>%3</t><br/>
        <t size='1'font='Bitstream'align='left'color='#666666'>Bandits Killed:</t><t size='1'font='Bitstream'align='right'color='#666666'>%4</t><br/>
        <t size='1'font='Bitstream'align='left'color='#00CC33'>Survived:</t><t size='1'font='Bitstream'align='right'color='#00CC33'>%5 Days</t><br/>
        <t size='1'font='Bitstream'align='left'color='#FFFFFF'>FPS:</t><t size='1'font='Bitstream'align='right'color='#FFCC00'>%6</t><br/>
        <t size='1'font='Bitstream'align='left'color='#FFFFFF'>Time until restart:</t><t size='0.75'font='Bitstream'align='right' color='#FFCC00'>%7mins</t><br/>
        <t size='1'font='Bitstream'align='left'color='#FFFFFF'>Vehicles:</t><t size='0.80'font='Bitstream'align='right'color='#FFCC00'>%8</t><br/>
        <t size='1.5'font='Bitstream'align='center'color='#006600'>%9</t><br/>
        <t size='1'font='Bitstream'align='center' color='#104E8B' >Press F11 to toggle! </t><br/>
        
        ",r_player_blood,round _humanity,_killsH,_killsB,dayz_Survived,(_clientfps),(_tL),(count([6800, 9200, 0] nearEntities [["Car","Motorcycle","Tank","Air","Ship"],25000])),dayz_playerName];
    sleep 1;
    };
};
[] spawn fnc_debug;
   
};
 
    progressLoadingScreen 0.8;
 
Last edited:
It doesn't matter where the actual debug code is as long as it gets loaded. Once your debug monitor is closed the second display would work fine.
And you can copy your current debug key code so you can press to close the info screen the same way ... I just find it easier to let them fade closed so they don't interfere with the mission hints or base building hints.
I didn't post it but I actually have a third key, F8 that displays the players base camps on the map also. You can put whatever you want in those code blocks. It looks like you could just copy/paste a new block right below your current one and change the key binding.
 
Im gonna give this a shot for my next restart.. I'll edit this if it works and my question is irrelevant but in the mean time... when I copy this for the help menu
Code:
if (_dikCode == 0x57) then {
        if (debugMonitor) then {
            debugMonitor = false;
            hintSilent "";
        } else {[] spawn fnc_debug;};
        };

obviously Ill need to change it to fnc_help... but will I also have to change the (debugMonitor) and debugMonitor= to say (helpMonitor) etc? or will it work just fine the way it is?
 
Everything is unique. If its stays as debugmonitor then it will try to be active when your debug monitor is running.
So helpmonitor for the win ...
 
Everything is unique. If its stays as debugmonitor then it will try to be active when your debug monitor is running.
So helpmonitor for the win ...
Thanks I'll give that a shot. It does indeed work the first way I tried it, however it slowly fades instead of just pure toggle.. Im guessing I need to
Code:
fnc_help = {
    debugMonitor = true;
    while {debugMonitor} do
    {
instead of just
Code:
fnc_help = {
?

Also, is there any possibility of adding a scroll function to it? Or am I limited in how much I can write by the size of the screen? I'd even like for it to possibly be wider than the debug, perhaps taking up the entire page if possible.
If not, no big deal, just curious! But thanks for this its working great.
 
If you want it to toggle on and off with the keypress you have to use the code like you wrote above, and if debugmonitor is true (its running when you press the key) then it has to make debugmonitor=false and do hintsilent "" to remove the page ... you know what to do, just follow your current one .

I dont think you can change the hint width with any code but what I THINK might work is to put an image at the top.
<img size='4.0' image='images\logo.paa' /><br/>
and make the image size like 6 or 8 or 2o .. who knows? But it was at 3 and I changed it to 4 and I THOUGHT the hint was wider, I didn't mean to do it, I meant to increase the image size itself but instead I think it makes the image container larger. could be my imagination though.

You can try hintC .. its what the Base Building 1.3 uses and it seems to give much more room
https://community.bistudio.com/wiki/hintC
I didnt' like how when you closed it, then the hint popped up like normal. So you got the big center page, close it and it pops up again in the right. I suppose you could add a hintsilent "" after you close the center page one ... somehow.


Code:
private["_separator1","_txt"];
cutText ["HOLD LEFT-CLICK ON TEXT AND DRAG UP AND DOWN, PRESS ESCAPE TO CLEAR OR CONTINUE ON BOTTOM!", "PLAIN DOWN"];
sleep 1;
"Base Building Help" hintC [
                                                            "*Some buildables require a flagpole, build one first to design base within "+str(BBFlagRadius)+" meters",
                                                            "*Removing a flagpole requires you to remove all buildables in the build radius",
                                                            "*Certain buildables can be elevated and you'll get extended build options.",
                                                            "*Some build objects will shift after you select 'Preview', this is how it will look at server restart(reposition to adjust)",
                                                            "*Do not troll build, or build an extremely unrealistic base/trolly base.  These will be removed by admins",
                                                            "*Info_stands give access to concrete walls within 15 meters, and all roofs, as well as lighting options around your base",
                                                            "*'Give access to object' action gives all players tied to your FlagPole access to that object, either to remove/operate",
                                                            "*Booby traps will only be triggered by players that are not added to the object manually or 'Give access action'",
                                                            "*Any unrealistic building designs, (floating objects[not roofs], blatant exploited buildables) will be removed by admins"
                                                            ];
 
well I tried
Code:
if (_dikCode == 0x43) then {
        if (helpMonitor) then {
            helpMonitor = false;
            hintSilent "";
        } else {[] spawn fnc_help;};
        };
and
Code:
fnc_help = {
    helpMonitor = true;
    while {helpMonitor} do
    {

and it broke the server :p
 
Broke the server is such a nebulous term ...

Its easy to make mistakes .. probably the code blocks are not aligned. Open in notepad++ and click on the closing curly braces and make sure the correct opening brace turns red.


Do not EVER cut corners and put stuff on one line. Always follow a indenting pattern so its easy to see where start- stop blocks are.
You must have the open- close braces out of whack.

You know the solution .... post the flle
 
ShootingBlanks DayZ Coding Level = Genius.

Man, you're too good at this to not be an OpenDayZ Rockstar.

When ShootingBlanks, tells you how to fix an issue or gives you advice, I highly recommend listening.
 
Man, you're too good at this to not be an OpenDayZ Rockstar.
I have had lots of practice so now its EASY to break other peoples servers ..o_O



here is my compiles.sqf
https://drive.google.com/file/d/0B4RTx5O3wZvEMlNKT0htQXFhV1k/edit?usp=sharing

I have the debugmonitor=true .. etc commented out because I dont want them to stay on so you will have to remove the comments. I did notice that I have to have the other monitor set to false when the current monitor is set to true and I think that was required for the monitors to work correctly when I kept the debugmonitor enabled like you do.

Code:
    fnc_debug = {
    //debugMonitor = true;
    //helpmonitor = false;
   // while {debugMonitor} do
    //{
 
I have had lots of practice so now its EASY to break other peoples servers ..o_O



here is my compiles.sqf
https://drive.google.com/file/d/0B4RTx5O3wZvEMlNKT0htQXFhV1k/edit?usp=sharing

I have the debugmonitor=true .. etc commented out because I dont want them to stay on so you will have to remove the comments. I did notice that I have to have the other monitor set to false when the current monitor is set to true and I think that was required for the monitors to work correctly when I kept the debugmonitor enabled like you do.

Code:
    fnc_debug = {
    //debugMonitor = true;
    //helpmonitor = false;
   // while {debugMonitor} do
    //{
Yea I think that was probably the issue because I copy pasted the previous code and all I changed was the word debug to help so it couldn't have been a bracket I don't believe.

This debug help thing is pretty cool but Im still in search of one I saw on another server. It basically opened up the old arma menu, similar to the one you used to be able to access via the map, or the arma admin control panel. It was an entire help page, not just a debug monitor. This is definitely better than nothing, and I'll continue tweaking it until I get the desired result. I might have to lower the font size cause Im running out of room :)

Thanks for showing me this, I'll use this to learn for sure.
 
Well the 'notes' can be enabled on older days and on epoch. Add all kinds of sections to it .... In arma its referred to as the briefing.
I would bet what you saw and want is just a custom menu ... That would have that look and allows you to click on sub categories. I will put one together for testing as that sounds like it would be perfect. When designing the size can be full screen just by dragging the corners ... Good idea ...
I have to work some then download some porn so it might take me a few hours
 
Well the 'notes' can be enabled on older days and on epoch. Add all kinds of sections to it .... In arma its referred to as the briefing.
I would bet what you saw and want is just a custom menu ... That would have that look and allows you to click on sub categories. I will put one together for testing as that sounds like it would be perfect. When designing the size can be full screen just by dragging the corners ... Good idea ...
I have to work some then download some porn so it might take me a few hours
Well of course! Priorities first!
 
help_dialog.jpg
 
Here are the files for this alpha release help and information display.
The color, size backgrounds, everything can be changed. This is just a basic demo. We can add more buttons to change to the next page, previous page. We can add images, we can jizz in our pants because this is going to be so cool, we can tell that I am running out of things to say about it. We can insert a map into the dialog so we can show important areas http://www.armagame.pl/download/file.php?id=392&sid=9b36860f0b8e3b3c3f4ed0a0de57ccce&mode=view

Want to break out on your own with this? https://community.bistudio.com/wiki/Dialog_Control

in your description.ext file add
#include "dialog.hpp"
#include "defines.hpp"

You can change the names to match what you save the files as below. You probably already have a defines.hpp, I would expect they are mostly all identical but a name change should work if needed.
We have all seen the "RscText member already defined" errors. This will break your server. The solution is you need to have each class defined ONLY ONCE in your description.ext file. Since these files are #included into your description.ext file, its just like pasting the code into it. I THINK the classnames will be unique and not cause any Member already defined, errors but if you do get one ... delete one of the offending classnames.

Save this file as "dialog.hpp" (or whatever you want to name it as)
Code:
class HELP_DIALOG
{
idd = 1;
movingenable = true;
 
class Controls
{
class help_box: Box_help
{
    idc = -1;
    x = 0.180203 * safezoneW + safezoneX;
    y = 0.0892106 * safezoneH + safezoneY;
    w = 0.647679 * safezoneW;
    h = 0.792895 * safezoneH;
};


class help_frame: RscFrame_help
{
    idc = 1800;
    text = "Help and Information";
    x = 0.180203 * safezoneW + safezoneX;
    y = 0.0892106 * safezoneH + safezoneY;
    w = 0.647679 * safezoneW;
    h = 0.792895 * safezoneH;
};
class help_one: RscText_help
{
    idc = 1103;
    text = "some useful information here about donating to the server";
    x = 0.191471 * safezoneW + safezoneX;
    y = 0.121052 * safezoneH + safezoneY;
    w = 0.617962 * safezoneW;
    h = 0.129737 * safezoneH;
};
class help_two: RscText_help
{
    idc = 1100;
    text = "some useful information here about donating to the server";
    x = 0.192344 * safezoneW + safezoneX;
    y = 0.297368 * safezoneH + safezoneY;
    w = 0.617962 * safezoneW;
    h = 0.129737 * safezoneH;
};
class help_three: RscText_help
{
    idc = 1101;
    text = "some useful information here about special things that happen ONLY on this server that makes it so damn special you MUST play here .. Like the zombies try to eat you, or the bandits try to kill you.  And when you die, you get to gather up all your gear again.  But most especially special is how the guy who said is your friend is about to shoot you in the back.";
    x = 0.186226 * safezoneW + safezoneX;
    y = 0.471052 * safezoneH + safezoneY;
    w = 0.622332 * safezoneW;
    h = 0.211316 * safezoneH;
};
class help_close: RscButton_help
{
    idc = 1600;
    text = "Close";
    x = 0.72812 * safezoneW + safezoneX;
    y = 0.763157 * safezoneH + safezoneY;
    w = 0.0708248 * safezoneW;
    h = 0.085 * safezoneH;
    action = "closeDialog 1";
};
};
};

Save this file as defines.hpp
Code:
// Control types
#define CT_STATIC           0
#define CT_BUTTON           1
#define CT_EDIT             2
#define CT_SLIDER           3
#define CT_COMBO            4
#define CT_LISTBOX          5
#define CT_TOOLBOX          6
#define CT_CHECKBOXES       7
#define CT_PROGRESS         8
#define CT_HTML             9
#define CT_STATIC_SKEW      10
#define CT_ACTIVETEXT       11
#define CT_TREE             12
#define CT_STRUCTURED_TEXT  13
#define CT_CONTEXT_MENU     14
#define CT_CONTROLS_GROUP   15
#define CT_SHORTCUTBUTTON   16
#define CT_XKEYDESC         40
#define CT_XBUTTON          41
#define CT_XLISTBOX         42
#define CT_XSLIDER          43
#define CT_XCOMBO           44
#define CT_ANIMATED_TEXTURE 45
#define CT_OBJECT           80
#define CT_OBJECT_ZOOM      81
#define CT_OBJECT_CONTAINER 82
#define CT_OBJECT_CONT_ANIM 83
#define CT_LINEBREAK        98
#define CT_USER             99
#define CT_MAP              100
#define CT_MAP_MAIN         101
#define CT_LISTNBOX         102

// Static styles
#define ST_POS            0x0F
#define ST_HPOS           0x03
#define ST_VPOS           0x0C
#define ST_LEFT           0x00
#define ST_RIGHT          0x01
#define ST_CENTER         0x02
#define ST_DOWN           0x04
#define ST_UP             0x08
#define ST_VCENTER        0x0C
#define ST_GROUP_BOX       96
#define ST_GROUP_BOX2      112
#define ST_ROUNDED_CORNER  ST_GROUP_BOX + ST_CENTER
#define ST_ROUNDED_CORNER2 ST_GROUP_BOX2 + ST_CENTER

#define ST_TYPE           0xF0
#define ST_SINGLE         0x00
#define ST_MULTI          0x10
#define ST_TITLE_BAR      0x20
#define ST_PICTURE        0x30
#define ST_FRAME          0x40
#define ST_BACKGROUND     0x50
#define ST_GROUP_BOX      0x60
#define ST_GROUP_BOX2     0x70
#define ST_HUD_BACKGROUND 0x80
#define ST_TILE_PICTURE   0x90
#define ST_WITH_RECT      0xA0
#define ST_LINE           0xB0

#define ST_SHADOW         0x100
#define ST_NO_RECT        0x200
#define ST_KEEP_ASPECT_RATIO  0x800

#define ST_TITLE          ST_TITLE_BAR + ST_CENTER

// Slider styles
#define SL_DIR            0x400
#define SL_VERT           0
#define SL_HORZ           0x400

#define SL_TEXTURES       0x10

// progress bar
#define ST_VERTICAL       0x01
#define ST_HORIZONTAL     0

// Listbox styles
#define LB_TEXTURES       0x10
#define LB_MULTI          0x20

// Tree styles
#define TR_SHOWROOT       1
#define TR_AUTOCOLLAPSE   2

// MessageBox styles
#define MB_BUTTON_OK      1
#define MB_BUTTON_CANCEL  2
#define MB_BUTTON_USER    4


////////////////
//Base Classes//
////////////////

class RscText_help
{
    access = 0;
    idc = -1;
    type = CT_STATIC;
    style = ST_MULTI;
    linespacing = 1;
    colorBackground[] = {0,0,0,0};
    colorText[] = {1,1,1,.5};
    text = "";
    shadow = 2;
    font = "Bitstream";
    SizeEx = 0.02300;
    fixedWidth = 0;
    x = 0;
    y = 0;
    h = 0;
    w = 0;
 
};

class RscPicture_help
{
    access = 0;
    idc = -1;
    type = CT_STATIC;
    style = ST_PICTURE;
    colorBackground[] = {0,0,0,0};
    colorText[] = {1,1,1,1};
    font = "Bitstream";
    sizeEx = 0;
    lineSpacing = 0;
    text = "";
    fixedWidth = 0;
    shadow = 0;
    x = 0;
    y = 0;
    w = 0.2;
    h = 0.15;
};

class RscButton_help
{
 
   access = 0;
    type = CT_BUTTON;
    text = "";
    colorText[] = {1,1,1,.9};
    colorDisabled[] = {0.4,0.4,0.4,0};
    colorBackground[] = {0.75,0.75,0.75,0.8};
    colorBackgroundDisabled[] = {0,0.0,0};
    colorBackgroundActive[] = {0.75,0.75,0.75,1};
    colorFocused[] = {0.75,0.75,0.75,.5};
    colorShadow[] = {0.023529,0,0.0313725,1};
    colorBorder[] = {0.023529,0,0.0313725,1};
    soundEnter[] = {"\ca\ui\data\sound\onover",0.09,1};
    soundPush[] = {"\ca\ui\data\sound\new1",0,0};
    soundClick[] = {"\ca\ui\data\sound\onclick",0.07,1};
    soundEscape[] = {"\ca\ui\data\sound\onescape",0.09,1};
    style = 2;
    x = 0;
    y = 0;
    w = 0.055589;
    h = 0.039216;
    shadow = 2;
    font = "Bitstream";
    sizeEx = 0.03921;
    offsetX = 0.003;
    offsetY = 0.003;
    offsetPressedX = 0.002;
    offsetPressedY = 0.002;
    borderSize = 0;
};

class RscFrame_help
{
    type = CT_STATIC;
    idc = -1;
    style = ST_FRAME;
    shadow = 2;
    colorBackground[] = {1,1,1,1};
    colorText[] = {1,1,1,0.9};
    font = "Bitstream";
    sizeEx = 0.03;
    text = "";
};

class BOX_help
{
   type = CT_STATIC;
    idc = -1;
    style = ST_CENTER;
    shadow = 2;
    colorText[] = {1,1,1,1};
    font = "Bitstream";
    sizeEx = 0.02;
    colorBackground[] = { 0.2,0.2,0.2, 0.9 };
    text = "";

};
 
Last edited:
I forgot to mention how to load this dialog.
For testing I put it into a Radio Alpha trigger because its so quick and easy.
I would assume most people would like to open this with a keypress, just like we are talking about with the debug monitor and help monitor.

In your dik codes instead of [] spawn fnc_debug;, we are going to write
_handle = CreateDialog "HELP_DIALOG";
if you look at the dialog.hpp you will see the name of my dialog is Help_Dialog. Each dialog must have a unique name, so if you add more of these you need to change the name.

This was just a test to see if it worked and was usable, which I think it is. This is pretty quick and easy to whip up so we will work on a few of these this week and improve the appearance and usefulness You can edit the text that shows in each text box yourself.
 
Here is a newer version that only requires a single page. On the upper right you put your logo.paa file that should be twice as long as it is high to scale properly. I suppose a logo.jpg would work, it usually does.
I set the transparency to .5 so that you can see the zombies running to eat you and close your help screen. I haven't tested it in game though to make sure the screen updates to actually show the zombies.
On the upper left is the basic info about your website, admins etc.
On the lower center of the screen is a 'listbox'. It has the scrollbars integrated into it so if your text exceeds the size of the listbox, you will be able to scroll to view. use the \n in your text to create new lines. So far, I don't know how to make the text=""; to be more readable in the code. it has to be on a single line.
Text = "This is line one:\nThis is line two:";
results in
This is line one:
This is line two:



hlpdialog2.jpg


Dialog.hpp

Code:
class HELP_DIALOG
{
idd = 1;
movingenable = true;
  
class Controls
{
class help_box: Box_help
{
    idc = -1;
    x = 0.149518 * safezoneW + safezoneX;
    y = 0.0789474 * safezoneH + safezoneY;
    w = 0.703616 * safezoneW;
    h = 0.842895 * safezoneH;
};


class RscFrame_1800: RscFrame_help
{
    idc = 1800;
    text = "Help and Information";
    x = 0.149518 * safezoneW + safezoneX;
    y = 0.0789474 * safezoneH + safezoneY;
    w = 0.703616 * safezoneW;
    h = 0.842895 * safezoneH;
};
class RscPicture_1200: RscPicture_help
{
    idc = 1200;
    text = "logo.paa";
    x = 0.448433 * safezoneW + safezoneX;
    y = 0.106579 * safezoneH + safezoneY;
    w = 0.411977 * safezoneW;
    h = 0.182631 * safezoneH;
    tooltip = "WWW.KILLONSIGHT.US   TS3.KILLONSIGHT.US";
};
class RscText_1000: RscText_help
{
    idc = 1000;
    text = "\nThanks for playing on the Kill on Sight server. \nVisit our website at www.killonsight.us  \n\nWe have a public teamspeak where you can contact admins at ts3.killonsight.us";
    x = 0.167872 * safezoneW + safezoneX;
    y = 0.111842 * safezoneH + safezoneY;
    w = 0.262235 * safezoneW;
    h = 0.21 * safezoneH;
};
class RscButton_1600: RscButton_help
{
    idc = 1600;
    text = "Close";
    x = 0.752591 * safezoneW + safezoneX;
    y = 0.853947 * safezoneH + safezoneY;
    w = 0.0760689 * safezoneW;
    h = 0.0494736 * safezoneH;
    action = "closeDialog 0";
};
class RscListbox_1500: RscListbox_help
{
    idc = 1500;
    text = "\nDayZ is an award winning 2012 multiplayer open world survival horror mod designed by Dean Hall for the 2009 tactical shooter video game ARMA 2 and its 2010 expansion pack, ARMA 2: Operation Arrowhead. \nThe mod places the player in the fictional post-Soviet state of Chernarus, where an unknown virus has turned most of the population into infected, violent zombies. As a survivor with limited supplies, the player must scavenge the world for supplies such as food, water, weapons and medicine, while killing or avoiding both zombies and other players, and sometimes non-player characters, in an effort to survive the zombie apocalypse.DayZ has been widely praised in gaming media for its innovative design elements, with Kotaku and Eurogamer describing it as possibly the best zombie game ever made, PC Gamer calling it one of the most important things to happen to PC gaming in 2012 as well as one of the five scariest games of all time, and PC PowerPlay giving it its Game of the Year award as well as ranking it as the overall fifth best PC game of all time. \nThe mod reached one million players in its first four months on 6 August 2012, with hundreds of thousands of people purchasing ARMA 2 just to play it.The mod version of DayZ remains in continued development by its community, where as the standalone game is currently in development by Dean Hall and ARMA 2 creators Bohemia Interactive. \n\n\nYes as you all ready may have found out, death in this game is permanent that means once you die you loose ALL yourequipment and have to start all over again. Some say it's rubbish, and that it needs to be changed!Only I know is that its COOL. Why? You may ask. Well its rather simple. I tried long list of MMO games over the yearsand what I found out is that most of them are !BORING! for only simple reason you cannot die.ell technically you can but practically you just re-spawn with some minor penalisation and hooray to carry on.In ayZ when you die you are DEAD this means you are on alert all the time you play because death can come from anywhere.You are constantly living in fear of death because that will mean all the items and clothing you have gathered over those hours of game play will begone, or worse, looted by one of the other players.So I have this little guide to help you to survive, get equipped and most of all STAY ALIVE!";
    x = 0.162627 * safezoneW + safezoneX;
    y = 0.351316 * safezoneH + safezoneY;
    w = 0.666907 * safezoneW;
    h = 0.474474 * safezoneH;
};

};
};

defines.hpp

Code:
// Control types
#define CT_STATIC           0
#define CT_BUTTON           1
#define CT_EDIT             2
#define CT_SLIDER           3
#define CT_COMBO            4
#define CT_LISTBOX          5
#define CT_TOOLBOX          6
#define CT_CHECKBOXES       7
#define CT_PROGRESS         8
#define CT_HTML             9
#define CT_STATIC_SKEW      10
#define CT_ACTIVETEXT       11
#define CT_TREE             12
#define CT_STRUCTURED_TEXT  13
#define CT_CONTEXT_MENU     14
#define CT_CONTROLS_GROUP   15
#define CT_SHORTCUTBUTTON   16
#define CT_XKEYDESC         40
#define CT_XBUTTON          41
#define CT_XLISTBOX         42
#define CT_XSLIDER          43
#define CT_XCOMBO           44
#define CT_ANIMATED_TEXTURE 45
#define CT_OBJECT           80
#define CT_OBJECT_ZOOM      81
#define CT_OBJECT_CONTAINER 82
#define CT_OBJECT_CONT_ANIM 83
#define CT_LINEBREAK        98
#define CT_USER             99
#define CT_MAP              100
#define CT_MAP_MAIN         101
#define CT_LISTNBOX         102

// Static styles
#define ST_POS            0x0F
#define ST_HPOS           0x03
#define ST_VPOS           0x0C
#define ST_LEFT           0x00
#define ST_RIGHT          0x01
#define ST_CENTER         0x02
#define ST_DOWN           0x04
#define ST_UP             0x08
#define ST_VCENTER        0x0C
#define ST_GROUP_BOX       96
#define ST_GROUP_BOX2      112
#define ST_ROUNDED_CORNER  ST_GROUP_BOX + ST_CENTER
#define ST_ROUNDED_CORNER2 ST_GROUP_BOX2 + ST_CENTER

#define ST_TYPE           0xF0
#define ST_SINGLE         0x00
#define ST_MULTI          0x10
#define ST_TITLE_BAR      0x20
#define ST_PICTURE        0x30
#define ST_FRAME          0x40
#define ST_BACKGROUND     0x50
#define ST_GROUP_BOX      0x60
#define ST_GROUP_BOX2     0x70
#define ST_HUD_BACKGROUND 0x80
#define ST_TILE_PICTURE   0x90
#define ST_WITH_RECT      0xA0
#define ST_LINE           0xB0

#define ST_SHADOW         0x100
#define ST_NO_RECT        0x200
#define ST_KEEP_ASPECT_RATIO  0x800

#define ST_TITLE          ST_TITLE_BAR + ST_CENTER

// Slider styles
#define SL_DIR            0x400
#define SL_VERT           0
#define SL_HORZ           0x400

#define SL_TEXTURES       0x10

// progress bar
#define ST_VERTICAL       0x01
#define ST_HORIZONTAL     0

// Listbox styles
#define LB_TEXTURES       0x10
#define LB_MULTI          0x20

// Tree styles
#define TR_SHOWROOT       1
#define TR_AUTOCOLLAPSE   2

// MessageBox styles
#define MB_BUTTON_OK      1
#define MB_BUTTON_CANCEL  2
#define MB_BUTTON_USER    4


////////////////
//Base Classes//
////////////////

class RscText_help
{
    access = 0;
    idc = -1;
    type = CT_STATIC;
    style = ST_MULTI;
    linespacing = 1;
    colorBackground[] = {0,0,0,0};
    colorText[] = {1,1,1,.5};
    text = "";
    shadow = 2;
    font = "Bitstream";
    SizeEx = 0.02300;
    fixedWidth = 0;
    x = 0;
    y = 0;
    h = 0;
    w = 0;
  
};

class RscPicture_help
{
    access = 0;
    idc = -1;
    type = CT_STATIC;
    style = ST_PICTURE;
    colorBackground[] = {0,0,0,0};
    colorText[] = {1,1,1,1};
    font = "Bitstream";
    sizeEx = 0;
    lineSpacing = 0;
    text = "";
    fixedWidth = 0;
    shadow = 0;
    x = 0;
    y = 0;
    w = 0.2;
    h = 0.15;
};

class RscButton_help
{
   
   access = 0;
    type = CT_BUTTON;
    text = "";
    colorText[] = {1,1,1,.9};
    colorDisabled[] = {0.4,0.4,0.4,0};
    colorBackground[] = {0.75,0.75,0.75,0.8};
    colorBackgroundDisabled[] = {0,0.0,0};
    colorBackgroundActive[] = {0.75,0.75,0.75,1};
    colorFocused[] = {0.75,0.75,0.75,.5};
    colorShadow[] = {0.023529,0,0.0313725,1};
    colorBorder[] = {0.023529,0,0.0313725,1};
    soundEnter[] = {"\ca\ui\data\sound\onover",0.09,1};
    soundPush[] = {"\ca\ui\data\sound\new1",0,0};
    soundClick[] = {"\ca\ui\data\sound\onclick",0.07,1};
    soundEscape[] = {"\ca\ui\data\sound\onescape",0.09,1};
    style = 2;
    x = 0;
    y = 0;
    w = 0.055589;
    h = 0.039216;
    shadow = 2;
    font = "Bitstream";
    sizeEx = 0.03921;
    offsetX = 0.003;
    offsetY = 0.003;
    offsetPressedX = 0.002;
    offsetPressedY = 0.002;
    borderSize = 0;
};

class RscFrame_help
{
    type = CT_STATIC;
    idc = -1;
    style = ST_FRAME;
    shadow = 2;
    colorBackground[] = {1,1,1,1};
    colorText[] = {1,1,1,0.9};
    font = "Bitstream";
    sizeEx = 0.03;
    text = "";
};
class RscListBox_help
{
    access = 0;
    idc = -1;
    type = CT_STATIC;
    style = ST_MULTI;
    linespacing = 1;
    colorBackground[] = {0,0,0,0};
    colorText[] = {1,1,1,.5};
    text = "";
    shadow = 2;
    font = "Bitstream";
    SizeEx = 0.02300;
    fixedWidth = 0;
    x = 0;
    y = 0;
    h = 0;
    w = 0;
  
};

class BOX_help
{
   type = CT_STATIC;
    idc = -1;
    style = ST_CENTER;
    shadow = 2;
    colorText[] = {1,1,1,1};
    font = "Bitstream";
    sizeEx = 0.02;
    colorBackground[] = { 0.2,0.2,0.2, 0.5 };
    text = "";

};
 
Back
Top