IIIIlllllIII Posted September 3, 2011 Share Posted September 3, 2011 hi i need help with how to creat a shop script i know how to creat gui window and a know the bind key from the winodw but my problem i want add img on the shop and i want lett the bind key if i press the key and the shop open i want hide the shop without close button i mean i want close button with bind key like f2 see the code shopWindow = guiCreateWindow(367,105,334,435,"Shop MOJRM-511",false) guiSetVisible (shopWindow, false) guiSetAlpha(shopWindow,1) guiWindowSetSizable(shopWindow,false) tabPanel = guiCreateTabPanel(11,23,314,372,false,shopWindow) tab = guiCreateTab("weapons",tabPanel) weapButton = guiCreateButton(107,308,100,29,"Buy Weapon",false,tab) bindKey(p,"f2","down","shopWindow") this my code i want add img on the shop and i want if i press the f2 close the shop i want open shop from f2 and close shop from f2 that is and sorry if you dont understand me Link to comment
JR10 Posted September 3, 2011 Share Posted September 3, 2011 guiCreateStaticImage ? For F2: bindKey ( "F2" , "down" , function() guiSetVisible ( shopWindow , not guiGetVisible ( shopWindow ) ) showCursor ( guiGetVisible ( shopWindow ) ) end ) Link to comment
E-mail Posted September 3, 2011 Share Posted September 3, 2011 if you use bind key for show the gui use unbind key to hide the gui 3.shopWindow = guiCreateWindow(367,105,334,435,"Shop MOJRM-511",false) 4.guiSetVisible (shopWindow, false) 5.guiSetAlpha(shopWindow,1) 6.guiWindowSetSizable(shopWindow,false) 7.tabPanel = guiCreateTabPanel(11,23,314,372,false,shopWindow) 8.tab = guiCreateTab("weapons",tabPanel) 9.weapButton = guiCreateButton(107,308,100,29,"Buy Weapon",false,tab) 10.bindKey(p,"f2","down","shopWindow") 11.unbindKey ( p,"f2","down","shopWindow" ) iam x[Dev-PoinT]x Nice you want to be a scripter lol Link to comment
JR10 Posted September 3, 2011 Share Posted September 3, 2011 E-mail, that's not correct at all. That won't work. Link to comment
IIIIlllllIII Posted September 3, 2011 Author Share Posted September 3, 2011 thank to all so mutch i will test it 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