MAB Posted July 28, 2015 Share Posted July 28, 2015 help the button is not working... sx,sy = guiGetScreenSize() x,y = (sx/1280),(sy/768) function edit () color2 = tocolor(255,255,255,255) dxDrawText("Close", x*756, y*522, x*870, y*552, color2, 1.30, "pricedown", "left", "top", false, false, false, false, false) addEventHandler( "onClientRender", root, edit ) function join ( button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement ) if ( absoluteX == x*870 and absoluteY == y*552 ) then if ( button == "left" and state == "up" ) then showCursor(false) removeEventHandler("onClientRender", root, edit) end end end addEventHandler ( "onClientClick", root, join ) Link to comment
GTX Posted July 28, 2015 Share Posted July 28, 2015 sx,sy = guiGetScreenSize() x,y = (sx/1280),(sy/768) function edit () color2 = tocolor(255,255,255,255) dxDrawText("Close", x*756, y*522, x*870, y*552, color2, 1.30, "pricedown", "left", "top", false, false, false, false, false) addEventHandler( "onClientRender", root, edit ) function join ( button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement ) if ( absoluteX >= x*756 and absoluteY >= y*552 ) and (absoluteX <= x*756+x*870 and absoluteY <= y*522+y*522) then if ( button == "left" and state == "up" ) then showCursor(false) removeEventHandler("onClientRender", root, edit) end end end addEventHandler ( "onClientClick", root, join ) 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