0 Üye ve 1 Ziyaretçi konuyu incelemekte.
local tabPanel = {}local buttons = {}local labels = {}local player = localPlayerfunction shopInterface() shop_window = guiCreateWindow(370,200, 544, 501, "Weapon Shop", false) guiSetVisible(shop_window, false) guiSetAlpha(shop_window, 0.73) guiWindowSetSizable(shop_window, false) exports.guicols:guiSetColor (shop_window, "red"); tabPanel.myTabPanel = guiCreateTabPanel(14, 120, 516, 318, false, shop_window)-- Create the Tab Panel tabPanel.TabArmas = guiCreateTab("Guns", tabPanel.myTabPanel) buttons.CZ550 = guiCreateButton(291, 24, 175, 85, "CZ 550 | 5$", false , tabPanel.TabArmas) -- M4 skill guiSetFont(buttons.CZ550, "default-bold-small") buttons.DesertEagle = guiCreateButton(43, 204, 165, 69, "Desert Eagle | 5$", false, tabPanel.TabArmas) -- AK47 skill guiSetFont(buttons.DesertEagle, "default-bold-small") buttons.Granada = guiCreateButton(291, 204, 175, 69, "Grenade | 25$", false, tabPanel.TabArmas) -- Sawn-off Shotgun skill guiSetFont(buttons.Granada , "default-bold-small") buttons.M4 = guiCreateButton(43, 24, 165, 85, "M4 | 5$", false, tabPanel.TabArmas) -- Shotgun skill guiSetFont(buttons.M4 , "default-bold-small") buttons.AK47 = guiCreateButton(43, 113, 165, 82, "AK-47 | 5$", false, tabPanel.TabArmas) -- SPAZ-12 skill guiSetFont(buttons.AK47 , "default-bold-small") buttons.M9SD = guiCreateButton(291, 113, 175, 82, "M9 SD | 5$", false, tabPanel.TabArmas) -- Silenced Pistol skill guiSetFont(buttons.M9SD , "default-bold-small") ------------- Ammos -------------------------------------------------------------------------------------------------------------------------- tabPanel.TabMunicao = guiCreateTab("Ammos", tabPanel.myTabPanel) buttons.CZ550Mag = guiCreateButton(291, 24, 175, 85, "CZ 550 1 Mag | 10$", false, tabPanel.TabMunicao) -- M4 skill guiSetFont(buttons.CZ550Mag , "default-bold-small") buttons.MP5Mag = guiCreateButton(43, 204, 165, 69, "MP5A5 1 Mag | 6$", false, tabPanel.TabMunicao) -- AK47 skill guiSetFont(buttons.MP5Mag , "default-bold-small") buttons.PDWMag = guiCreateButton(291, 113, 175, 82, "PDW 1 Mag | 6$", false, tabPanel.TabMunicao) -- Sawn-off Shotgun skill guiSetFont(buttons.PDWMag , "default-bold-small") buttons.WinchesterMAG = guiCreateButton(291, 204, 175, 69, "1866 Slug | 8$", false, tabPanel.TabMunicao) -- Shotgun skill guiSetFont(buttons.WinchesterMAG , "default-bold-small") buttons.AKMag = guiCreateButton(43, 113, 165, 82, "AK 1 Mag | 10$", false, tabPanel.TabMunicao) -- SPAZ-12 skill guiSetFont(buttons.AKMag , "default-bold-small") buttons.M4Mag = guiCreateButton(43, 24, 165, 85, "M4 1 Mag | 10$", false, tabPanel.TabMunicao) -- Silenced Pistol skill guiSetFont(buttons.M4Mag , "default-bold-small") ------------ Others ---------------- tabPanel.TabOutros = guiCreateTab("Others", tabPanel.myTabPanel) buttons.Road = guiCreateButton(43, 24, 165, 85, "Roadflare | 6$", false, tabPanel.TabOutros) -- Sawn-off Shotgun skill guiSetFont(buttons.Road , "default-bold-small") buttons.Wire = guiCreateButton(291, 24, 175, 85, "Wirefence | 10$", false, tabPanel.TabOutros) -- Shotgun skill guiSetFont(buttons.Wire , "default-bold-small") buttons.Full = guiCreateButton(43, 113, 165, 82, "Full Gas Canister | 20$", false, tabPanel.TabOutros) -- Silenced Pistol skill guiSetFont(buttons.Full , "default-bold-small") ------------- Food/Drinks -------------------------------------------------------------------------------------------------------------------------- tabPanel.TabComidas = guiCreateTab("Food/Drinks", tabPanel.myTabPanel) buttons.Pizza = guiCreateButton(24, 21, 184, 84, "Pizza | 6$", false, tabPanel.TabComidas) guiSetFont(buttons.Pizza , "default-bold-small") buttons.Milk = guiCreateButton(291, 21, 188, 84, "Milk | 5$", false, tabPanel.TabComidas) guiSetFont(buttons.Milk , "default-bold-small") buttons.Cooked = guiCreateButton(24, 120, 184, 75, "Cooked Meat | 6$", false,tabPanel.TabComidas) guiSetFont(buttons.Cooked , "default-bold-small") buttons.Soda = guiCreateButton(291, 123, 188, 75, "Soda Bottle | 5$", false, tabPanel.TabComidas) guiSetFont(buttons.Soda , "default-bold-small") buttons.BeansCan = guiCreateButton(24, 204, 184, 69, "Beans Can | 6$", false, tabPanel.TabComidas) guiSetFont(buttons.BeansCan , "default-bold-small") buttons.WaterBottle = guiCreateButton(291, 208, 188, 65, "Water Bottle | 5$", false, tabPanel.TabComidas) guiSetFont(buttons.WaterBottle , "default-bold-small") ------------- Skins -------------------------------------------------------------------------------------------------------------------------- tabPanel.TabSkins = guiCreateTab("Skins", tabPanel.myTabPanel) buttons.Ghillie = guiCreateButton(23, 30, 179, 98, "Ghillie Woman | 11$", false,tabPanel.TabSkins) guiSetFont(buttons.Ghillie, "default-bold-small") buttons.Ghost = guiCreateButton(302, 30, 179, 98, "Ghost Clothing | 6$", false, tabPanel.TabSkins) guiSetFont(buttons.Ghost, "default-bold-small") buttons.Camouflage = guiCreateButton(23, 147, 179, 98, "Camouflage Clothing | 10$", false, tabPanel.TabSkins) guiSetFont(buttons.Camouflage, "default-bold-small") buttons.Survivor = guiCreateButton(302, 147, 179, 98, "Survivor Clothing | 5$", false, tabPanel.TabSkins) guiSetFont(buttons.Survivor, "default-bold-small") ------------- Parte de Carros -------------------------------------------------------------------------------------------------------------------------- tabPanel.TabParteDeCarros = guiCreateTab("Car Parts", tabPanel.myTabPanel) buttons.Tires = guiCreateButton(23, 23, 183, 97, "Tires | 7$", false, tabPanel.TabParteDeCarros) guiSetFont( buttons.Tires, "default-bold-small") buttons.TankParts = guiCreateButton(291, 23, 183, 97, "Tank Parts | 12$", false, tabPanel.TabParteDeCarros) guiSetFont(buttons.TankParts, "default-bold-small") buttons.Engine = guiCreateButton(62, 143, 385, 111, "Engine | 15$", false,tabPanel.TabParteDeCarros) guiSetFont(buttons.Engine , "default-bold-small") ------------- Medicos -------------------------------------------------------------------------------------------------------------------------- tabPanel.TabMedico = guiCreateTab("Medical Items", tabPanel.myTabPanel) buttons.Medickit = guiCreateButton(33, 28, 195, 103, "Medic Kit | 15$", false, tabPanel.TabMedico) guiSetFont(buttons.Medickit, "default-bold-small") buttons.Bandage = guiCreateButton(33, 141, 195, 122, "Bandage | 6$", false, tabPanel.TabMedico) guiSetFont(buttons.Bandage, "default-bold-small") buttons.PainKiller = guiCreateButton(270, 28, 193, 107, "Painkiller | 8$", false, tabPanel.TabMedico) guiSetFont(buttons.PainKiller, "default-bold-small") buttons.Morphine = guiCreateButton(270, 141, 193, 122, "Morphine | 6$", false, tabPanel.TabMedico) guiSetFont(buttons.Morphine, "default-bold-small") ------------- Criador -------------------------------------------------------------------------------------------------------------------------- tabPanel.Criador = guiCreateTab("INFO", tabPanel.myTabPanel) labels.Painel = guiCreateLabel(187, 18, 248, 99, "dayz", false, tabPanel.Criador) guiSetFont(labels.Painel, "sa-gothic") labels.Criador = guiCreateLabel(198, 90, 215, 19, "Dynamic DayZ", false, tabPanel.Criador) guiSetFont(labels.Criador, "default-bold-small") guiLabelSetColor(labels.Criador, 254, 0, 0) labels.Servidor = guiCreateLabel(142, 163, 408, 56, "If you want buy tokens, contact with us!", false, tabPanel.Criador) guiSetFont(labels.Servidor, "default-bold-small") labels.Painel2 = guiCreateLabel(189, 41, 519, 70, "Dayz", false, shop_window) guiSetFont(labels.Painel2, "sa-gothic") guiLabelSetColor(labels.Painel2, 12, 247, 6) ----- Sair buttons.Sair = guiCreateButton(15, 443, 515, 48, "CLOSE", false, shop_window) guiSetFont(buttons.Sair , "default-bold-small") ----------- Button Color ---------------------------------------------------------------- for _, button in pairs(buttons) do guiSetProperty(button, "HoverTextColour", "FFFF0000") endendaddEventHandler("onClientResourceStart", resourceRoot, shopInterface)----------- Buy Armas ---------------------------------------------------------------addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.CZ550) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_CZ550") end end)addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.DesertEagle) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_DesertEagle") end end)addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.Granada) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_Granada") end end)addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.M4) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_M4") end end)addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.AK47) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_AK47") end end)addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.M9SD) then triggerServerEvent("onClientBuyWeapon", localPlayer, "weapon_M9SD") end end)----------- Comidas -----------------------------------------------------addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.Pizza) then triggerServerEvent("onClientBuyComida", localPlayer, "Comida_Pizza") end end)addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.Milk) then triggerServerEvent("onClientBuyComida", localPlayer, "Comida_Milk") end end)addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.Cooked) then triggerServerEvent("onClientBuyComida", localPlayer, "Comida_Cooked") end end)addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.Soda) then triggerServerEvent("onClientBuyComida", localPlayer, "Comida_Soda") end end)addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.BeansCan) then triggerServerEvent("onClientBuyComida", localPlayer, "Comida_BeansCan") end end)addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.WaterBottle) then triggerServerEvent("onClientBuyComida", localPlayer, "Comida_WaterBottle") end end)----------- Outros -----------------------------------------------------addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.Alice) then triggerServerEvent("onClientBuyOutros", localPlayer, "Outro_Alice") end end)addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.Road) then triggerServerEvent("onClientBuyOutros", localPlayer, "Outro_Road") end end)addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.Wire) then triggerServerEvent("onClientBuyOutros", localPlayer, "Outro_Wire") end end)addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.Czech) then triggerServerEvent("onClientBuyOutros", localPlayer, "Outro_Czech") end end)addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.Full) then triggerServerEvent("onClientBuyOutros", localPlayer, "Outro_Full") end end)----------- Munição -----------------------------------------------------addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.CZ550Mag) then triggerServerEvent("onClientBuyMunicao", localPlayer, "Municao_CZ550Mag") end end)addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.MP5Mag) then triggerServerEvent("onClientBuyMunicao", localPlayer, "Municao_MP5Mag") end end)addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.PDWMag) then triggerServerEvent("onClientBuyMunicao", localPlayer, "Municao_PDWMag") end end)addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.WinchesterMAG) then triggerServerEvent("onClientBuyMunicao", localPlayer, "Municao_WinchesterMAG") end end)addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.AKMag) then triggerServerEvent("onClientBuyMunicao", localPlayer, "Municao_AKMag") end end)addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.M4Mag) then triggerServerEvent("onClientBuyMunicao", localPlayer, "Municao_M4Mag") end end)------------------------------ Skins ---------------------------------------------------addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.Ghillie) then triggerServerEvent("onClientBuySkin", localPlayer, "Skin_Ghillie") end end)addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.Civilian) then triggerServerEvent("onClientBuySkin", localPlayer, "Skin_Civilian") end end)addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.Camouflage) then triggerServerEvent("onClientBuySkin", localPlayer, "Skin_Camouflage") end end)addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.Survivor) then triggerServerEvent("onClientBuySkin", localPlayer, "Skin_Survivor") end end)----------- Parte de carros ---addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.Tires) then triggerServerEvent("onClientBuyCarro", localPlayer, "Carros_Tires") end end)addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.TankParts) then triggerServerEvent("onClientBuyCarro", localPlayer, "Carros_TankParts") end end)addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.Engine) then triggerServerEvent("onClientBuyCarro", localPlayer, "Carros_Engine") end end)----------------- MedicosaddEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.Medickit) then triggerServerEvent("onClientBuyMedico", localPlayer, "Medico_Medickit") end end)addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.Bandage) then triggerServerEvent("onClientBuyMedico", localPlayer, "Medico_Bandage") end end)addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.PainKiller) then triggerServerEvent("onClientBuyMedico", localPlayer, "Medico_PainKiller") end end)addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.Morphine) then triggerServerEvent("onClientBuyMedico", localPlayer, "Medico_Morphine") end end)addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == buttons.Sair) then guiSetVisible(shop_window,false) showCursor(false) end end)---- Fimfunction AbrirJanela2()guiSetVisible(shop_window,true)showCursor(true)endaddEvent("openWindow",true)addEventHandler("openWindow", getRootElement(), AbrirJanela2)bindKey ( "F6", "down", AbrirJanela2 )
function AbrirJanela2()guiSetVisible(shop_window,not guiGetVisible(shop_window))showCursor(guiGetVisible(shop_window))endaddEvent("openWindow",true)addEventHandler("openWindow", getRootElement(), AbrirJanela2)bindKey ( "F6", "down", AbrirJanela2 )