Jump to content

dx panel's OK, but label?


Recommended Posts

Hi guys;

I want to do:

--I want to do click market label open the market window

-------------------- haritaal label open the haritaal window

-------------------- hesap label open the hesap window

----------------Thanks for help

My code:

sX,sY = guiGetScreenSize() 
local g_Root = getRootElement() 
local g_ResRoot = getResourceRootElement(getThisResource()) 
local g_Resource = getThisResource() 
local g_Me = getLocalPlayer() 
-- 
local hour,minute,panel,dxAcc,dxIstatistik = 0,0,"0","0","0" 
local para,puan,level,kazanilanoyun,toplamoyun,kazanmaorani,zkazanmaorani,kazanilanbahis,kazanilanzar,toplamucunculuk,toplamikincilik 
function createUserPanel() 
  
    local showing = isCursorShowing () 
    if not showing then 
        showCursor(true) 
    end 
    ----DX 
        dxDrawRectangle(577.0,274.0,196.0,60.0,tocolor(12,12,12,212),false) 
        dxDrawRectangle(303.0,274.0,196.0,60.0,tocolor(12,12,12,212),false) 
        dxDrawRectangle(30.0,274.0,196.0,60.0,tocolor(12,12,12,212),false) 
        dxDrawRectangle(1.0,356.0,799.0,52.0,tocolor(12,12,12,212),false) 
        dxDrawRectangle(1.0,190.0,799.0,52.0,tocolor(12,12,12,212),false) 
        dxDrawRectangle(417.0,215.0,5.0,5.0,tocolor(255,255,255,255),false) 
        dxDrawText("",417.0,95.0,422.0,100.0,tocolor(255,255,255,255),1.0,"default","left","top",false,false,false) 
        dxDrawRectangle(236.0,113.0,318.0,61.0,tocolor(12,12,12,212),false) 
        dxDrawText("V0.5",495.0,138.0,553.0,169.0,tocolor(255,255,255,255),1.0,"diploma","left","top",false,false,false) 
        dxDrawText("Eski Dostlar Race Panel",248.0,119.0,515.0,150.0,tocolor(255,255,255,255),1.0,"pricedown","left","top",false,false,false) 
  
    setTime(0,0) 
end 
function panelshow() 
  
end 
function panelgizli() 
guiSetVisible ( market, false ) 
guiSetVisible ( haritaal, false ) 
guiSetVisible ( hesap, false ) 
end 
function panelacik() 
-------THİS İS LABEL----- 
  
market = guiCreateLabel(24,271,208,73,"Market",false) 
guiLabelSetVerticalAlign(market,"center") 
guiLabelSetHorizontalAlign(market,"center",false) 
guiSetFont(market,"sa-gothic") 
  
haritaal = guiCreateLabel(293,272,221,71,"Harita Al",false) 
guiLabelSetVerticalAlign(haritaal,"center") 
guiLabelSetHorizontalAlign(haritaal,"center",false) 
guiSetFont(haritaal,"sa-gothic") 
  
hesap = guiCreateLabel(564,268,218,75,"Hesap",false) 
guiLabelSetVerticalAlign(hesap,"center") 
guiLabelSetHorizontalAlign(hesap,"center",false) 
guiSetFont(hesap,"sa-gothic") 
guiSetVisible ( market, true ) 
guiSetVisible ( haritaal, true ) 
guiSetVisible ( hesap, true ) 
  
-------What Can I DO???--- 
--I want to do click market label open the market window 
-------------------- haritaal label open the haritaal window 
-------------------- hesap label open the hesap window 
----------------Thanks for help 
  
end 
function panelShowHide() 
    triggerServerEvent("panelIsLogin",g_Me) 
end 
bindKey("u","up",panelShowHide) 
-- 
function showDXPanel() 
    if panel ~= "1" then 
        panel = "1" 
        local h,m = getTime() 
        addEventHandler("onClientRender",g_Root,createUserPanel) 
        hour = h 
        minute = m 
        dxAcc = "0" 
        dxIstatistik="0" 
        panelacik() 
         
    else 
        panel="0" 
        removeEventHandler("onClientRender",g_Root,createUserPanel) 
        showCursor(false) 
        panelgizli() 
        setTime(tonumber(hour),tonumber(minute)) 
    end 
end 
addEvent("showDXPanel",true) 
addEventHandler("showDXPanel",g_Root,showDXPanel) 
-- 
  
  
  

Link to comment
Guest Guest4401

--I want to do click market label open the market window

-------------------- haritaal label open the haritaal window

-------------------- hesap label open the hesap window

----------------Thanks for help

Where are those 3 windows? I didn't find them in your code at all. Anyways, I've made the code excluding that part. Include it when you make those 3 windows.

addEventHandler("onClientGUIClick", getRootElement(), 
    function() 
        if source == market then 
            --make the window visible here 
        elseif source == haritaal then 
            --make the window visible here 
        elseif source == hesap then 
            --make the window visible here 
        end 
    end 
) 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...