Jump to content
Sign in to follow this  
ios

DIALOGS Problem

Recommended Posts

I Have problem with a dialog menu, i get from a template, (All credits to Author)

All Work fine, except one things, i hope someone can help me.

Here the problem :

The player can call "Menu" in action menu,

110609052728648562.jpg

Here all work fine but when you Open Menu by Clicking on "> Menu"

110609053205209226.jpg

Error Message appear, but all work fine, i just want to remove that error message cause even if all work fine, it's not very serious to have that error message.

here script i use (i repeat this script is not from me, All Credit to Author)

PopupMenu.hpp :

// Desc: A popup menu dialog
// By: Dr Eyeball
// Version: 1.1 (May 2007)
//-----------------------------------------------------------------------------
// PUM3_ is the unique prefix associated with all unique classes for this dialog.

//-----------------------------------------------------------------------------
// IDD's & IDC's
//-----------------------------------------------------------------------------
#define PUM3_IDD_PopupMenuDialog 390

#define PUM3_IDC_Caption0 892
#define PUM3_IDC_Caption1 893
#define PUM3_IDC_Caption2 894

#define PUM3_IDC_Button000 870
#define PUM3_IDC_Button001 871
#define PUM3_IDC_Button002 872
#define PUM3_IDC_Button003 873
#define PUM3_IDC_Button004 874
#define PUM3_IDC_Button005 875
#define PUM3_IDC_Button006 876
#define PUM3_IDC_Button007 877
#define PUM3_IDC_Button008 878
#define PUM3_IDC_Button009 879
#define PUM3_IDC_Button010 880
#define PUM3_IDC_Button011 881
#define PUM3_IDC_Button012 882
#define PUM3_IDC_Button013 883
#define PUM3_IDC_Button014 884
#define PUM3_IDC_Button015 885
#define PUM3_IDC_Button016 886
#define PUM3_IDC_Button017 887
#define PUM3_IDC_Button018 888
#define PUM3_IDC_Button019 889

#define PUM3_IDC_Button100 1870
#define PUM3_IDC_Button101 1871
#define PUM3_IDC_Button102 1872
#define PUM3_IDC_Button103 1873
#define PUM3_IDC_Button104 1874
#define PUM3_IDC_Button105 1875
#define PUM3_IDC_Button106 1876
#define PUM3_IDC_Button107 1877
#define PUM3_IDC_Button108 1878
#define PUM3_IDC_Button109 1879
#define PUM3_IDC_Button110 1880
#define PUM3_IDC_Button111 1881
#define PUM3_IDC_Button112 1882
#define PUM3_IDC_Button113 1883
#define PUM3_IDC_Button114 1884
#define PUM3_IDC_Button115 1885
#define PUM3_IDC_Button116 1886
#define PUM3_IDC_Button117 1887
#define PUM3_IDC_Button118 1888
#define PUM3_IDC_Button119 1889

#define PUM3_IDC_Button200 2870
#define PUM3_IDC_Button201 2871
#define PUM3_IDC_Button202 2872
#define PUM3_IDC_Button203 2873
#define PUM3_IDC_Button204 2874
#define PUM3_IDC_Button205 2875
#define PUM3_IDC_Button206 2876
#define PUM3_IDC_Button207 2877
#define PUM3_IDC_Button208 2878
#define PUM3_IDC_Button209 2879
#define PUM3_IDC_Button210 2880
#define PUM3_IDC_Button211 2881
#define PUM3_IDC_Button212 2882
#define PUM3_IDC_Button213 2883
#define PUM3_IDC_Button214 2884
#define PUM3_IDC_Button215 2885
#define PUM3_IDC_Button216 2886
#define PUM3_IDC_Button217 2887
#define PUM3_IDC_Button218 2888
#define PUM3_IDC_Button219 2889

#define PUM3_dlg_x 0.05
#define PUM3_dlg_y 0.20
#define PUM3_dlg_wid 0.30
#define PUM3_dlg_hgt 0.9

//-----------------------------------------------------------------------------
// Personalisation - Custom modifications to the standard control classes
//-----------------------------------------------------------------------------

class PUM3_Caption: Dlg_Caption
{
 y = PUM3_dlg_y;
 w = PUM3_dlg_wid;
 text = "Popup Menu";
};

class PUM3_MenuItem: RscButton
{
 style = ST_LEFT;

 sizeEx = Dlg_TEXTHGT * PUM3_dlg_hgt;
 //size = Dlg_TEXTHGT;
 font = "Zeppelin32";
 //colorDisabled[] = {Dlg_Color_Gray_7, 0.7};
 colorBackgroundDisabled[] = {Dlg_ColorScheme_3DControlBackground,1};

 x = PUM3_dlg_x;
 y = PUM3_dlg_y;
 w = PUM3_dlg_wid;
 h = Dlg_TEXTHGT * PUM3_dlg_hgt;

 text = "";
 action = "";
};
class PUM3_MenuItem0: PUM3_MenuItem
{
 x = PUM3_dlg_x;
};
class PUM3_MenuItem1: PUM3_MenuItem
{
 x = PUM3_dlg_x + (PUM3_dlg_wid * 1);
};
class PUM3_MenuItem2: PUM3_MenuItem
{
 x = PUM3_dlg_x + (PUM3_dlg_wid * 2);
};

//-----------------------------------------------------------------------------
// Main dialog
//-----------------------------------------------------------------------------
class PUM3_PopupMenuDialog
{
 idd = PUM3_IDD_PopupMenuDialog;

 movingEnable = true;
 controlsBackground[] = { };

 //---------------------------------------------
 objects[] = 
 { 
 };

