bosslorenz Posted January 12, 2015 Share Posted January 12, 2015 client side~~~~~ GUIEditor = { tab = {}, progressbar = {}, tabpanel = {}, button = {}, window = {}, memo = {} } function spawnPanel(p) if (p == localPlayer) then GUIEditor.window[1] = guiCreateWindow(234, 105, 317, 372, "Zombie Infestation |DayZ| (PH SERVER)", false) guiWindowSetMovable(GUIEditor.window[1], false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFF0000") GUIEditor.memo[1] = guiCreateMemo(9, 20, 298, 105, "Welcome to Zombie Infestation |DayZ|\nBelow are the list of teams that will be available for you.\nRead every team's description.\nJoin the team you want to fight against the massive army of zombies.", false, GUIEditor.window[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) GUIEditor.tabpanel[1] = guiCreateTabPanel(9, 131, 298, 224, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Team 1", GUIEditor.tabpanel[1]) GUIEditor.memo[2] = guiCreateMemo(0, 0, 298, 107, "~MILITARY~\nOne of the deadliest gang in Las Venturas.\nPowerful weapons.\nLocated at west of Las Venturas in military base.\n\nGANG WAR : ON", false, GUIEditor.tab[1]) guiMemoSetReadOnly(GUIEditor.memo[2], true) GUIEditor.button[1] = guiCreateButton(41, 117, 216, 55, "CHOOSE MILITARY", false, GUIEditor.tab[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF06FF00") GUIEditor.tab[2] = guiCreateTab("Team 2", GUIEditor.tabpanel[1]) GUIEditor.memo[3] = guiCreateMemo(0, 0, 298, 142, "~LV MAFIA~\nOne of the deadliest gang in Las Venturas.\nConsist of 3 mob families :\n1) Forelli Family (Leader)\n2) Leone Family\n3) Sindacco Family\nRichest team in Las Venturas.\nLocated center of LV on the main streets.\n\nGANG WAR : ON", false, GUIEditor.tab[2]) guiMemoSetReadOnly(GUIEditor.memo[3], true) GUIEditor.button[2] = guiCreateButton(23, 152, 251, 42, "CHOOSE LV MAFIA", false, GUIEditor.tab[2]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFBA00FF") GUIEditor.tab[3] = guiCreateTab("Team 3", GUIEditor.tabpanel[1]) GUIEditor.memo[4] = guiCreateMemo(0, 0, 298, 133, "~DEADMAN.INC~\nKnown as Varrios Los Aztecas.\nThey are veterans in carjacking and gun running.\nThey are the rival of military in taking territory over the west of Las Venturas.\nLocated at west of Las Venturas near LV Airport.\n\nGANG WAR : ON", false, GUIEditor.tab[3]) guiMemoSetReadOnly(GUIEditor.memo[4], true) GUIEditor.button[3] = guiCreateButton(44, 139, 209, 60, "CHOOSE DEADMAN.INC", false, GUIEditor.tab[3]) guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FF0000FF") GUIEditor.tab[4] = guiCreateTab("Team 4", GUIEditor.tabpanel[1]) GUIEditor.memo[5] = guiCreateMemo(0, 0, 298, 112, "~ZOMBIELAND KILLERS~\nTheir job is only killing zombies.\nThey earn cash by killing zombies.\nSafe from gangwar.\n\nGANG WAR : OFF", false, GUIEditor.tab[4]) guiMemoSetReadOnly(GUIEditor.memo[5], true) GUIEditor.button[4] = guiCreateButton(27, 124, 243, 59, "CHOOSE ZOMBIELAND KILLERS", false, GUIEditor.tab[4]) guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFFFFB00") GUIEditor.progressbar[1] = guiCreateProgressBar(0, 0, 800, 600, false) guiSetAlpha(GUIEditor.progressbar[1], 0.00) end end addEventHandler("onClientPlayerLogin", root, spawnPanel) No error in debug but doesnt show GUI after logging in, help? Link to comment
Anubhav Posted January 12, 2015 Share Posted January 12, 2015 onClientPlayerLogin is not a event. Link to comment
bosslorenz Posted January 12, 2015 Author Share Posted January 12, 2015 OH I FORGOT TO ADD SERVER SIDE SERVER SIDE~~~~ team1 = createTeam ( "MILITARY", 0, 255, 0 ) addEventHandler ("onPlayerLogin",getRootElement(), function () triggerClientEvent (source,"onClientPlayerLogin",source) setPlayerTeam(player,team1) spawnPlayer (player, 202.39999389648, 1858.4000244141, 13.10000038147, 0, 312, 0, 0) outputChatBox("You have joined the MILITARY team", player, 0, 255, 0) giveWeapon ( player, 30, 1000 ) giveWeapon ( player, 32, 1000 ) end) CLIENT SIDE~~~~~~~~~~ GUIEditor = { tab = {}, progressbar = {}, tabpanel = {}, button = {}, window = {}, memo = {} } addEvent ("onClientPlayerLogin",true) addEventHandler ("onClientPlayerLogin",getLocalPlayer(), function () GUIEditor.window[1] = guiCreateWindow(234, 105, 317, 372, "Zombie Infestation |DayZ| (PH SERVER)", false) guiWindowSetMovable(GUIEditor.window[1], false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFF0000") GUIEditor.memo[1] = guiCreateMemo(9, 20, 298, 105, "Welcome to Zombie Infestation |DayZ|\nBelow are the list of teams that will be available for you.\nRead every team's description.\nJoin the team you want to fight against the massive army of zombies.", false, GUIEditor.window[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) GUIEditor.tabpanel[1] = guiCreateTabPanel(9, 131, 298, 224, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Team 1", GUIEditor.tabpanel[1]) GUIEditor.memo[2] = guiCreateMemo(0, 0, 298, 107, "~MILITARY~\nOne of the deadliest gang in Las Venturas.\nPowerful weapons.\nLocated at west of Las Venturas in military base.\n\nGANG WAR : ON", false, GUIEditor.tab[1]) guiMemoSetReadOnly(GUIEditor.memo[2], true) GUIEditor.button[1] = guiCreateButton(41, 117, 216, 55, "CHOOSE MILITARY", false, GUIEditor.tab[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF06FF00") GUIEditor.tab[2] = guiCreateTab("Team 2", GUIEditor.tabpanel[1]) GUIEditor.memo[3] = guiCreateMemo(0, 0, 298, 142, "~LV MAFIA~\nOne of the deadliest gang in Las Venturas.\nConsist of 3 mob families :\n1) Forelli Family (Leader)\n2) Leone Family\n3) Sindacco Family\nRichest team in Las Venturas.\nLocated center of LV on the main streets.\n\nGANG WAR : ON", false, GUIEditor.tab[2]) guiMemoSetReadOnly(GUIEditor.memo[3], true) GUIEditor.button[2] = guiCreateButton(23, 152, 251, 42, "CHOOSE LV MAFIA", false, GUIEditor.tab[2]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFBA00FF") GUIEditor.tab[3] = guiCreateTab("Team 3", GUIEditor.tabpanel[1]) GUIEditor.memo[4] = guiCreateMemo(0, 0, 298, 133, "~DEADMAN.INC~\nKnown as Varrios Los Aztecas.\nThey are veterans in carjacking and gun running.\nThey are the rival of military in taking territory over the west of Las Venturas.\nLocated at west of Las Venturas near LV Airport.\n\nGANG WAR : ON", false, GUIEditor.tab[3]) guiMemoSetReadOnly(GUIEditor.memo[4], true) GUIEditor.button[3] = guiCreateButton(44, 139, 209, 60, "CHOOSE DEADMAN.INC", false, GUIEditor.tab[3]) guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FF0000FF") GUIEditor.tab[4] = guiCreateTab("Team 4", GUIEditor.tabpanel[1]) GUIEditor.memo[5] = guiCreateMemo(0, 0, 298, 112, "~ZOMBIELAND KILLERS~\nTheir job is only killing zombies.\nThey earn cash by killing zombies.\nSafe from gangwar.\n\nGANG WAR : OFF", false, GUIEditor.tab[4]) guiMemoSetReadOnly(GUIEditor.memo[5], true) GUIEditor.button[4] = guiCreateButton(27, 124, 243, 59, "CHOOSE ZOMBIELAND KILLERS", false, GUIEditor.tab[4]) guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFFFFB00") GUIEditor.progressbar[1] = guiCreateProgressBar(0, 0, 800, 600, false) guiSetAlpha(GUIEditor.progressbar[1], 0.00) end) Link to comment
bosslorenz Posted January 12, 2015 Author Share Posted January 12, 2015 Now it shows the panel but I cant click anything on the panel.... SERVER~~ team1 = createTeam ( "MILITARY", 0, 255, 0 ) function panel() triggerClientEvent (source,"onClientPlayerLogin",source) outputChatBox("Welcome Player", player, 255, 255, 255) end addEventHandler("onPlayerLogin", root, panel) function team1 () setPlayerTeam(player,team1) spawnPlayer (player, 202.39999389648, 1858.4000244141, 13.10000038147, 0, 312, 0, 0) outputChatBox("You have joined the MILITARY team", player, 0, 255, 0) giveWeapon ( player, 30, 1000 ) giveWeapon ( player, 32, 1000 ) end addEvent("team1", true) addEventHandler("team1", root, team1) CLIENT~~~ GUIEditor = { tab = {}, progressbar = {}, tabpanel = {}, button = {}, window = {}, memo = {} } function spawnPanel() GUIEditor.window[1] = guiCreateWindow(234, 105, 317, 372, "Zombie Infestation |DayZ| (PH SERVER)", false) guiWindowSetMovable(GUIEditor.window[1], false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFF0000") GUIEditor.memo[1] = guiCreateMemo(9, 20, 298, 105, "Welcome to Zombie Infestation |DayZ|\nBelow are the list of teams that will be available for you.\nRead every team's description.\nJoin the team you want to fight against the massive army of zombies.", false, GUIEditor.window[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) GUIEditor.tabpanel[1] = guiCreateTabPanel(9, 131, 298, 224, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Team 1", GUIEditor.tabpanel[1]) GUIEditor.memo[2] = guiCreateMemo(0, 0, 298, 107, "~MILITARY~\nOne of the deadliest gang in Las Venturas.\nPowerful weapons.\nLocated at west of Las Venturas in military base.\n\nGANG WAR : ON", false, GUIEditor.tab[1]) guiMemoSetReadOnly(GUIEditor.memo[2], true) GUIEditor.button[1] = guiCreateButton(41, 117, 216, 55, "CHOOSE MILITARY", false, GUIEditor.tab[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF06FF00") GUIEditor.tab[2] = guiCreateTab("Team 2", GUIEditor.tabpanel[1]) GUIEditor.memo[3] = guiCreateMemo(0, 0, 298, 142, "~LV MAFIA~\nOne of the deadliest gang in Las Venturas.\nConsist of 3 mob families :\n1) Forelli Family (Leader)\n2) Leone Family\n3) Sindacco Family\nRichest team in Las Venturas.\nLocated center of LV on the main streets.\n\nGANG WAR : ON", false, GUIEditor.tab[2]) guiMemoSetReadOnly(GUIEditor.memo[3], true) GUIEditor.button[2] = guiCreateButton(23, 152, 251, 42, "CHOOSE LV MAFIA", false, GUIEditor.tab[2]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFBA00FF") GUIEditor.tab[3] = guiCreateTab("Team 3", GUIEditor.tabpanel[1]) GUIEditor.memo[4] = guiCreateMemo(0, 0, 298, 133, "~DEADMAN.INC~\nKnown as Varrios Los Aztecas.\nThey are veterans in carjacking and gun running.\nThey are the rival of military in taking territory over the west of Las Venturas.\nLocated at west of Las Venturas near LV Airport.\n\nGANG WAR : ON", false, GUIEditor.tab[3]) guiMemoSetReadOnly(GUIEditor.memo[4], true) GUIEditor.button[3] = guiCreateButton(44, 139, 209, 60, "CHOOSE DEADMAN.INC", false, GUIEditor.tab[3]) guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FF0000FF") GUIEditor.tab[4] = guiCreateTab("Team 4", GUIEditor.tabpanel[1]) GUIEditor.memo[5] = guiCreateMemo(0, 0, 298, 112, "~ZOMBIELAND KILLERS~\nTheir job is only killing zombies.\nThey earn cash by killing zombies.\nSafe from gangwar.\n\nGANG WAR : OFF", false, GUIEditor.tab[4]) guiMemoSetReadOnly(GUIEditor.memo[5], true) GUIEditor.button[4] = guiCreateButton(27, 124, 243, 59, "CHOOSE ZOMBIELAND KILLERS", false, GUIEditor.tab[4]) guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFFFFB00") GUIEditor.progressbar[1] = guiCreateProgressBar(0, 0, 800, 600, false) guiSetAlpha(GUIEditor.progressbar[1], 0.00) showCursor(true) end addEvent ("onClientPlayerLogin",true) addEventHandler ("onClientPlayerLogin", root, spawnPanel) Link to comment
Anubhav Posted January 12, 2015 Share Posted January 12, 2015 Use events for detecting a click and output. onClientGUIClick. Link to comment
bosslorenz Posted January 12, 2015 Author Share Posted January 12, 2015 SERVER function panel() triggerClientEvent (source,"onClientPlayerLogin",source) outputChatBox("Welcome Player", player, 255, 255, 255) end addEventHandler("onPlayerLogin", root, panel) CLIENT GUIEditor = { tab = {}, progressbar = {}, tabpanel = {}, button = {}, window = {}, memo = {} } function spawnPanel() GUIEditor.window[1] = guiCreateWindow(234, 105, 317, 372, "Zombie Infestation |DayZ| (PH SERVER)", false) guiWindowSetMovable(GUIEditor.window[1], false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFF0000") GUIEditor.memo[1] = guiCreateMemo(9, 20, 298, 105, "Welcome to Zombie Infestation |DayZ|\nBelow are the list of teams that will be available for you.\nRead every team's description.\nJoin the team you want to fight against the massive army of zombies.", false, GUIEditor.window[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) GUIEditor.tabpanel[1] = guiCreateTabPanel(9, 131, 298, 224, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Team 1", GUIEditor.tabpanel[1]) GUIEditor.memo[2] = guiCreateMemo(0, 0, 298, 107, "~MILITARY~\nOne of the deadliest gang in Las Venturas.\nPowerful weapons.\nLocated at west of Las Venturas in military base.\n\nGANG WAR : ON", false, GUIEditor.tab[1]) guiMemoSetReadOnly(GUIEditor.memo[2], true) GUIEditor.button[1] = guiCreateButton(41, 117, 216, 55, "CHOOSE MILITARY", false, GUIEditor.tab[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF06FF00") GUIEditor.tab[2] = guiCreateTab("Team 2", GUIEditor.tabpanel[1]) GUIEditor.memo[3] = guiCreateMemo(0, 0, 298, 142, "~LV MAFIA~\nOne of the deadliest gang in Las Venturas.\nConsist of 3 mob families :\n1) Forelli Family (Leader)\n2) Leone Family\n3) Sindacco Family\nRichest team in Las Venturas.\nLocated center of LV on the main streets.\n\nGANG WAR : ON", false, GUIEditor.tab[2]) guiMemoSetReadOnly(GUIEditor.memo[3], true) GUIEditor.button[2] = guiCreateButton(23, 152, 251, 42, "CHOOSE LV MAFIA", false, GUIEditor.tab[2]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFBA00FF") GUIEditor.tab[3] = guiCreateTab("Team 3", GUIEditor.tabpanel[1]) GUIEditor.memo[4] = guiCreateMemo(0, 0, 298, 133, "~DEADMAN.INC~\nKnown as Varrios Los Aztecas.\nThey are veterans in carjacking and gun running.\nThey are the rival of military in taking territory over the west of Las Venturas.\nLocated at west of Las Venturas near LV Airport.\n\nGANG WAR : ON", false, GUIEditor.tab[3]) guiMemoSetReadOnly(GUIEditor.memo[4], true) GUIEditor.button[3] = guiCreateButton(44, 139, 209, 60, "CHOOSE DEADMAN.INC", false, GUIEditor.tab[3]) guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FF0000FF") GUIEditor.tab[4] = guiCreateTab("Team 4", GUIEditor.tabpanel[1]) GUIEditor.memo[5] = guiCreateMemo(0, 0, 298, 112, "~ZOMBIELAND KILLERS~\nTheir job is only killing zombies.\nThey earn cash by killing zombies.\nSafe from gangwar.\n\nGANG WAR : OFF", false, GUIEditor.tab[4]) guiMemoSetReadOnly(GUIEditor.memo[5], true) GUIEditor.button[4] = guiCreateButton(27, 124, 243, 59, "CHOOSE ZOMBIELAND KILLERS", false, GUIEditor.tab[4]) guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFFFFB00") GUIEditor.progressbar[1] = guiCreateProgressBar(0, 0, 800, 600, false) guiSetAlpha(GUIEditor.progressbar[1], 0.00) showCursor(true) end addEvent ("onClientPlayerLogin",true) addEventHandler ("onClientPlayerLogin", root, spawnPanel) MAYBE WE CAN JUST TALK ABOUT THE BASIC FIRST ONLY SHOW PANEL With that scripts it will show panel and that tab panel , buttons can be clickable but its not working Link to comment
bosslorenz Posted January 12, 2015 Author Share Posted January 12, 2015 SHOW PANEL BUT CANT CLICK ANYTHING LIKE TAB PANEL AND BUTTONS Link to comment
xeon17 Posted January 12, 2015 Share Posted January 12, 2015 Server: function panel() triggerClientEvent (source,"onClientPlayerLogin",source) outputChatBox("Welcome Player", source, 255, 255, 255) end addEventHandler("onPlayerLogin", root, panel) Client: GUIEditor = { tab = {}, progressbar = {}, tabpanel = {}, button = {}, window = {}, memo = {} } function spawnPanel() showCursor(true) GUIEditor.window[1] = guiCreateWindow(234, 105, 317, 372, "Zombie Infestation |DayZ| (PH SERVER)", false) guiWindowSetMovable(GUIEditor.window[1], false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFF0000") GUIEditor.memo[1] = guiCreateMemo(9, 20, 298, 105, "Welcome to Zombie Infestation |DayZ|\nBelow are the list of teams that will be available for you.\nRead every team's description.\nJoin the team you want to fight against the massive army of zombies.", false, GUIEditor.window[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) GUIEditor.tabpanel[1] = guiCreateTabPanel(9, 131, 298, 224, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Team 1", GUIEditor.tabpanel[1]) GUIEditor.memo[2] = guiCreateMemo(0, 0, 298, 107, "~MILITARY~\nOne of the deadliest gang in Las Venturas.\nPowerful weapons.\nLocated at west of Las Venturas in military base.\n\nGANG WAR : ON", false, GUIEditor.tab[1]) guiMemoSetReadOnly(GUIEditor.memo[2], true) GUIEditor.button[1] = guiCreateButton(41, 117, 216, 55, "CHOOSE MILITARY", false, GUIEditor.tab[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF06FF00") GUIEditor.tab[2] = guiCreateTab("Team 2", GUIEditor.tabpanel[1]) GUIEditor.memo[3] = guiCreateMemo(0, 0, 298, 142, "~LV MAFIA~\nOne of the deadliest gang in Las Venturas.\nConsist of 3 mob families :\n1) Forelli Family (Leader)\n2) Leone Family\n3) Sindacco Family\nRichest team in Las Venturas.\nLocated center of LV on the main streets.\n\nGANG WAR : ON", false, GUIEditor.tab[2]) guiMemoSetReadOnly(GUIEditor.memo[3], true) GUIEditor.button[2] = guiCreateButton(23, 152, 251, 42, "CHOOSE LV MAFIA", false, GUIEditor.tab[2]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFBA00FF") GUIEditor.tab[3] = guiCreateTab("Team 3", GUIEditor.tabpanel[1]) GUIEditor.memo[4] = guiCreateMemo(0, 0, 298, 133, "~DEADMAN.INC~\nKnown as Varrios Los Aztecas.\nThey are veterans in carjacking and gun running.\nThey are the rival of military in taking territory over the west of Las Venturas.\nLocated at west of Las Venturas near LV Airport.\n\nGANG WAR : ON", false, GUIEditor.tab[3]) guiMemoSetReadOnly(GUIEditor.memo[4], true) GUIEditor.button[3] = guiCreateButton(44, 139, 209, 60, "CHOOSE DEADMAN.INC", false, GUIEditor.tab[3]) guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FF0000FF") GUIEditor.tab[4] = guiCreateTab("Team 4", GUIEditor.tabpanel[1]) GUIEditor.memo[5] = guiCreateMemo(0, 0, 298, 112, "~ZOMBIELAND KILLERS~\nTheir job is only killing zombies.\nThey earn cash by killing zombies.\nSafe from gangwar.\n\nGANG WAR : OFF", false, GUIEditor.tab[4]) guiMemoSetReadOnly(GUIEditor.memo[5], true) GUIEditor.button[4] = guiCreateButton(27, 124, 243, 59, "CHOOSE ZOMBIELAND KILLERS", false, GUIEditor.tab[4]) guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFFFFB00") GUIEditor.progressbar[1] = guiCreateProgressBar(0, 0, 800, 600, false) guiSetAlpha(GUIEditor.progressbar[1], 0.00) end addEvent ("onClientPlayerLogin",true) addEventHandler ("onClientPlayerLogin", root, spawnPanel) Link to comment
bosslorenz Posted January 12, 2015 Author Share Posted January 12, 2015 Server: function panel() triggerClientEvent (source,"onClientPlayerLogin",source) outputChatBox("Welcome Player", source, 255, 255, 255) end addEventHandler("onPlayerLogin", root, panel) Client: GUIEditor = { tab = {}, progressbar = {}, tabpanel = {}, button = {}, window = {}, memo = {} } function spawnPanel() showCursor(true) GUIEditor.window[1] = guiCreateWindow(234, 105, 317, 372, "Zombie Infestation |DayZ| (PH SERVER)", false) guiWindowSetMovable(GUIEditor.window[1], false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFF0000") GUIEditor.memo[1] = guiCreateMemo(9, 20, 298, 105, "Welcome to Zombie Infestation |DayZ|\nBelow are the list of teams that will be available for you.\nRead every team's description.\nJoin the team you want to fight against the massive army of zombies.", false, GUIEditor.window[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) GUIEditor.tabpanel[1] = guiCreateTabPanel(9, 131, 298, 224, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Team 1", GUIEditor.tabpanel[1]) GUIEditor.memo[2] = guiCreateMemo(0, 0, 298, 107, "~MILITARY~\nOne of the deadliest gang in Las Venturas.\nPowerful weapons.\nLocated at west of Las Venturas in military base.\n\nGANG WAR : ON", false, GUIEditor.tab[1]) guiMemoSetReadOnly(GUIEditor.memo[2], true) GUIEditor.button[1] = guiCreateButton(41, 117, 216, 55, "CHOOSE MILITARY", false, GUIEditor.tab[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF06FF00") GUIEditor.tab[2] = guiCreateTab("Team 2", GUIEditor.tabpanel[1]) GUIEditor.memo[3] = guiCreateMemo(0, 0, 298, 142, "~LV MAFIA~\nOne of the deadliest gang in Las Venturas.\nConsist of 3 mob families :\n1) Forelli Family (Leader)\n2) Leone Family\n3) Sindacco Family\nRichest team in Las Venturas.\nLocated center of LV on the main streets.\n\nGANG WAR : ON", false, GUIEditor.tab[2]) guiMemoSetReadOnly(GUIEditor.memo[3], true) GUIEditor.button[2] = guiCreateButton(23, 152, 251, 42, "CHOOSE LV MAFIA", false, GUIEditor.tab[2]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFBA00FF") GUIEditor.tab[3] = guiCreateTab("Team 3", GUIEditor.tabpanel[1]) GUIEditor.memo[4] = guiCreateMemo(0, 0, 298, 133, "~DEADMAN.INC~\nKnown as Varrios Los Aztecas.\nThey are veterans in carjacking and gun running.\nThey are the rival of military in taking territory over the west of Las Venturas.\nLocated at west of Las Venturas near LV Airport.\n\nGANG WAR : ON", false, GUIEditor.tab[3]) guiMemoSetReadOnly(GUIEditor.memo[4], true) GUIEditor.button[3] = guiCreateButton(44, 139, 209, 60, "CHOOSE DEADMAN.INC", false, GUIEditor.tab[3]) guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FF0000FF") GUIEditor.tab[4] = guiCreateTab("Team 4", GUIEditor.tabpanel[1]) GUIEditor.memo[5] = guiCreateMemo(0, 0, 298, 112, "~ZOMBIELAND KILLERS~\nTheir job is only killing zombies.\nThey earn cash by killing zombies.\nSafe from gangwar.\n\nGANG WAR : OFF", false, GUIEditor.tab[4]) guiMemoSetReadOnly(GUIEditor.memo[5], true) GUIEditor.button[4] = guiCreateButton(27, 124, 243, 59, "CHOOSE ZOMBIELAND KILLERS", false, GUIEditor.tab[4]) guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFFFFB00") GUIEditor.progressbar[1] = guiCreateProgressBar(0, 0, 800, 600, false) guiSetAlpha(GUIEditor.progressbar[1], 0.00) end addEvent ("onClientPlayerLogin",true) addEventHandler ("onClientPlayerLogin", root, spawnPanel) Still wont enable me to click something on the panel Link to comment
bosslorenz Posted January 12, 2015 Author Share Posted January 12, 2015 CLIENT SIDE~~ GUIEditor = { tab = {}, progressbar = {}, tabpanel = {}, button = {}, window = {}, memo = {} } GUIEditor.window[1] = guiCreateWindow(234, 105, 317, 372, "Zombie Infestation |DayZ| (PH SERVER)", false) guiWindowSetMovable(GUIEditor.window[1], false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFF0000") GUIEditor.memo[1] = guiCreateMemo(9, 20, 298, 105, "Welcome to Zombie Infestation |DayZ|\nBelow are the list of teams that will be available for you.\nRead every team's description.\nJoin the team you want to fight against the massive army of zombies.", false, GUIEditor.window[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) GUIEditor.tabpanel[1] = guiCreateTabPanel(9, 131, 298, 224, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Team 1", GUIEditor.tabpanel[1]) GUIEditor.memo[2] = guiCreateMemo(0, 0, 298, 107, "~MILITARY~\nOne of the deadliest gang in Las Venturas.\nPowerful weapons.\nLocated at west of Las Venturas in military base.\n\nGANG WAR : ON", false, GUIEditor.tab[1]) guiMemoSetReadOnly(GUIEditor.memo[2], true) GUIEditor.button[1] = guiCreateButton(41, 117, 216, 55, "CHOOSE MILITARY", false, GUIEditor.tab[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF06FF00") GUIEditor.tab[2] = guiCreateTab("Team 2", GUIEditor.tabpanel[1]) GUIEditor.memo[3] = guiCreateMemo(0, 0, 298, 142, "~LV MAFIA~\nOne of the deadliest gang in Las Venturas.\nConsist of 3 mob families :\n1) Forelli Family (Leader)\n2) Leone Family\n3) Sindacco Family\nRichest team in Las Venturas.\nLocated center of LV on the main streets.\n\nGANG WAR : ON", false, GUIEditor.tab[2]) guiMemoSetReadOnly(GUIEditor.memo[3], true) GUIEditor.button[2] = guiCreateButton(23, 152, 251, 42, "CHOOSE LV MAFIA", false, GUIEditor.tab[2]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFBA00FF") GUIEditor.tab[3] = guiCreateTab("Team 3", GUIEditor.tabpanel[1]) GUIEditor.memo[4] = guiCreateMemo(0, 0, 298, 133, "~DEADMAN.INC~\nKnown as Varrios Los Aztecas.\nThey are veterans in carjacking and gun running.\nThey are the rival of military in taking territory over the west of Las Venturas.\nLocated at west of Las Venturas near LV Airport.\n\nGANG WAR : ON", false, GUIEditor.tab[3]) guiMemoSetReadOnly(GUIEditor.memo[4], true) GUIEditor.button[3] = guiCreateButton(44, 139, 209, 60, "CHOOSE DEADMAN.INC", false, GUIEditor.tab[3]) guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FF0000FF") GUIEditor.tab[4] = guiCreateTab("Team 4", GUIEditor.tabpanel[1]) GUIEditor.memo[5] = guiCreateMemo(0, 0, 298, 112, "~ZOMBIELAND KILLERS~\nTheir job is only killing zombies.\nThey earn cash by killing zombies.\nSafe from gangwar.\n\nGANG WAR : OFF", false, GUIEditor.tab[4]) guiMemoSetReadOnly(GUIEditor.memo[5], true) GUIEditor.button[4] = guiCreateButton(27, 124, 243, 59, "CHOOSE ZOMBIELAND KILLERS", false, GUIEditor.tab[4]) guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFFFFB00") GUIEditor.progressbar[1] = guiCreateProgressBar(0, 0, 800, 600, false) guiSetAlpha(GUIEditor.progressbar[1], 0.00) addEvent("spawnpanel",true) addEventHandler("spawnpanel", root, function() guiSetVisible(GUIEditor.window[1],true) showCursor(true) end ) SERVER SIDE~~ addEventHandler("onPlayerLogin", root, function () triggerClientEvent(source,"spawnpanel", source) end ) Please help me with this script guys.... It does show the panel but cant click on any of the tab....also the buttons.. And also shows the panel even when Im not log in yet... Link to comment
Mizudori Posted January 12, 2015 Share Posted January 12, 2015 CLIENT SIDE~~ GUIEditor = { tab = {}, progressbar = {}, tabpanel = {}, button = {}, window = {}, memo = {} } GUIEditor.window[1] = guiCreateWindow(234, 105, 317, 372, "Zombie Infestation |DayZ| (PH SERVER)", false) guiWindowSetMovable(GUIEditor.window[1], false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFF0000") GUIEditor.memo[1] = guiCreateMemo(9, 20, 298, 105, "Welcome to Zombie Infestation |DayZ|\nBelow are the list of teams that will be available for you.\nRead every team's description.\nJoin the team you want to fight against the massive army of zombies.", false, GUIEditor.window[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) GUIEditor.tabpanel[1] = guiCreateTabPanel(9, 131, 298, 224, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Team 1", GUIEditor.tabpanel[1]) GUIEditor.memo[2] = guiCreateMemo(0, 0, 298, 107, "~MILITARY~\nOne of the deadliest gang in Las Venturas.\nPowerful weapons.\nLocated at west of Las Venturas in military base.\n\nGANG WAR : ON", false, GUIEditor.tab[1]) guiMemoSetReadOnly(GUIEditor.memo[2], true) GUIEditor.button[1] = guiCreateButton(41, 117, 216, 55, "CHOOSE MILITARY", false, GUIEditor.tab[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF06FF00") GUIEditor.tab[2] = guiCreateTab("Team 2", GUIEditor.tabpanel[1]) GUIEditor.memo[3] = guiCreateMemo(0, 0, 298, 142, "~LV MAFIA~\nOne of the deadliest gang in Las Venturas.\nConsist of 3 mob families :\n1) Forelli Family (Leader)\n2) Leone Family\n3) Sindacco Family\nRichest team in Las Venturas.\nLocated center of LV on the main streets.\n\nGANG WAR : ON", false, GUIEditor.tab[2]) guiMemoSetReadOnly(GUIEditor.memo[3], true) GUIEditor.button[2] = guiCreateButton(23, 152, 251, 42, "CHOOSE LV MAFIA", false, GUIEditor.tab[2]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFBA00FF") GUIEditor.tab[3] = guiCreateTab("Team 3", GUIEditor.tabpanel[1]) GUIEditor.memo[4] = guiCreateMemo(0, 0, 298, 133, "~DEADMAN.INC~\nKnown as Varrios Los Aztecas.\nThey are veterans in carjacking and gun running.\nThey are the rival of military in taking territory over the west of Las Venturas.\nLocated at west of Las Venturas near LV Airport.\n\nGANG WAR : ON", false, GUIEditor.tab[3]) guiMemoSetReadOnly(GUIEditor.memo[4], true) GUIEditor.button[3] = guiCreateButton(44, 139, 209, 60, "CHOOSE DEADMAN.INC", false, GUIEditor.tab[3]) guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FF0000FF") GUIEditor.tab[4] = guiCreateTab("Team 4", GUIEditor.tabpanel[1]) GUIEditor.memo[5] = guiCreateMemo(0, 0, 298, 112, "~ZOMBIELAND KILLERS~\nTheir job is only killing zombies.\nThey earn cash by killing zombies.\nSafe from gangwar.\n\nGANG WAR : OFF", false, GUIEditor.tab[4]) guiMemoSetReadOnly(GUIEditor.memo[5], true) GUIEditor.button[4] = guiCreateButton(27, 124, 243, 59, "CHOOSE ZOMBIELAND KILLERS", false, GUIEditor.tab[4]) guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFFFFB00") GUIEditor.progressbar[1] = guiCreateProgressBar(0, 0, 800, 600, false) guiSetAlpha(GUIEditor.progressbar[1], 0.00) addEvent("spawnpanel",true) addEventHandler("spawnpanel", root, function() guiSetVisible(GUIEditor.window[1],true) showCursor(true) end ) SERVER SIDE~~ addEventHandler("onPlayerLogin", root, function () triggerClientEvent(source,"spawnpanel", source) end ) Please help me with this script guys.... It does show the panel but cant click on any of the tab....also the buttons.. And also shows the panel even when Im not log in yet... It shows panel from the start beacuse you did not use after creating gui guiSetVisible(GUIEditor.window[1],false) and for buttons function onClickBtn ( button, state ) if (source == button_name) then -- when button click function end end addEventHandler ( "onClientGUIClick", button_name, onClickBtn, false ) Link to comment
bosslorenz Posted January 13, 2015 Author Share Posted January 13, 2015 CLIENT SIDE~~ GUIEditor = { tab = {}, progressbar = {}, tabpanel = {}, button = {}, window = {}, memo = {} } GUIEditor.window[1] = guiCreateWindow(234, 105, 317, 372, "Zombie Infestation |DayZ| (PH SERVER)", false) guiWindowSetMovable(GUIEditor.window[1], false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFF0000") GUIEditor.memo[1] = guiCreateMemo(9, 20, 298, 105, "Welcome to Zombie Infestation |DayZ|\nBelow are the list of teams that will be available for you.\nRead every team's description.\nJoin the team you want to fight against the massive army of zombies.", false, GUIEditor.window[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) GUIEditor.tabpanel[1] = guiCreateTabPanel(9, 131, 298, 224, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Team 1", GUIEditor.tabpanel[1]) GUIEditor.memo[2] = guiCreateMemo(0, 0, 298, 107, "~MILITARY~\nOne of the deadliest gang in Las Venturas.\nPowerful weapons.\nLocated at west of Las Venturas in military base.\n\nGANG WAR : ON", false, GUIEditor.tab[1]) guiMemoSetReadOnly(GUIEditor.memo[2], true) GUIEditor.button[1] = guiCreateButton(41, 117, 216, 55, "CHOOSE MILITARY", false, GUIEditor.tab[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF06FF00") GUIEditor.tab[2] = guiCreateTab("Team 2", GUIEditor.tabpanel[1]) GUIEditor.memo[3] = guiCreateMemo(0, 0, 298, 142, "~LV MAFIA~\nOne of the deadliest gang in Las Venturas.\nConsist of 3 mob families :\n1) Forelli Family (Leader)\n2) Leone Family\n3) Sindacco Family\nRichest team in Las Venturas.\nLocated center of LV on the main streets.\n\nGANG WAR : ON", false, GUIEditor.tab[2]) guiMemoSetReadOnly(GUIEditor.memo[3], true) GUIEditor.button[2] = guiCreateButton(23, 152, 251, 42, "CHOOSE LV MAFIA", false, GUIEditor.tab[2]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFBA00FF") GUIEditor.tab[3] = guiCreateTab("Team 3", GUIEditor.tabpanel[1]) GUIEditor.memo[4] = guiCreateMemo(0, 0, 298, 133, "~DEADMAN.INC~\nKnown as Varrios Los Aztecas.\nThey are veterans in carjacking and gun running.\nThey are the rival of military in taking territory over the west of Las Venturas.\nLocated at west of Las Venturas near LV Airport.\n\nGANG WAR : ON", false, GUIEditor.tab[3]) guiMemoSetReadOnly(GUIEditor.memo[4], true) GUIEditor.button[3] = guiCreateButton(44, 139, 209, 60, "CHOOSE DEADMAN.INC", false, GUIEditor.tab[3]) guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FF0000FF") GUIEditor.tab[4] = guiCreateTab("Team 4", GUIEditor.tabpanel[1]) GUIEditor.memo[5] = guiCreateMemo(0, 0, 298, 112, "~ZOMBIELAND KILLERS~\nTheir job is only killing zombies.\nThey earn cash by killing zombies.\nSafe from gangwar.\n\nGANG WAR : OFF", false, GUIEditor.tab[4]) guiMemoSetReadOnly(GUIEditor.memo[5], true) GUIEditor.button[4] = guiCreateButton(27, 124, 243, 59, "CHOOSE ZOMBIELAND KILLERS", false, GUIEditor.tab[4]) guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFFFFB00") GUIEditor.progressbar[1] = guiCreateProgressBar(0, 0, 800, 600, false) guiSetAlpha(GUIEditor.progressbar[1], 0.00) guiSetVisible(GUIEditor.window[1],false) addEvent("spawnpanel",true) addEventHandler("spawnpanel", root, function() guiSetVisible(GUIEditor.window[1],true) showCursor(true) end ) SERVER SIDE~~ addEventHandler("onPlayerLogin", root, function () triggerClientEvent(source,"spawnpanel", source) end ) Please help me with this script guys.... It does show the panel but cant click on any of the tab....also the buttons.. And also shows the panel even when Im not log in yet... It shows panel from the start beacuse you did not use after creating gui guiSetVisible(GUIEditor.window[1],false) and for buttons function onClickBtn ( button, state ) if (source == button_name) then -- when button click function end end addEventHandler ( "onClientGUIClick", button_name, onClickBtn, false ) Still wont allow me clicking something on the panels....Its like it is stuck. Link to comment
Mann56 Posted January 13, 2015 Share Posted January 13, 2015 As Mizudori wrote, you need to make functions to detect the button clicks. Make as much functions as much buttons you have in GUI. Your GUI has 4 buttons so make four such functions. Example : function onClickBtn (button , state) if button =="left" and state=="up" then --function to put player in desired team end end addEventHandler ( "onClientGUIClick" , button_name , onClickBtn , false) And also I would recommend you to use dxText instead of read-only memo. It makes the GUI look more attractive. Link to comment
bosslorenz Posted January 13, 2015 Author Share Posted January 13, 2015 GUIEditor = { tab = {}, progressbar = {}, tabpanel = {}, button = {}, window = {}, memo = {} } GUIEditor.window[1] = guiCreateWindow(234, 105, 317, 372, "Zombie Infestation |DayZ| (PH SERVER)", false) guiWindowSetMovable(GUIEditor.window[1], false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFF0000") GUIEditor.memo[1] = guiCreateMemo(9, 20, 298, 105, "Welcome to Zombie Infestation |DayZ|\nBelow are the list of teams that will be available for you.\nRead every team's description.\nJoin the team you want to fight against the massive army of zombies.", false, GUIEditor.window[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) GUIEditor.tabpanel[1] = guiCreateTabPanel(9, 131, 298, 224, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Team 1", GUIEditor.tabpanel[1]) GUIEditor.memo[2] = guiCreateMemo(0, 0, 298, 107, "~MILITARY~\nOne of the deadliest gang in Las Venturas.\nPowerful weapons.\nLocated at west of Las Venturas in military base.\n\nGANG WAR : ON", false, GUIEditor.tab[1]) guiMemoSetReadOnly(GUIEditor.memo[2], true) GUIEditor.button[1] = guiCreateButton(41, 117, 216, 55, "CHOOSE MILITARY", false, GUIEditor.tab[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF06FF00") GUIEditor.tab[2] = guiCreateTab("Team 2", GUIEditor.tabpanel[1]) GUIEditor.memo[3] = guiCreateMemo(0, 0, 298, 142, "~LV MAFIA~\nOne of the deadliest gang in Las Venturas.\nConsist of 3 mob families :\n1) Forelli Family (Leader)\n2) Leone Family\n3) Sindacco Family\nRichest team in Las Venturas.\nLocated center of LV on the main streets.\n\nGANG WAR : ON", false, GUIEditor.tab[2]) guiMemoSetReadOnly(GUIEditor.memo[3], true) GUIEditor.button[2] = guiCreateButton(23, 152, 251, 42, "CHOOSE LV MAFIA", false, GUIEditor.tab[2]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFBA00FF") GUIEditor.tab[3] = guiCreateTab("Team 3", GUIEditor.tabpanel[1]) GUIEditor.memo[4] = guiCreateMemo(0, 0, 298, 133, "~DEADMAN.INC~\nKnown as Varrios Los Aztecas.\nThey are veterans in carjacking and gun running.\nThey are the rival of military in taking territory over the west of Las Venturas.\nLocated at west of Las Venturas near LV Airport.\n\nGANG WAR : ON", false, GUIEditor.tab[3]) guiMemoSetReadOnly(GUIEditor.memo[4], true) GUIEditor.button[3] = guiCreateButton(44, 139, 209, 60, "CHOOSE DEADMAN.INC", false, GUIEditor.tab[3]) guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FF0000FF") GUIEditor.tab[4] = guiCreateTab("Team 4", GUIEditor.tabpanel[1]) GUIEditor.memo[5] = guiCreateMemo(0, 0, 298, 112, "~ZOMBIELAND KILLERS~\nTheir job is only killing zombies.\nThey earn cash by killing zombies.\nSafe from gangwar.\n\nGANG WAR : OFF", false, GUIEditor.tab[4]) guiMemoSetReadOnly(GUIEditor.memo[5], true) GUIEditor.button[4] = guiCreateButton(27, 124, 243, 59, "CHOOSE ZOMBIELAND KILLERS", false, GUIEditor.tab[4]) guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFFFFB00") GUIEditor.progressbar[1] = guiCreateProgressBar(0, 0, 800, 600, false) guiSetAlpha(GUIEditor.progressbar[1], 0.00) guiSetVisible(GUIEditor.window[1],false) addEvent("spawnpanel",true) addEventHandler("spawnpanel", root, function() guiSetVisible(GUIEditor.window[1],true) showCursor(true) end ) Dont you get what I mean guys? Even just with this script I can click buttons but it will not detect functions. BUT I AM ABLE TO CLICK TAB AND BUTTONS RIGHT? What IM Asking is why my panel just like became a picture.. It doesnt enable me to click anything on the GUI... Im not asking for the functions onClientGUIClick.! Link to comment
Mann56 Posted January 13, 2015 Share Posted January 13, 2015 Well if you are able to click buttons what else you wan't to be click able ? What exactly is your problem with thou GUI? Link to comment
bosslorenz Posted January 13, 2015 Author Share Posted January 13, 2015 The problem is I cant click anything at the GUI..... Even Im going to make a function onClientGUIClick for tab 2, its no use coz I cant click and go to tab 2 It just stucks me into tab 1....and even the button in tab 1 cant be clicked. Link to comment
Mann56 Posted January 13, 2015 Share Posted January 13, 2015 Did you try this ? -- make the GUI visible guiSetVisible ( GUIEditor.window[1] , true) showCursor(true) Link to comment
bosslorenz Posted January 13, 2015 Author Share Posted January 13, 2015 Yep I added that.. You dont get what I really mean you know... I said I cant click anything.... the GUI like became a picture you know!. I cant click on anything, the tab panel, the buttons... Link to comment
Mann56 Posted January 13, 2015 Share Posted January 13, 2015 Does the GUI panel show before you log in? Link to comment
bosslorenz Posted January 13, 2015 Author Share Posted January 13, 2015 Nope , after logging in the GUI panel shows, coz I made a script onPlayerLogin.. the real problem here is the GUI panel looks like a picture as I said its stucked!.... Even though Imade it onClientMarkerHit... the panel is still stucked!..... zzzz Link to comment
bosslorenz Posted January 13, 2015 Author Share Posted January 13, 2015 WTF All thats making it not functioning is b`coz of this... I figured it out. I compared my spawn panel to my vehicle spawner and it worked.. This is it thats ruining my panel. Its working now after removing this line: GUIEditor.progressbar[1] = guiCreateProgressBar(0, 0, 800, 600, false) But can I ask what is this progressbar? Link to comment
bosslorenz Posted January 13, 2015 Author Share Posted January 13, 2015 SERVER~~ function panel() triggerClientEvent (source,"onClientPlayerLogin",source) end addEventHandler("onPlayerLogin", root, panel) function teamm () setPlayerTeam(player,team1) spawnPlayer (player, 202.39999389648, 1858.4000244141, 13.10000038147, 0, 312, 0, 0) giveWeapon ( player, 30, 1000 ) giveWeapon ( player, 32, 1000 ) end addEvent("team1", true) addEventHandler("team1", root, teamm) CLIENT~~ GUIEditor = { tab = {}, progressbar = {}, tabpanel = {}, button = {}, window = {}, memo = {} } function spawnPanel() GUIEditor.window[1] = guiCreateWindow(234, 105, 317, 372, "Zombie Infestation |DayZ| (PH SERVER)", false) guiWindowSetMovable(GUIEditor.window[1], false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFF0000") GUIEditor.memo[1] = guiCreateMemo(9, 20, 298, 105, "Welcome to Zombie Infestation |DayZ|\nBelow are the list of teams that will be available for you.\nRead every team's description.\nJoin the team you want to fight against the massive army of zombies.", false, GUIEditor.window[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) GUIEditor.tabpanel[1] = guiCreateTabPanel(9, 131, 298, 224, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Team 1", GUIEditor.tabpanel[1]) GUIEditor.memo[2] = guiCreateMemo(0, 0, 298, 107, "~MILITARY~\nOne of the deadliest gang in Las Venturas.\nPowerful weapons.\nLocated at west of Las Venturas in military base.\n\nGANG WAR : ON", false, GUIEditor.tab[1]) guiMemoSetReadOnly(GUIEditor.memo[2], true) GUIEditor.button[1] = guiCreateButton(41, 117, 216, 55, "CHOOSE MILITARY", false, GUIEditor.tab[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF06FF00") GUIEditor.tab[2] = guiCreateTab("Team 2", GUIEditor.tabpanel[1]) GUIEditor.memo[3] = guiCreateMemo(0, 0, 298, 142, "~LV MAFIA~\nOne of the deadliest gang in Las Venturas.\nConsist of 3 mob families :\n1) Forelli Family (Leader)\n2) Leone Family\n3) Sindacco Family\nRichest team in Las Venturas.\nLocated center of LV on the main streets.\n\nGANG WAR : ON", false, GUIEditor.tab[2]) guiMemoSetReadOnly(GUIEditor.memo[3], true) GUIEditor.button[2] = guiCreateButton(23, 152, 251, 42, "CHOOSE LV MAFIA", false, GUIEditor.tab[2]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFBA00FF") GUIEditor.tab[3] = guiCreateTab("Team 3", GUIEditor.tabpanel[1]) GUIEditor.memo[4] = guiCreateMemo(0, 0, 298, 133, "~DEADMAN.INC~\nKnown as Varrios Los Aztecas.\nThey are veterans in carjacking and gun running.\nThey are the rival of military in taking territory over the west of Las Venturas.\nLocated at west of Las Venturas near LV Airport.\n\nGANG WAR : ON", false, GUIEditor.tab[3]) guiMemoSetReadOnly(GUIEditor.memo[4], true) GUIEditor.button[3] = guiCreateButton(44, 139, 209, 60, "CHOOSE DEADMAN.INC", false, GUIEditor.tab[3]) guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FF0000FF") GUIEditor.tab[4] = guiCreateTab("Team 4", GUIEditor.tabpanel[1]) GUIEditor.memo[5] = guiCreateMemo(0, 0, 298, 112, "~ZOMBIELAND KILLERS~\nTheir job is only killing zombies.\nThey earn cash by killing zombies.\nSafe from gangwar.\n\nGANG WAR : OFF", false, GUIEditor.tab[4]) guiMemoSetReadOnly(GUIEditor.memo[5], true) GUIEditor.button[4] = guiCreateButton(27, 124, 243, 59, "CHOOSE ZOMBIELAND KILLERS", false, GUIEditor.tab[4]) guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFFFFB00") guiSetAlpha(GUIEditor.progressbar[1], 0.00) showCursor(true) end addEvent ("onClientPlayerLogin",true) addEventHandler ("onClientPlayerLogin", root, spawnPanel) function teamM() if ( source == GUIEditor.button[1] ) then triggerServerEvent("team1",source) guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end Now the panels working,,, the spawn function doesnt work : clicking button [1] doesnt spawn me Link to comment
Mann56 Posted January 13, 2015 Share Posted January 13, 2015 Finally your GUI is working! Does clicking button1 close the GUI? If not, maybe you must add if ( source=="button" state=="up") then State will recognize the left click of the mouse. Hope it works now or else other may be an error in server script. Link to comment
xeon17 Posted January 13, 2015 Share Posted January 13, 2015 --Server function panel() triggerClientEvent (source,"onClientPlayerLogin",source) end addEventHandler("onPlayerLogin", root, panel) function teamm () setPlayerTeam(source,team1) spawnPlayer (source, 202.39999389648, 1858.4000244141, 13.10000038147, 0, 312, 0, 0) giveWeapon ( source, 30, 1000 ) giveWeapon ( source, 32, 1000 ) end addEvent("team1", true) addEventHandler("team1", root, teamm) Link to comment
bosslorenz Posted January 14, 2015 Author Share Posted January 14, 2015 CLIENT~~ GUIEditor = { tab = {}, progressbar = {}, tabpanel = {}, button = {}, window = {}, memo = {} } function spawnPanel() GUIEditor.window[1] = guiCreateWindow(234, 105, 317, 372, "Zombie Infestation |DayZ| (PH SERVER)", false) guiWindowSetMovable(GUIEditor.window[1], false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FFFF0000") GUIEditor.memo[1] = guiCreateMemo(9, 20, 298, 105, "Welcome to Zombie Infestation |DayZ|\nBelow are the list of teams that will be available for you.\nRead every team's description.\nJoin the team you want to fight against the massive army of zombies.", false, GUIEditor.window[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) GUIEditor.tabpanel[1] = guiCreateTabPanel(9, 131, 298, 224, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Team 1", GUIEditor.tabpanel[1]) GUIEditor.memo[2] = guiCreateMemo(0, 0, 298, 107, "~MILITARY~\nOne of the deadliest gang in Las Venturas.\nPowerful weapons.\nLocated at west of Las Venturas in military base.\n\nGANG WAR : ON", false, GUIEditor.tab[1]) guiMemoSetReadOnly(GUIEditor.memo[2], true) GUIEditor.button[1] = guiCreateButton(41, 117, 216, 55, "CHOOSE MILITARY", false, GUIEditor.tab[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF06FF00") GUIEditor.tab[2] = guiCreateTab("Team 2", GUIEditor.tabpanel[1]) GUIEditor.memo[3] = guiCreateMemo(0, 0, 298, 142, "~LV MAFIA~\nOne of the deadliest gang in Las Venturas.\nConsist of 3 mob families :\n1) Forelli Family (Leader)\n2) Leone Family\n3) Sindacco Family\nRichest team in Las Venturas.\nLocated center of LV on the main streets.\n\nGANG WAR : ON", false, GUIEditor.tab[2]) guiMemoSetReadOnly(GUIEditor.memo[3], true) GUIEditor.button[2] = guiCreateButton(23, 152, 251, 42, "CHOOSE LV MAFIA", false, GUIEditor.tab[2]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFBA00FF") GUIEditor.tab[3] = guiCreateTab("Team 3", GUIEditor.tabpanel[1]) GUIEditor.memo[4] = guiCreateMemo(0, 0, 298, 133, "~DEADMAN.INC~\nKnown as Varrios Los Aztecas.\nThey are veterans in carjacking and gun running.\nThey are the rival of military in taking territory over the west of Las Venturas.\nLocated at west of Las Venturas near LV Airport.\n\nGANG WAR : ON", false, GUIEditor.tab[3]) guiMemoSetReadOnly(GUIEditor.memo[4], true) GUIEditor.button[3] = guiCreateButton(44, 139, 209, 60, "CHOOSE DEADMAN.INC", false, GUIEditor.tab[3]) guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FF0000FF") GUIEditor.tab[4] = guiCreateTab("Team 4", GUIEditor.tabpanel[1]) GUIEditor.memo[5] = guiCreateMemo(0, 0, 298, 112, "~ZOMBIELAND KILLERS~\nTheir job is only killing zombies.\nThey earn cash by killing zombies.\nSafe from gangwar.\n\nGANG WAR : OFF", false, GUIEditor.tab[4]) guiMemoSetReadOnly(GUIEditor.memo[5], true) GUIEditor.button[4] = guiCreateButton(27, 124, 243, 59, "CHOOSE ZOMBIELAND KILLERS", false, GUIEditor.tab[4]) guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFFFFB00") guiSetAlpha(GUIEditor.progressbar[1], 0.00) showCursor(true) end addEvent ("onClientPlayerLogin",true) addEventHandler ("onClientPlayerLogin", root, spawnPanel) function teamM() if ( source == GUIEditor.button[1] ) then triggerServerEvent("team1",source) guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end SERVER~~ function panel() triggerClientEvent (source,"onClientPlayerLogin",source) end addEventHandler("onPlayerLogin", root, panel) function teamm () setPlayerTeam(source,team1) spawnPlayer (source, 202.39999389648, 1858.4000244141, 13.10000038147, 0, 312, 0, 0) giveWeapon ( source, 30, 1000 ) giveWeapon ( source, 32, 1000 ) end addEvent("team1", true) addEventHandler("team1", root, teamm) STILL NOT WORKING, AFTER CLICKING THE BUTTON , IT DOES NOT SPAWN ME Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now