miguel93041 0 Posted June 25, 2016 Im having a problem where the action in the button is not working with this select 0 on calli have maded this:fn_creardialogo_style = _this select 0;_caller = _this select 1;_position = _this select 3;_cursorTarget = cursorTarget;_backpack = backpack _cursorTarget;_vest = vest _cursorTarget;_veh = vehicle player;//_control1 = (findDisplay 999) displayCtrl 01;//_control2 = (findDisplay 999) displayCtrl 02;//_control3 = (findDisplay 999) displayCtrl 03;//_control4 = (findDisplay 999) displayCtrl 04;//_control5 = (findDisplay 999) displayCtrl 05;//_control6 = (findDisplay 999) displayCtrl 06;//_control7 = (findDisplay 999) displayCtrl 07;//_control8 = (findDisplay 999) displayCtrl 08;switch (_style) do{CASE "MAIN": {closeDialog 0;createDialog "ISLAND_DIALOG";_control5 = (findDisplay 999) displayCtrl 05;_control5 ctrlSetText "PRINCIPAL";_control5 buttonSetAction "[""INFO""]call life_fnc_crearDialogo"; <--- NOT WORKING, when you click it the button is creating the ISLAND_DIALOG but is not doing the case info, the text dont appear etc.};CASE "INFO": {closeDialog 0;createDialog "ISLAND_DIALOG";_control5 = (findDisplay 999) displayCtrl 05;_control5 ctrlSetText "INFORMACION";_control5 buttonSetAction "[""POLO""]call life_fnc_crearDialogo";};};So when i press the button it dont open the info dialog. But when i type in the debug console: ["INFO"] call life_fnc_creardialogo; IT WORKS, i dont know why is this happening i think its for the """" on the select 0 WHEN IN THE DEBUG CONSOLE YOU EXECUTE THE "MAIN" MENU: https://gyazo.com/6d363340f013b3354af41c81ebcb6e66| https://gyazo.com/7513ac4851bade1b6d94426c445b4fc6 WHEN YOU PRESS THE INFO (INFORMACION) BUTTON: https://gyazo.com/4395b1ebe5b35fdcea7ce8618113388e WHEN IN THE DEBUG CONSOLE YOU EXECUTE THE "INFO" MENU: https://gyazo.com/60440d1bef11e82e0c3b980443d12a1b| https://gyazo.com/e40fe3a54b2458799e98b7a612d99a58 Share this post Link to post Share on other sites
bull_a 44 Posted June 28, 2016 What is needed: - A full copy of the definition classes and the dialog class. - A full outlook of the script file that is being call/executed. 1 Share this post Link to post Share on other sites
miguel93041 0 Posted July 1, 2016 What is needed: - A full copy of the definition classes and the dialog class. - A full outlook of the script file that is being call/executed. The dialog where all the class are #define ST_LEFT 0x00 #define ST_MULTI 0x10 #define GUI_GRID_CENTER_WAbs ((safezoneW / safezoneH) min 1.2) #define GUI_GRID_CENTER_HAbs (GUI_GRID_CENTER_WAbs / 1.2) #define GUI_GRID_CENTER_W (GUI_GRID_CENTER_WAbs / 40) #define GUI_GRID_CENTER_H (GUI_GRID_CENTER_HAbs / 25) #define GUI_GRID_CENTER_X (safezoneX + (safezoneW - GUI_GRID_CENTER_WAbs)/2) #define GUI_GRID_CENTER_Y (safezoneY + (safezoneH - GUI_GRID_CENTER_HAbs)/2) class Life_Checkbox { access = 0; // Control access (0 - ReadAndWrite, 1 - ReadAndCreate, 2 - ReadOnly, 3 - ReadOnlyVerified) idc = -1; // Control identification (without it, the control won't be displayed) type = 77; // Type style = ST_LEFT + ST_MULTI; // Style default = 0; // Control selected by default (only one within a display can be used) blinkingPeriod = 0; // Time in which control will fade out and back in. Use 0 to disable the effect. x = 0; y = 0; w = 1 * GUI_GRID_CENTER_W; // Width h = 1 * GUI_GRID_CENTER_H; // Height //Colors color[] = { 1, 1, 1, 0.7 }; // Texture color colorFocused[] = { 1, 1, 1, 1 }; // Focused texture color colorHover[] = { 1, 1, 1, 1 }; // Mouse over texture color colorPressed[] = { 1, 1, 1, 1 }; // Mouse pressed texture color colorDisabled[] = { 1, 1, 1, 0.2 }; // Disabled texture color //Background colors colorBackground[] = { 0, 0, 0, 0 }; // Fill color colorBackgroundFocused[] = { 0, 0, 0, 0 }; // Focused fill color colorBackgroundHover[] = { 0, 0, 0, 0 }; // Mouse hover fill color colorBackgroundPressed[] = { 0, 0, 0, 0 }; // Mouse pressed fill color colorBackgroundDisabled[] = { 0, 0, 0, 0 }; // Disabled fill color //Textures textureChecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa"; //Texture of checked CheckBox. textureUnchecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa"; //Texture of unchecked CheckBox. textureFocusedChecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa"; //Texture of checked focused CheckBox (Could be used for showing different texture when focused). textureFocusedUnchecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa"; //Texture of unchecked focused CheckBox. textureHoverChecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa"; textureHoverUnchecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa"; texturePressedChecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa"; texturePressedUnchecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa"; textureDisabledChecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa"; textureDisabledUnchecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa"; tooltip = ""; // Tooltip text tooltipColorShade[] = { 0, 0, 0, 1 }; // Tooltip background color tooltipColorText[] = { 1, 1, 1, 1 }; // Tooltip text color tooltipColorBox[] = { 1, 1, 1, 1 }; // Tooltip frame color //Sounds soundClick[] = { "\A3\ui_f\data\sound\RscButton\soundClick", 0.09, 1 }; // Sound played after control is activated in format {file, volume, pitch} soundEnter[] = { "\A3\ui_f\data\sound\RscButton\soundEnter", 0.09, 1 }; // Sound played when mouse cursor enters the control soundPush[] = { "\A3\ui_f\data\sound\RscButton\soundPush", 0.09, 1 }; // Sound played when the control is pushed down soundEscape[] = { "\A3\ui_f\data\sound\RscButton\soundEscape", 0.09, 1 }; // Sound played when the control is released after pushing down }; class Life_RscScrollBar { color[] = {1,1,1,0.6}; colorActive[] = {1,1,1,1}; colorDisabled[] = {1,1,1,0.3}; thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa"; arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa"; arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa"; border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa"; shadow = 0; scrollSpeed = 0.06; width = 0; height = 0; autoScrollEnabled = 1; autoScrollSpeed = -1; autoScrollDelay = 5; autoScrollRewind = 0; }; class Life_RscControlsGroup { type = 15; idc = -1; x = 0; y = 0; w = 1; h = 1; shadow = 0; style = 16; class VScrollBar : Life_RscScrollBar { width = 0.021; autoScrollEnabled = 1; }; class HScrollBar : Life_RscScrollBar { height = 0.028; }; class Controls {}; }; class Life_RscControlsGroupNoScrollbars : Life_RscControlsGroup { class VScrollbar : VScrollbar { width = 0; }; class HScrollbar : HScrollbar { height = 0; }; }; class Life_RscHud { idc = -1; type = 0; style = 0x00; colorBackground[] = { 1 , 1 , 1 , 0 }; colorText[] = { 1 , 1 , 1 , 1 }; font = "PuristaSemibold"; sizeEx = 0.025; h = 0.25; text = ""; }; class Life_RscListNBox { style = 16; type = 102; shadow = 0; font = "PuristaMedium"; sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; color[] = {0.95,0.95,0.95,1}; colorText[] = {1,1,1,1.0}; colorDisabled[] = {1,1,1,0.25}; colorScrollbar[] = {0.95,0.95,0.95,1}; colorSelect[] = {0,0,0,1}; colorSelect2[] = {0,0,0,1}; colorSelectBackground[] = {0.8,0.8,0.8,1}; colorSelectBackground2[] = {1,1,1,0.5}; colorPicture[] = {1,1,1,1}; colorPictureSelected[] = {1,1,1,1}; colorPictureDisabled[] = {1,1,1,1}; soundSelect[] = {"",0.1,1}; soundExpand[] = {"",0.1,1}; soundCollapse[] = {"",0.1,1}; period = 1.2; maxHistoryDelay = 0.5; autoScrollSpeed = -1; autoScrollDelay = 5; autoScrollRewind = 0; class ListScrollBar: Life_RscScrollBar{}; class ScrollBar: Life_RscScrollBar{}; }; class Life_RscText { x = 0; y = 0; h = 0.037; w = 0.3; type = 0; style = 0; shadow = 1; colorShadow[] = {0, 0, 0, 0.5}; font = "PuristaMedium"; SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; text = ""; colorText[] = {1, 1, 1, 1.0}; colorBackground[] = {0, 0, 0, 0}; linespacing = 1; tooltipColorText[] = {1,1,1,1}; tooltipColorBox[] = {1,1,1,1}; tooltipColorShade[] = {0,0,0,0.65}; }; class Life_RscLine : Life_RscText { idc = -1; style = 176; x = 0.17; y = 0.48; w = 0.66; h = 0; text = ""; colorBackground[] = {0, 0, 0, 0}; colorText[] = {1, 1, 1, 1.0}; }; class Life_RscTree { style = 2; font = "PuristaMedium"; sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)"; expandedTexture = "A3\ui_f\data\gui\Rsccommon\Rsctree\expandedTexture_ca.paa"; hiddenTexture = "A3\ui_f\data\gui\Rsccommon\Rsctree\hiddenTexture_ca.paa"; rowHeight = 0.0439091; color[] = {1, 1, 1, 1}; colorSelect[] = {0.7, 0.7, 0.7, 1}; colorBackground[] = {0, 0, 0, 0}; colorSelectBackground[] = {0, 0, 0, 0.5}; colorBorder[] = {0, 0, 0, 0}; borderSize = 0; }; class Life_RscTitle : Life_RscText { style = 0; sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; colorText[] = {0.95, 0.95, 0.95, 1}; }; class life_RscPicture { shadow = 0; type = 0; style = 48; sizeEx = 0.023; font = "PuristaMedium"; colorBackground[] = {}; colorText[] = {}; x = 0; y = 0; w = 0.2; h = 0.15; tooltipColorText[] = {1,1,1,1}; tooltipColorBox[] = {1,1,1,1}; tooltipColorShade[] = {0,0,0,0.65}; }; class Life_RscTextMulti : Life_RscText { linespacing = 1; style = 0 + 16 + 0x200; }; class Life_RscPictureKeepAspect : Life_RscPicture { style = 0x30 + 0x800; }; class Life_RscStructuredText { type = 13; style = 0; x = 0; y = 0; h = 0.035; w = 0.1; text = ""; size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; colorText[] = {1, 1, 1, 1.0}; shadow = 1; class Attributes { font = "PuristaMedium"; color = "#ffffff"; align = "left"; shadow = 1; }; }; class Life_RscActiveText { idc = -1; type = 11; style = 0; x = 0; y = 0; h = 0.037; w = 0.3; sizeEx = 0.040; font = "PuristaLight"; color[] = {1, 1, 1, 1}; colorActive[] = {1, 0.2, 0.2, 1}; soundEnter[] = {"\A3\ui_f\data\sound\onover", 0.09, 1}; soundPush[] = {"\A3\ui_f\data\sound\new1", 0.0, 0}; soundClick[] = {"\A3\ui_f\data\sound\onclick", 0.07, 1}; soundEscape[] = {"\A3\ui_f\data\sound\onescape", 0.09, 1}; action = ""; text = ""; tooltipColorText[] = {1,1,1,1}; tooltipColorBox[] = {1,1,1,1}; tooltipColorShade[] = {0,0,0,0.65}; }; class Life_RscButton { style = 2; x = 0; y = 0; w = 0.095589; h = 0.039216; shadow = 2; font = "PuristaMedium"; sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; colorText[] = {1,1,1,1.0}; colorDisabled[] = {0.4,0.4,0.4,1}; colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",0.7}; colorBackgroundActive[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",1}; colorBackgroundDisabled[] = {0.95,0.95,0.95,1}; offsetX = 0.003; offsetY = 0.003; offsetPressedX = 0.002; offsetPressedY = 0.002; colorFocused[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",1}; colorShadow[] = {0,0,0,1}; colorBorder[] = {0,0,0,1}; borderSize = 0.0; soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter",0.09,1}; soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush",0.09,1}; soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1}; soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape",0.09,1}; }; class Life_RscButtonTextOnly : Life_RscButton { SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)"; colorBackground[] = {1, 1, 1, 0}; colorBackgroundActive[] = {1, 1, 1, 0}; colorBackgroundDisabled[] = {1, 1, 1, 0}; colorFocused[] = {1, 1, 1, 0}; colorShadow[] = {1, 1, 1, 0}; borderSize = 0.0; }; class Life_RscShortcutButton { idc = -1; style = 0; default = 0; shadow = 1; w = 0.183825; h = "((((safezoneW / safezoneH) min 1.2) / 1.2) / 20)"; color[] = {1,1,1,1.0}; colorFocused[] = {1,1,1,1.0}; color2[] = {0.95,0.95,0.95,1}; colorDisabled[] = {1,1,1,0.25}; colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",1}; colorBackgroundFocused[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",1}; colorBackground2[] = {1,1,1,1}; animTextureDefault = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\normal_ca.paa"; animTextureNormal = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\normal_ca.paa"; animTextureDisabled = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\normal_ca.paa"; animTextureOver = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\over_ca.paa"; animTextureFocused = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\focus_ca.paa"; animTexturePressed = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\down_ca.paa"; periodFocus = 1.2; periodOver = 0.8; class HitZone { left = 0.0; top = 0.0; right = 0.0; bottom = 0.0; }; class ShortcutPos { left = 0; top = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 20) - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2"; w = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1) * (3/4)"; h = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; }; class TextPos { left = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1) * (3/4)"; top = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 20) - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2"; right = 0.005; bottom = 0.0; }; period = 0.4; font = "PuristaMedium"; size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; text = ""; soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter",0.09,1}; soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush",0.09,1}; soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1}; soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape",0.09,1}; action = ""; class Attributes { font = "PuristaMedium"; color = "#E5E5E5"; align = "left"; shadow = "true"; }; class AttributesImage { font = "PuristaMedium"; color = "#E5E5E5"; align = "left"; }; }; class Life_RscButtonMenu : Life_RscShortcutButton { idc = -1; type = 16; style = "0x02 + 0xC0"; default = 0; shadow = 0; x = 0; y = 0; w = 0.095589; h = 0.039216; animTextureNormal = "#(argb,8,8,3)color(1,1,1,1)"; animTextureDisabled = "#(argb,8,8,3)color(1,1,1,1)"; animTextureOver = "#(argb,8,8,3)color(1,1,1,1)"; animTextureFocused = "#(argb,8,8,3)color(1,1,1,1)"; animTexturePressed = "#(argb,8,8,3)color(1,1,1,1)"; animTextureDefault = "#(argb,8,8,3)color(1,1,1,1)"; colorBackground[] = {0,0,0,0.8}; colorBackgroundFocused[] = {1,1,1,1}; colorBackground2[] = {0.75,0.75,0.75,1}; color[] = {1,1,1,1}; colorFocused[] = {0,0,0,1}; color2[] = {0,0,0,1}; colorText[] = {1,1,1,1}; colorDisabled[] = {1,1,1,0.25}; period = 1.2; periodFocus = 1.2; periodOver = 1.2; size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; tooltipColorText[] = {1,1,1,1}; tooltipColorBox[] = {1,1,1,1}; tooltipColorShade[] = {0,0,0,0.65}; class TextPos { left = "0.25 * (((safezoneW / safezoneH) min 1.2) / 40)"; top = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2"; right = 0.005; bottom = 0.0; }; class Attributes { font = "PuristaLight"; color = "#E5E5E5"; align = "left"; shadow = "false"; }; class ShortcutPos { left = "(6.25 * (((safezoneW / safezoneH) min 1.2) / 40)) - 0.0225 - 0.005"; top = 0.005; w = 0.0225; h = 0.03; }; soundEnter[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundEnter",0.09,1}; soundPush[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundPush",0.09,1}; soundClick[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundClick",0.09,1}; soundEscape[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundEscape",0.09,1}; textureNoShortcut = ""; }; class Life_RscButtonInvisible : Life_RscButtonMenu { animTextureNormal = "#(argb,8,8,3)color(1,1,1,0)"; animTextureDisabled = "#(argb,8,8,3)color(1,1,1,0)"; animTextureOver = "#(argb,8,8,3)color(1,1,1,0)"; animTextureFocused = "#(argb,8,8,3)color(1,1,1,0)"; animTexturePressed = "#(argb,8,8,3)color(1,1,1,0)"; animTextureDefault = "#(argb,8,8,3)color(1,1,1,0)"; colorBackground[] = {0, 0, 0, 0}; colorBackground2[] = {1, 1, 1, 0}; color[] = {1, 1, 1, 0}; color2[] = {1, 1, 1, 0}; colorText[] = {1, 1, 1, 0}; colorDisabled[] = {1, 1, 1, 0}; }; class Life_RscShortcutButtonMain : Life_RscShortcutButton { idc = -1; style = 0; default = 0; w = 0.313726; h = 0.104575; color[] = {1, 1, 1, 1.0}; colorDisabled[] = {1, 1, 1, 0.25}; class HitZone { left = 0.0; top = 0.0; right = 0.0; bottom = 0.0; }; class ShortcutPos { left = 0.0145; top = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 20) - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)) / 2"; w = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2) * (3/4)"; h = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)"; }; class TextPos { left = "( ((safezoneW / safezoneH) min 1.2) / 32) * 1.5"; top = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 20)*2 - (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)) / 2"; right = 0.005; bottom = 0.0; }; animTextureNormal = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButtonMain\normal_ca.paa"; animTextureDisabled = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButtonMain\disabled_ca.paa"; animTextureOver = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButtonMain\over_ca.paa"; animTextureFocused = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButtonMain\focus_ca.paa"; animTexturePressed = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButtonMain\down_ca.paa"; animTextureDefault = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButtonMain\normal_ca.paa"; period = 0.5; font = "PuristaMedium"; size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)"; sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)"; text = ""; soundEnter[] = {"\A3\ui_f\data\sound\onover", 0.09, 1}; soundPush[] = {"\A3\ui_f\data\sound\new1", 0.0, 0}; soundClick[] = {"\A3\ui_f\data\sound\onclick", 0.07, 1}; soundEscape[] = {"\A3\ui_f\data\sound\onescape", 0.09, 1}; action = ""; class Attributes { font = "PuristaMedium"; color = "#E5E5E5"; align = "left"; shadow = "false"; }; class AttributesImage { font = "PuristaMedium"; color = "#E5E5E5"; align = "false"; }; }; class Life_RscCheckbox { idc = -1; type = 7; style = 0; x = "LINE_X(XVAL)"; y = LINE_Y; w = "LINE_W(WVAL)"; h = 0.029412; colorText[] = {1, 0, 0, 1}; color[] = {0, 0, 0, 0}; colorBackground[] = {0, 0, 1, 1}; colorTextSelect[] = {0, 0.8, 0, 1}; colorSelectedBg[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 1}; colorSelect[] = {0, 0, 0, 1}; colorTextDisable[] = {0.4, 0.4, 0.4, 1}; colorDisable[] = {0.4, 0.4, 0.4, 1}; font = "PuristaMedium"; sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)"; rows = 1; 5ns = 1; strings[] = {UNCHECKED}; checked_strings[] = {CHECKED}; }; class Life_RscProgress { type = 8; style = 0; x = 0.344; y = 0.619; w = 0.313726; h = 0.0261438; texture = ""; shadow = 2; colorFrame[] = {0, 0, 0, 1}; colorBackground[] = {0,0,0,0.7}; colorBar[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"}; }; class Life_RscListBox { style = 16; idc = -1; type = 5; w = 0.275; h = 0.04; font = "PuristaMedium"; colorSelect[] = {1, 1, 1, 1}; colorText[] = {1, 1, 1, 1}; colorBackground[] = {0.28,0.28,0.28,0.28}; colorSelect2[] = {1, 1, 1, 1}; colorSelectBackground[] = {0.95, 0.95, 0.95, 0.5}; colorSelectBackground2[] = {1, 1, 1, 0.5}; colorScrollbar[] = {0.2, 0.2, 0.2, 1}; colorPicture[] = {1,1,1,1}; colorPictureSelected[] = {1,1,1,1}; colorPictureDisabled[] = {1,1,1,1}; arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa"; arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa"; wholeHeight = 0.45; rowHeight = 0.04; color[] = {0.7, 0.7, 0.7, 1}; colorActive[] = {0,0,0,1}; colorDisabled[] = {0,0,0,0.3}; sizeEx = 0.023; soundSelect[] = {"",0.1,1}; soundExpand[] = {"",0.1,1}; soundCollapse[] = {"",0.1,1}; maxHistoryDelay = 1; autoScrollSpeed = -1; autoScrollDelay = 5; autoScrollRewind = 0; tooltipColorText[] = {1,1,1,1}; tooltipColorBox[] = {1,1,1,1}; tooltipColorShade[] = {0,0,0,0.65}; class ListScrollBar: Life_RscScrollBar { color[] = {1,1,1,1}; autoScrollEnabled = 1; }; }; class Life_RscEdit { type = 2; style = 0x00 + 0x40; font = "PuristaMedium"; shadow = 2; sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; colorBackground[] = {0, 0, 0, 1}; soundSelect[] = {"",0.1,1}; soundExpand[] = {"",0.1,1}; colorText[] = {0.95, 0.95, 0.95, 1}; colorDisabled[] = {1, 1, 1, 0.25}; autocomplete = false; colorSelection[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 1}; canModify = 1; }; class Life_RscSlider { h = 0.025; color[] = {1, 1, 1, 0.8}; colorActive[] = {1, 1, 1, 1}; }; class life_RscXSliderH { style = 1024; type = 43; shadow = 2; x = 0; y = 0; h = 0.029412; w = 0.400000; color[] = { 1, 1, 1, 0.7 }; colorActive[] = { 1, 1, 1, 1 }; colorDisabled[] = { 1, 1, 1, 0.500000 }; arrowEmpty = "\A3\ui_f\data\gui\cfg\slider\arrowEmpty_ca.paa"; arrowFull = "\A3\ui_f\data\gui\cfg\slider\arrowFull_ca.paa"; border = "\A3\ui_f\data\gui\cfg\slider\border_ca.paa"; thumb = "\A3\ui_f\data\gui\cfg\slider\thumb_ca.paa"; }; class Life_RscFrame { type = 0; idc = -1; style = 64; shadow = 2; colorBackground[] = {0, 0, 0, 0}; colorText[] = {1, 1, 1, 1}; font = "PuristaMedium"; sizeEx = 0.02; text = ""; }; class Life_RscBackground : Life_RscText { type = 0; IDC = -1; style = 512; shadow = 0; x = 0.0; y = 0.0; w = 1.0; h = 1.0; text = ""; ColorBackground[] = {0.48, 0.5, 0.35, 1}; ColorText[] = {0.1, 0.1, 0.1, 1}; font = "PuristaMedium"; SizeEx = 1; }; class Life_RscHTML { colorText[] = {1, 1, 1, 1.0}; colorBold[] = {1, 1, 1, 1.0}; colorLink[] = {1, 1, 1, 0.75}; colorLinkActive[] = {1, 1, 1, 1.0}; sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; prevPage = "\A3\ui_f\data\gui\Rsccommon\Rschtml\arrow_left_ca.paa"; nextPage = "\A3\ui_f\data\gui\Rsccommon\Rschtml\arrow_right_ca.paa"; shadow = 2; class H1 { font = "PuristaMedium"; fontBold = "PuristaSemibold"; sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)"; align = "left"; }; class H2 { font = "PuristaMedium"; fontBold = "PuristaSemibold"; sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; align = "right"; }; class H3 { font = "PuristaMedium"; fontBold = "PuristaSemibold"; sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; align = "left"; }; class H4 { font = "PuristaMedium"; fontBold = "PuristaSemibold"; sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; align = "left"; }; class H5 { font = "PuristaMedium"; fontBold = "PuristaSemibold"; sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; align = "left"; }; class H6 { font = "PuristaMedium"; fontBold = "PuristaSemibold"; sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; align = "left"; }; class P { font = "PuristaMedium"; fontBold = "PuristaSemibold"; sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; align = "left"; }; }; class Life_RscHitZones { x = 0; y = 0; w = 0.1; h = 0.1; xCount = 1; yCount = 1; xSpace = 0; ySpace = 0; }; class Life_RscMapControl { access = 0; type = 101; idc = 51; style = 48; colorBackground[] = {0.969,0.957,0.949,1}; colorOutside[] = {0,0,0,1}; colorText[] = {0,0,0,1}; font = "TahomaB"; sizeEx = 0.04; colorSea[] = {0.467,0.631,0.851,0.5}; colorForest[] = {0.624,0.78,0.388,0.5}; colorRocks[] = {0,0,0,0.3}; colorCountlines[] = {0.572,0.354,0.188,0.25}; colorMainCountlines[] = {0.572,0.354,0.188,0.5}; colorCountlinesWater[] = {0.491,0.577,0.702,0.3}; colorMainCountlinesWater[] = {0.491,0.577,0.702,0.6}; colorForestBorder[] = {0,0,0,0}; colorRocksBorder[] = {0,0,0,0}; colorPowerLines[] = {0.1,0.1,0.1,1}; colorRailWay[] = {0.8,0.2,0,1}; colorNames[] = {0.1,0.1,0.1,0.9}; colorInactive[] = {1,1,1,0.5}; colorLevels[] = {0.286,0.177,0.094,0.5}; colorTracks[] = {0.84,0.76,0.65,0.15}; colorRoads[] = {0.7,0.7,0.7,1}; colorMainRoads[] = {0.9,0.5,0.3,1}; colorTracksFill[] = {0.84,0.76,0.65,1}; colorRoadsFill[] = {1,1,1,1}; colorMainRoadsFill[] = {1,0.6,0.4,1}; colorGrid[] = {0.1,0.1,0.1,0.6}; colorGridMap[] = {0.1,0.1,0.1,0.6}; stickX[] = {0.2,{"Gamma",1,1.5}}; stickY[] = {0.2,{"Gamma",1,1.5}}; class Legend { colorBackground[] = {1,1,1,0.5}; color[] = {0,0,0,1}; x = "SafeZoneX + (((safezoneW / safezoneH) min 1.2) / 40)"; y = "SafeZoneY + safezoneH - 4.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; w = "10 * (((safezoneW / safezoneH) min 1.2) / 40)"; h = "3.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; font = "PuristaMedium"; sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)"; }; class ActiveMarker { color[] = {0.3,0.1,0.9,1}; size = 50; }; class Command { color[] = {1,1,1,1}; icon = "\A3\ui_f\data\map\mapcontrol\waypoint_ca.paa"; size = 18; importance = 1; coefMin = 1; coefMax = 1; }; class Task { colorCreated[] = {1,1,1,1}; colorCanceled[] = {0.7,0.7,0.7,1}; colorDone[] = {0.7,1,0.3,1}; colorFailed[] = {1,0.3,0.2,1}; color[] = {"(profilenamespace getvariable ['IGUI_TEXT_RGB_R',0])","(profilenamespace getvariable ['IGUI_TEXT_RGB_G',1])","(profilenamespace getvariable ['IGUI_TEXT_RGB_B',1])","(profilenamespace getvariable ['IGUI_TEXT_RGB_A',0.8])"}; icon = "\A3\ui_f\data\map\mapcontrol\taskIcon_CA.paa"; iconCreated = "\A3\ui_f\data\map\mapcontrol\taskIconCreated_CA.paa"; iconCanceled = "\A3\ui_f\data\map\mapcontrol\taskIconCanceled_CA.paa"; iconDone = "\A3\ui_f\data\map\mapcontrol\taskIconDone_CA.paa"; iconFailed = "\A3\ui_f\data\map\mapcontrol\taskIconFailed_CA.paa"; size = 27; importance = 1; coefMin = 1; coefMax = 1; }; class CustomMark { color[] = {0,0,0,1}; icon = "\A3\ui_f\data\map\mapcontrol\custommark_ca.paa"; size = 24; importance = 1; coefMin = 1; coefMax = 1; }; class Tree { color[] = {0.45,0.64,0.33,0.4}; icon = "\A3\ui_f\data\map\mapcontrol\bush_ca.paa"; size = 12; importance = "0.9 * 16 * 0.05"; coefMin = 0.25; coefMax = 4; }; class SmallTree { color[] = {0.45,0.64,0.33,0.4}; icon = "\A3\ui_f\data\map\mapcontrol\bush_ca.paa"; size = 12; importance = "0.6 * 12 * 0.05"; coefMin = 0.25; coefMax = 4; }; class Bush { color[] = {0.45,0.64,0.33,0.4}; icon = "\A3\ui_f\data\map\mapcontrol\bush_ca.paa"; size = "14/2"; importance = "0.2 * 14 * 0.05 * 0.05"; coefMin = 0.25; coefMax = 4; }; class Church { color[] = {1,1,1,1}; icon = "\A3\ui_f\data\map\mapcontrol\church_CA.paa"; size = 24; importance = 1; coefMin = 0.85; coefMax = 1; }; class Chapel { color[] = {0,0,0,1}; icon = "\A3\ui_f\data\map\mapcontrol\Chapel_CA.paa"; size = 24; importance = 1; coefMin = 0.85; coefMax = 1; }; class Cross { color[] = {0,0,0,1}; icon = "\A3\ui_f\data\map\mapcontrol\Cross_CA.paa"; size = 24; importance = 1; coefMin = 0.85; coefMax = 1; }; class Rock { color[] = {0.1,0.1,0.1,0.8}; icon = "\A3\ui_f\data\map\mapcontrol\rock_ca.paa"; size = 12; importance = "0.5 * 12 * 0.05"; coefMin = 0.25; coefMax = 4; }; class Bunker { color[] = {0,0,0,1}; icon = "\A3\ui_f\data\map\mapcontrol\bunker_ca.paa"; size = 14; importance = "1.5 * 14 * 0.05"; coefMin = 0.25; coefMax = 4; }; class Fortress { color[] = {0,0,0,1}; icon = "\A3\ui_f\data\map\mapcontrol\bunker_ca.paa"; size = 16; importance = "2 * 16 * 0.05"; coefMin = 0.25; coefMax = 4; }; class Fountain { color[] = {0,0,0,1}; icon = "\A3\ui_f\data\map\mapcontrol\fountain_ca.paa"; size = 11; importance = "1 * 12 * 0.05"; coefMin = 0.25; coefMax = 4; }; class ViewTower { color[] = {0,0,0,1}; icon = "\A3\ui_f\data\map\mapcontrol\viewtower_ca.paa"; size = 16; importance = "2.5 * 16 * 0.05"; coefMin = 0.5; coefMax = 4; }; class Lighthouse { color[] = {1,1,1,1}; icon = "\A3\ui_f\data\map\mapcontrol\lighthouse_CA.paa"; size = 24; importance = 1; coefMin = 0.85; coefMax = 1; }; class Quay { color[] = {1,1,1,1}; icon = "\A3\ui_f\data\map\mapcontrol\quay_CA.paa"; size = 24; importance = 1; coefMin = 0.85; coefMax = 1; }; class Fuelstation { color[] = {1,1,1,1}; icon = "\A3\ui_f\data\map\mapcontrol\fuelstation_CA.paa"; size = 24; importance = 1; coefMin = 0.85; coefMax = 1; }; class Hospital { color[] = {1,1,1,1}; icon = "\A3\ui_f\data\map\mapcontrol\hospital_CA.paa"; size = 24; importance = 1; coefMin = 0.85; coefMax = 1; }; class BusStop { color[] = {1,1,1,1}; icon = "\A3\ui_f\data\map\mapcontrol\busstop_CA.paa"; size = 24; importance = 1; coefMin = 0.85; coefMax = 1; }; class Transmitter { color[] = {1,1,1,1}; icon = "\A3\ui_f\data\map\mapcontrol\transmitter_CA.paa"; size = 24; importance = 1; coefMin = 0.85; coefMax = 1; }; class Stack { color[] = {0,0,0,1}; icon = "\A3\ui_f\data\map\mapcontrol\stack_ca.paa"; size = 20; importance = "2 * 16 * 0.05"; coefMin = 0.9; coefMax = 4; }; class Ruin { color[] = {0,0,0,1}; icon = "\A3\ui_f\data\map\mapcontrol\ruin_ca.paa"; size = 16; importance = "1.2 * 16 * 0.05"; coefMin = 1; coefMax = 4; }; class Tourism { color[] = {0,0,0,1}; icon = "\A3\ui_f\data\map\mapcontrol\tourism_ca.paa"; size = 16; importance = "1 * 16 * 0.05"; coefMin = 0.7; coefMax = 4; }; class Watertower { color[] = {1,1,1,1}; icon = "\A3\ui_f\data\map\mapcontrol\watertower_CA.paa"; size = 24; importance = 1; coefMin = 0.85; coefMax = 1; }; class Waypoint { color[] = {0,0,0,1}; size = 24; importance = 1; coefMin = 1; coefMax = 1; icon = "\A3\ui_f\data\map\mapcontrol\waypoint_ca.paa"; }; class WaypointCompleted { color[] = {0,0,0,1}; size = 24; importance = 1; coefMin = 1; coefMax = 1; icon = "\A3\ui_f\data\map\mapcontrol\waypointCompleted_ca.paa"; }; moveOnEdges = 0;//1; x = "SafeZoneXAbs"; y = "SafeZoneY + 1.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; w = "SafeZoneWAbs"; h = "SafeZoneH - 1.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; shadow = 0; ptsPerSquareSea = 5; ptsPerSquareTxt = 3; ptsPerSquareCLn = 10; ptsPerSquareExp = 10; ptsPerSquareCost = 10; ptsPerSquareFor = 9; ptsPerSquareForEdge = 9; ptsPerSquareRoad = 6; ptsPerSquareObj = 9; showCountourInterval = 0; scaleMin = 0.001; scaleMax = 1; scaleDefault = 0.16; maxSatelliteAlpha = 0.85; alphaFadeStartScale = 0.35; alphaFadeEndScale = 0.4; fontLabel = "PuristaMedium"; sizeExLabel = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)"; fontGrid = "TahomaB"; sizeExGrid = 0.02; fontUnits = "TahomaB"; sizeExUnits = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)"; fontNames = "PuristaMedium"; sizeExNames = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8) * 2"; fontInfo = "PuristaMedium"; sizeExInfo = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)"; fontLevel = "TahomaB"; sizeExLevel = 0.02; text = "#(argb,8,8,3)color(1,1,1,1)"; //text = "\a3\ui_f\data\map_background2_co.paa"; class power { icon = "\A3\ui_f\data\map\mapcontrol\power_CA.paa"; size = 24; importance = 1; coefMin = 0.85; coefMax = 1; color[] = {1,1,1,1}; }; class powersolar { icon = "\A3\ui_f\data\map\mapcontrol\powersolar_CA.paa"; size = 24; importance = 1; coefMin = 0.85; coefMax = 1; color[] = {1,1,1,1}; }; class powerwave { icon = "\A3\ui_f\data\map\mapcontrol\powerwave_CA.paa"; size = 24; importance = 1; coefMin = 0.85; coefMax = 1; color[] = {1,1,1,1}; }; class powerwind { icon = "\A3\ui_f\data\map\mapcontrol\powerwind_CA.paa"; size = 24; importance = 1; coefMin = 0.85; coefMax = 1; color[] = {1,1,1,1}; }; class shipwreck { icon = "\A3\ui_f\data\map\mapcontrol\shipwreck_CA.paa"; size = 24; importance = 1; coefMin = 0.85; coefMax = 1; color[] = {1,1,1,1}; }; }; class Life_RscCombo { style = 16; type = 4; x = 0; y = 0; w = 0.12; h = 0.035; shadow = 0; colorSelect[] = {0, 0, 0, 1}; soundExpand[] = {"",0.1,1}; colorText[] = {0.95, 0.95, 0.95, 1}; soundCollapse[] = {"",0.1,1}; maxHistoryDelay = 1; colorBackground[] = {0.4,0.4,0.4,0.4}; colorSelectBackground[] = {1, 1, 1, 0.7}; colow_Rscrollbar[] = {1, 0, 0, 1}; soundSelect[] = { "", 0.000000, 1 }; arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa"; arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa"; wholeHeight = 0.45; color[] = {1, 1, 1, 1}; colorActive[] = {1, 0, 0, 1}; colorDisabled[] = {1, 1, 1, 0.25}; font = "PuristaMedium"; sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; class ComboScrollBar : Life_RscScrollBar {}; }; class Life_RscToolbox { colorText[] = {0.95, 0.95, 0.95, 1}; color[] = {0.95, 0.95, 0.95, 1}; colorTextSelect[] = {0.95, 0.95, 0.95, 1}; colorSelect[] = {0.95, 0.95, 0.95, 1}; colorTextDisable[] = {0.4, 0.4, 0.4, 1}; colorDisable[] = {0.4, 0.4, 0.4, 1}; colorSelectedBg[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5}; font = "PuristaMedium"; sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)"; }; The ISLAND_DIALOG, dialog class class Island_Dialog { idd = 999; movingenable = false; name="Island_Dialog"; class controls { class Island_button_01: Life_RscButtonMenu { idc = 01; x = 0.45 * safezoneW + safezoneX; y = 0.36 * safezoneH + safezoneY; w = 0.1 * safezoneW; h = 0.04 * safezoneH; }; class Island_button_02: Life_RscButtonMenu { idc = 02; x = 0.5875 * safezoneW + safezoneX; y = 0.4 * safezoneH + safezoneY; w = 0.1 * safezoneW; h = 0.04 * safezoneH; }; class Island_button_03: Life_RscButtonMenu { idc = 03; x = 0.6 * safezoneW + safezoneX; y = 0.48 * safezoneH + safezoneY; w = 0.1 * safezoneW; h = 0.04 * safezoneH; }; class Island_button_04: Life_RscButtonMenu { idc = 04; x = 0.5875 * safezoneW + safezoneX; y = 0.56 * safezoneH + safezoneY; w = 0.1 * safezoneW; h = 0.04 * safezoneH; }; class Island_button_05: Life_RscButtonMenu { idc = 05; x = 0.45 * safezoneW + safezoneX; y = 0.6 * safezoneH + safezoneY; w = 0.1 * safezoneW; h = 0.04 * safezoneH; }; class Island_button_06: Life_RscButtonMenu { idc = 06; x = 0.3125 * safezoneW + safezoneX; y = 0.56 * safezoneH + safezoneY; w = 0.1 * safezoneW; h = 0.04 * safezoneH; }; class Island_button_07: Life_RscButtonMenu { idc = 07; x = 0.3 * safezoneW + safezoneX; y = 0.48 * safezoneH + safezoneY; w = 0.1 * safezoneW; h = 0.04 * safezoneH; }; class Island_button_08: Life_RscButtonMenu { idc = 08; x = 0.3125 * safezoneW + safezoneX; y = 0.4 * safezoneH + safezoneY; w = 0.1 * safezoneW; h = 0.04 * safezoneH; }; class Island_Foto: Life_RscPicture { idc = 1000; x = 0.425 * safezoneW + safezoneX; y = 0.43 * safezoneH + safezoneY; w = 0.15 * safezoneW; h = 0.12 * safezoneH; text = "textures\life.paa"; }; class Island_creditText: Life_RscText { idc = 1001; x = 0 * safezoneW + safezoneX; y = 0.98 * safezoneH + safezoneY; w = 0.9 * safezoneW; h = 0.02 * safezoneH; style = ST_LEFT; SizeEx = 0.03; text = "4Island Life | VERSION: 0.1 | Mike93041 |"; colorText[] = {0,0,0,0.5}; }; }; }; The full fn_crearDialogo _style = _this select 0; _caller = _this select 1; _position = _this select 3; _cursorTarget = cursorTarget; _backpack = backpack _cursorTarget; _vest = vest _cursorTarget; _veh = vehicle player; //_control1 = (findDisplay 999) displayCtrl 01; //_control2 = (findDisplay 999) displayCtrl 02; //_control3 = (findDisplay 999) displayCtrl 03; //_control4 = (findDisplay 999) displayCtrl 04; //_control5 = (findDisplay 999) displayCtrl 05; //_control6 = (findDisplay 999) displayCtrl 06; //_control7 = (findDisplay 999) displayCtrl 07; //_control8 = (findDisplay 999) displayCtrl 08; switch (_style) do { CASE "MAIN": { closeDialog 0; createDialog "ISLAND_DIALOG"; _control1 = (findDisplay 999) displayCtrl 01; _control2 = (findDisplay 999) displayCtrl 02; _control3 = (findDisplay 999) displayCtrl 0356; _control4 = (findDisplay 999) displayCtrl 04; _control5 = (findDisplay 999) displayCtrl 05; _control6 = (findDisplay 999) displayCtrl 06; _control7 = (findDisplay 999) displayCtrl 07; _control8 = (findDisplay 999) displayCtrl 08; _control1 ctrlSetText "CERRAR";buttonSetAction [01, "closeDialog 0;"]; //===================================POLICIA===================================\\ // NADA If (playerSide == west) then { _control3 ctrlSetText "GESTOS";_control3 buttonSetAction "[] call life_fnc_coreGestos"; _control5 ctrlSetText "INFORMACION";_control5 buttonSetAction "[""INFO""]call life_fnc_crearDialogo"; _control6 ctrlSetText "INVENTARIO V.ITEMS";_control6 buttonSetAction "[""INFO""]call life_fnc_crearDialogo"; _control7 ctrlEnable false; _control7 ctrlShow false; // CIVIL If (playerSide == west && _cursorTarget isKindOf "Man" && side _cursorTarget == civilian && alive _cursorTarget) then { _control2 ctrlSetText "POLICIA";_control2 buttonSetAction "[""SHOUT""]call life_fnc_crearDialogo"; _control8 ctrlEnable false; _control8 ctrlShow false; _control4 ctrlEnable false; _control4 ctrlShow false; } else { _control2 ctrlEnable false; _control2 ctrlShow false; }; // VEHICULO If (playerSide == west && (_cursorTarget isKindOf "landVehicle") OR (_cursorTarget isKindOf "Ship") OR (_cursorTarget isKindOf "Air")) then { if(_cursorTarget isKindOf "Ship") then { _control4 ctrlSetText "EMPUJAR";_control4 buttonSetAction "[] spawn life_fnc_pushObject; closeDialog 0;"; } else { _control4 ctrlEnable false; _control4 ctrlShow false; }; _control8 ctrlSetText "VEHICULO";_control8 buttonSetAction "[""VEHICULO""]call life_fnc_crearDialogo"; _control2 ctrlEnable false; _control2 ctrlShow false; } else { _control8 ctrlEnable false; _control8 ctrlShow false; _control4 ctrlEnable false; _control4 ctrlShow false; }; If(vehicle player != player) then { ctrlEnable [08, true]; _control3 ctrlEnable false; _control3 ctrlShow false; if(vehicle player isKindOf "landVehicle") then { _control8 ctrlSetText "VEHICULO";_control8 buttonSetAction "[""VEHICULO""]call life_fnc_crearDialogo"; }; if(vehicle player isKindOf "Ship") then { _control8 ctrlSetText "VEHICULO";_control8 buttonSetAction "[""VEHICULOMA""]call life_fnc_crearDialogo"; }; if(vehicle player isKindOf "Air") then { _control8 ctrlSetText "VEHICULO";_control8 buttonSetAction "[""VEHICULOAIR""]call life_fnc_crearDialogo"; }; } else { _control4 ctrlEnable false; _control4 ctrlShow false; }; }; //====================================CIVIL====================================\\ // NADA If(playerSide == civilian) then { _control3 ctrlSetText "GESTOS";_control3 buttonSetAction "[""GESTOS""]call life_fnc_crearDialogo"; _control5 ctrlSetText "INFORMACION";_control5 buttonSetAction "[""INFO""]call life_fnc_crearDialogo"; _control6 ctrlSetText "INVENTARIO V.ITEMS";_control6 buttonSetAction "[""INFO""]call life_fnc_crearDialogo"; _control7 ctrlEnable false; _control7 ctrlShow false; _control8 ctrlEnable false; _control8 ctrlShow false; _control2 ctrlEnable false; _control2 ctrlShow false; // VEHICULO If (playerSide == civilian && (_cursorTarget isKindOf "landVehicle") OR (_cursorTarget isKindOf "Ship") OR (_cursorTarget isKindOf "Air")) then { ctrlEnable [08, true]; if(_cursorTarget isKindOf "Ship") then { _control4 ctrlSetText "EMPUJAR";_control4 buttonSetAction "[] spawn life_fnc_pushObject; closeDialog 0;"; } else { _control4 ctrlEnable false; _control4 ctrlShow false; }; _control8 ctrlSetText "VEHICULO";_control8 buttonSetAction "[""VEHICULO""]call life_fnc_crearDialogo"; } else { _control4 ctrlEnable false; _control4 ctrlShow false; }; If(vehicle player != player) then { ctrlEnable [08, true]; if(vehicle player isKindOf "landVehicle") then { _control8 ctrlSetText "VEHICULO";_control8 buttonSetAction "[""VEHICULO""]call life_fnc_crearDialogo"; }; if(vehicle player isKindOf "Ship") then { _control8 ctrlSetText "VEHICULO";_control8 buttonSetAction "[""VEHICULOMA""]call life_fnc_crearDialogo"; }; if(vehicle player isKindOf "Air") then { _control8 ctrlSetText "VEHICULO";_control8 buttonSetAction "[""VEHICULOAIR""]call life_fnc_crearDialogo"; }; _control3 ctrlEnable false; _control3 ctrlShow false; } else { _control4 ctrlEnable false; _control4 ctrlShow false; }; }; //====================================MÉDICOS==================================\\ // NADA If(playerSide == independent) then { _control3 ctrlSetText "GESTOS";_control3 buttonSetAction "[""GESTOS""]call life_fnc_crearDialogo"; _control5 ctrlSetText "INFORMACION";_control5 buttonSetAction "[""INFO""]call life_fnc_crearDialogo"; _control6 ctrlSetText "INVENTARIO V.ITEMS";_control6 buttonSetAction "[""INFO""]call life_fnc_crearDialogo"; _control7 ctrlEnable false; _control7 ctrlShow false; _control2 ctrlEnable false; _control2 ctrlShow false; // VEHICULO If (playerSide == independent && (_cursorTarget isKindOf "landVehicle") OR (_cursorTarget isKindOf "Ship") OR (_cursorTarget isKindOf "Air")) then { if(_cursorTarget isKindOf "Ship") then { _control4 ctrlSetText "EMPUJAR";_control4 buttonSetAction "[] spawn life_fnc_pushObject; closeDialog 0;"; } else { _control4 ctrlEnable false; _control4 ctrlShow false; }; _control8 ctrlSetText "VEHICULO";_control8 buttonSetAction "[""VEHICULOMED""]call life_fnc_crearDialogo"; } else { _control4 ctrlEnable false; _control4 ctrlShow false; _control8 ctrlEnable false; _control8 ctrlShow false; }; If(vehicle player != player) then { ctrlEnable [08, true]; _control3 ctrlEnable false; _control3 ctrlShow false; if(vehicle player isKindOf "landVehicle") then { _control8 ctrlSetText "VEHICULO";_control8 buttonSetAction "[""VEHICULO""]call life_fnc_crearDialogo"; }; if(vehicle player isKindOf "Ship") then { _control8 ctrlSetText "VEHICULO";_control8 buttonSetAction "[""VEHICULOMA""]call life_fnc_crearDialogo"; }; if(vehicle player isKindOf "Air") then { _control8 ctrlSetText "VEHICULO";_control8 buttonSetAction "[""VEHICULOAIR""]call life_fnc_crearDialogo"; }; } else { _control4 ctrlEnable false; _control4 ctrlShow false; }; }; }; CASE "ACCIONESVEH": { closeDialog 0; createDialog "Island_Dialog"; _control1 = (findDisplay 999) displayCtrl 01; _control2 = (findDisplay 999) displayCtrl 02; _control3 = (findDisplay 999) displayCtrl 03; _control4 = (findDisplay 999) displayCtrl 04; _control5 = (findDisplay 999) displayCtrl 05; _control6 = (findDisplay 999) displayCtrl 06; _control7 = (findDisplay 999) displayCtrl 07; _control8 = (findDisplay 999) displayCtrl 08; if(vehicle player != player) then { _control2 ctrlEnable false; _control2 ctrlShow false; _control3 ctrlEnable false; _control3 ctrlShow false; _control4 ctrlEnable false; _control4 ctrlShow false; }; if(vehicle player == player) then { _control5 ctrlEnable false; _control5 ctrlShow false; _control7 ctrlEnable false; _control7 ctrlShow false; _control8 ctrlEnable false; _control8 ctrlShow false; }; _control1 ctrlSetText "<- VOLVER";_control1 buttonSetAction "[""VEHICULO""]call life_fnc_crearDialogo"; _control2 ctrlSetText "ENTRAR DE CONDUCTOR";_control2 buttonSetAction "cursorTarget lock false;player action [""getInDriver"", cursorTarget];cursorTarget lock true;"; _control3 ctrlSetText "ENTRAR DE PASAJERO";_control3 buttonSetAction "cursorTarget lock false;player action [""getInCargo"", cursorTarget];cursorTarget lock true;"; _control4 ctrlSetText "ENTRAR DE ARTILLERO";_control4 buttonSetAction "cursorTarget lock false;player action [""getIngunner"", cursorTarget];cursorTarget lock true;"; _control5 ctrlSetText "SALIR DEL VEHICULO";_control5 buttonSetAction "_veh lock false;_caller action [""eject"", _veh];_veh lock true;"; _control6 ctrlEnable false; _control6 ctrlShow false; _control8 ctrlSetText "CONTACTO";_control8 buttonSetAction "[""CONTACTO""]call life_fnc_crearDialogo"; _control7 ctrlSetText "LUCES";_control7 buttonSetAction "[""LUCES""]call life_fnc_crearDialogo"; //ctrlSetText [08, "ENCENDER MOTOR"];buttonSetAction [08, "vehicle player engineOn true"]; //ctrlSetText [07, "APAGAR MOTOR"];buttonSetAction [07, "vehicle player engineOn false"]; }; CASE "ACCIONESMA": { closeDialog 0; createDialog "Island_Dialog"; _control1 = (findDisplay 999) displayCtrl 01; _control2 = (findDisplay 999) displayCtrl 02; _control3 = (findDisplay 999) displayCtrl 03; _control4 = (findDisplay 999) displayCtrl 04; _control5 = (findDisplay 999) displayCtrl 05; _control6 = (findDisplay 999) displayCtrl 06; _control7 = (findDisplay 999) displayCtrl 07; _control8 = (findDisplay 999) displayCtrl 08; if(vehicle player != player) then { _control2 ctrlEnable false; _control2 ctrlShow false; _control3 ctrlEnable false; _control3 ctrlShow false; _control4 ctrlEnable false; _control4 ctrlShow false; }; if(vehicle player == player) then { _control5 ctrlEnable false; _control5 ctrlShow false; _control7 ctrlEnable false; _control7 ctrlShow false; _control8 ctrlEnable false; _control8 ctrlShow false; }; _control1 ctrlSetText "<- VOLVER";_control1 buttonSetAction "[""VEHICULOMA""]call life_fnc_crearDialogo"; _control2 ctrlSetText "ENTRAR DE CONDUCTOR";_control2 buttonSetAction "cursorTarget lock false;player action [""getInDriver"", cursorTarget];cursorTarget lock true;"; _control3 ctrlSetText "ENTRAR DE PASAJERO";_control3 buttonSetAction "cursorTarget lock false;player action [""getInCargo"", cursorTarget];cursorTarget lock true;"; _control4 ctrlSetText "ENTRAR DE ARTILLERO";_control4 buttonSetAction "cursorTarget lock false;player action [""getIngunner"", cursorTarget];cursorTarget lock true;"; _control5 ctrlSetText "SALIR DEL VEHICULO";_control5 buttonSetAction "_veh lock false;_caller action [""eject"", _veh];_veh lock true;"; _control6 ctrlEnable false; _control6 ctrlShow false; _control8 ctrlSetText "CONTACTO";_control8 buttonSetAction "[""CONTACTO""]call life_fnc_crearDialogo"; _control7 ctrlSetText "LUCES";_control7 buttonSetAction "[""LUCES""]call life_fnc_crearDialogo"; //ctrlSetText [08, "ENCENDER MOTOR"];buttonSetAction [08, "vehicle player engineOn true"]; //ctrlSetText [07, "APAGAR MOTOR"];buttonSetAction [07, "vehicle player engineOn false"]; }; CASE "ACCIONESVEHAIR": { closeDialog 0; createDialog "Island_Dialog"; _control1 = (findDisplay 999) displayCtrl 01; _control2 = (findDisplay 999) displayCtrl 02; _control3 = (findDisplay 999) displayCtrl 03; _control4 = (findDisplay 999) displayCtrl 04; _control5 = (findDisplay 999) displayCtrl 05; _control6 = (findDisplay 999) displayCtrl 06; _control7 = (findDisplay 999) displayCtrl 07; _control8 = (findDisplay 999) displayCtrl 08; if(vehicle player != player) then { _control2 ctrlEnable false; _control2 ctrlShow false; _control3 ctrlEnable false; _control3 ctrlShow false; _control4 ctrlEnable false; _control4 ctrlShow false; }; if(vehicle player == player) then { _control5 ctrlEnable false; _control5 ctrlShow false; _control6 ctrlEnable false; _control6 ctrlShow false; _control7 ctrlEnable false; _control7 ctrlShow false; _control8 ctrlEnable false; _control8 ctrlShow false; }; _control1 ctrlSetText "<- VOLVER";_control1 buttonSetAction "[""VEHICULOAIR""]call life_fnc_crearDialogo"; _control2 ctrlSetText "ENTRAR DE CONDUCTOR";_control2 buttonSetAction "cursorTarget lock false;player action [""getInDriver"", cursorTarget];cursorTarget lock true;"; _control3 ctrlSetText "ENTRAR DE PASAJERO";_control3 buttonSetAction "cursorTarget lock false;player action [""getInCargo"", cursorTarget];cursorTarget lock true;"; _control4 ctrlSetText "ENTRAR DE ARTILLERO";_control4 buttonSetAction "cursorTarget lock false;player action [""getIngunner"", cursorTarget];cursorTarget lock true;"; _control5 ctrlSetText "SALIR DEL VEHICULO";_control5 buttonSetAction "_veh lock false;_caller action [""eject"", _veh];_veh lock true;"; _control6 ctrlSetText "HIDRAULICA";_control6 buttonSetAction "[""HIDRAULICA""]call life_fnc_crearDialogo"; _control8 ctrlSetText "CONTACTO";_control8 buttonSetAction "[""CONTACTO""]call life_fnc_crearDialogo"; _control7 ctrlSetText "LUCES";_control7 buttonSetAction "[""LUCES""]call life_fnc_crearDialogo"; //ctrlSetText [08, "ENCENDER MOTOR"];buttonSetAction [08, "vehicle player engineOn true"]; //ctrlSetText [07, "APAGAR MOTOR"];buttonSetAction [07, "vehicle player engineOn false"]; }; CASE "HIDRAULICA": { closeDialog 0; createDialog "Island_Dialog"; _control1 = (findDisplay 999) displayCtrl 01; _control2 = (findDisplay 999) displayCtrl 02; _control3 = (findDisplay 999) displayCtrl 03; _control4 = (findDisplay 999) displayCtrl 04; _control5 = (findDisplay 999) displayCtrl 05; _control6 = (findDisplay 999) displayCtrl 06; _control7 = (findDisplay 999) displayCtrl 07; _control8 = (findDisplay 999) displayCtrl 08; _control1 ctrlSetText "<- VOLVER";_control1 buttonSetAction "[""ACCIONESVEHAIR""]call life_fnc_crearDialogo"; _control7 ctrlSetText "BAJAR TREN ATERRIZAJE";_control7 buttonSetAction "player action [""LandGear"", vehicle player]"; _control8 ctrlSetText "SUBIR TREN ATERRIZAJE";_control8 buttonSetAction "player action [""LandGearUp"", vehicle player]"; if(vehicle player isKindOf "Helicopter") then { _control5 ctrlSetText "ACTIVAR ESTABILIZADOR";_control5 buttonSetAction "player action [""autoHover"", vehicle player]"; _control6 ctrlSetText "DESACTIVAR ESTABILIZADOR";_control6 buttonSetAction "player action [""autoHoverCancel"", vehicle player]"; _control2 ctrlEnable false; _control2 ctrlShow false; _control3 ctrlEnable false; _control3 ctrlShow false; } else { _control5 ctrlEnable false; _control5 ctrlShow false; _control6 ctrlEnable false; _control6 ctrlShow false; }; if(vehicle player isKindOf "Plane") then { _control2 ctrlSetText "FLAPS ARRIBA";_control2 buttonSetAction "player action [""flapsUp"", vehicle player]"; _control3 ctrlSetText "FLAPS ABAJO";_control3 buttonSetAction "player action [""flapsDown"", vehicle player]"; } else { _control2 ctrlEnable false; _control2 ctrlShow false; _control3 ctrlEnable false; _control3 ctrlShow false; }; _control4 ctrlEnable false; _control4 ctrlShow false; }; CASE "LUCES": { closeDialog 0; createDialog "Island_Dialog"; _control1 = (findDisplay 999) displayCtrl 01; _control2 = (findDisplay 999) displayCtrl 02; _control3 = (findDisplay 999) displayCtrl 03; _control4 = (findDisplay 999) displayCtrl 04; _control5 = (findDisplay 999) displayCtrl 05; _control6 = (findDisplay 999) displayCtrl 06; _control7 = (findDisplay 999) displayCtrl 07; _control8 = (findDisplay 999) displayCtrl 08; _control1 ctrlSetText "<- VOLVER";_control1 buttonSetAction "[""MAIN""]call life_fnc_crearDialogo"; _control2 ctrlSetText "ENCENDER LUCES";_control2 buttonSetAction "player action [""lightOn"", vehicle player];"; _control3 ctrlSetText "APAGAR LUCES";_control3 buttonSetAction "player action [""lightOff"", vehicle player];"; if(vehicle player isKindOf "Air") then { _control5 ctrlSetText "ENCENDER COLISION";_control5 buttonSetAction "player action [""lightOn"", vehicle player];"; _control6 ctrlSetText "APAGAR COLISION";_control6 buttonSetAction "player action [""lightOff"", vehicle player];"; } else { _control5 ctrlEnable false; _control5 ctrlShow false; _control6 ctrlEnable false; _control6 ctrlShow false; }; _control4 ctrlEnable false; _control4 ctrlShow false; _control7 ctrlEnable false; _control7 ctrlShow false; _control8 ctrlEnable false; _control8 ctrlShow false; }; CASE "CONTACTO": { closeDialog 0; createDialog "Island_Dialog"; _control1 = (findDisplay 999) displayCtrl 01; _control2 = (findDisplay 999) displayCtrl 02; _control3 = (findDisplay 999) displayCtrl 03; _control4 = (findDisplay 999) displayCtrl 04; _control5 = (findDisplay 999) displayCtrl 05; _control6 = (findDisplay 999) displayCtrl 06; _control7 = (findDisplay 999) displayCtrl 07; _control8 = (findDisplay 999) displayCtrl 08; _control1 ctrlSetText "<- VOLVER";_control1 buttonSetAction "[""MAIN""]call life_fnc_crearDialogo"; _control2 ctrlSetText "ENCENDER MOTOR";_control2 buttonSetAction "vehicle player engineOn true"; _control3 ctrlSetText "APAGAR MOTOR";_control3 buttonSetAction "vehicle player engineOn false"; _control4 ctrlEnable false; _control4 ctrlShow false; _control5 ctrlEnable false; _control5 ctrlShow false; _control7 ctrlEnable false; _control7 ctrlShow false; _control8 ctrlEnable false; _control8 ctrlShow false; _control6 ctrlEnable false; _control6 ctrlShow false; }; CASE "VEHICULO": { closeDialog 0; createDialog "Island_Dialog"; _control1 = (findDisplay 999) displayCtrl 01; _control2 = (findDisplay 999) displayCtrl 02; _control3 = (findDisplay 999) displayCtrl 03; _control4 = (findDisplay 999) displayCtrl 04; _control5 = (findDisplay 999) displayCtrl 05; _control6 = (findDisplay 999) displayCtrl 06; _control7 = (findDisplay 999) displayCtrl 07; _control8 = (findDisplay 999) displayCtrl 08; _control1 ctrlSetText "<- VOLVER";_control1 buttonSetAction "[""MAIN""]call life_fnc_crearDialogo"; _control2 ctrlSetText "ACCIONES";_control2 buttonSetAction "[""ACCIONESVEH""]call life_fnc_crearDialogo"; _control3 ctrlSetText "REPARAR";_control3 buttonSetAction "[_cursorTarget] spawn life_fnc_repairTruck;"; _control4 ctrlSetText "DAR LA VUELTA";_control4 buttonSetAction "_cursorTarget setPos [getPos _cursorTarget select 0, getPos _cursorTarget select 1, (getPos _cursorTarget select 2)+0.5]; closeDialog 0;"; _control5 ctrlEnable false; _control5 ctrlShow false; _control7 ctrlEnable false; _control7 ctrlShow false; _control8 ctrlEnable false; _control8 ctrlShow false; _control6 ctrlEnable false; _control6 ctrlShow false; if(playerSide == west) then { _control6 ctrlEnable true; _control6 ctrlShow true; _control7 ctrlEnable true; _control7 ctrlShow true; _control6 ctrlSetText "POLICIA";_control6 buttonSetAction "[""POLICIAVEH""]call life_fnc_crearDialogo"; _control7 ctrlSetText "RADIO";_control7 buttonSetAction "execVM ""Arrestar\radioon.sqf"""; }; if(playerSide == independent) then { _control6 ctrlEnable true; _control6 ctrlShow true; _control6 ctrlSetText "MEDICO";_control6 buttonSetAction "[""MEDICOVEH""]call life_fnc_crearDialogo"; }; if(vehicle player != player) then { _control3 ctrlEnable false; _control3 ctrlShow false; _control4 ctrlEnable false; _control4 ctrlShow false; _control6 ctrlEnable false; _control6 ctrlShow false; }; }; CASE "VEHICULOMA": { closeDialog 0; createDialog "Island_Dialog"; _control1 = (findDisplay 999) displayCtrl 01; _control2 = (findDisplay 999) displayCtrl 02; _control3 = (findDisplay 999) displayCtrl 03; _control4 = (findDisplay 999) displayCtrl 04; _control5 = (findDisplay 999) displayCtrl 05; _control6 = (findDisplay 999) displayCtrl 06; _control7 = (findDisplay 999) displayCtrl 07; _control8 = (findDisplay 999) displayCtrl 08; _control1 ctrlSetText "<- VOLVER";_control1 buttonSetAction "[""MAIN""]call life_fnc_crearDialogo"; _control2 ctrlSetText "ACCIONES";_control2 buttonSetAction "[""ACCIONESMA""]call life_fnc_crearDialogo"; _control3 ctrlSetText "REPARAR";_control3 buttonSetAction "[_cursorTarget] spawn life_fnc_repairTruck;"; if(vehicle player != player) then { _control3 ctrlEnable false; }; _control4 ctrlEnable false; _control4 ctrlShow false; _control5 ctrlEnable false; _control5 ctrlShow false; _control7 ctrlEnable false; _control7 ctrlShow false; _control8 ctrlEnable false; _control8 ctrlShow false; _control6 ctrlEnable false; _control6 ctrlShow false; }; CASE "VEHICULOAIR": { closeDialog 0; createDialog "Island_Dialog"; _control1 = (findDisplay 999) displayCtrl 01; _control2 = (findDisplay 999) displayCtrl 02; _control3 = (findDisplay 999) displayCtrl 03; _control4 = (findDisplay 999) displayCtrl 04; _control5 = (findDisplay 999) displayCtrl 05; _control6 = (findDisplay 999) displayCtrl 06; _control7 = (findDisplay 999) displayCtrl 07; _control8 = (findDisplay 999) displayCtrl 08; _control1 ctrlSetText "<- VOLVER";_control1 buttonSetAction "[""MAIN""]call life_fnc_crearDialogo"; _control2 ctrlSetText "ACCIONES";_control2 buttonSetAction "[""ACCIONESVEHAIR""]call life_fnc_crearDialogo"; _control3 ctrlSetText "REPARAR";_control3 buttonSetAction "[_cursorTarget] spawn life_fnc_repairTruck;"; if(vehicle player != player) then { _control3 ctrlEnable false; _control3 ctrlShow false; }; _control4 ctrlEnable false; _control4 ctrlShow false; _control5 ctrlEnable false; _control5 ctrlShow false; _control7 ctrlEnable false; _control7 ctrlShow false; _control8 ctrlEnable false; _control8 ctrlShow false; _control6 ctrlEnable false; _control6 ctrlShow false; }; CASE "VEHICULOMED": { closeDialog 0; createDialog "Island_Dialog"; _control1 = (findDisplay 999) displayCtrl 01; _control2 = (findDisplay 999) displayCtrl 02; _control3 = (findDisplay 999) displayCtrl 03; _control4 = (findDisplay 999) displayCtrl 04; _control5 = (findDisplay 999) displayCtrl 05; _control6 = (findDisplay 999) displayCtrl 06; _control7 = (findDisplay 999) displayCtrl 07; _control8 = (findDisplay 999) displayCtrl 08; _control1 ctrlSetText "<- VOLVER";_control1 buttonSetAction "[""MAIN""]call life_fnc_crearDialogo"; _control2 ctrlSetText "ACCIONES";_control2 buttonSetAction "[""ACCIONESVEH""]call life_fnc_crearDialogo"; _control3 ctrlSetText "REPARAR";_control3 buttonSetAction "[_cursorTarget] spawn life_fnc_repairTruck;"; _control4 ctrlSetText "DAR LA VUELTA";_control4 buttonSetAction "_cursorTarget setPos [getPos _cursorTarget select 0, getPos _cursorTarget select 1, (getPos _cursorTarget select 2)+0.5]; closeDialog 0;"; _control6 ctrlSetText "MEDICO";_control6 buttonSetAction "[""MEDICOVEH""]call life_fnc_crearDialogo"; _control5 ctrlEnable false; _control5 ctrlShow false; _control7 ctrlEnable false; _control7 ctrlShow false; _control8 ctrlEnable false; _control8 ctrlShow false; }; CASE "MEDICOVEH": { closeDialog 0; createDialog "Island_Dialog"; _control1 = (findDisplay 999) displayCtrl 01; _control2 = (findDisplay 999) displayCtrl 02; _control3 = (findDisplay 999) displayCtrl 03; _control4 = (findDisplay 999) displayCtrl 04; _control5 = (findDisplay 999) displayCtrl 05; _control6 = (findDisplay 999) displayCtrl 06; _control7 = (findDisplay 999) displayCtrl 07; _control8 = (findDisplay 999) displayCtrl 08; if(count crew _cursorTarget == 0) then {ctrlEnable [05, false];}; _control1 ctrlSetText "<- VOLVER";_control1 buttonSetAction "[""VEHICULOMED""]call life_fnc_crearDialogo"; _control2 ctrlSetText "PROPIETARIO";_control2 buttonSetAction "[_cursorTarget] spawn life_fnc_searchVehAction;"; _control4 ctrlSetText "SACAR INDIVIDUOS";_control4 buttonSetAction "[_cursorTarget] spawn life_fnc_pulloutAction;"; _control6 ctrlSetText "EMBARGAR";_control6 buttonSetAction "[_cursorTarget] spawn life_fnc_impoundAction;"; _control5 ctrlEnable false; _control5 ctrlShow false; _control3 ctrlEnable false; _control3 ctrlShow false; _control7 ctrlEnable false; _control7 ctrlShow false; _control8 ctrlEnable false; _control8 ctrlShow false; }; CASE "POLICIAVEH": { closeDialog 0; createDialog "Island_Dialog"; _control1 = (findDisplay 999) displayCtrl 01; _control2 = (findDisplay 999) displayCtrl 02; _control3 = (findDisplay 999) displayCtrl 03; _control4 = (findDisplay 999) displayCtrl 04; _control5 = (findDisplay 999) displayCtrl 05; _control6 = (findDisplay 999) displayCtrl 06; _control7 = (findDisplay 999) displayCtrl 07; _control8 = (findDisplay 999) displayCtrl 08; if(count crew _cursorTarget == 0) then {ctrlEnable [05, false];}; _control1 ctrlSetText "<- VOLVER";_control1 buttonSetAction "[""VEHICULO""]call life_fnc_crearDialogo"; _control2 ctrlSetText "PROPIETARIO";_control2 buttonSetAction "[_cursorTarget] spawn life_fnc_searchVehAction;"; _control3 ctrlSetText "REGISTRAR";_control3 buttonSetAction "[_cursorTarget] spawn life_fnc_vehInvSearch;"; _control4 ctrlSetText "SACAR INDIVIDUOS";_control4 buttonSetAction "[_cursorTarget] spawn life_fnc_pulloutAction;"; _control6 ctrlSetText "EMBARGAR";_control6 buttonSetAction "[_cursorTarget] spawn life_fnc_impoundAction;"; _control5 ctrlEnable false; _control5 ctrlShow false; _control7 ctrlEnable false; _control7 ctrlShow false; _control8 ctrlEnable false; _control8 ctrlShow false; }; CASE "GESTOS": { closeDialog 0; createDialog "Island_Dialog"; _control1 = (findDisplay 999) displayCtrl 01; _control2 = (findDisplay 999) displayCtrl 02; _control3 = (findDisplay 999) displayCtrl 03; _control4 = (findDisplay 999) displayCtrl 04; _control5 = (findDisplay 999) displayCtrl 05; _control6 = (findDisplay 999) displayCtrl 06; _control7 = (findDisplay 999) displayCtrl 07; _control8 = (findDisplay 999) displayCtrl 08; _control1 ctrlSetText "<- VOLVER";_control1 buttonSetAction "[""MAIN""]call life_fnc_crearDialogo"; _control2 ctrlSetText "EJERCICIOS";_control2 buttonSetAction "[""EJERCICIOS""]call life_fnc_crearDialogo"; _control3 ctrlSetText "DIVERTIDO";_control3 buttonSetAction "[""DIVERTIDO""]call life_fnc_crearDialogo"; _control4 ctrlSetText "INDICACIONES";_control4 buttonSetAction "[""INDICACIONES""]call life_fnc_crearDialogo"; _control5 ctrlEnable false; _control5 ctrlShow false; _control6 ctrlEnable false; _control6 ctrlShow false; _control7 ctrlEnable false; _control7 ctrlShow false; _control8 ctrlEnable false; _control8 ctrlShow false; }; CASE "EJERCICIOS": { closeDialog 0; createDialog "Island_Dialog"; _control1 = (findDisplay 999) displayCtrl 01; _control2 = (findDisplay 999) displayCtrl 02; _control3 = (findDisplay 999) displayCtrl 03; _control4 = (findDisplay 999) displayCtrl 04; _control5 = (findDisplay 999) displayCtrl 05; _control6 = (findDisplay 999) displayCtrl 06; _control7 = (findDisplay 999) displayCtrl 07; _control8 = (findDisplay 999) displayCtrl 08; _control1 ctrlSetText"<- VOLVER";_control1 buttonSetAction "[""GESTOS""]call life_fnc_crearDialogo"; _control2 ctrlSetText "KUNG FU";_control2 buttonSetAction "player playMove ""AmovPercMstpSnonWnonDnon_exerciseKata"""; _control3 ctrlSetText "FLEXIONES";_control3 buttonSetAction "player playMove ""AmovPercMstpSnonWnonDnon_exercisePushup"""; _control4 ctrlSetText "SENTADILLAS (LENTO)";_control4 buttonSetAction "player playMove ""AmovPercMstpSnonWnonDnon_exercisekneeBendA"""; _control5 ctrlSetText "SENTADILLAS (RAPIDO)";_control5 buttonSetAction "player playMove ""AmovPercMstpSnonWnonDnon_exercisekneeBendB"""; _control6 ctrlEnable false; _control6 ctrlShow false; _control7 ctrlEnable false; _control7 ctrlShow false; _control8 ctrlEnable false; _control8 ctrlShow false; }; CASE "DIVERTIDO": { closeDialog 0; createDialog "Island_Dialog"; _control1 = (findDisplay 999) displayCtrl 01; _control2 = (findDisplay 999) displayCtrl 02; _control3 = (findDisplay 999) displayCtrl 03; _control4 = (findDisplay 999) displayCtrl 04; _control5 = (findDisplay 999) displayCtrl 05; _control6 = (findDisplay 999) displayCtrl 06; _control7 = (findDisplay 999) displayCtrl 07; _control8 = (findDisplay 999) displayCtrl 08; _control1 ctrlSetText "<- VOLVER";_control1 buttonSetAction "[""GESTOS""]call life_fnc_crearDialogo"; _control2 ctrlSetText "NADAR EN LA TIERRA";_control2 buttonSetAction "player playMove ""AswmPercMrunSnonWnonDf_AswmPercMstpSnonWnonDnon"""; _control3 ctrlSetText "ASUSTADO";_control3 buttonSetAction "player playMove ""AmovPercMstpSnonWnonDnon_Scared"""; _control4 ctrlSetText "BORRACHO";_control4 buttonSetAction "player playMove ""AcinPercMstpSnonWnonDnon_agony"""; _control5 ctrlSetText "MEAR";_control5 buttonSetAction "player switchMove ""CL3_anim_Pee"""; _control6 ctrlSetText "CAGAR";_control6 buttonSetAction "player switchMove ""CL3_anim_Poo"""; _control7 ctrlSetText "PAJA";_control7 buttonSetAction "player switchMove ""CL3_anim_Wank"""; _control8 ctrlEnable false; _control8 ctrlShow false; }; CASE "INDICACIONES": { closeDialog 0; createDialog "Island_Dialog"; _control1 = (findDisplay 999) displayCtrl 01; _control2 = (findDisplay 999) displayCtrl 02; _control3 = (findDisplay 999) displayCtrl 03; _control4 = (findDisplay 999) displayCtrl 04; _control5 = (findDisplay 999) displayCtrl 05; _control6 = (findDisplay 999) displayCtrl 06; _control7 = (findDisplay 999) displayCtrl 07; _control8 = (findDisplay 999) displayCtrl 08; _control1 ctrlSetText "<- VOLVER";_control1 buttonSetAction "[""GESTOS""]call life_fnc_crearDialogo"; _control2 ctrlSetText "APUNTAR IZQ";_control2 buttonSetAction "player switchMove ""HubBriefing_pointLeft"";sleep 3;player switchMove "";"; _control3 ctrlSetText "APUNTAR DRCH";_control3 buttonSetAction "player switchMove ""HubBriefing_pointRight"""; _control4 ctrlSetText "APUNTAR ABAJO";_control4 buttonSetAction "player switchMove ""HubBriefing_pointAtTable"""; _control5 ctrlSetText "SEGUIR";_control5 buttonSetAction "player switchMove ""Acts_NavigatingChopper_in"""; _control6 ctrlEnable false; _control6 ctrlShow false; _control7 ctrlEnable false; _control7 ctrlShow false; _control8 ctrlEnable false; _control8 ctrlShow false; }; CASE "SEARCH": { closeDialog 0; createDialog "Island_Dialog"; _control1 = (findDisplay 999) displayCtrl 01; _control2 = (findDisplay 999) displayCtrl 02; _control3 = (findDisplay 999) displayCtrl 03; _control4 = (findDisplay 999) displayCtrl 04; _control5 = (findDisplay 999) displayCtrl 05; _control6 = (findDisplay 999) displayCtrl 06; _control7 = (findDisplay 999) displayCtrl 07; _control8 = (findDisplay 999) displayCtrl 08; _control1 ctrlSetText "REGISTRAR";_control1 buttonSetAction "[_cursorTarget] spawn life_fnc_copSearchPlayer; closeDialog 0;"; _control7 ctrlSetText "REQUISAR";_control7 buttonSetAction "[_cursorTarget] spawn life_fnc_sequestroCheck;"; _control8 ctrlSetText "BUSCAR V.ITEMS";_control8 buttonSetAction "[_cursorTarget] spawn life_fnc_searchAction; closeDialog 0;"; }; CASE "SHOUT": { closeDialog 0; createDialog "Island_Dialog"; _control1 = (findDisplay 999) displayCtrl 01; _control2 = (findDisplay 999) displayCtrl 02; _control3 = (findDisplay 999) displayCtrl 03; _control4 = (findDisplay 999) displayCtrl 04; _control5 = (findDisplay 999) displayCtrl 05; _control6 = (findDisplay 999) displayCtrl 06; _control7 = (findDisplay 999) displayCtrl 07; _control8 = (findDisplay 999) displayCtrl 08; _control1 ctrlSetText "<- VOLVER";_control1 buttonSetAction "[""MAIN""]call life_fnc_crearDialogo"; _control2 ctrlSetText "LICENCIAS";_control2 buttonSetAction "[player] remoteExecCall [""life_fnc_licenseCheck"",_cursorTarget];"; _control3 ctrlSetText "REGISTRAR";_control3 buttonSetAction "[""SEARCH""]call life_fnc_crearDialogo"; _control4 ctrlSetText "INVENTARIO";_control4 buttonSetAction "createDialog ""ACIM_INVENTORY"""; _control5 ctrlSetText "JUSTICIA";_control5 buttonSetAction "[""JUSTICIA""]call life_fnc_crearDialogo"; _control7 ctrlSetText "ACCIONES";_control7 buttonSetAction "[""ACCIONES""]call life_fnc_crearDialogo"; _control8 ctrlSetText "DESESPOSAR";_control8 buttonSetAction "[_cursorTarget] call life_fnc_unrestrain; closeDialog 0;"; _control6 ctrlEnable false; _control6 ctrlShow false; }; CASE "JUSTICIA": { closeDialog 0; createDialog "Island_Dialog"; _control1 = (findDisplay 999) displayCtrl 01; _control2 = (findDisplay 999) displayCtrl 02; _control3 = (findDisplay 999) displayCtrl 03; _control4 = (findDisplay 999) displayCtrl 04; _control5 = (findDisplay 999) displayCtrl 05; _control6 = (findDisplay 999) displayCtrl 06; _control7 = (findDisplay 999) displayCtrl 07; _control8 = (findDisplay 999) displayCtrl 08; _control1 ctrlSetText "<- VOLVER";_control1 buttonSetAction "[""SHOUT""]call life_fnc_crearDialogo"; _control2 ctrlSetText "MULTAR";_control2 buttonSetAction "[_cursorTarget] call life_fnc_ticketAction;"; _control3 ctrlSetText "CARCEL";_control3 buttonSetAction "closeDialog 0; [] call life_fnc_showArrestDialog;"; _control8 ctrlEnable false; _control8 ctrlShow false; _control7 ctrlEnable false; _control7 ctrlShow false; _control6 ctrlEnable false; _control6 ctrlShow false; _control5 ctrlEnable false; _control5 ctrlShow false; _control4 ctrlEnable false; _control4 ctrlShow false; }; CASE "ACCIONES": { closeDialog 0; createDialog "ISLAND_DIALOG"; _control1 = (findDisplay 999) displayCtrl 01; _control2 = (findDisplay 999) displayCtrl 02; _control3 = (findDisplay 999) displayCtrl 03; _control4 = (findDisplay 999) displayCtrl 04; _control5 = (findDisplay 999) displayCtrl 05; _control6 = (findDisplay 999) displayCtrl 06; _control7 = (findDisplay 999) displayCtrl 07; _control8 = (findDisplay 999) displayCtrl 08; _control1 ctrlSetText "<- VOLVER";_control1 buttonSetAction "[""VEHICULO""]call life_fnc_crearDialogo"; _control2 ctrlSetText "ESCOLTAR";_control2 buttonSetAction "[_cursorTarget] call life_fnc_escortAction; closeDialog 0;"; _control3 ctrlSetText "PARAR ESCOLTA";_control3 buttonSetAction "[_cursorTarget] call life_fnc_stopEscorting; closeDialog 0;"; _control4 ctrlSetText "COLOCAR VEHICULO";_control4 buttonSetAction "[_cursorTarget] call life_fnc_putInCar;"; _control5 ctrlSetText "TIRAR AL SUELO";_control5 buttonSetAction "execVM ""Arrestar\arrestarsuelo.sqf"""; _control6 ctrlSetText "LEVANTAR DEL SUELO";_control6 buttonSetAction "execVM ""Arrestar\arrestarlsuelo.sqf"""; _control8 ctrlEnable false; _control8 ctrlShow false; _control7 ctrlEnable false; _control7 ctrlShow false; }; CASE "INFO": { closeDialog 0; createDialog "ISLAND_DIALOG"; _control1 = (findDisplay 999) displayCtrl 01; _control2 = (findDisplay 999) displayCtrl 02; _control3 = (findDisplay 999) displayCtrl 03; _control4 = (findDisplay 999) displayCtrl 04; _control5 = (findDisplay 999) displayCtrl 05; _control6 = (findDisplay 999) displayCtrl 06; _control7 = (findDisplay 999) displayCtrl 07; _control8 = (findDisplay 999) displayCtrl 08; _control1 ctrlSetText "<- VOLVER";_control1 buttonSetAction "[""MAIN""]call life_fnc_crearDialogo"; _control2 ctrlSetText "DNI";_control2 buttonSetAction "createDialog ""ISLAND_Info"""; _control3 ctrlSetText "RENDIRSE";_control3 buttonSetAction "player playMoveNow ""AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon"""; _control4 ctrlSetText "LLAVERO";_control4 buttonSetAction "createDialog ""Life_key_management"""; _control5 ctrlSetText "LICENCIAS";_control5 buttonSetAction "[] call life_fnc_openLicensesMenu"; _control8 ctrlEnable false; _control8 ctrlShow false; _control7 ctrlEnable false; _control7 ctrlShow false; _control6 ctrlEnable false; _control6 ctrlShow false; _control5 ctrlEnable false; _control5 ctrlShow false; }; }; Share this post Link to post Share on other sites
kylania 568 Posted July 1, 2016 And that ladies and gentleman is why I hate dialogs. :) Where's my Visual SQF or xSQF markup language instead of over 2000 lines of fiddly configs? Might wanna spoiler tag or pastebin that btw. Share this post Link to post Share on other sites
Larrow 2823 Posted July 1, 2016 Stop closing the dialog every time you call a new state. Its most likely a timing thing where the dialog is still null when the buttons are set. Instead leave the same dialog open, disable/hide all the buttons each time you call the script then each state only sets the buttons it needs. Something like... params[ "_style", "_caller", "_?", "_position" ]; _cursorTarget = cursorTarget; if ( _cursorTarget isKindOf "Man" ) then { _backpack = backpack _cursorTarget; _vest = vest _cursorTarget; }; _veh = vehicle player; _display = findDisplay( uiNamespace getVariable[ "IslandDialog", displayNull ] ); if ( isNull _display ) exitWith { "Island dialog not found" call BIS_fnc_error; }; //Clear all buttons { ctrlEnable [ _x, false ]; ctrlShow [ _x, false ]; }forEach [ 1, 2, 3, 4, 5, 6, 7, 8 ]; _fnc_setButton = { params[ "_button", "_txt", "_action" ]; ctrlEnable [ _button, true ]; ctrlShow [ _button, true ]; ctrlSetText [ _button, _txt ]; buttonSetAction [ _button, _action ]; }; switch (_style) do { CASE "MAIN": { //===================================COMMON===================================\\ [ 1, "CERRAR", "closeDialog 0;" ] call _fnc_setButton; { _x call _fnc_setButton; }forEach [ [ 3, "GESTOS", "[] call life_fnc_coreGestos" ], [ 5, "INFORMACION", "[""INFO""]call life_fnc_crearDialogo" ], [ 6, "INVENTARIO V.ITEMS", "[""INFO""]call life_fnc_crearDialogo" ] ]; if !(_veh isEqualTo player) then { _fnc = switch ( true ) do { case ( _veh isKindOf "LandVehicle" ) :{ "VEHICULO" }; case ( _veh isKindOf "Ship" ) :{ "VEHICULOMA" }; case ( _veh isKindOf "Air" ) :{ "VEHICULOAIR" }; }; [ 8, "VEHICULO", format[ '["%1"]call life_fnc_crearDialogo', str _fnc ] ] call _fnc_setButton; }; // VEHICULO If ( !isNull _cursorTarget && { { cursorTarget isKindOf _x }count [ "Ship", "LandVehicle", "Air" ] > 0 } ) then { if(_cursorTarget isKindOf "Ship") then { [ 4, "EMPUJAR", "[] spawn life_fnc_pushObject; closeDialog 0;" ] call _fnc_setButton; }; [ 8, "VEHICULO", "[""VEHICULO""]call life_fnc_crearDialogo" ] call _fnc_setButton; }; //===================================POLICIA===================================\\ // NADA If (playerSide == west) then { // CIVIL If (_cursorTarget isKindOf "Man" && { side _cursorTarget == civilian && alive _cursorTarget } ) then { [ 2, "POLICIA", "[""SHOUT""]call life_fnc_crearDialogo" ] call _fnc_setButton; }; }; //====================================CIVIL====================================\\ //====================================MÉDICOS==================================\\ // NADA If(playerSide == independent) then { // VEHICULO If (!isNull _cursorTarget && { { cursorTarget isKindOf _x }count [ "Ship", "LandVehicle", "Air" ] > 0 }) then { [ 8, "VEHICULO", "[""VEHICULOMED""]call life_fnc_crearDialogo" ] call _fnc_setButton; }; }; }; CASE "ACCIONESVEH": { [ 1, "<- VOLVER", "[""VEHICULO""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 2, "ENTRAR DE CONDUCTOR", "cursorTarget lock false;player action [""getInDriver"", cursorTarget];cursorTarget lock true;" ] call _fnc_setButton; [ 3, "ENTRAR DE PASAJERO", "cursorTarget lock false;player action [""getInCargo"", cursorTarget];cursorTarget lock true;" ] call _fnc_setButton; [ 4, "ENTRAR DE ARTILLERO", "cursorTarget lock false;player action [""getIngunner"", cursorTarget];cursorTarget lock true;" ] call _fnc_setButton; [ 5, "SALIR DEL VEHICULO", "_veh lock false;_caller action [""eject"", _veh];_veh lock true;" ] call _fnc_setButton; [ 8, "CONTACTO", "[""CONTACTO""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 7, "LUCES", "[""LUCES""]call life_fnc_crearDialogo" ] call _fnc_setButton; //[ 8, "ENCENDER MOTOR", "vehicle player engineOn true" ] call _fnc_setButton; //[ 7, "APAGAR MOTOR", "vehicle player engineOn false" ] call _fnc_setButton; }; CASE "ACCIONESMA": { [ 1, "<- VOLVER", "[""VEHICULOMA""]call life_fnc_crearDialogo" ] call _fnc_setbutton; [ 2, "ENTRAR DE CONDUCTOR", "cursorTarget lock false;player action [""getInDriver"", cursorTarget];cursorTarget lock true;" ] call _fnc_setbutton; [ 3, "ENTRAR DE PASAJERO", "cursorTarget lock false;player action [""getInCargo"", cursorTarget];cursorTarget lock true;" ] call _fnc_setbutton; [ 4, "ENTRAR DE ARTILLERO", "cursorTarget lock false;player action [""getIngunner"", cursorTarget];cursorTarget lock true;" ] call _fnc_setbutton; [ 5, "SALIR DEL VEHICULO", "_veh lock false;_caller action [""eject"", _veh];_veh lock true;" ] call _fnc_setbutton; [ 8, "CONTACTO", "[""CONTACTO""]call life_fnc_crearDialogo" ] call _fnc_setbutton; [ 7, "LUCES", "[""LUCES""]call life_fnc_crearDialogo" ] call _fnc_setbutton; //[ 8, "ENCENDER MOTOR", "vehicle player engineOn true" ] call _fnc_setButton; //[ 7, "APAGAR MOTOR", "vehicle player engineOn false" ] call _fnc_setButton; }; CASE "ACCIONESVEHAIR": { [ 1, "<- VOLVER", "[""VEHICULOAIR""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 2, "ENTRAR DE CONDUCTOR", "cursorTarget lock false;player action [""getInDriver"", cursorTarget];cursorTarget lock true;" ] call _fnc_setButton; [ 3, "ENTRAR DE PASAJERO", "cursorTarget lock false;player action [""getInCargo"", cursorTarget];cursorTarget lock true;" ] call _fnc_setButton; [ 4, "ENTRAR DE ARTILLERO", "cursorTarget lock false;player action [""getIngunner"", cursorTarget];cursorTarget lock true;" ] call _fnc_setButton; [ 5, "SALIR DEL VEHICULO", "_veh lock false;_caller action [""eject"", _veh];_veh lock true;" ] call _fnc_setButton; [ 6, "HIDRAULICA", "[""HIDRAULICA""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 8, "CONTACTO", "[""CONTACTO""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 7, "LUCES", "[""LUCES""]call life_fnc_crearDialogo" ] call _fnc_setButton; //ctrlSetText [08, "ENCENDER MOTOR"];buttonSetAction [08, "vehicle player engineOn true"]; //ctrlSetText [07, "APAGAR MOTOR"];buttonSetAction [07, "vehicle player engineOn false"]; }; CASE "HIDRAULICA": { [ 1, "<- VOLVER", "[""ACCIONESVEHAIR""]call life_fnc_crearDialogo" ] call _fnc_setbutton; [ 7, "BAJAR TREN ATERRIZAJE", "player action [""LandGear"", vehicle player]" ] call _fnc_setbutton; [ 8, "SUBIR TREN ATERRIZAJE", "player action [""LandGearUp"", vehicle player]" ] call _fnc_setbutton; if(_veh isKindOf "Helicopter") then { [ 5, "ACTIVAR ESTABILIZADOR", "player action [""autoHover"", vehicle player]" ] call _fnc_setButton; [ 6, "DESACTIVAR ESTABILIZADOR", "player action [""autoHoverCancel"", vehicle player]" ] call _fnc_setButton; }; if(_veh isKindOf "Plane") then { [ 2, "FLAPS ARRIBA", "player action [""flapsUp"", vehicle player]" ] call _fnc_setButton; [ 3, "FLAPS ABAJO", "player action [""flapsDown"", vehicle player]" ] call _fnc_setButton; }; }; CASE "LUCES": { [ 1, "<- VOLVER", "[""MAIN""]call life_fnc_crearDialogo" ] call _fnc_setbutton; [ 2, "ENCENDER LUCES", "player action [""lightOn"", vehicle player];" ] call _fnc_setbutton; [ 3, "APAGAR LUCES", "player action [""lightOff"", vehicle player];" ] call _fnc_setbutton; if(_veh isKindOf "Air") then { [ 5, "ENCENDER COLISION", "player action [""lightOn"", vehicle player];" ] call _fnc_setButton; [ 6, "APAGAR COLISION", "player action [""lightOff"", vehicle player];" ] call _fnc_setButton; }; }; CASE "CONTACTO": { [ 1, "<- VOLVER", "[""MAIN""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 2, "ENCENDER MOTOR", "vehicle player engineOn true" ] call _fnc_setButton; [ 3, "APAGAR MOTOR", "vehicle player engineOn false" ] call _fnc_setButton; }; CASE "VEHICULO": { [ 1, "<- VOLVER", "[""MAIN""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 2, "ACCIONES", "[""ACCIONESVEH""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 3, "REPARAR", "[_cursorTarget] spawn life_fnc_repairTruck;" ] call _fnc_setButton; [ 4, "DAR LA VUELTA", "_cursorTarget setPos [getPos _cursorTarget select 0, getPos _cursorTarget select 1, (getPos _cursorTarget select 2)+0.5]; closeDialog 0;" ] call _fnc_setButton; if(playerSide == west) then { [ 6, "POLICIA", "[""POLICIAVEH""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 7, "RADIO", "execVM ""Arrestar\radioon.sqf""" ] call _fnc_setButton; }; if(playerSide == independent) then { [ 6, "MEDICO", "[""MEDICOVEH""]call life_fnc_crearDialogo" ] call _fnc_setButton; }; }; CASE "VEHICULOMA": { [ 1, "<- VOLVER", "[""MAIN""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 2, "ACCIONES", "[""ACCIONESMA""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 3, "REPARAR", "[_cursorTarget] spawn life_fnc_repairTruck;" ] call _fnc_setButton; }; CASE "VEHICULOAIR": { [ 1, "<- VOLVER", "[""MAIN""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 2, "ACCIONES", "[""ACCIONESVEHAIR""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 3, "REPARAR", "[_cursorTarget] spawn life_fnc_repairTruck;" ] call _fnc_setButton; }; CASE "VEHICULOMED": { [ 1, "<- VOLVER", "[""MAIN""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 2, "ACCIONES", "[""ACCIONESVEH""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 3, "REPARAR", "[_cursorTarget] spawn life_fnc_repairTruck;" ] call _fnc_setButton; [ 4, "DAR LA VUELTA", "_cursorTarget setPos [getPos _cursorTarget select 0, getPos _cursorTarget select 1, (getPos _cursorTarget select 2)+0.5]; closeDialog 0;" ] call _fnc_setButton; [ 6, "MEDICO", "[""MEDICOVEH""]call life_fnc_crearDialogo" ] call _fnc_setButton; }; CASE "MEDICOVEH": { [ 1, "<- VOLVER", "[""VEHICULOMED""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 2, "PROPIETARIO", "[_cursorTarget] spawn life_fnc_searchVehAction;" ] call _fnc_setButton; [ 4, "SACAR INDIVIDUOS", "[_cursorTarget] spawn life_fnc_pulloutAction;" ] call _fnc_setButton; [ 6, "EMBARGAR", "[_cursorTarget] spawn life_fnc_impoundAction;" ] call _fnc_setButton; }; CASE "POLICIAVEH": { [ 1, "<- VOLVER", "[""VEHICULO""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 2, "PROPIETARIO", "[_cursorTarget] spawn life_fnc_searchVehAction;" ] call _fnc_setButton; [ 3, "REGISTRAR", "[_cursorTarget] spawn life_fnc_vehInvSearch;" ] call _fnc_setButton; [ 4, "SACAR INDIVIDUOS", "[_cursorTarget] spawn life_fnc_pulloutAction;" ] call _fnc_setButton; [ 6, "EMBARGAR", "[_cursorTarget] spawn life_fnc_impoundAction;" ] call _fnc_setButton; }; CASE "GESTOS": { [ 1, "<- VOLVER", "[""MAIN""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 2, "EJERCICIOS", "[""EJERCICIOS""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 3, "DIVERTIDO", "[""DIVERTIDO""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 4, "INDICACIONES", "[""INDICACIONES""]call life_fnc_crearDialogo" ] call _fnc_setButton; }; CASE "EJERCICIOS": { [ 1, "<- VOLVER", "[""GESTOS""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 2, "KUNG FU", "player playMove ""AmovPercMstpSnonWnonDnon_exerciseKata""" ] call _fnc_setButton; [ 3, "FLEXIONES", "player playMove ""AmovPercMstpSnonWnonDnon_exercisePushup""" ] call _fnc_setButton; [ 4, "SENTADILLAS (LENTO)", "player playMove ""AmovPercMstpSnonWnonDnon_exercisekneeBendA""" ] call _fnc_setButton; [ 5, "SENTADILLAS (RAPIDO)", "player playMove ""AmovPercMstpSnonWnonDnon_exercisekneeBendB""" ] call _fnc_setButton; }; CASE "DIVERTIDO": { [ 1, "<- VOLVER", "[""GESTOS""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 2, "NADAR EN LA TIERRA", "player playMove ""AswmPercMrunSnonWnonDf_AswmPercMstpSnonWnonDnon""" ] call _fnc_setButton; [ 3, "ASUSTADO", "player playMove ""AmovPercMstpSnonWnonDnon_Scared""" ] call _fnc_setButton; [ 4, "BORRACHO", "player playMove ""AcinPercMstpSnonWnonDnon_agony""" ] call _fnc_setButton; [ 5, "MEAR", "player switchMove ""CL3_anim_Pee""" ] call _fnc_setButton; [ 6, "CAGAR", "player switchMove ""CL3_anim_Poo""" ] call _fnc_setButton; [ 7, "PAJA", "player switchMove ""CL3_anim_Wank""" ] call _fnc_setButton; }; CASE "INDICACIONES": { [ 1, "<- VOLVER", "[""GESTOS""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 2, "APUNTAR IZQ", "player switchMove ""HubBriefing_pointLeft"";sleep 3;player switchMove "";" ] call _fnc_setButton; [ 3, "APUNTAR DRCH", "player switchMove ""HubBriefing_pointRight""" ] call _fnc_setButton; [ 4, "APUNTAR ABAJO", "player switchMove ""HubBriefing_pointAtTable""" ] call _fnc_setButton; [ 5, "SEGUIR", "player switchMove ""Acts_NavigatingChopper_in""" ] call _fnc_setButton; }; CASE "SEARCH": { [ 1, "REGISTRAR", "[_cursorTarget] spawn life_fnc_copSearchPlayer; closeDialog 0;" ] call _fnc_setButton; [ 7, "REQUISAR", "[_cursorTarget] spawn life_fnc_sequestroCheck;" ] call _fnc_setButton; [ 8, "BUSCAR V.ITEMS", "[_cursorTarget] spawn life_fnc_searchAction; closeDialog 0;" ] call _fnc_setButton; }; CASE "SHOUT": { [ 1, "<- VOLVER", "[""MAIN""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 2, "LICENCIAS", "[player] remoteExecCall [""life_fnc_licenseCheck"",_cursorTarget];" ] call _fnc_setButton; [ 3, "REGISTRAR", "[""SEARCH""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 4, "INVENTARIO", "createDialog ""ACIM_INVENTORY""" ] call _fnc_setButton; [ 5, "JUSTICIA", "[""JUSTICIA""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 7, "ACCIONES", "[""ACCIONES""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 8, "DESESPOSAR", "[_cursorTarget] call life_fnc_unrestrain; closeDialog 0;" ] call _fnc_setButton; }; CASE "JUSTICIA": { [ 1, "<- VOLVER", "[""SHOUT""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 2, "MULTAR", "[_cursorTarget] call life_fnc_ticketAction;" ] call _fnc_setButton; [ 3, "CARCEL", "closeDialog 0; [] call life_fnc_showArrestDialog;" ] call _fnc_setButton; }; CASE "ACCIONES": { [ 1, "<- VOLVER", "[""VEHICULO""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 2, "ESCOLTAR", "[_cursorTarget] call life_fnc_escortAction; closeDialog 0;" ] call _fnc_setButton; [ 3, "PARAR ESCOLTA", "[_cursorTarget] call life_fnc_stopEscorting; closeDialog 0;" ] call _fnc_setButton; [ 4, "COLOCAR VEHICULO", "[_cursorTarget] call life_fnc_putInCar;" ] call _fnc_setButton; [ 5, "TIRAR AL SUELO", "execVM ""Arrestar\arrestarsuelo.sqf""" ] call _fnc_setButton; [ 6, "LEVANTAR DEL SUELO", "execVM ""Arrestar\arrestarlsuelo.sqf""" ] call _fnc_setButton; }; CASE "INFO": { [ 1, "<- VOLVER", "[""MAIN""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 2, "DNI", "createDialog ""ISLAND_Info""" ] call _fnc_setButton; [ 3, "RENDIRSE", "player playMoveNow ""AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon""" ] call _fnc_setButton; [ 4, "LLAVERO", "createDialog ""Life_key_management""" ] call _fnc_setButton; [ 5, "LICENCIA, "[] call life_fnc_openLicensesMenu" ] call _fnc_setButton; }; }; Cuts out all the repeated code 800+ lines down to 300, above may have some errors as i have only quickly gone through and changed stuff, but hopefully gives you an idea. Share this post Link to post Share on other sites
miguel93041 0 Posted July 2, 2016 Thank you Larrow. Ok, all is right and i understand it, but.. i think you have missed the _style = _this select 0; etc, and the createDialog at start. But now when i write ["MAIN"] call life_fnc_crearDialogo; is not doing anything Share this post Link to post Share on other sites
Larrow 2823 Posted July 2, 2016 i think you have missed the _style = _this select 0;No its there. I rewrote it as params. params[ "_style", "_caller", "_?", "_position" ];Although there is no referece to _this select 2 in the script so i set it as _?. But now when i write ["MAIN"] call life_fnc_crearDialogo; is not doing anythingYes i had changed the dialog itself but did not post that. If your using your call to this function to also open the dialog then change this... _display = findDisplay( uiNamespace getVariable[ "IslandDialog", displayNull ] ); if ( isNull _display ) exitWith { "Island dialog not found" call BIS_fnc_error; };to if ( isNull ( uiNamespace getVariable[ "IslandDialog", displayNull ] ) ) then { createDialog "ISLAND_DIALOG"; };and change the top of your ui class Island_Dialog { idd = 999; movingenable = false; name="Island_Dialog"; onLoad = "uinamespace setvariable [ 'IslandDialog', _this select 0 ]";So when your script starts if the ui variable is null/does not exist it creates your dialog. The dialog sets the ui variable filling it with a reference to the display.On further calls by states to the script the variable will not be null so it does not create the dialog. On closing the dialog the reference held by the ui variable will automatically become null. Share this post Link to post Share on other sites
miguel93041 0 Posted July 2, 2016 No its there. I rewrote it as params. params[ "_style", "_caller", "_?", "_position" ];Although there is no referece to _this select 2 in the script so i set it as _?. Yes i had changed the dialog itself but did not post that. If your using your call to this function to also open the dialog then change this... _display = findDisplay( uiNamespace getVariable[ "IslandDialog", displayNull ] ); if ( isNull _display ) exitWith { "Island dialog not found" call BIS_fnc_error; };to if ( isNull ( uiNamespace getVariable[ "IslandDialog", displayNull ] ) ) then { createDialog "ISLAND_DIALOG"; };and change the top of your ui class Island_Dialog { idd = 999; movingenable = false; name="Island_Dialog"; onLoad = "uinamespace setvariable [ 'IslandDialog', _this select 0 ]";So when your script starts if the ui variable is null/does not exist it creates your dialog. The dialog sets the ui variable filling it with a reference to the display.On further calls by states to the script the variable will not be null so it does not create the dialog. On closing the dialog the reference held by the ui variable will automatically become null. Incredible, now is working. But its not setting the text on the buttons, they are black! I have a teory. As you can see in https://community.bistudio.com/wiki/ctrlSetText the main syntax is not working for me (Its like it dont recognize the IDC), so if you test the alternative syntax it is setting the text correctly, thats why im doing the (find display) bla bla. You know why? It can be because its more Display than dialog? Share this post Link to post Share on other sites
Larrow 2823 Posted July 2, 2016 Ah I see there is a note there on the ctrlSetText page saying normal syntax does not work for CT_SortcutButton's. Never really used them that much so never come across that problem myself. Well at least you only have to change it in the one place _fnc_setButton. _fnc_setButton = { params[ "_button", "_txt", "_action" ]; ctrlEnable [ _button, true ]; ctrlShow [ _button, true ]; ( uiNamespace getVariable "IslandDialog" ) displayCtrl _button ctrlSetText _txt; buttonSetAction [ _button, _action ]; }; Share this post Link to post Share on other sites
miguel93041 0 Posted July 2, 2016 Ah I see there is a note there on the ctrlSetText page saying normal syntax does not work for CT_SortcutButton's. Never really used them that much so never come across that problem myself. Well at least you only have to change it in the one place _fnc_setButton. _fnc_setButton = { params[ "_button", "_txt", "_action" ]; ctrlEnable [ _button, true ]; ctrlShow [ _button, true ]; ( uiNamespace getVariable "IslandDialog" ) displayCtrl _button ctrlSetText _txt; buttonSetAction [ _button, _action ]; }; Thank you so much. All is working fine now. Well at least.. This wasnt a waste of time, you have learnt a new thing about ctrlSetText and i have my script working fine :D :lol: Someday i have to buy you some beers haha Share this post Link to post Share on other sites
miguel93041 0 Posted July 4, 2016 Ah I see there is a note there on the ctrlSetText page saying normal syntax does not work for CT_SortcutButton's. Never really used them that much so never come across that problem myself. Well at least you only have to change it in the one place _fnc_setButton. _fnc_setButton = { params[ "_button", "_txt", "_action" ]; ctrlEnable [ _button, true ]; ctrlShow [ _button, true ]; ( uiNamespace getVariable "IslandDialog" ) displayCtrl _button ctrlSetText _txt; buttonSetAction [ _button, _action ]; }; Well about time i saw a small bug but i dont know why is happening.. i checked the code and all seems to be working fine. Look, if you open the main island dialog, and you click into GESTOS then the button called EJERCICIOS & <- VOLVER is not working but DIVERTIDO & INDICACIONES yes. When you click in the ones who fails you can hear a sound trying to create the dialog, but then it closes like a closeDialog Share this post Link to post Share on other sites
Larrow 2823 Posted July 4, 2016 No idea as I do not have a working dialog, I'm only going off of what you have posted. What does [] call life_fnc_coreGestos do? Do any of the other menus have problems? as EJERCICIOS & <- VOLVER are buttons 1&2 and DIVERTIDO & INDICACIONES 3&4, so is it a timing issue? Do other states fails on their first couple of buttons? Most of the other buttons either call another state directly or do something obvious like some code i.e an animation or action. Share this post Link to post Share on other sites
miguel93041 0 Posted July 4, 2016 No idea as I do not have a working dialog, I'm only going off of what you have posted. What does [] call life_fnc_coreGestos do? Do any of the other menus have problems? as EJERCICIOS & <- VOLVER are buttons 1&2 and DIVERTIDO & INDICACIONES 3&4, so is it a timing issue? Do other states fails on their first couple of buttons? Most of the other buttons either call another state directly or do something obvious like some code i.e an animation or action. No, coreGestos its a test i maded, it calls the "GESTOS" case. Im uploading a video where you can see all i have and i post the script again with the modifications. I know that the 1º and 2º button arent setted with action but with text yes, and the 3º and 4º are setted correctly, all buttons like <- VOLVER or CERRAR dont work because they are first it can be a supposition. https://youtu.be/SGEaXzPxHa0 http://pastebin.com/Q6kkr2G1<- THE PASTEBIN OF THE CODE params[ "_style", "_caller", "_?", "_position" ]; _cursorTarget = cursorTarget; if ( _cursorTarget isKindOf "Man" ) then { _backpack = backpack _cursorTarget; _vest = vest _cursorTarget; }; _veh = vehicle player; if ( isNull ( uiNamespace getVariable[ "IslandDialog", displayNull ] ) ) then { createDialog "ISLAND_DIALOG"; }; //Clear all buttons { ctrlEnable [ _x, false ]; ctrlShow [ _x, false ]; }forEach [ 01, 02, 03, 04, 05, 06, 07, 08 ]; _fnc_setButton = { params[ "_button", "_txt", "_action" ]; ctrlEnable [ _button, true ]; ctrlShow [ _button, true ]; ( uiNamespace getVariable "IslandDialog" ) displayCtrl _button ctrlSetText _txt; ( uiNamespace getVariable "IslandDialog" ) displayCtrl _button buttonSetAction _action; }; switch (_style) do { CASE "MAIN": { //===================================COMMON===================================\\ [ 01, "CERRAR", "closeDialog 0;" ] call _fnc_setButton; { _x call _fnc_setButton; }forEach [ [ 03, "GESTOS", "[""GESTOS""] call life_fnc_crearDialogo" ], [ 05, "INFORMACION", "[""INFO""]call life_fnc_crearDialogo" ] ]; if !(_veh isEqualTo player) then { _fnc = switch ( true ) do { case ( _veh isKindOf "LandVehicle" ) :{ "VEHICULO" }; case ( _veh isKindOf "Ship" ) :{ "VEHICULOMA" }; case ( _veh isKindOf "Air" ) :{ "VEHICULOAIR" }; }; [ 08, "VEHICULO", format[ '["%01"]call life_fnc_crearDialogo', str _fnc ] ] call _fnc_setButton; }; // VEHICULO If ( !isNull _cursorTarget && { { cursorTarget isKindOf _x }count [ "Ship", "LandVehicle", "Air" ] > 0 } ) then { if(_cursorTarget isKindOf "Ship") then { [ 04, "EMPUJAR", "[] spawn life_fnc_pushObject; closeDialog 0;" ] call _fnc_setButton; }; [ 08, "VEHICULO", "[""VEHICULO""]call life_fnc_crearDialogo" ] call _fnc_setButton; }; //===================================POLICIA===================================\\ // NADA If (playerSide == west) then { // CIVIL If (_cursorTarget isKindOf "Man" && { side _cursorTarget == civilian && alive _cursorTarget } ) then { [ 02, "POLICIA", "[""SHOUT""]call life_fnc_crearDialogo" ] call _fnc_setButton; }; }; //====================================CIVIL====================================\\ //====================================MÉDICOS==================================\\ // NADA If(playerSide == independent) then { // VEHICULO If (!isNull _cursorTarget && { { cursorTarget isKindOf _x }count [ "Ship", "LandVehicle", "Air" ] > 0 }) then { [ 08, "VEHICULO", "[""VEHICULOMED""]call life_fnc_crearDialogo" ] call _fnc_setButton; }; }; }; CASE "ACCIONESVEH": { [ 01, "<- VOLVER", "[""VEHICULO""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 02, "ENTRAR DE CONDUCTOR", "cursorTarget lock false;player action [""getInDriver"", cursorTarget];cursorTarget lock true;" ] call _fnc_setButton; [ 03, "ENTRAR DE PASAJERO", "cursorTarget lock false;player action [""getInCargo"", cursorTarget];cursorTarget lock true;" ] call _fnc_setButton; [ 04, "ENTRAR DE ARTILLERO", "cursorTarget lock false;player action [""getIngunner"", cursorTarget];cursorTarget lock true;" ] call _fnc_setButton; [ 05, "SALIR DEL VEHICULO", "_veh lock false;_caller action [""eject"", _veh];_veh lock true;" ] call _fnc_setButton; [ 08, "CONTACTO", "[""CONTACTO""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 07, "LUCES", "[""LUCES""]call life_fnc_crearDialogo" ] call _fnc_setButton; //[ 08, "ENCENDER MOTOR", "vehicle player engineOn true" ] call _fnc_setButton; //[ 07, "APAGAR MOTOR", "vehicle player engineOn false" ] call _fnc_setButton; }; CASE "ACCIONESMA": { [ 01, "<- VOLVER", "[""VEHICULOMA""]call life_fnc_crearDialogo" ] call _fnc_setbutton; [ 02, "ENTRAR DE CONDUCTOR", "cursorTarget lock false;player action [""getInDriver"", cursorTarget];cursorTarget lock true;" ] call _fnc_setbutton; [ 03, "ENTRAR DE PASAJERO", "cursorTarget lock false;player action [""getInCargo"", cursorTarget];cursorTarget lock true;" ] call _fnc_setbutton; [ 04, "ENTRAR DE ARTILLERO", "cursorTarget lock false;player action [""getIngunner"", cursorTarget];cursorTarget lock true;" ] call _fnc_setbutton; [ 05, "SALIR DEL VEHICULO", "_veh lock false;_caller action [""eject"", _veh];_veh lock true;" ] call _fnc_setbutton; [ 08, "CONTACTO", "[""CONTACTO""]call life_fnc_crearDialogo" ] call _fnc_setbutton; [ 07, "LUCES", "[""LUCES""]call life_fnc_crearDialogo" ] call _fnc_setbutton; //[ 08, "ENCENDER MOTOR", "vehicle player engineOn true" ] call _fnc_setButton; //[ 07, "APAGAR MOTOR", "vehicle player engineOn false" ] call _fnc_setButton; }; CASE "ACCIONESVEHAIR": { [ 01, "<- VOLVER", "[""VEHICULOAIR""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 02, "ENTRAR DE CONDUCTOR", "cursorTarget lock false;player action [""getInDriver"", cursorTarget];cursorTarget lock true;" ] call _fnc_setButton; [ 03, "ENTRAR DE PASAJERO", "cursorTarget lock false;player action [""getInCargo"", cursorTarget];cursorTarget lock true;" ] call _fnc_setButton; [ 04, "ENTRAR DE ARTILLERO", "cursorTarget lock false;player action [""getIngunner"", cursorTarget];cursorTarget lock true;" ] call _fnc_setButton; [ 05, "SALIR DEL VEHICULO", "_veh lock false;_caller action [""eject"", _veh];_veh lock true;" ] call _fnc_setButton; [ 06, "HIDRAULICA", "[""HIDRAULICA""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 08, "CONTACTO", "[""CONTACTO""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 07, "LUCES", "[""LUCES""]call life_fnc_crearDialogo" ] call _fnc_setButton; //ctrlSetText [08, "ENCENDER MOTOR"];buttonSetAction [08, "vehicle player engineOn true"]; //ctrlSetText [07, "APAGAR MOTOR"];buttonSetAction [07, "vehicle player engineOn false"]; }; CASE "HIDRAULICA": { [ 01, "<- VOLVER", "[""ACCIONESVEHAIR""]call life_fnc_crearDialogo" ] call _fnc_setbutton; [ 07, "BAJAR TREN ATERRIZAJE", "player action [""LandGear"", vehicle player]" ] call _fnc_setbutton; [ 08, "SUBIR TREN ATERRIZAJE", "player action [""LandGearUp"", vehicle player]" ] call _fnc_setbutton; if(_veh isKindOf "Helicopter") then { [ 05, "ACTIVAR ESTABILIZADOR", "player action [""autoHover"", vehicle player]" ] call _fnc_setButton; [ 06, "DESACTIVAR ESTABILIZADOR", "player action [""autoHoverCancel"", vehicle player]" ] call _fnc_setButton; }; if(_veh isKindOf "Plane") then { [ 02, "FLAPS ARRIBA", "player action [""flapsUp"", vehicle player]" ] call _fnc_setButton; [ 03, "FLAPS ABAJO", "player action [""flapsDown"", vehicle player]" ] call _fnc_setButton; }; }; CASE "LUCES": { [ 01, "<- VOLVER", "[""MAIN""]call life_fnc_crearDialogo" ] call _fnc_setbutton; [ 02, "ENCENDER LUCES", "player action [""lightOn"", vehicle player];" ] call _fnc_setbutton; [ 03, "APAGAR LUCES", "player action [""lightOff"", vehicle player];" ] call _fnc_setbutton; if(_veh isKindOf "Air") then { [ 05, "ENCENDER COLISION", "player action [""lightOn"", vehicle player];" ] call _fnc_setButton; [ 06, "APAGAR COLISION", "player action [""lightOff"", vehicle player];" ] call _fnc_setButton; }; }; CASE "CONTACTO": { [ 01, "<- VOLVER", "[""MAIN""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 02, "ENCENDER MOTOR", "vehicle player engineOn true" ] call _fnc_setButton; [ 03, "APAGAR MOTOR", "vehicle player engineOn false" ] call _fnc_setButton; }; CASE "VEHICULO": { [ 01, "<- VOLVER", "[""MAIN""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 02, "ACCIONES", "[""ACCIONESVEH""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 03, "REPARAR", "[_cursorTarget] spawn life_fnc_repairTruck;" ] call _fnc_setButton; [ 04, "DAR LA VUELTA", "_cursorTarget setPos [getPos _cursorTarget select 0, getPos _cursorTarget select 01, (getPos _cursorTarget select 02)+0.05]; closeDialog 0;" ] call _fnc_setButton; if(playerSide == west) then { [ 06, "POLICIA", "[""POLICIAVEH""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 07, "RADIO", "execVM ""Arrestar\radioon.sqf""" ] call _fnc_setButton; }; if(playerSide == independent) then { [ 06, "MEDICO", "[""MEDICOVEH""]call life_fnc_crearDialogo" ] call _fnc_setButton; }; }; CASE "VEHICULOMA": { [ 01, "<- VOLVER", "[""MAIN""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 02, "ACCIONES", "[""ACCIONESMA""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 03, "REPARAR", "[_cursorTarget] spawn life_fnc_repairTruck;" ] call _fnc_setButton; }; CASE "VEHICULOAIR": { [ 01, "<- VOLVER", "[""MAIN""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 02, "ACCIONES", "[""ACCIONESVEHAIR""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 03, "REPARAR", "[_cursorTarget] spawn life_fnc_repairTruck;" ] call _fnc_setButton; }; CASE "VEHICULOMED": { [ 01, "<- VOLVER", "[""MAIN""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 02, "ACCIONES", "[""ACCIONESVEH""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 03, "REPARAR", "[_cursorTarget] spawn life_fnc_repairTruck;" ] call _fnc_setButton; [ 04, "DAR LA VUELTA", "_cursorTarget setPos [getPos _cursorTarget select 0, getPos _cursorTarget select 01, (getPos _cursorTarget select 02)+0.05]; closeDialog 0;" ] call _fnc_setButton; [ 06, "MEDICO", "[""MEDICOVEH""]call life_fnc_crearDialogo" ] call _fnc_setButton; }; CASE "MEDICOVEH": { [ 01, "<- VOLVER", "[""VEHICULOMED""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 02, "PROPIETARIO", "[_cursorTarget] spawn life_fnc_searchVehAction;" ] call _fnc_setButton; [ 04, "SACAR INDIVIDUOS", "[_cursorTarget] spawn life_fnc_pulloutAction;" ] call _fnc_setButton; [ 06, "EMBARGAR", "[_cursorTarget] spawn life_fnc_impoundAction;" ] call _fnc_setButton; }; CASE "POLICIAVEH": { [ 01, "<- VOLVER", "[""VEHICULO""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 02, "PROPIETARIO", "[_cursorTarget] spawn life_fnc_searchVehAction;" ] call _fnc_setButton; [ 03, "REGISTRAR", "[_cursorTarget] spawn life_fnc_vehInvSearch;" ] call _fnc_setButton; [ 04, "SACAR INDIVIDUOS", "[_cursorTarget] spawn life_fnc_pulloutAction;" ] call _fnc_setButton; [ 06, "EMBARGAR", "[_cursorTarget] spawn life_fnc_impoundAction;" ] call _fnc_setButton; }; CASE "GESTOS": { [ 01, "<- VOLVER", "[""MAIN""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 02, "EJERCICIOS", "[""EJERCICIOS""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 03, "DIVERTIDO", "[""DIVERTIDO""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 04, "INDICACIONES", "[""INDICACIONES""]call life_fnc_crearDialogo" ] call _fnc_setButton; }; CASE "EJERCICIOS": { [ 01, "<- VOLVER", "[""GESTOS""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 02, "KUNG FU", "player playMove ""AmovPercMstpSnonWnonDnon_exerciseKata""" ] call _fnc_setButton; [ 03, "FLEXIONES", "player playMove ""AmovPercMstpSnonWnonDnon_exercisePushup""" ] call _fnc_setButton; [ 04, "SENTADILLAS (LENTO)", "player playMove ""AmovPercMstpSnonWnonDnon_exercisekneeBendA""" ] call _fnc_setButton; [ 05, "SENTADILLAS (RAPIDO)", "player playMove ""AmovPercMstpSnonWnonDnon_exercisekneeBendB""" ] call _fnc_setButton; }; CASE "DIVERTIDO": { [ 01, "<- VOLVER", "[""GESTOS""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 02, "NADAR EN LA TIERRA", "player playMove ""AswmPercMrunSnonWnonDf_AswmPercMstpSnonWnonDnon""" ] call _fnc_setButton; [ 03, "ASUSTADO", "player playMove ""AmovPercMstpSnonWnonDnon_Scared""" ] call _fnc_setButton; [ 04, "BORRACHO", "player playMove ""AcinPercMstpSnonWnonDnon_agony""" ] call _fnc_setButton; [ 05, "MEAR", "player switchMove ""CL3_anim_Pee""" ] call _fnc_setButton; [ 06, "CAGAR", "player switchMove ""CL3_anim_Poo""" ] call _fnc_setButton; [ 07, "PAJA", "player switchMove ""CL3_anim_Wank""" ] call _fnc_setButton; }; CASE "INDICACIONES": { [ 01, "<- VOLVER", "[""GESTOS""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 02, "APUNTAR IZQ", "player switchMove ""HubBriefing_pointLeft"";sleep 03;player switchMove "";" ] call _fnc_setButton; [ 03, "APUNTAR DRCH", "player switchMove ""HubBriefing_pointRight""" ] call _fnc_setButton; [ 04, "APUNTAR ABAJO", "player switchMove ""HubBriefing_pointAtTable""" ] call _fnc_setButton; [ 05, "SEGUIR", "player switchMove ""Acts_NavigatingChopper_in""" ] call _fnc_setButton; }; CASE "SEARCH": { [ 01, "REGISTRAR", "[_cursorTarget] spawn life_fnc_copSearchPlayer; closeDialog 0;" ] call _fnc_setButton; [ 07, "REQUISAR", "[_cursorTarget] spawn life_fnc_sequestroCheck;" ] call _fnc_setButton; [ 08, "BUSCAR V.ITEMS", "[_cursorTarget] spawn life_fnc_searchAction; closeDialog 0;" ] call _fnc_setButton; }; CASE "SHOUT": { [ 01, "<- VOLVER", "[""MAIN""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 02, "LICENCIAS", "[player] remoteExecCall [""life_fnc_licenseCheck"",_cursorTarget];" ] call _fnc_setButton; [ 03, "REGISTRAR", "[""SEARCH""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 04, "INVENTARIO", "createDialog ""ACIM_INVENTORY""" ] call _fnc_setButton; [ 05, "JUSTICIA", "[""JUSTICIA""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 07, "ACCIONES", "[""ACCIONES""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 08, "DESESPOSAR", "[_cursorTarget] call life_fnc_unrestrain; closeDialog 0;" ] call _fnc_setButton; }; CASE "JUSTICIA": { [ 01, "<- VOLVER", "[""SHOUT""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 02, "MULTAR", "[_cursorTarget] call life_fnc_ticketAction;" ] call _fnc_setButton; [ 03, "CARCEL", "closeDialog 0; [] call life_fnc_showArrestDialog;" ] call _fnc_setButton; }; CASE "ACCIONES": { [ 01, "<- VOLVER", "[""VEHICULO""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 02, "ESCOLTAR", "[_cursorTarget] call life_fnc_escortAction; closeDialog 0;" ] call _fnc_setButton; [ 03, "PARAR ESCOLTA", "[_cursorTarget] call life_fnc_stopEscorting; closeDialog 0;" ] call _fnc_setButton; [ 04, "COLOCAR VEHICULO", "[_cursorTarget] call life_fnc_putInCar;" ] call _fnc_setButton; [ 05, "TIRAR AL SUELO", "execVM ""Arrestar\arrestarsuelo.sqf""" ] call _fnc_setButton; [ 06, "LEVANTAR DEL SUELO", "execVM ""Arrestar\arrestarlsuelo.sqf""" ] call _fnc_setButton; }; CASE "INFO": { [ 01, "<- VOLVER", "[""MAIN""]call life_fnc_crearDialogo" ] call _fnc_setButton; [ 02, "DNI", "createDialog ""ISLAND_Info""" ] call _fnc_setButton; [ 03, "RENDIRSE", "player playMoveNow ""AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon""" ] call _fnc_setButton; [ 04, "LLAVERO", "createDialog ""Life_key_management""" ] call _fnc_setButton; [ 05, "LICENCIA", "[] call life_fnc_openLicensesMenu" ] call _fnc_setButton; }; }; Share this post Link to post Share on other sites
Larrow 2823 Posted July 5, 2016 Renumber your button idc's. 1 and 2 are reserved idc's for OK and CANCEL respectively. Share this post Link to post Share on other sites
miguel93041 0 Posted July 5, 2016 Renumber your button idc's. 1 and 2 are reserved idc's for OK and CANCEL respectively. I have renumbered them, already they are 01,02,03,04,05,06,07,08 FOR BUTTONS and 999 for the main ISLAND_DIALOG You reffer to 01 or 1? Share this post Link to post Share on other sites
Larrow 2823 Posted July 5, 2016 01 or 1 are the same , its still 1. Share this post Link to post Share on other sites
miguel93041 0 Posted July 5, 2016 01 or 1 are the same , its still 1. Let me test it wait 10 minutes I guess the numbers from 1001 for 1008 are not picked up Im entering the server because when i enter for the first time it always kick me to lobby i dont know why it pauses on recieving data 5990 of 6000 and stops Share this post Link to post Share on other sites
miguel93041 0 Posted July 5, 2016 01 or 1 are the same , its still 1. Now is working properly i think now it works 100% if i discover a new error then i tell you. I have learned so much in this post, thank you Just one question if i want to call this with a case? Share this post Link to post Share on other sites
miguel93041 0 Posted July 5, 2016 Now is working properly i think now it works 100% if i discover a new error then i tell you. I have learned so much in this post, thank you Just one question if i want to call this with a case? I maded this but is not working With and EH on Keydown called by the init i suppose but i cant figure to see the display of the case 33 for example the page where you see them, i only see 46 Never mind i found it https://resources.bisimulations.com/wiki/DIK_KeyCodes case 33: { ["MAIN"] call life_fnc_crearDialogo; }; Share this post Link to post Share on other sites
miguel93041 0 Posted July 5, 2016 I maded this but is not working With and EH on Keydown called by the init i suppose but i cant figure to see the display of the case 33 for example the page where you see them, i only see 46 Never mind i found it https://resources.bisimulations.com/wiki/DIK_KeyCodes case 33: { ["MAIN"] call life_fnc_crearDialogo; }; I created a keyHandler if (_this select 1 == 33) then { ["MAIN"] call life_fnc_crearDialogo; }; waituntil {!(IsNull (findDisplay 46))}; (FindDisplay 46) displayAddEventHandler ["keydown","_this call life_fnc_tecla"]; Now its working thank you :D Share this post Link to post Share on other sites
Larrow 2823 Posted July 5, 2016 Just one little tip, never ever hard bind keys, its one sure way to piss off your end user, I know it does me. It might well be the best mission in the world but if you've hard bound keys so I cant use my game keys then it gets uninstalled straight away. The number of mission on the workshop that I have found does this is infuriating. Create a little ui for your mod/mission where people can select the keys needed and then save them in the users profile. Share this post Link to post Share on other sites
miguel93041 0 Posted July 5, 2016 About the keys, i dont know how is the code for change keys but i know how to create the ui so.. :C Share this post Link to post Share on other sites