 controls[] = 
 {
   PUM3_Caption0,
   PUM3_Caption1,
   PUM3_Caption2,

   PUM3_MenuItem000,
   PUM3_MenuItem001,
   PUM3_MenuItem002,
   PUM3_MenuItem003,
   PUM3_MenuItem004,
   PUM3_MenuItem005,
   PUM3_MenuItem006,
   PUM3_MenuItem007,
   PUM3_MenuItem008,
   PUM3_MenuItem009,
   PUM3_MenuItem010,
   PUM3_MenuItem011,
   PUM3_MenuItem012,
   PUM3_MenuItem013,
   PUM3_MenuItem014,
   PUM3_MenuItem015,
   PUM3_MenuItem016,
   PUM3_MenuItem017,
   PUM3_MenuItem018,
   PUM3_MenuItem019,

   PUM3_MenuItem100,
   PUM3_MenuItem101,
   PUM3_MenuItem102,
   PUM3_MenuItem103,
   PUM3_MenuItem104,
   PUM3_MenuItem105,
   PUM3_MenuItem106,
   PUM3_MenuItem107,
   PUM3_MenuItem108,
   PUM3_MenuItem109,
   PUM3_MenuItem110,
   PUM3_MenuItem111,
   PUM3_MenuItem112,
   PUM3_MenuItem113,
   PUM3_MenuItem114,
   PUM3_MenuItem115,
   PUM3_MenuItem116,
   PUM3_MenuItem117,
   PUM3_MenuItem118,
   PUM3_MenuItem119,

   PUM3_MenuItem200,
   PUM3_MenuItem201,
   PUM3_MenuItem202,
   PUM3_MenuItem203,
   PUM3_MenuItem204,
   PUM3_MenuItem205,
   PUM3_MenuItem206,
   PUM3_MenuItem207,
   PUM3_MenuItem208,
   PUM3_MenuItem209,
   PUM3_MenuItem210,
   PUM3_MenuItem211,
   PUM3_MenuItem212,
   PUM3_MenuItem213,
   PUM3_MenuItem214,
   PUM3_MenuItem215,
   PUM3_MenuItem216,
   PUM3_MenuItem217,
   PUM3_MenuItem218,
   PUM3_MenuItem219
 };
 //---------------------------------------------
 // Controls
 class PUM3_Caption0: PUM3_Caption { idc = PUM3_IDC_Caption0; x	= PUM3_dlg_x; y = PUM3_dlg_y; };
 class PUM3_Caption1: PUM3_Caption { idc = PUM3_IDC_Caption1; x = PUM3_dlg_x + (PUM3_dlg_wid * 1); y = PUM3_dlg_y+Dlg_CONTROLHGT; };
 class PUM3_Caption2: PUM3_Caption { idc = PUM3_IDC_Caption2; x = PUM3_dlg_x + (PUM3_dlg_wid * 2); y = PUM3_dlg_y+(2*Dlg_CONTROLHGT); };
 //---------------------------------------------
 // buttons - menu 0
 class PUM3_MenuItem000: PUM3_MenuItem0 { idc = PUM3_IDC_Button000; y = 0*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + Dlg_CONTROLHGT; };
 class PUM3_MenuItem001: PUM3_MenuItem0 { idc = PUM3_IDC_Button001; y = 1*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + Dlg_CONTROLHGT; };
 class PUM3_MenuItem002: PUM3_MenuItem0 { idc = PUM3_IDC_Button002; y = 2*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + Dlg_CONTROLHGT; };
 class PUM3_MenuItem003: PUM3_MenuItem0 { idc = PUM3_IDC_Button003; y = 3*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + Dlg_CONTROLHGT; };
 class PUM3_MenuItem004: PUM3_MenuItem0 { idc = PUM3_IDC_Button004; y = 4*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + Dlg_CONTROLHGT; };
 class PUM3_MenuItem005: PUM3_MenuItem0 { idc = PUM3_IDC_Button005; y = 5*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + Dlg_CONTROLHGT; };
 class PUM3_MenuItem006: PUM3_MenuItem0 { idc = PUM3_IDC_Button006; y = 6*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + Dlg_CONTROLHGT; };
 class PUM3_MenuItem007: PUM3_MenuItem0 { idc = PUM3_IDC_Button007; y = 7*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + Dlg_CONTROLHGT; };
 class PUM3_MenuItem008: PUM3_MenuItem0 { idc = PUM3_IDC_Button008; y = 8*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + Dlg_CONTROLHGT; };
 class PUM3_MenuItem009: PUM3_MenuItem0 { idc = PUM3_IDC_Button009; y = 9*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + Dlg_CONTROLHGT; };
 class PUM3_MenuItem010: PUM3_MenuItem0 { idc = PUM3_IDC_Button010; y = 10*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + Dlg_CONTROLHGT; };
 class PUM3_MenuItem011: PUM3_MenuItem0 { idc = PUM3_IDC_Button011; y = 11*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + Dlg_CONTROLHGT; };
 class PUM3_MenuItem012: PUM3_MenuItem0 { idc = PUM3_IDC_Button012; y = 12*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + Dlg_CONTROLHGT; };
 class PUM3_MenuItem013: PUM3_MenuItem0 { idc = PUM3_IDC_Button013; y = 13*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + Dlg_CONTROLHGT; };
 class PUM3_MenuItem014: PUM3_MenuItem0 { idc = PUM3_IDC_Button014; y = 14*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + Dlg_CONTROLHGT; };
 class PUM3_MenuItem015: PUM3_MenuItem0 { idc = PUM3_IDC_Button015; y = 15*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + Dlg_CONTROLHGT; };
 class PUM3_MenuItem016: PUM3_MenuItem0 { idc = PUM3_IDC_Button016; y = 16*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + Dlg_CONTROLHGT; };
 class PUM3_MenuItem017: PUM3_MenuItem0 { idc = PUM3_IDC_Button017; y = 17*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + Dlg_CONTROLHGT; };
 class PUM3_MenuItem018: PUM3_MenuItem0 { idc = PUM3_IDC_Button018; y = 18*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + Dlg_CONTROLHGT; };
 class PUM3_MenuItem019: PUM3_MenuItem0 { idc = PUM3_IDC_Button019; y = 19*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + Dlg_CONTROLHGT; };
 //---------------------------------------------
 // buttons - menu 1
 class PUM3_MenuItem100: PUM3_MenuItem1 { idc = PUM3_IDC_Button100; y = 0*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (2*Dlg_CONTROLHGT); };
 class PUM3_MenuItem101: PUM3_MenuItem1 { idc = PUM3_IDC_Button101; y = 1*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (2*Dlg_CONTROLHGT); };
 class PUM3_MenuItem102: PUM3_MenuItem1 { idc = PUM3_IDC_Button102; y = 2*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (2*Dlg_CONTROLHGT); };
 class PUM3_MenuItem103: PUM3_MenuItem1 { idc = PUM3_IDC_Button103; y = 3*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (2*Dlg_CONTROLHGT); };
 class PUM3_MenuItem104: PUM3_MenuItem1 { idc = PUM3_IDC_Button104; y = 4*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (2*Dlg_CONTROLHGT); };
 class PUM3_MenuItem105: PUM3_MenuItem1 { idc = PUM3_IDC_Button105; y = 5*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (2*Dlg_CONTROLHGT); };
 class PUM3_MenuItem106: PUM3_MenuItem1 { idc = PUM3_IDC_Button106; y = 6*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (2*Dlg_CONTROLHGT); };
 class PUM3_MenuItem107: PUM3_MenuItem1 { idc = PUM3_IDC_Button107; y = 7*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (2*Dlg_CONTROLHGT); };
 class PUM3_MenuItem108: PUM3_MenuItem1 { idc = PUM3_IDC_Button108; y = 8*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (2*Dlg_CONTROLHGT); };
 class PUM3_MenuItem109: PUM3_MenuItem1 { idc = PUM3_IDC_Button109; y = 9*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (2*Dlg_CONTROLHGT); };
 class PUM3_MenuItem110: PUM3_MenuItem1 { idc = PUM3_IDC_Button110; y = 10*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (2*Dlg_CONTROLHGT); };
 class PUM3_MenuItem111: PUM3_MenuItem1 { idc = PUM3_IDC_Button111; y = 11*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (2*Dlg_CONTROLHGT); };
 class PUM3_MenuItem112: PUM3_MenuItem1 { idc = PUM3_IDC_Button112; y = 12*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (2*Dlg_CONTROLHGT); };
 class PUM3_MenuItem113: PUM3_MenuItem1 { idc = PUM3_IDC_Button113; y = 13*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (2*Dlg_CONTROLHGT); };
 class PUM3_MenuItem114: PUM3_MenuItem1 { idc = PUM3_IDC_Button114; y = 14*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (2*Dlg_CONTROLHGT); };
 class PUM3_MenuItem115: PUM3_MenuItem1 { idc = PUM3_IDC_Button115; y = 15*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (2*Dlg_CONTROLHGT); };
 class PUM3_MenuItem116: PUM3_MenuItem1 { idc = PUM3_IDC_Button116; y = 16*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (2*Dlg_CONTROLHGT); };
 class PUM3_MenuItem117: PUM3_MenuItem1 { idc = PUM3_IDC_Button117; y = 17*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (2*Dlg_CONTROLHGT); };
 class PUM3_MenuItem118: PUM3_MenuItem1 { idc = PUM3_IDC_Button118; y = 18*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (2*Dlg_CONTROLHGT); };
 class PUM3_MenuItem119: PUM3_MenuItem1 { idc = PUM3_IDC_Button119; y = 19*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (2*Dlg_CONTROLHGT); };
 //---------------------------------------------
 // buttons - menu 2
 class PUM3_MenuItem200: PUM3_MenuItem2 { idc = PUM3_IDC_Button200; y = 0*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (3*Dlg_CONTROLHGT); };
 class PUM3_MenuItem201: PUM3_MenuItem2 { idc = PUM3_IDC_Button201; y = 1*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (3*Dlg_CONTROLHGT); };
 class PUM3_MenuItem202: PUM3_MenuItem2 { idc = PUM3_IDC_Button202; y = 2*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (3*Dlg_CONTROLHGT); };
 class PUM3_MenuItem203: PUM3_MenuItem2 { idc = PUM3_IDC_Button203; y = 3*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (3*Dlg_CONTROLHGT); };
 class PUM3_MenuItem204: PUM3_MenuItem2 { idc = PUM3_IDC_Button204; y = 4*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (3*Dlg_CONTROLHGT); };
 class PUM3_MenuItem205: PUM3_MenuItem2 { idc = PUM3_IDC_Button205; y = 5*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (3*Dlg_CONTROLHGT); };
 class PUM3_MenuItem206: PUM3_MenuItem2 { idc = PUM3_IDC_Button206; y = 6*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (3*Dlg_CONTROLHGT); };
 class PUM3_MenuItem207: PUM3_MenuItem2 { idc = PUM3_IDC_Button207; y = 7*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (3*Dlg_CONTROLHGT); };
 class PUM3_MenuItem208: PUM3_MenuItem2 { idc = PUM3_IDC_Button208; y = 8*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (3*Dlg_CONTROLHGT); };
 class PUM3_MenuItem209: PUM3_MenuItem2 { idc = PUM3_IDC_Button209; y = 9*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (3*Dlg_CONTROLHGT); };
 class PUM3_MenuItem210: PUM3_MenuItem2 { idc = PUM3_IDC_Button210; y = 10*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (3*Dlg_CONTROLHGT); };
 class PUM3_MenuItem211: PUM3_MenuItem2 { idc = PUM3_IDC_Button211; y = 11*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (3*Dlg_CONTROLHGT); };
 class PUM3_MenuItem212: PUM3_MenuItem2 { idc = PUM3_IDC_Button212; y = 12*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (3*Dlg_CONTROLHGT); };
 class PUM3_MenuItem213: PUM3_MenuItem2 { idc = PUM3_IDC_Button213; y = 13*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (3*Dlg_CONTROLHGT); };
 class PUM3_MenuItem214: PUM3_MenuItem2 { idc = PUM3_IDC_Button214; y = 14*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (3*Dlg_CONTROLHGT); };
 class PUM3_MenuItem215: PUM3_MenuItem2 { idc = PUM3_IDC_Button215; y = 15*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (3*Dlg_CONTROLHGT); };
 class PUM3_MenuItem216: PUM3_MenuItem2 { idc = PUM3_IDC_Button216; y = 16*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (3*Dlg_CONTROLHGT); };
 class PUM3_MenuItem217: PUM3_MenuItem2 { idc = PUM3_IDC_Button217; y = 17*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (3*Dlg_CONTROLHGT); };
 class PUM3_MenuItem218: PUM3_MenuItem2 { idc = PUM3_IDC_Button218; y = 18*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (3*Dlg_CONTROLHGT); };
 class PUM3_MenuItem219: PUM3_MenuItem2 { idc = PUM3_IDC_Button219; y = 19*(Dlg_TEXTHGT * PUM3_dlg_hgt) + PUM3_dlg_y + (3*Dlg_CONTROLHGT); };
 //---------------------------------------------
};

PopupMenu.sqf

// Desc: A popup menu dialog
// By: Dr Eyeball
// Version: 1.1 (May 2007)
//-----------------------------------------------------------------------------
// Constants
//-----------------------------------------------------------------------------
// The following IDD & IDC variables should match their equivalents for the dialog (from "Dialogs\PopupMenuDialog.hpp")

private ["_marker"];

PUM3_IDD_PopupMenuDialog = 390;

PUM3_IDC_Caption0 = 892;
PUM3_IDC_Caption1 = 893;
PUM3_IDC_Caption2 = 894;

