Black2 Posted August 12, 2015 Share Posted August 12, 2015 [HELP]Because my button does not close the window ? local pickup = createPickup ( 2487.1398925781, -1667.7604980469, 13.34375, 3, 1239, 0 ) GUIEditor = { button = {}, window = {}, memo = {} } local function clientPickupHit(thePlayer, matchingDimension) windows1 = guiCreateWindow(171, 151, 280, 439, "Info", false) guiWindowSetSizable(windows1, false) memo1 = guiCreateMemo(20, 36, 240, 354, "Here Info", false, windows1) button1 = guiCreateButton(53, 397, 165, 32, "Close", false, windows1) showCursor(true) end addEventHandler("onClientPickupHit", pickup, clientPickupHit) function hidegui() guiSetVisible(windows1, false) showCursor (false) end addEventHandler ( "onClientGUIClick", button1, hidegui, false ) Link to comment
KariiiM Posted August 12, 2015 Share Posted August 12, 2015 I edited your code and i fixed it,now it works perfectly windows1 = guiCreateWindow(171, 151, 280, 439, "Info", false) memo1 = guiCreateMemo(20, 36, 240, 354, "Here Info", false, windows1) button1 = guiCreateButton(53, 397, 165, 32, "Close", false, windows1) guiSetVisible(windows1, false) guiWindowSetSizable(windows1, false) local pickup = createPickup ( 2487.1398925781, -1667.7604980469, 13.34375, 3, 1239, 0 ) function clientPickupHit( hitPlayer, matchingDimension ) if( hitPlayer == localPlayer ) then if (source == pickup) then guiSetVisible (windows1,true) showCursor (true) end end end addEventHandler ("onClientPickupHit",pickup,clientPickupHit) addEventHandler("onClientGUIClick", guiRoot, function () if (source == button1) then guiSetVisible (windows1,false) showCursor(false) end end) 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