Genius Posted June 3, 2012 Share Posted June 3, 2012 I cant open window Bad argument @ "guiGetVisible" Bad argument @"guiSetVisible" windowoff = guiCreateWindow (350,189,301,161,"Off duty",true) label = guiCreateLabel (69,35,113,37,"Your job:",true,windowoff) label1 = guiCreateLabel (69,35,115,36,"",true,windowoff) closeoff = guiCreateButton (160,117,120,35,"Close",true,windowoff) buttonoff = guiCreateButton(18,117,127,35,"Off duty",true,windowoff) showCursor ( true ) function toggle() if (guiGetVisible(windowoff)) then showCursor(false) guiSetVisible(windowoff,false) else showCursor(true) guiSetVisible(windowoff,true) end end bindKey("F2","down",toggle) Link to comment
Kenix Posted June 3, 2012 Share Posted June 3, 2012 windowoff = guiCreateWindow (350,189,301,161,"Off duty",true) label = guiCreateLabel (69,35,113,37,"Your job:",true,windowoff) label1 = guiCreateLabel (69,35,115,36,"",true,windowoff) closeoff = guiCreateButton (160,117,120,35,"Close",true,windowoff) buttonoff = guiCreateButton(18,117,127,35,"Off duty",true,windowoff) Your problem here. You use relative argument but you not use relative pos and size. ( relative pos and size should be float Example: position 0.1, 0.5, size 0.2, 0.2 ) Read wiki pls before write post. It's should be windowoff = guiCreateWindow( 0.350, 0.189, 0.301, 0.161, "Off duty", true ) label = guiCreateLabel( 0.069, 0.035, 0.113, 0.037, "Your job:", true, windowoff ) label1 = guiCreateLabel( 0.069, 0.035, 0.115, 0.036, "", true, windowoff ) closeoff = guiCreateButton( 0.160, 0.117, 0.120,0.035, "Close", true, windowoff ) buttonoff = guiCreateButton( 0.018, 0.117, 0.127, 0.035, "Off duty", true, windowoff ) 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