PUM3_IDC_Button000 = 870;
PUM3_IDC_Button001 = 871;
PUM3_IDC_Button002 = 872;
PUM3_IDC_Button003 = 873;
PUM3_IDC_Button004 = 874;
PUM3_IDC_Button005 = 875;
PUM3_IDC_Button006 = 876;
PUM3_IDC_Button007 = 877;
PUM3_IDC_Button008 = 878;
PUM3_IDC_Button009 = 879;
PUM3_IDC_Button010 = 880;
PUM3_IDC_Button011 = 881;
PUM3_IDC_Button012 = 882;
PUM3_IDC_Button013 = 883;
PUM3_IDC_Button014 = 884;
PUM3_IDC_Button015 = 885;
PUM3_IDC_Button016 = 886;
PUM3_IDC_Button017 = 887;
PUM3_IDC_Button018 = 888;
PUM3_IDC_Button019 = 889;

PUM3_IDC_Button100 = 1870;
PUM3_IDC_Button101 = 1871;
PUM3_IDC_Button102 = 1872;
PUM3_IDC_Button103 = 1873;
PUM3_IDC_Button104 = 1874;
PUM3_IDC_Button105 = 1875;
PUM3_IDC_Button106 = 1876;
PUM3_IDC_Button107 = 1877;
PUM3_IDC_Button108 = 1878;
PUM3_IDC_Button109 = 1879;
PUM3_IDC_Button110 = 1880;
PUM3_IDC_Button111 = 1881;
PUM3_IDC_Button112 = 1882;
PUM3_IDC_Button113 = 1883;
PUM3_IDC_Button114 = 1884;
PUM3_IDC_Button115 = 1885;
PUM3_IDC_Button116 = 1886;
PUM3_IDC_Button117 = 1887;
PUM3_IDC_Button118 = 1888;
PUM3_IDC_Button119 = 1889;

PUM3_IDC_Button200 = 2870;
PUM3_IDC_Button201 = 2871;
PUM3_IDC_Button202 = 2872;
PUM3_IDC_Button203 = 2873;
PUM3_IDC_Button204 = 2874;
PUM3_IDC_Button205 = 2875;
PUM3_IDC_Button206 = 2876;
PUM3_IDC_Button207 = 2877;
PUM3_IDC_Button208 = 2878;
PUM3_IDC_Button209 = 2879;
PUM3_IDC_Button210 = 2880;
PUM3_IDC_Button211 = 2881;
PUM3_IDC_Button212 = 2882;
PUM3_IDC_Button213 = 2883;
PUM3_IDC_Button214 = 2884;
PUM3_IDC_Button215 = 2885;
PUM3_IDC_Button216 = 2886;
PUM3_IDC_Button217 = 2887;
PUM3_IDC_Button218 = 2888;
PUM3_IDC_Button219 = 2889;

PUM3_MenuControls0 = [
 PUM3_IDC_Caption0, 
 PUM3_IDC_Button000, 
 PUM3_IDC_Button001, 
 PUM3_IDC_Button002, 
 PUM3_IDC_Button003,
 PUM3_IDC_Button004,
 PUM3_IDC_Button005,
 PUM3_IDC_Button006,
 PUM3_IDC_Button007,
 PUM3_IDC_Button008,
 PUM3_IDC_Button009,
 PUM3_IDC_Button010, 
 PUM3_IDC_Button011, 
 PUM3_IDC_Button012, 
 PUM3_IDC_Button013,
 PUM3_IDC_Button014,
 PUM3_IDC_Button015,
 PUM3_IDC_Button016,
 PUM3_IDC_Button017,
 PUM3_IDC_Button018,
 PUM3_IDC_Button019
 ];
PUM3_MenuControls1 = [      
 PUM3_IDC_Caption1, 
 PUM3_IDC_Button100, 
 PUM3_IDC_Button101, 
 PUM3_IDC_Button102, 
 PUM3_IDC_Button103,
 PUM3_IDC_Button104,
 PUM3_IDC_Button105,
 PUM3_IDC_Button106,
 PUM3_IDC_Button107,
 PUM3_IDC_Button108,
 PUM3_IDC_Button109,
 PUM3_IDC_Button110, 
 PUM3_IDC_Button111, 
 PUM3_IDC_Button112, 
 PUM3_IDC_Button113,
 PUM3_IDC_Button114,
 PUM3_IDC_Button115,
 PUM3_IDC_Button116,
 PUM3_IDC_Button117,
 PUM3_IDC_Button118,
 PUM3_IDC_Button119
 ];
PUM3_MenuControls2 = [    
 PUM3_IDC_Caption2, 
 PUM3_IDC_Button200, 
 PUM3_IDC_Button201, 
 PUM3_IDC_Button202, 
 PUM3_IDC_Button203,
 PUM3_IDC_Button204,
 PUM3_IDC_Button205,
 PUM3_IDC_Button206,
 PUM3_IDC_Button207,
 PUM3_IDC_Button208,
 PUM3_IDC_Button209,
 PUM3_IDC_Button210, 
 PUM3_IDC_Button211, 
 PUM3_IDC_Button212, 
 PUM3_IDC_Button213,
 PUM3_IDC_Button214,
 PUM3_IDC_Button215,
 PUM3_IDC_Button216,
 PUM3_IDC_Button217,
 PUM3_IDC_Button218,
 PUM3_IDC_Button219
 ];
PUM3_MenuControlsList = [PUM3_MenuControls0, PUM3_MenuControls1, PUM3_MenuControls2];

PUM3_dlg_x = 0.05;
PUM3_dlg_y = 0.20;
PUM3_dlg_wid = 0.30;
PUM3_dlg_hgt = 0.9;

