Jump to content

asking and a need a help


IIIIlllllIII

Recommended Posts

Posted

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

Posted
guiCreateStaticImage 

?

For F2:

bindKey ( "F2" , "down" , function() guiSetVisible ( shopWindow , not guiGetVisible ( shopWindow ) ) showCursor ( guiGetVisible ( shopWindow ) ) end ) 

Posted

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

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