Jump to content

bosslorenz

Members
  • Posts

    200
  • Joined

  • Last visited

Everything posted by bosslorenz

  1. 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...
  2. 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.
  3. 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.!
  4. 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.
  5. 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...
  6. Still wont enable me to click something on the panel
  7. SHOW PANEL BUT CANT CLICK ANYTHING LIKE TAB PANEL AND BUTTONS
  8. 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
  9. 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)
  10. 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)
  11. 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?
  12. CLIENT SIDE-- local marker1 = createMarker( 1920.599609375, 1310.099609375, 8, "cylinder", 2, 0 ,0, 255, 155 ) GUIEditor = { button = {}, window = {}, memo = {} } function showGUI() GUIEditor.window[1] = guiCreateWindow(275, 76, 219, 461, "LV MAFIA VEHICLE SPAWNER", false) guiWindowSetSizable(GUIEditor.window[1], false) guiWindowSetMovable (GUIEditor.window[1], false) guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF41FF00") GUIEditor.button[1] = guiCreateButton(9, 27, 200, 79, "STAFFORD", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFFF0000") GUIEditor.button[2] = guiCreateButton(9, 114, 200, 76, "FREEWAY", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFFF0000") GUIEditor.button[3] = guiCreateButton(131, 415, 78, 36, "CLOSE", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[3], "default-bold-small") guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFFF0000") GUIEditor.memo[1] = guiCreateMemo(9, 216, 200, 169, "This is only available to team LV MAFIA. That means, only players who are in team LV MAFIA can spawn vehicles in this marker.\n\nWARNING : Spawning another vehicle will destroy the existing vehicle you spawned earlier.", false, GUIEditor.window[1]) guiMemoSetReadOnly(GUIEditor.memo[1], true) showCursor(true) end addEventHandler("onClientMarkerHit",marker1,showGUI) function spawn1() if ( source == GUIEditor.button[1] ) then triggerServerEvent("spawn1",localPlayer) guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end addEventHandler ("onClientGUIClick", root, spawn1) function spawn2() if ( source == GUIEditor.button[2] ) then triggerServerEvent("spawn2",localPlayer) guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end addEventHandler ("onClientGUIClick", root, spawn2) function closeGUI() if ( source == GUIEditor.button[3] ) then guiSetVisible(GUIEditor.window[1],false) showCursor(false) end end addEventHandler ("onClientGUIClick", root, closeGUI) SERVER SIDE-- function vehicle1() local playerTeam = getPlayerTeam ( source ) local teamName = ( playerTeam and getTeamName ( playerTeam ) or "" ) if teamName == "LV MAFIA" then local prevVeh = getElementData(client, "mafiaVeh") -- get the element stored in mafiaVeh for the player if prevVeh and isElement(prevVeh) then -- if it exist and if it's an element then destroyElement(prevVeh) -- destroy it end local veh = createVehicle( 580, 1927.6, 1309.8, 9.4, 0, 0, 270 ) -- creating the vehicle setElementData(client, "mafiaVeh", veh) -- storing the vehicle in "mafiaVeh" for the player end end addEvent("spawn1", true) addEventHandler("spawn1", root, vehicle1) function vehicle2() local playerTeam = getPlayerTeam ( source ) local teamName = ( playerTeam and getTeamName ( playerTeam ) or "" ) if teamName == "LV MAFIA" then local prevVeh = getElementData(client, "mafiaVeh") if prevVeh and isElement(prevVeh) then destroyElement(prevVeh) end local veh = createVehicle( 463, 1927.6, 1309.8, 8.9, 0, 0, 270 ) setElementData(client, "mafiaVeh", veh) end end addEvent("spawn2", true) addEventHandler("spawn2", root, vehicle2) addEventHandler("onPlayerWasted",root,function() local veh = getElementData(source, "mafiaVeh") if(veh)then if(isElement(veh))then destroyElement(veh) setElementData(source,"mafiaVeh",nil) end end end ) addEventHandler("onPlayerQuit",root,function() local veh = getElementData(source, "mafiaVeh") if(veh)then if(isElement(veh))then destroyElement(veh) setElementData(source,"mafiaVeh",nil) end end end ) Why does the GUI shows to every one, just for example . 2 players and only 1 player step into the marker but the GUIwindow show to both of them? Anything wrong with the script?
  13. setting timer for killPed so that player not on team gets warning before killed ?
  14. function killP( hitElement ) if(getElementType(hitElement)=="player")then local playerTeam = getPlayerTeam ( hitElement ) local teamName = ( playerTeam and getTeamName ( playerTeam ) or "" ) if not ( teamName == "LV MAFIA")then killPed(hitElement) outputChatBox("You will be killed in 5 seconds if you don`t get out from LV MAFIA base.", hitElement) end end end addEventHandler("onColShapeHit", safeZone, killP) add setTimer(killPed,5000,0) ? outputChatBox will give him warning and if still on zone in 5 secs kill Ped
  15. function killP(hitElement) if(getElementType(hitElement)=="ped")then destroyElement(hitElement) elseif(getElementType(hitElement)=="player")then local playerTeam = getPlayerTeam ( hitElement ) local teamName = ( playerTeam and getTeamName ( playerTeam ) or "" ) if teamName == "LV MAFIA" then return end if not teamName =="LV MAFIA" then killPed(hitElement) end end end addEventHandler("onColShapeHit", safeZone, killP) What`s still wrong about this? No error on mtaserver.exe but in game doesnt kill player that is not on team LV MAFIA
  16. safeZone = createColRectangle ( 1837.4000244141, 1283.0999755859, 195, 165) safeArea = createRadarArea ( 1837.4000244141, 1283.0999755859, 195, 165, 0, 255, 0, 150) setElementData (safeArea,"zombieProof",true) function safeZoneEnter ( thePlayer, matchingDimension ) if getElementType( thePlayer ) ~= "player" then return end outputChatBox ( "* You Have Entered The *LV MAFIA* Base! *", thePlayer, 200, 0, 100 ) toggleControl ( thePlayer, "fire", false ) toggleControl ( thePlayer, "next_weapon", true ) toggleControl ( thePlayer, "previous_weapon", true ) setPedWeaponSlot ( thePlayer, 0 ) toggleControl ( thePlayer, "aim_weapon", false ) toggleControl ( thePlayer, "vehicle_fire", false ) toggleControl ( thePlayer, "vehicle_secondary_fire", false ) end addEventHandler ( "onColShapeHit", safeZone, safeZoneEnter ) function safeZoneExit ( thePlayer, matchingDimension ) if getElementType( thePlayer ) ~= "player" then return end outputChatBox ( "* You Have Left The *LV MAFIA* Base! *", thePlayer, 200, 0, 100 ) toggleControl ( thePlayer, "fire", true ) toggleControl ( thePlayer, "next_weapon", true ) toggleControl ( thePlayer, "previous_weapon", true ) toggleControl ( thePlayer, "aim_weapon", true ) toggleControl ( thePlayer, "vehicle_fire", true ) toggleControl ( thePlayer, "vehicle_secondary_fire", true ) end addEventHandler ( "onColShapeLeave", safeZone, safeZoneExit ) addEventHandler ( "onColShapeHit", safeZone, function ( hitElement ) if getElementType( hitElement ) == "ped" then setRadarAreaFlashing(safeArea, false) setElementData (safeZone,"zombieProof", true) killPed(hitElement) end end ) function killP(hitElement) local playerTeam = getPlayerTeam ( hitElement ) local teamName = ( playerTeam and getTeamName ( playerTeam ) or "" ) if teamName == "LV MAFIA" then return end if not teamName =="LV MAFIA" then if(getElementType(hitElement)=="ped")then destroyElement (hitElement) elseif(getElementType(hitElement)=="player")then killPed(hitElement) end end end addEventHandler("onColShapeHit", safeZone, killP) 42: bad argument @'getPlayerTeam' Expected player at argument 1, got ped
  17. safeZone = createColRectangle ( 1837.4000244141, 1283.0999755859, 195, 165) safeArea = createRadarArea ( 1837.4000244141, 1283.0999755859, 195, 165, 0, 255, 0, 150) setElementData (safeArea,"zombieProof",true) function safeZoneEnter ( thePlayer, matchingDimension ) if getElementType( thePlayer ) ~= "player" then return end outputChatBox ( "* You Have Entered The *LV MAFIA* Base! *", thePlayer, 200, 0, 100 ) toggleControl ( thePlayer, "fire", false ) toggleControl ( thePlayer, "next_weapon", true ) toggleControl ( thePlayer, "previous_weapon", true ) setPedWeaponSlot ( thePlayer, 0 ) toggleControl ( thePlayer, "aim_weapon", false ) toggleControl ( thePlayer, "vehicle_fire", false ) toggleControl ( thePlayer, "vehicle_secondary_fire", false ) end addEventHandler ( "onColShapeHit", safeZone, safeZoneEnter ) function safeZoneExit ( thePlayer, matchingDimension ) if getElementType( thePlayer ) ~= "player" then return end outputChatBox ( "* You Have Left The *LV MAFIA* Base! *", thePlayer, 200, 0, 100 ) toggleControl ( thePlayer, "fire", true ) toggleControl ( thePlayer, "next_weapon", true ) toggleControl ( thePlayer, "previous_weapon", true ) toggleControl ( thePlayer, "aim_weapon", true ) toggleControl ( thePlayer, "vehicle_fire", true ) toggleControl ( thePlayer, "vehicle_secondary_fire", true ) end addEventHandler ( "onColShapeLeave", safeZone, safeZoneExit ) addEventHandler ( "onColShapeHit", safeZone, function ( hitElement ) if getElementType( hitElement ) == "ped" then setRadarAreaFlashing(safeArea, false) setElementData (safeZone,"zombieProof", true) killPed(hitElement) end end ) function killP(hitElement) local playerTeam = getPlayerTeam ( hitElement ) local teamName = ( playerTeam and getTeamName ( playerTeam ) or "" ) if teamName == "LV MAFIA" then return end if not teamName =="LV MAFIA" then killPed(hitElement) end end addEventHandler("onColShapeHit", safeZone, killP) says lua:42 :bad argument @ 'getPlayerTeam' expected player at argument 1, got Ped
  18. bosslorenz

    Team base

    For example Team 1 Team 2 How to make an area only available to team 1 and if you are team 2 and you entered the area it will kill you
  19. Okay thanks to you guys who helped me. Changing topic to FIXED
  20. lua :39 : unexpected symbol near 'then'
  21. onPlayerWasted inside vehicle and onPlayerWasted outside vehicle....
  22. >>>>>>lua :37 : attempt to index global 'prevVeh' a nil value<<<<<
  23. Thanks for that Citizen But can u tell me whats wrong with this script I put? function vehicle1() local playerTeam = getPlayerTeam ( source ) local teamName = ( playerTeam and getTeamName ( playerTeam ) or "" ) if teamName == "LV MAFIA" then local prevVeh = getElementData(client, "mafiaVeh") -- get the element stored in mafiaVeh for the player if prevVeh and isElement(prevVeh) then -- if it exist and if it's an element then destroyElement(prevVeh) -- destroy it end local veh = createVehicle( 580, 1927.6, 1309.8, 9.4, 0, 0, 270 ) -- creating the vehicle setElementData(client, "mafiaVeh", veh) -- storing the vehicle in "mafiaVeh" for the player else outputChatBox("You can't spawn a vehicle here, you're not a LV MAFIA member", client, 200, 0, 100) end end addEvent("spawn1", true) addEventHandler("spawn1", root, vehicle1) function vehicle2() local playerTeam = getPlayerTeam ( source ) local teamName = ( playerTeam and getTeamName ( playerTeam ) or "" ) if teamName == "LV MAFIA" then local prevVeh = getElementData(client, "mafiaVeh") if prevVeh and isElement(prevVeh) then destroyElement(prevVeh) end local veh = createVehicle( 463, 1928.1, 1313.1, 8.9, 0, 0, 270 ) setElementData(client, "mafiaVeh", veh) else outputChatBox("You can't spawn a vehicle here, you're not a LV MAFIA member", client, 200, 0, 100) end end addEvent("spawn2", true) addEventHandler("spawn2", root, vehicle2) addEventHandler("onPlayerWasted",root,function() if isElement( prevVeh[source]) then destroyElement(prevVeh[source]) prevVeh[source] = nil end end ) Im adding onPlayerWasted but it tells attempt to call global
  24. Can anyone help me with the scripts for 1 vehicle per player only: destroy vehicle when spawning another one, and onPlayerQuit and onPlayerWasted
  25. Dont know what to do anymore, can you just tell me the script guys?
×
×
  • Create New...