//-----------------------------------------------------------------------------
// Functions
//-----------------------------------------------------------------------------
PUM3_Exit =
{
 closeDialog PUM3_IDD_PopupMenuDialog;
};
//----------------------
PUM3_OnClose =
{
 _MarkerName = "m_MapClickCommandMenu";
 _MarkerName setMarkerType "Empty";
};
//----------------------
PUM3_MenuItem00 =
{
 call PUM3_Exit;
};
//----------------------
PUM3_MenuItem01 =
{
 call PUM3_Exit;
};
//----------------------
PUM3_MenuItem02 =
{
 call PUM3_Exit;
};
//----------------------
PUM3_MenuItem03 =
{
 call PUM3_Exit;
};
//----------------------
PUM3_HideMenus =
{
 _level = _this select 0;

 switch (_level) do
 {
   case 0: { { ctrlShow [_x, false] } forEach PUM3_MenuControls0+PUM3_MenuControls1+PUM3_MenuControls2 };
   case 1: { { ctrlShow [_x, false] } forEach PUM3_MenuControls1+PUM3_MenuControls2 };
   case 2: { { ctrlShow [_x, false] } forEach PUM3_MenuControls2 };
 };  
};
//----------------------
PUM3_ShowMenu =
{
 [
   _this,
   ["_Params", PUM3_Params]
 ] call PUM3_ProcessMenu;
};
//----------------------
PUM3_ClickButton =
{
 _IDC = _this select 0;

 _MenuControls = [];
 if (_IDC in PUM3_MenuControls0) then { PUM3_Level = 1 };
 if (_IDC in PUM3_MenuControls1) then { PUM3_Level = 2 };
 if (_IDC in PUM3_MenuControls2) then { PUM3_Level = 3 };

 _MenuControls = PUM3_MenuControlsList select (PUM3_Level-1);
 [PUM3_Level] call PUM3_HideMenus;

 // restore color of all menu items in selected menu back to default text color
 {
   _ctrl = PUM3_display displayCtrl _x;
   _ctrl ctrlSetTextColor [1,1,1,1]; // Dlg_Color_white // Dlg_ColorScheme_3DControlText;
 } forEach _MenuControls;

 // mark selected menu item in special color
 _ctrl = PUM3_display displayCtrl _IDC;
 _ctrl ctrlSetTextColor [0.253906,0.410156,0.878906,1]; // Dlg_Color_RoyalBlue // Dlg_ColorScheme_CaptionBackground;
 //_ctrl ctrlSetBackgroundColor [1, 0, 0, 1]; // doesn't work
};
//----------------------
PUM3_ReplaceCommonParams =
{
 _action = _this select 0;

 _MapClickParams = ["MapClickParams", PUM3_Params, []] call fn_GetParamByName;
 //player sidechat format["MapClickParams=%1", _MapClickParams]; // debug

 _MapClickPos = ["Pos", _MapClickParams, [0,0,0]] call fn_GetParamByName;
 _MapClickUnits = ["Units", _MapClickParams, []] call fn_GetParamByName;
 _MapClickShift = ["Shift", _MapClickParams, false] call fn_GetParamByName;
 _MapClickAlt = ["Alt", _MapClickParams, false] call fn_GetParamByName;
 _MapClickPosGridRef = [_MapClickPos] call fn_GridRefCoords;

 _CurrentWaypoints = waypoints player;
 _CurrentWaypointPos = [0,0,0];
 // TODO: Since there is no GetCurrentWaypoint command yet, we'll have to assume which one is the current one.
 if (count _CurrentWaypoints > 1) then 
 {
   _CurrentWaypoint = _CurrentWaypoints select 1; // TODO: Change this to GetCurrentWaypoint when available or manually maintained global variable.
   _CurrentWaypointPos = WaypointPosition _CurrentWaypoint;
   //player groupChat format["Curr WP=%1", _CurrentWaypointPos]; // debug
 };
 _CurrentWaypointGridRef = [_CurrentWaypointPos] call fn_GridRefCoords;

 _MapOrPlayerPos = _MapClickPos;
 if (format["%1", _MapOrPlayerPos] == "[0,0,0]") then { _MapOrPlayerPos = position player };
 _MapOrPlayerGridRef = [_MapOrPlayerPos] call fn_GridRefCoords;

 _action = format[_action, 
   /* %1 */ position player,
   /* %2 */ [position player] call fn_GridRefCoords,
   /* %3 */ _MapClickPos, 
   /* %4 */ _MapClickPosGridRef,
   /* %5 */ _MapOrPlayerPos,
   /* %6 */ _MapOrPlayerGridRef,
   /* %7 */ _CurrentWaypointPos,
   /* %8 */ _CurrentWaypointGridRef,
   ""
 ];
 if (_action == "-") then {
   _action = "------------------------------------------------------------" };
 _action;
};
//----------------------
PUM3_ProcessMenu =
{
 _MenuName = ["MenuName", _this, "MainMenu"] call fn_GetParamByName;
 _Params = ["_Params", _this, []] call fn_GetParamByName;
 //player sidechat format["ProcessMenu params=%1", _Params]; // debug

 _Menu = [_MenuName, _Params, []] call fn_GetParamByName;

 _MenuControls = PUM3_MenuControlsList select PUM3_Level;

 // Setup caption
 _IDC_CaptionControl = _MenuControls select 0;
 _caption = ["Caption", _Menu, "Menu"] call fn_GetParamByName;
 _caption = [_caption] call PUM3_ReplaceCommonParams;
 ctrlSetText [_IDC_CaptionControl, _caption];
 ctrlShow [_IDC_CaptionControl, true];

 // Setup menu items
 _items = ["Items", _Menu, "Menu"] call fn_GetParamByName;
 _i = 0;
 {
   _IDC = _x;
   _ctrl = PUM3_display displayCtrl _IDC;

   /*
   // set new X offset pos
   _pos = ctrlPosition _ctrl;
   _newX = PUM3_dlg_x + (PUM3_dlg_wid * PUM3_Level);
   _ctrl ctrlSetPosition [_newX, _pos select 1, _pos select 2, _pos select 3];
   //player sidechat format["_x=%1 %2", _i, _items];
   */

   if (_i > 0) then
   {
     ctrlShow [_IDC, false];
     _ctrl ctrlSetTextColor [1,1,1,1]; // Dlg_Color_white // Dlg_ColorScheme_3DControlText;
   };

   // set menu item caption and action
   if (typeName _items == "ARRAY") then
   {
     if (_i > 0 && count _items >= _i) then
     {
       _item = _items select (_i - 1);
       //player sidechat format["_Item %1=%2", _i, _Item]; // debug

       if (count _item > 0) then
       {
         //if (_i == 1) then { ctrlSetFocus _ctrl };

         _caption = ["Item", _item, ""] call fn_GetParamByName;
         _separator = (_caption == "-");
         _caption = [_caption] call PUM3_ReplaceCommonParams;
         ctrlSetText [_IDC, _caption];
         //player sidechat format["_cap %1=%2", _i, _caption]; // debug

         _SubMenuName = ["SubMenu", _item, ""] call fn_GetParamByName;
         //player sidechat format["_SubMenuName %1='%2'=%3", _i, _SubMenuName, _Item]; // debug
         _Close = ["Close", _item, true] call fn_GetParamByName;
         if (_SubMenuName != "") then // SubMenu overrides Close
         { 
           _Close = false 
         };

         _action = ["Action", _item, ""] call fn_GetParamByName;
         if (typeName _action == "CODE") then
         {
           _action = format["%1", _action];
         };
         _action = format["[%1] call PUM3_ClickButton; %2", _IDC, _action];
         if (_SubMenuName != "") then 
         {
           _action = format["%2; ['MenuName', '%1'] call PUM3_ShowMenu", _SubMenuName, _action];
           //player sidechat format["_SubMenuName=%1; %2", _SubMenuName, _action]; // debug
         };
         if (_Close) then
         {
           _action = format["%1; [] call PUM3_Exit", _action];
         };

         _action = [_action] call PUM3_ReplaceCommonParams;

         buttonSetAction [_IDC, _action];
         //player sidechat format["_act %1=%2=%3", _i, typeName _action, _action]; // debug

         _Default = ["Default", _item, false] call fn_GetParamByName;
         if (_Default) then
         {
           ctrlSetFocus _ctrl; // doesn't work for buttons?
         };

         ctrlShow [_IDC, true];
         ctrlEnable [_IDC, true];

         _Enabled = ["Enabled", _item, true] call fn_GetParamByName;
         if (_separator) then { _Enabled = false };
         ctrlEnable [_IDC, _Enabled];

         _Hint = ["Hint", _item, ""] call fn_GetParamByName;
         if (_Hint != "") then 
         {
           _ctrl ctrlSetToolTip _Hint;
         };
       };
     };
   };
   _i = _i + 1;

   _ctrl ctrlCommit 0; // commits ctrlSetPosition
 } forEach _MenuControls;
};
//----------------------
PUM3_Main =
{
 //_Params = _this;
 //player sidechat format["Start params=%1", _Params]; // debug
 PUM3_Level = 0;
 [0] call PUM3_HideMenus;

 ["MenuName", "MainMenu"] call PUM3_ShowMenu;

 PUM3_display displaySetEventHandler["Unload", "call PUM3_OnClose"];

 _MapClickParams = ["MapClickParams", PUM3_Params, []] call fn_GetParamByName;
 _MapClickPos = ["Pos", _MapClickParams, position player] call fn_GetParamByName;
 _MarkerName = "m_MapClickCommandMenu";

 _marker = createMarkerLocal [_MarkerName, _MapClickPos];
 _MarkerName setMarkerShape "ICON";
 _MarkerName setMarkerType "dot";
 _MarkerName setMarkerText "";
 _MarkerName setMarkerColor "ColorBlue";
 _MarkerName setMarkerSize [0.3, 0.3];
 _MarkerName setMarkerPos _MapClickPos;
};
//-----------------------------------------------------------------------------
// Init
//-----------------------------------------------------------------------------

_ok = createDialog "PUM3_PopupMenuDialog";
if !(_ok) exitWith { hint "createDialog failed" };

PUM3_display = findDisplay PUM3_IDD_PopupMenuDialog;
_closeDialog = format["closeDialog %1", PUM3_IDD_PopupMenuDialog];

PUM3_Params = _this;
//["PopupMenu.sqf", PUM3_Params] call fn_DebugAppend; // debug
PUM3_Params call PUM3_Main;

i hope someone will find solution !

Thanks in Advance :)

Share this post


Link to post
Share on other sites

Put following command into .sqf file.

disableSerialization

Storing UI elements into variables is not allowed (cannot be saved), so you must disable saving of the script by this command.

Share this post


Link to post
Share on other sites

Thanks for replying :)

i tried but it's not working :s

here what i tried ;

PopupMenu.sqf :

// Desc: A popup menu dialog
// By: Dr Eyeball
// Version: 1.1 (May 2007)
//-----------------------------------------------------------------------------
// Constants
//-----------------------------------------------------------------------------
// The following IDD & IDC variables should match their equivalents for the dialog (from "Dialogs\PopupMenuDialog.hpp")

//== DISABLESERIALIZATION ==//
disableSerialization;

private ["_marker"];

PUM3_IDD_PopupMenuDialog = 390;
//== DISABLESERIALIZATION ==//
disableSerialization;
PUM3_IDC_Caption0 = 892;
PUM3_IDC_Caption1 = 893;
PUM3_IDC_Caption2 = 894;
//== DISABLESERIALIZATION ==//
disableSerialization;
PUM3_IDC_Button000 = 870;
PUM3_IDC_Button001 = 871;
PUM3_IDC_Button002 = 872;
PUM3_IDC_Button003 = 873;
PUM3_IDC_Button004 = 874;
PUM3_IDC_Button005 = 875;
PUM3_IDC_Button006 = 876;
PUM3_IDC_Button007 = 877;
PUM3_IDC_Button008 = 878;
PUM3_IDC_Button009 = 879;
PUM3_IDC_Button010 = 880;
PUM3_IDC_Button011 = 881;
PUM3_IDC_Button012 = 882;
PUM3_IDC_Button013 = 883;
PUM3_IDC_Button014 = 884;
PUM3_IDC_Button015 = 885;
PUM3_IDC_Button016 = 886;
PUM3_IDC_Button017 = 887;
PUM3_IDC_Button018 = 888;
PUM3_IDC_Button019 = 889;
//== DISABLESERIALIZATION ==//
disableSerialization;
PUM3_IDC_Button100 = 1870;
PUM3_IDC_Button101 = 1871;
PUM3_IDC_Button102 = 1872;
PUM3_IDC_Button103 = 1873;
PUM3_IDC_Button104 = 1874;
PUM3_IDC_Button105 = 1875;
PUM3_IDC_Button106 = 1876;
PUM3_IDC_Button107 = 1877;
PUM3_IDC_Button108 = 1878;
PUM3_IDC_Button109 = 1879;
PUM3_IDC_Button110 = 1880;
PUM3_IDC_Button111 = 1881;
PUM3_IDC_Button112 = 1882;
PUM3_IDC_Button113 = 1883;
PUM3_IDC_Button114 = 1884;
PUM3_IDC_Button115 = 1885;
PUM3_IDC_Button116 = 1886;
PUM3_IDC_Button117 = 1887;
PUM3_IDC_Button118 = 1888;
PUM3_IDC_Button119 = 1889;
//== DISABLESERIALIZATION ==//
disableSerialization;
PUM3_IDC_Button200 = 2870;
PUM3_IDC_Button201 = 2871;
PUM3_IDC_Button202 = 2872;
PUM3_IDC_Button203 = 2873;
PUM3_IDC_Button204 = 2874;
PUM3_IDC_Button205 = 2875;
PUM3_IDC_Button206 = 2876;
PUM3_IDC_Button207 = 2877;
PUM3_IDC_Button208 = 2878;
PUM3_IDC_Button209 = 2879;
PUM3_IDC_Button210 = 2880;
PUM3_IDC_Button211 = 2881;
PUM3_IDC_Button212 = 2882;
PUM3_IDC_Button213 = 2883;
PUM3_IDC_Button214 = 2884;
PUM3_IDC_Button215 = 2885;
PUM3_IDC_Button216 = 2886;
PUM3_IDC_Button217 = 2887;
PUM3_IDC_Button218 = 2888;
PUM3_IDC_Button219 = 2889;
//== DISABLESERIALIZATION ==//
disableSerialization;
PUM3_MenuControls0 = [
 PUM3_IDC_Caption0, 
 PUM3_IDC_Button000, 
 PUM3_IDC_Button001, 
 PUM3_IDC_Button002, 
 PUM3_IDC_Button003,
 PUM3_IDC_Button004,
 PUM3_IDC_Button005,
 PUM3_IDC_Button006,
 PUM3_IDC_Button007,
 PUM3_IDC_Button008,
 PUM3_IDC_Button009,
 PUM3_IDC_Button010, 
 PUM3_IDC_Button011, 
 PUM3_IDC_Button012, 
 PUM3_IDC_Button013,
 PUM3_IDC_Button014,
 PUM3_IDC_Button015,
 PUM3_IDC_Button016,
 PUM3_IDC_Button017,
 PUM3_IDC_Button018,
 PUM3_IDC_Button019
 ];
