Jump to content

have a bug on tab


darbka2002

Recommended Posts

guibutton = guiCreateButton ( ... ) 
addEventHandler ( "onClientGUIClick", guibutton, function ( button, state ) 
    if button == "left" and state == "up" then 
        destroyElement ( guibutton )  -- Hide GUI 
    end 
end, false ) 

https://wiki.multitheftauto.com/wiki/OnClientGUIClick

guitab = guiCreateTab ( ... ) 
addEventHandler ( "onClientGUIClick", guitab, function ( button, state ) 
    if button == "left" and state == "up" then 
        destroyElement ( guitab )  -- Hide GUI 
    end 
end, false ) 

Didn't really change much :D

My first answer was just an example, thought you will notice what I wanna say.

Link to comment

it still not work

close1 = guiCreateTab("close", tabpanel)   
  
addEventHandler ( "onClientGUIClick", close1, function ( button, state ) 
    if  state == "up" then 
       guiSetVisible( rule, false ) 
    end 
end, false ) 

and i try to use your codes but it not work and this not work i just need if i click in the tab in the top in the tab name the gui close

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...