PUM3_MenuControls1 = [      
 PUM3_IDC_Caption1, 
 PUM3_IDC_Button100, 
 PUM3_IDC_Button101, 
 PUM3_IDC_Button102, 
 PUM3_IDC_Button103,
 PUM3_IDC_Button104,
 PUM3_IDC_Button105,
 PUM3_IDC_Button106,
 PUM3_IDC_Button107,
 PUM3_IDC_Button108,
 PUM3_IDC_Button109,
 PUM3_IDC_Button110, 
 PUM3_IDC_Button111, 
 PUM3_IDC_Button112, 
 PUM3_IDC_Button113,
 PUM3_IDC_Button114,
 PUM3_IDC_Button115,
 PUM3_IDC_Button116,
 PUM3_IDC_Button117,
 PUM3_IDC_Button118,
 PUM3_IDC_Button119
 ];
PUM3_MenuControls2 = [    
 PUM3_IDC_Caption2, 
 PUM3_IDC_Button200, 
 PUM3_IDC_Button201, 
 PUM3_IDC_Button202, 
 PUM3_IDC_Button203,
 PUM3_IDC_Button204,
 PUM3_IDC_Button205,
 PUM3_IDC_Button206,
 PUM3_IDC_Button207,
 PUM3_IDC_Button208,
 PUM3_IDC_Button209,
 PUM3_IDC_Button210, 
 PUM3_IDC_Button211, 
 PUM3_IDC_Button212, 
 PUM3_IDC_Button213,
 PUM3_IDC_Button214,
 PUM3_IDC_Button215,
 PUM3_IDC_Button216,
 PUM3_IDC_Button217,
 PUM3_IDC_Button218,
 PUM3_IDC_Button219
 ];
PUM3_MenuControlsList = [PUM3_MenuControls0, PUM3_MenuControls1, PUM3_MenuControls2];

PUM3_dlg_x = 0.05;
PUM3_dlg_y = 0.20;
PUM3_dlg_wid = 0.30;
PUM3_dlg_hgt = 0.9;

//== DISABLESERIALIZATION ==//
disableSerialization;

//-----------------------------------------------------------------------------
// Functions
//-----------------------------------------------------------------------------
PUM3_Exit =
{
 closeDialog PUM3_IDD_PopupMenuDialog;
};
//----------------------
PUM3_OnClose =
{
 _MarkerName = "m_MapClickCommandMenu";
 _MarkerName setMarkerType "Empty";
};
//----------------------
PUM3_MenuItem00 =
{
 call PUM3_Exit;
};
//----------------------
PUM3_MenuItem01 =
{
 call PUM3_Exit;
};
//----------------------
PUM3_MenuItem02 =
{
 call PUM3_Exit;
};
//----------------------
PUM3_MenuItem03 =
{
 call PUM3_Exit;
};
//----------------------
PUM3_HideMenus =
{
 _level = _this select 0;

 switch (_level) do
 {
   case 0: { { ctrlShow [_x, false] } forEach PUM3_MenuControls0+PUM3_MenuControls1+PUM3_MenuControls2 };
   case 1: { { ctrlShow [_x, false] } forEach PUM3_MenuControls1+PUM3_MenuControls2 };
   case 2: { { ctrlShow [_x, false] } forEach PUM3_MenuControls2 };
 };  
};
//----------------------
PUM3_ShowMenu =
{
 [
   _this,
   ["_Params", PUM3_Params]
 ] call PUM3_ProcessMenu;
};
//----------------------
PUM3_ClickButton =
{
//== DISABLESERIALIZATION ==//
disableSerialization;
 _IDC = _this select 0;

 _MenuControls = [];
 if (_IDC in PUM3_MenuControls0) then { PUM3_Level = 1 };
 if (_IDC in PUM3_MenuControls1) then { PUM3_Level = 2 };
 if (_IDC in PUM3_MenuControls2) then { PUM3_Level = 3 };

 _MenuControls = PUM3_MenuControlsList select (PUM3_Level-1);
 [PUM3_Level] call PUM3_HideMenus;

 // restore color of all menu items in selected menu back to default text color
 {
 //== DISABLESERIALIZATION ==//
disableSerialization;
   _ctrl = PUM3_display displayCtrl _x;
   _ctrl ctrlSetTextColor [1,1,1,1]; // Dlg_Color_white // Dlg_ColorScheme_3DControlText;
  //== DISABLESERIALIZATION ==//
disableSerialization;
 } forEach _MenuControls;
 //== DISABLESERIALIZATION ==//
disableSerialization;
 // mark selected menu item in special color
 _ctrl = PUM3_display displayCtrl _IDC;
   //== DISABLESERIALIZATION ==//
disableSerialization;
 _ctrl ctrlSetTextColor [0.253906,0.410156,0.878906,1]; // Dlg_Color_RoyalBlue // Dlg_ColorScheme_CaptionBackground;
 //_ctrl ctrlSetBackgroundColor [1, 0, 0, 1]; // doesn't work
};
//----------------------
PUM3_ReplaceCommonParams =
{
 _action = _this select 0;

 _MapClickParams = ["MapClickParams", PUM3_Params, []] call fn_GetParamByName;
 //player sidechat format["MapClickParams=%1", _MapClickParams]; // debug

 _MapClickPos = ["Pos", _MapClickParams, [0,0,0]] call fn_GetParamByName;
 _MapClickUnits = ["Units", _MapClickParams, []] call fn_GetParamByName;
 _MapClickShift = ["Shift", _MapClickParams, false] call fn_GetParamByName;
 _MapClickAlt = ["Alt", _MapClickParams, false] call fn_GetParamByName;
 _MapClickPosGridRef = [_MapClickPos] call fn_GridRefCoords;

 _CurrentWaypoints = waypoints player;
 _CurrentWaypointPos = [0,0,0];
 // TODO: Since there is no GetCurrentWaypoint command yet, we'll have to assume which one is the current one.
 if (count _CurrentWaypoints > 1) then 
 {
   _CurrentWaypoint = _CurrentWaypoints select 1; // TODO: Change this to GetCurrentWaypoint when available or manually maintained global variable.
   _CurrentWaypointPos = WaypointPosition _CurrentWaypoint;
   //player groupChat format["Curr WP=%1", _CurrentWaypointPos]; // debug
 };
 _CurrentWaypointGridRef = [_CurrentWaypointPos] call fn_GridRefCoords;

 _MapOrPlayerPos = _MapClickPos;
 if (format["%1", _MapOrPlayerPos] == "[0,0,0]") then { _MapOrPlayerPos = position player };
 _MapOrPlayerGridRef = [_MapOrPlayerPos] call fn_GridRefCoords;

 _action = format[_action, 
   /* %1 */ position player,
   /* %2 */ [position player] call fn_GridRefCoords,
   /* %3 */ _MapClickPos, 
   /* %4 */ _MapClickPosGridRef,
   /* %5 */ _MapOrPlayerPos,
   /* %6 */ _MapOrPlayerGridRef,
   /* %7 */ _CurrentWaypointPos,
   /* %8 */ _CurrentWaypointGridRef,
   ""
 ];
 if (_action == "-") then {
   _action = "------------------------------------------------------------" };
 _action;
};
//----------------------
PUM3_ProcessMenu =
{
//== DISABLESERIALIZATION ==//
disableSerialization;
 _MenuName = ["MenuName", _this, "MainMenu"] call fn_GetParamByName;
 _Params = ["_Params", _this, []] call fn_GetParamByName;
 //player sidechat format["ProcessMenu params=%1", _Params]; // debug

 _Menu = [_MenuName, _Params, []] call fn_GetParamByName;

 _MenuControls = PUM3_MenuControlsList select PUM3_Level;

 // Setup caption
 _IDC_CaptionControl = _MenuControls select 0;
 _caption = ["Caption", _Menu, "Menu"] call fn_GetParamByName;
 _caption = [_caption] call PUM3_ReplaceCommonParams;
 ctrlSetText [_IDC_CaptionControl, _caption];
 ctrlShow [_IDC_CaptionControl, true];

 // Setup menu items
 _items = ["Items", _Menu, "Menu"] call fn_GetParamByName;
 _i = 0;
 {
    //== DISABLESERIALIZATION ==//
disableSerialization;
   _IDC = _x;
   _ctrl = PUM3_display displayCtrl _IDC;
 //== DISABLESERIALIZATION ==//
disableSerialization;
   /*
   // set new X offset pos
   _pos = ctrlPosition _ctrl;
   _newX = PUM3_dlg_x + (PUM3_dlg_wid * PUM3_Level);
   _ctrl ctrlSetPosition [_newX, _pos select 1, _pos select 2, _pos select 3];
   //player sidechat format["_x=%1 %2", _i, _items];
   */

   if (_i > 0) then
   {
     ctrlShow [_IDC, false];
     _ctrl ctrlSetTextColor [1,1,1,1]; // Dlg_Color_white // Dlg_ColorScheme_3DControlText;
   };

   // set menu item caption and action
   if (typeName _items == "ARRAY") then
   {
     if (_i > 0 && count _items >= _i) then
     {
       _item = _items select (_i - 1);
       //player sidechat format["_Item %1=%2", _i, _Item]; // debug

       if (count _item > 0) then
       {
         //if (_i == 1) then { ctrlSetFocus _ctrl };

         _caption = ["Item", _item, ""] call fn_GetParamByName;
         _separator = (_caption == "-");
         _caption = [_caption] call PUM3_ReplaceCommonParams;
         ctrlSetText [_IDC, _caption];
         //player sidechat format["_cap %1=%2", _i, _caption]; // debug

         _SubMenuName = ["SubMenu", _item, ""] call fn_GetParamByName;
         //player sidechat format["_SubMenuName %1='%2'=%3", _i, _SubMenuName, _Item]; // debug
         _Close = ["Close", _item, true] call fn_GetParamByName;
         if (_SubMenuName != "") then // SubMenu overrides Close
         { 
           _Close = false 
         };

         _action = ["Action", _item, ""] call fn_GetParamByName;
         if (typeName _action == "CODE") then
         {
           _action = format["%1", _action];
         };
         _action = format["[%1] call PUM3_ClickButton; %2", _IDC, _action];
         if (_SubMenuName != "") then 
         {
           _action = format["%2; ['MenuName', '%1'] call PUM3_ShowMenu", _SubMenuName, _action];
           //player sidechat format["_SubMenuName=%1; %2", _SubMenuName, _action]; // debug
         };
         if (_Close) then
         {
           _action = format["%1; [] call PUM3_Exit", _action];
         };

         _action = [_action] call PUM3_ReplaceCommonParams;

         buttonSetAction [_IDC, _action];
         //player sidechat format["_act %1=%2=%3", _i, typeName _action, _action]; // debug

         _Default = ["Default", _item, false] call fn_GetParamByName;
         if (_Default) then
         {
           ctrlSetFocus _ctrl; // doesn't work for buttons?
         };

         ctrlShow [_IDC, true];
         ctrlEnable [_IDC, true];

         _Enabled = ["Enabled", _item, true] call fn_GetParamByName;
         if (_separator) then { _Enabled = false };
         ctrlEnable [_IDC, _Enabled];

         _Hint = ["Hint", _item, ""] call fn_GetParamByName;
         if (_Hint != "") then 
         {
           _ctrl ctrlSetToolTip _Hint;
         };
       };
     };
   };
   _i = _i + 1;

   _ctrl ctrlCommit 0; // commits ctrlSetPosition
 } forEach _MenuControls;
};
//----------------------
PUM3_Main =
{
//== DISABLESERIALIZATION ==//
disableSerialization;
 //_Params = _this;
 //player sidechat format["Start params=%1", _Params]; // debug
 PUM3_Level = 0;
 [0] call PUM3_HideMenus;

 ["MenuName", "MainMenu"] call PUM3_ShowMenu;
 //== DISABLESERIALIZATION ==//
disableSerialization;
 PUM3_display displaySetEventHandler["Unload", "call PUM3_OnClose"];
 //== DISABLESERIALIZATION ==//
disableSerialization;
 _MapClickParams = ["MapClickParams", PUM3_Params, []] call fn_GetParamByName;
 _MapClickPos = ["Pos", _MapClickParams, position player] call fn_GetParamByName;
 _MarkerName = "m_MapClickCommandMenu";

 _marker = createMarkerLocal [_MarkerName, _MapClickPos];
 _MarkerName setMarkerShape "ICON";
 _MarkerName setMarkerType "dot";
 _MarkerName setMarkerText "";
 _MarkerName setMarkerColor "ColorBlue";
 _MarkerName setMarkerSize [0.3, 0.3];
 _MarkerName setMarkerPos _MapClickPos;
};
//-----------------------------------------------------------------------------
// Init
//-----------------------------------------------------------------------------

_ok = createDialog "PUM3_PopupMenuDialog";
if !(_ok) exitWith { hint "createDialog failed" };
 //== DISABLESERIALIZATION ==//
disableSerialization;
PUM3_display = findDisplay PUM3_IDD_PopupMenuDialog;
_closeDialog = format["closeDialog %1", PUM3_IDD_PopupMenuDialog];
 //== DISABLESERIALIZATION ==//
disableSerialization;
PUM3_Params = _this;
//["PopupMenu.sqf", PUM3_Params] call fn_DebugAppend; // debug
PUM3_Params call PUM3_Main;

//== DISABLESERIALIZATION ==//
disableSerialization;

And in CreatePopupMenu.sqf here what i have :

CreatePopupMenu.sqf :

// Desc: A sample menu array structure definition, for use by PopupMenu.sqf.
// Concept By: Dr Eyeball
// Version: 1.1 (May 2007)
//-----------------------------------------------------------------------------
// Notes: Avoid using "format" command inside a caption, Item or Action string, since PopUpMenu will call PUM3_ReplaceCommonParams for parameter substitution.
//-----------------------------------------------------------------------------
private ["_MapClickPos", "_MapClickUnits", "_MapClickShift", "_MapClickAlt"];

//== DISABLESERIALIZATION ==//
disableSerialization;
//-----------------------------------------------------------------------------
// Get MapClick params
_MapClickParams = ["MapClickParams", _this, []] call fn_GetParamByName;

_MapClickPos = ["Pos", _MapClickParams, [0,0,0]] call fn_GetParamByName;
_MapClickUnits = ["Units", _MapClickParams, []] call fn_GetParamByName;
_MapClickShift = ["Shift", _MapClickParams, false] call fn_GetParamByName;
_MapClickAlt = ["Alt", _MapClickParams, false] call fn_GetParamByName;
//-----------------------------------------------------------------------------
// Get Action menu params
_ActionParams = ["ActionParams", _this, []] call fn_GetParamByName;

_ActionUnit = ["Unit", _ActionParams, objNull] call fn_GetParamByName;
_ActionCaller = ["Caller", _ActionParams, objNull] call fn_GetParamByName;
_ActionID = ["ID", _ActionParams, -1] call fn_GetParamByName;
_ActionParams = ["Params", _ActionParams, []] call fn_GetParamByName;
//-----------------------------------------------------------------------------
// Determine "Enabled" status of several menu items
_InAVehicle = [vehicle player] call fn_IsVehicle;

_pos = LCS9_CurrentTransportRequest select 0;
_RequestPickUpEnabled = format['%1', _pos] == '[0,0,0]';
_CancelRequestPickUpEnabled = format['%1', _pos] != '[0,0,0]';
_MapClickEnabled = (count _MapClickParams > 0) && (count _MapClickPos > 0) && (format["%1", _MapClickPos] != "[0,0,0]");

_HumanPlayersCount = 0; { if (IsPlayer _x) then { _HumanPlayersCount = _HumanPlayersCount + 1 }; } forEach units player;
_IsGroupLeader = (local player) && (leader player == player);
_GroupLeaderEnabled = _IsGroupLeader && (count units player > 1);
_HumanGroupLeaderEnabled = _IsGroupLeader && (count units player > 1) && (_HumanPlayersCount > 1);
//-----------------------------------------------------------------------------
// Create player list

// TODO: Fill array with real player list
PlayerList_MenuArray = 
[
 [ ["Item", "Dr Eyeball"], 
   ["Action", "player globalChat 'type: #vote admin [TOG] Dr Eyeball'"]
 ],
 [ ["Item", "The Terminator"], 
   ["Action", ""]
 ],
 [ ["Item", "Prince Charles"], 
   ["Action", ""]
 ],
 [ ["Item", "Mr Munchkin"], 
   ["Action", ""] 
 ]
];
//-----------------------------------------------------------------------------
// create TeamStatusAction - auto detect vehicle
_TeamStatusAction = "[0,player,0,['Group']] execVM 'TeamStatusDialog\TeamStatusDialog.sqf'";
//player sidechat format["ActionUnit=%1,%2", _ActionUnit, vehicleVarName _ActionUnit]; // debug
if (count _ActionParams > 0 && [_ActionUnit] call fn_IsVehicle) then
{
 // Requires Team Status Dialog v1.1
 _TeamStatusAction = format["[0,player,0,[['VehicleObject', '%1'], 'Vehicle']] execVM 'TeamStatusDialog\TeamStatusDialog.sqf'", _ActionUnit];
};
//-----------------------------------------------------------------------------
// Set "WP" enabled states
_Fake_CurrentWaypointId = 0;

_HasCurrentWaypoint = (_Fake_CurrentWaypointId > 0);

_WP1Exists = (count waypoints player > 1);
_WP2Exists = (count waypoints player > 2);
_WP3Exists = (count waypoints player > 3);
_WP4Exists = (count waypoints player > 4);
_WP5Exists = (count waypoints player > 5);
_WP6Exists = (count waypoints player > 6);
//-----------------------------------------------------------------------------
// Create "acknowledge pick-up" list

PickUpList_MenuArray = 
[
 // Sample only - script code removed
 [ ["Item", "ack, byWho, time, [pos]->[pos2], playerName, vehicle, purpose"], 
   ["Action", ""]
 ]
];
PickUpWaypointList_MenuArray = 
[
 // Sample only - script code removed
 [ ["Item", "Add pick-up waypoint ID x8: playerName, [pos]->[pos2]"], 
   ["Action", "nul=[1, %3] execVM 'Scripts\LCS\SetWaypoint.sqf'" ], 
   ["Enabled", true ] 
 ]
];

// script code removed
// ...

if (count PickUpList_MenuArray == 0) then
{
 PickUpList_MenuArray = 
 [
   [ ["Item", "None"], 
     ["Action", ""],
     ["Enabled", false]
   ]
 ];
};
if (count PickUpWaypointList_MenuArray == 0) then
{
 PickUpWaypointList_MenuArray =
   [
     [ ["Item", "None"], 
       ["Action", ""],
       ["Enabled", false]
     ]
   ];
};

//player sideChat format["%1", PickUpList_MenuArray]; // debug
//player sideChat format["%1", G_LCS9_TransportRequests]; // debug
//-----------------------------------------------------------------------------
//== DISABLESERIALIZATION ==//
disableSerialization;
_MenuStructureArray =
[
 //_MapClickParams,
 ["MapClickParams",
   [
     ["Pos", _MapClickPos],
     ["Units",_MapClickUnits],
     ["Shift", _MapClickShift],
     ["Alt", _MapClickAlt]
   ]
 ],

 //_ActionParams,

 ["MainMenu",
   [
     ["Caption", "Vendor System"],
     ["Items",
       [
         [ ["Item", "Weapon West >"], ["SubMenu", "Weapon"] ],
         [ ["Item", "Ammo West >"], ["SubMenu", "Ammo"] ],
         [ ["Item", "Vehicle West >"], ["SubMenu", "Vehicle"] ],
	  [ ["Item", "Food >"], ["SubMenu", "Food"] ],
         [ ["Item", "Close Menu"],
           ["Close", true],
           ["Default", true]
         ]
       ]
     ]
   ]
 ],

 ["Weapon",
   [
     ["Caption", "Weapon West"],
     ["Items",
       [
         [ ["Item", "Launcher >"], ["SubMenu", "LauncherWest"] ],
	  [ ["Item", "Machine Gun >"], ["SubMenu", "MachineGunWest"] ],
	  [ ["Item", "Rifle >"], ["SubMenu", "RifleWest"] ],
	  [ ["Item", "Rifle SD >"], ["SubMenu", "RifleSDWest"] ],
	  [ ["Item", "Sniper >"], ["SubMenu", "SniperWest"] ],
	  [ ["Item", "Sniper SD >"], ["SubMenu", "SniperSDWest"] ],
	  [ ["Item", "Pistol >"], ["SubMenu", "PistolWest"] ],
	  [ ["Item", "Pistol SD >"], ["SubMenu", "PistolSDWest"] ]
       ] 
     ]		
   ]
 ],

 ["PistolSDWest",
   [
     ["Caption", "West Pistol SD"],
     ["Items",
       [
        [ ["Item", "Buy USP SD - 25$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\ACE_USPSD.sqf'"], ["Close", false] ]
       ] 
     ]		
   ]
 ], 



 ["PistolWest",
   [
     ["Caption", "West Pistol"],
     ["Items",
       [
        [ ["Item", "Buy Sig Mauser P226 - 25$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\ACE_P226.sqf'"], ["Close", false] ],
	 [ ["Item", "Buy USP Tactical - 25$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\ACE_USP.sqf'"], ["Close", false] ],
	 [ ["Item", "Buy Glock 18 - 25$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\ACE_Glock18.sqf'"], ["Close", false] ]
       ] 
     ]		
   ]
 ], 


 ["SniperSDWest",
   [
     ["Caption", "West Sniper SD"],
     ["Items",
       [
         [ ["Item", "Buy Mk12 SPR SD - 100$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\ACE_M4SPR_SD.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy M110 SD - 170$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\ACE_M110_SD.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy TAC50 SD - 170$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\ACE_TAC50_SD.sqf'"], ["Close", false] ]
       ] 
     ]		
   ]
 ], 


 ["SniperWest",
   [
     ["Caption", "West Sniper"],
     ["Items",
       [
	 [ ["Item", "Buy M24 - 70$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\M24.sqf'"], ["Close", false] ],
        [ ["Item", "Buy M40A3 - 80$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\M40A3.sqf'"], ["Close", false] ],
	 [ ["Item", "Buy DMR - 100$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\DMR.sqf'"], ["Close", false] ],
	 [ ["Item", "Buy M109 - 150$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\ACE_M109.sqf'"], ["Close", false] ],
	 [ ["Item", "Buy M110 - 150$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\ACE_M110.sqf'"], ["Close", false] ],
	 [ ["Item", "Buy TAC50 - 150$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\ACE_TAC50.sqf'"], ["Close", false] ],
	 [ ["Item", "Buy M107 - 150$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\M107.sqf'"], ["Close", false] ]
       ] 
     ]		
   ]
 ],


 ["RifleSDWest",
   [
     ["Caption", "West Rifle SD"],
     ["Items",
       [
         [ ["Item", "Buy HK416 D10RS SD ACG - 100$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\ACE_HK416_D10_COMPM3_SD.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy M4A1 RCO SD - 100$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\ACE_M4A1_ACOG_SD.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy M4A1 ShortDot SD - 100$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\ACE_SOC_M4A1_SHORTDOT_SD.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy G36 SD - 100$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\G36_C_SD_Eotech.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy M4A1 Camo SD - 100$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\M4A1_AIM_SD_CAMO.sqf'"], ["Close", false] ]
       ] 
     ]		
   ]
 ],


  ["RifleWest",
   [
     ["Caption", "West Rifle"],
     ["Items",
       [ 
	  [ ["Item", "Buy UMP 45 - 90$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\ACE_UMP45.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy M16A2 - 90$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\M16A2.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy M16A4 - 90$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\M16A4.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy HK416 D10RS ACG - 90$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\ACE_HK416_D10_COMPM3.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy M4A1 - 90$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\M4A1.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy M8_SAW - 90$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\M8_SAW.sqf'"], ["Close", false] ],
         [ ["Item", "Buy M16A4_ACG - 100$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\M16A4_ACG.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy M4A1 ShortDot - 100$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\ACE_SOC_M4A1_SHORTDOT.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy M4A1 Holo Socom - 100$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\ACE_SOC_M4A1_Eotech.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy M4A1 CCO - 100$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\M4A1_AIM.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy G36a - 100$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\G36a.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy M4A1 M203 ACG - 120$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\M4A1_RCO_GL.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy M4A1 M203 ACG Camo - 120$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\ACE_SOC_M4A1_RCO_GL.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy G36 GL Camo - 120$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\ACE_G36A1_AG36A1_D.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy HK416 D14RS GL - 120$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\ACE_HK416_D14_COMPM3_M320.sqf'"], ["Close", false] ]
       ] 
     ]		
   ]
 ],

  ["MachineGunWest",
   [
     ["Caption", "West Machine Gun"],
     ["Items",
       [
         [ ["Item", "Buy MG36 - 90$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\MG36.sqf'"], ["Close", false] ],
         [ ["Item", "Buy M249 Para ACG - 100$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\ACE_M249_PIP_ACOG.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy M240 - 100$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\M240.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy Mk 48 Mod - 100$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\Mk_48.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy M249 - 100$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\M249.sqf'"], ["Close", false] ]
       ] 
     ]		
   ]
 ],

  ["LauncherWest",
   [
     ["Caption", "West Launcher"],
     ["Items",
       [
         [ ["Item", "Buy M136 - 75$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\M136.sqf'"], ["Close", false] ],
         [ ["Item", "Buy SMAW - 150$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\SMAW.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy Javelin - 150$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\Javelin.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy M32 - 150$"], ["Action", "nul=execVM 'VENDOR\WEAPON\WEST\ACE_M32.sqf'"], ["Close", false] ]
       ] 
     ]		
   ]
 ],





 //========================================================================================================================//

 ["Ammo",
   [
     ["Caption", "Ammo West"],
     ["Items",
       [
         [ ["Item", "Launcher Ammo >"], ["SubMenu", "LauncherAmmo"] ],
         [ ["Item", "Machine Gun Ammo >"], ["SubMenu", "MachineGunAmmo"] ],
	  [ ["Item", "Rifle Ammo >"], ["SubMenu", "RifleAmmo"] ],
         [ ["Item", "Rifle SD Ammo >"], ["SubMenu", "RifleSDAmmo"] ],
	  [ ["Item", "Sniper Ammo >"], ["SubMenu", "SniperAmmo"] ],
         [ ["Item", "Sniper SD Ammo >"], ["SubMenu", "SniperSDAmmo"] ],
	  [ ["Item", "Pistol Ammo >"], ["SubMenu", "PistolAmmo"] ],
         [ ["Item", "Pistol SD Ammo >"], ["SubMenu", "PistolSDAmmo"] ],
	  [ ["Item", "Grenade >"], ["SubMenu", "Grenade"] ],
         [ ["Item", "Explosive >"], ["SubMenu", "Explosive"] ]
       ]        
     ]
   ]
 ],


 ["LauncherAmmo",
   [
     ["Caption", "Launcher Ammo West"],
     ["Items",
       [
         [ ["Item", "Buy Ammo. M136 - 20$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\M136.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy Ammo. SMAW_HEAA - 50$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\SMAW_HEAA.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy Ammo. SMAW_HEDP - 50$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\SMAW_HEDP.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy Ammo. Javelin - 50$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\Javelin.sqf'"], ["Close", false] ]
       ]        
     ]
   ]
 ],

   ["MachineGunAmmo",
   [
     ["Caption", "MG Ammo West"],
     ["Items",
       [
          [ ["Item", "Buy Ammo. MG36 - 40$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\100Rnd_556x45_BetaCMag.sqf'"], ["Close", false] ],
	   [ ["Item", "Buy Ammo. M240 And Mk 48 - 40$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\100Rnd_762x51_M240.sqf'"], ["Close", false] ],
	   [ ["Item", "Buy Ammo. M249 - 60$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\200Rnd_556x45_M249.sqf'"], ["Close", false] ]
       ]        
     ]
   ]
 ],

     ["RifleAmmo",
   [
     ["Caption", "Rifle Ammo West"],
     ["Items",
       [
        [ ["Item", "Buy Ammo. UMP 45 - 20$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\ACE_25Rnd_1143x23_B_UMP45.sqf'"], ["Close", false] ],
	 [ ["Item", "Buy Ammo. 30Rnd_556x45_Stanag - 20$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\30Rnd_556x45_Stanag.sqf'"], ["Close", false] ],
	 [ ["Item", "Buy Ammo. M8 SAW And G36 - 30$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\30Rnd_556x45_G36.sqf'"], ["Close", false] ]
       ]        
     ]
   ]
 ],

    ["RifleSDAmmo",
   [
     ["Caption", "Rifle SD Ammo West"],
     ["Items",
       [
         [ ["Item", "Buy Ammo. 30Rnd_556x45_StanagSD - 30$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\30Rnd_556x45_StanagSD.sqf'"], ["Close", false] ]
       ]        
     ]
   ]
 ],

      ["SniperAmmo",
   [
     ["Caption", "Sniper Ammo West"],
     ["Items",
       [
         [ ["Item", "Buy Ammo. M24 And M40A3 - 10$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\5Rnd_762x51_M24.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy Ammo. M109 - 20$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\ACE_5Rnd_25x59_HEDP_Barrett.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy Ammo. M110 - 20$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\ACE_20Rnd_762x51_S_M110.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy Ammo. 20Rnd_762x51_DMR - 20$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\20Rnd_762x51_DMR.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy Ammo. M107 - 20$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\10Rnd_127x99_m107.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy Ammo. TAC50 - 20$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\ACE_5Rnd_127x99_B_TAC50.sqf'"], ["Close", false] ]
       ]        
     ]
   ]
 ],


      ["SniperSDAmmo",
   [
     ["Caption", "Sniper SD Ammo West"],
     ["Items",
       [
	  [ ["Item", "Buy Ammo. TAC50 SD - 20$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\ACE_5Rnd_127x99_S_TAC50.sqf.sqf'"], ["Close", false] ],
         [ ["Item", "Buy Ammo. M110 SD - 20$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\ACE_20Rnd_762x51_SB_M110.sqf'"], ["Close", false] ]
       ]        
     ]
   ]
 ],

        ["PistolAmmo",
   [
     ["Caption", "Pistol Ammo West"],
     ["Items",
       [
         [ ["Item", "Buy Ammo. SIG P226 - 5$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\ACE_15Rnd_9x19_P226.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy Ammo. Glock 18 - 5$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\ACE_33Rnd_9x19_G18.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy Ammo. USP Tactical - 5$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\ACE_12Rnd_45ACP_USP.sqf'"], ["Close", false] ]
       ]        
     ]
   ]
 ],

          ["PistolSDAmmo",
   [
     ["Caption", "Pistol SD Ammo West"],
     ["Items",
       [
          [ ["Item", "Buy Ammo. USP SD - 5$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\ACE_12Rnd_45ACP_USPSD.sqf'"], ["Close", false] ]
       ]        
     ]
   ]
 ],


           ["Grenade",
   [
     ["Caption", "Grenade West"],
     ["Items",
       [
         [ ["Item", "Buy Red Smoke Grenade - 5$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\SmokeShellRed.sqf'"], ["Close", false] ],
         [ ["Item", "Buy Purple Smoke Grenade - 5$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\SmokeShellPurple.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy Smoke Grenade - 5$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\SmokeShell.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy Green Smoke Grenade - 5$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\SmokeShellGreen.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy 1Rnd_Smoke_M203 - 5$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\1Rnd_Smoke_M203.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy 1Rnd_SmokeRed_M203 - 5$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\1Rnd_SmokeRed_M203.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy FlashBang - 10$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\ACE_Flashbang.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy Grenade Phosphore - 10$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\ACE_M34.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy Grenade Lacrymogene - 10$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\ACE_M7A3.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy American Grenade - 10$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\HandGrenade_West.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy Ammo. M203 HE - 25$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\G_40mm_HE.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy HuntIR Round - 25$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\ACE_HuntIR_M203.sqf'"], ["Close", false] ]
       ]        
     ]
   ]
 ],

         ["Explosive",
   [
     ["Caption", "Explosive West"],
     ["Items",
       [
        [ ["Item", "Buy Satchel - 20$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\PipeBomb.sqf'"], ["Close", false] ],
	  [ ["Item", "Buy C4 - 20$"], ["Action", "nul=execVM 'VENDOR\AMMO\WEST\ACE_C4_M.sqf'"], ["Close", false] ]
       ]        
     ]
   ]
 ],


   //========================================================================================================================//


 ["Vehicle",
   [
     ["Caption", "Vehicle West"],
     ["Items",
       [
         [ ["Item", "Air Vehicle >"], ["SubMenu", "AirVehicle"] ],
         [ ["Item", "Ground Vehicle >"], ["SubMenu", "GroundVehicle"] ]
       ]       
     ]
   ]
 ],

 ["AirVehicle",
   [
     ["Caption", "Air Vehicle West"],
     ["Items",
       [
        [ ["Item", "Buy Mi17_Civilian - 500$"], ["Action", "nul=execVM 'VENDOR\VEHICLE\AIRVEHICLE\WEST\Mi17_Civilian.sqf'"], ["Close", false] ],
        [ ["Item", "Buy MH60S - 1000$"], ["Action", "nul=execVM 'VENDOR\VEHICLE\AIRVEHICLE\WEST\MH60S.sqf'"], ["Close", false] ],
	 [ ["Item", "Buy UH-1Y - 1200$"], ["Action", "nul=execVM 'VENDOR\VEHICLE\AIRVEHICLE\WEST\UH1Y.sqf'"], ["Close", false] ],
	 [ ["Item", "Buy AH1Z - 4000$"], ["Action", "nul=execVM 'VENDOR\VEHICLE\AIRVEHICLE\WEST\AH1Z.sqf'"], ["Close", false] ],
	 [ ["Item", "Buy F35B - 5000$"], ["Action", "nul=execVM 'VENDOR\VEHICLE\AIRVEHICLE\WEST\F35B.sqf'"], ["Close", false] ]
       ]        
     ]
   ]
 ],

   ["GroundVehicle",
   [
     ["Caption", "Ground Vehicle West"],
     ["Items",
       [
        [ ["Item", "Buy UralCivil - 100$"], ["Action", "nul=execVM 'VEHICLE\GROUNDVEHICLE\WEST\UralCivil.sqf'"], ["Close", false] ],
        [ ["Item", "Buy MTVR - 200$"], ["Action", "nul=execVM 'VEHICLE\GROUNDVEHICLE\WEST\MTVR.sqf'"], ["Close", false] ],
	 [ ["Item", "Buy HMMWV MK19 - 950$"], ["Action", "nul=execVM 'VEHICLE\GROUNDVEHICLE\WEST\HMMWV_MK19.sqf'"], ["Close", false] ],
	 [ ["Item", "Buy AAVP7A1 - 2500$"], ["Action", "nul=execVM 'VEHICLE\GROUNDVEHICLE\WEST\AAV.sqf'"], ["Close", false] ],
	 [ ["Item", "Buy M1A1 - 3500$"], ["Action", "nul=execVM 'VEHICLE\GROUNDVEHICLE\WEST\M1A1.sqf'"], ["Close", false] ],
	 [ ["Item", "Buy M270 MLRS - 5000$"], ["Action", "nul=execVM 'VEHICLE\GROUNDVEHICLE\WEST\MLRS.sqf'"], ["Close", false] ]
       ]        
     ]
   ]
 ],

     ["Food",
   [
     ["Caption", "Food"],
     ["Items",
       [
	 [ ["Item", "Buy Food Ration"], ["Action", "nul=execVM 'VENDOR\FOOD\x_Food.sqf'"], ["Close", false] ],
	 [ ["Item", "Buy Water Ration"], ["Action", "nul=execVM 'VENDOR\FOOD\x_Water.sqf'"], ["Close", false] ]
       ]        
     ]
   ]
 ],


 ["PlayerList",
   [
     ["Caption", "Player List"],
     ["Items", PlayerList_MenuArray]
   ]
 ]

];
//== DISABLESERIALIZATION ==//
disableSerialization;
//["CreatePopupMenu.sqf", _MenuStructureArray] call fn_DebugAppend; // debug
nul=_MenuStructureArray execVM "Dialogs\Common\PopupMenu.sqf";
//-----------------------------------------------------------------------------

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×