Mr.Co00oL Posted September 16, 2013 Posted September 16, 2013 hello guys i want help in this script i maked a skin panel all thing is all right but when i start the script the bind key dont work and the panel dont show onley 2 bouton the panel open withe guiAddInterpolateEffect function look when i start it show like this this is the client any help and thx unction guiCreateWindow(x2, y2, width2, height2, titleBarText2, relative2) local mainBackground = guiCreateStaticImage(x2, y2, width2, height2, "wnd.png", relative2) local mainBackgroundLabel = guiCreateLabel(0, 0, 0, 0, titleBarText2, false, mainBackground2) guiSetEnabled(mainBackgroundLabel, false) return mainBackground end wnd = guiCreateWindow(0, 518, 1020, 198, "", false) guiWindowSetSizable(wnd, false) specials = guiCreateButton(0.02, 0.62, 0.24, 0.29, "Show List", false, wnd) guiSetProperty(specials, "NormalTextColour", "FFAAAAAA") animals = guiCreateButton(420, 122, 248, 57, "Show List", false, wnd) guiSetProperty(animals, "NormalTextColour", "FFAAAAAA") carton = guiCreateButton(758, 122, 248, 57, "Show List", false, wnd) guiSetProperty(carton, "NormalTextColour", "FFAAAAAA") GUIEditor.staticimage[1] = guiCreateStaticImage(54, 64, 180, 48, "specials.png", false, wnd) GUIEditor.staticimage[2] = guiCreateStaticImage(448, 63, 181, 49, "animal.png", false, wnd) GUIEditor.staticimage[4] = guiCreateStaticImage(800, 63, 146, 42, "cartoon.png", false, wnd) GUIEditor.label[1] = guiCreateLabel(422, 24, 247, 29, ".:: Skins Panel V.3 ::.", false, wnd) function guiAddInterpolateEffect( ... ) return call( getResourceFromName( "GIE" ), "guiAddInterpolateEffect", unpack( { ... } ) ) end local screen = { guiGetScreenSize( ) } local w, h = 392,88 local x, y = ( screen[1] - w ) / 2, ( screen[2] - h ) / 2 guiSetVisible ( wnd, false ) function OpenWin() local cx, cy = guiGetPosition( wnd, false ) local cw, ch = guiGetSize( wnd, false ) if guiGetVisible ( wnd ) then showCursor(false) guiSetInputEnabled(false) guiSetVisible ( specials, false ) guiSetVisible ( animal, false ) guiSetVisible ( cartoon, false ) guiAddInterpolateEffect( wnd, cx, cy, cw, ch, 0, 0, 0, 0, 2,"Linear","Linear",false ) else guiAddInterpolateEffect( wnd, 218,514,392,88, x, y, w, h, 2,"Linear","Linear",true ) showCursor(true) guiSetInputEnabled(true) end end bindKey("F2", "down", OpenWin) addEventHandler("onClientGUIClick",root, function () if source == specials then guiSetVisible ( specials, true ) guiSetVisible ( animals, false ) guiSetVisible ( carton, false ) showCursor(true) end end ) addEventHandler("onClientGUIClick",root, function () if source == animals then guiSetVisible ( specials, false ) guiSetVisible ( animals, true ) guiSetVisible ( carton, false ) showCursor(false) end end ) addEventHandler("onClientGUIClick",root, function () if source == carton then guiSetVisible ( specials, false ) guiSetVisible ( animals, false ) guiSetVisible ( carton, true ) showCursor(true) end end ) specials = guiCreateWindow(104, 0, 760, 522, "", false) guiWindowSetSizable(specials, false) skins = guiCreateLabel(234, 31, 317, 43, ".:Skins Panel V.3::.", false, specials) guiLabelSetColor(skins, 120, 110, 249) GUIEditor.staticimage[1] = guiCreateStaticImage(218, 84, 364, 70, "specials.png", false, specials) joker = guiCreateStaticImage(10, 165, 126, 188, "joker.png", false, specials) michel = guiCreateStaticImage(214, 165, 126, 188, "michel.png", false, specials) PSY = guiCreateStaticImage(420, 164, 126, 188, "PSY.png", false, specials) arabian = guiCreateStaticImage(598, 164, 124, 188, "arabian.png", false, specials) joker = guiCreateButton(9, 371, 127, 36, ".::[OK]::.", false, specials) guiSetProperty(joker, "NormalTextColour", "FFC3F96D") michel = guiCreateButton(213, 371, 127, 36, ".::[OK]::.", false, specials) guiSetProperty(michel, "NormalTextColour", "FFC3F96D") PSY = guiCreateButton(419, 371, 127, 36, ".::[OK]::.", false, specials) guiSetProperty(PSY, "NormalTextColour", "FFC3F96D") arabian = guiCreateButton(600, 371, 122, 36, ".::[OK]::.", false, specials) guiSetProperty(arabian, "NormalTextColour", "FFC3F96D") Co00oL = guiCreateLabel(9, 467, 330, 42, "CreateD by Mr.Co00oL ", false, specials) guiLabelSetColor(Co00oL, 244, 21, 63) close = guiCreateButton(623, 482, 127, 30, "CLose", false, specials) guiSetProperty(Close, "NormalTextColour", "FF8DF315") addEventHandler("onClientGUIClick",root, function () if ( source == close ) then guiSetVisible(specials,false) guiSetVisible(wnd,false) showCursor(false) guiSetInputEnabled(false) end end ) guiSetVisible (specials, false) function OpenWin() if guiGetVisible ( specials ) then guiSetVisible ( specials, false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( specials, true ) showCursor(true) guiSetInputEnabled(true) end end bindKey("F02", "down", OpenWin) animals = guiCreateWindow(104, 0, 760, 522, "", false) guiWindowSetSizable(animals, false) skins = guiCreateLabel(234, 31, 317, 43, ".:: Skins Panel V.3 ::.", false, animals) guiLabelSetColor(skins, 120, 110, 249) GUIEditor.staticimage[1] = guiCreateStaticImage(218, 84, 364, 70, "animals.png", false, animals) bear = guiCreateStaticImage(10, 165, 126, 188, "bear.png", false, animals) lion = guiCreateStaticImage(214, 165, 126, 188, "lion.png", false, animals) monkey = guiCreateStaticImage(420, 164, 126, 188, "monkey.png", false, animals) shep = guiCreateStaticImage(598, 164, 124, 188, "shep.png", false, animals) bear = guiCreateButton(9, 371, 127, 36, ".::[OK]::.", false, animals) guiSetProperty(bear, "NormalTextColour", "FFC3F96D") lion = guiCreateButton(213, 371, 127, 36, ".::[OK]::.", false, animals) guiSetProperty(lion, "NormalTextColour", "FFC3F96D") monkey = guiCreateButton(419, 371, 127, 36, ".::[OK]::.", false, animals) guiSetProperty(monkey, "NormalTextColour", "FFC3F96D") shep = guiCreateButton(600, 371, 122, 36, ".::[OK]::.", false, animals) guiSetProperty(shep, "NormalTextColour", "FFC3F96D") Co00oL = guiCreateLabel(9, 467, 330, 42, "CreateD by Mr.Co00oL ", false, animals) guiLabelSetColor(Co00oL, 244, 21, 63) close2 = guiCreateButton(623, 482, 127, 30, "CLose", false, animals) guiSetProperty(close2, "NormalTextColour", "FF8DF315") addEventHandler("onClientGUIClick",root, function () if ( source == close2 ) then guiSetVisible(animals,false) guiSetVisible(wnd,false) showCursor(false) guiSetInputEnabled(false) end end ) guiSetVisible (animals, false) function OpenWin() if guiGetVisible ( animals ) then guiSetVisible ( animals, false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( animals, true ) showCursor(true) guiSetInputEnabled(true) end end bindKey("F06", "down", OpenWin) carton = guiCreateWindow(104, 0, 760, 522, "", false) guiWindowSetSizable(carton, false) skins = guiCreateLabel(234, 31, 317, 43, ".:: Skins Panel V.3 ::.", false, carton) guiLabelSetColor(skins, 120, 110, 249) GUIEditor.staticimage[1] = guiCreateStaticImage(218, 84, 364, 70, "carton.png", false, carton) conan = guiCreateStaticImage(10, 165, 126, 188, "conan.png", false, carton) ninja = guiCreateStaticImage(214, 165, 126, 188, "ninja.png", false, carton) super = guiCreateStaticImage(420, 164, 126, 188, "super.png", false, carton) squed = guiCreateStaticImage(598, 164, 124, 188, "squed.png", false, carton) conan = guiCreateButton(9, 371, 127, 36, ".::[OK]::.", false, carton) guiSetProperty(conan, "NormalTextColour", "FFC3F96D") ninja = guiCreateButton(213, 371, 127, 36, ".::[OK]::.", false, carton) guiSetProperty(ninja, "NormalTextColour", "FFC3F96D") super = guiCreateButton(419, 371, 127, 36, ".::[OK]::.", false, carton) guiSetProperty(super, "NormalTextColour", "FFC3F96D") squed = guiCreateButton(600, 371, 122, 36, ".::[OK]::.", false, carton) guiSetProperty(squed, "NormalTextColour", "FFC3F96D") Co00oL = guiCreateLabel(9, 467, 330, 42, "CreateD by Mr.Co00oL ", false, carton) guiLabelSetColor(Co00oL, 244, 21, 63) close4 = guiCreateButton(623, 482, 127, 30, "CLose", false, carton) guiSetProperty(close4, "NormalTextColour", "FF8DF315") addEventHandler("onClientGUIClick",root, function () if ( source == close4 ) then guiSetVisible(carton,false) guiSetVisible(wnd,false) showCursor(false) guiSetInputEnabled(false) end end ) guiSetVisible (carton, false) function OpenWin() if guiGetVisible ( carton ) then guiSetVisible ( carton, false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( carton, true ) showCursor(true) guiSetInputEnabled(true) end end bindKey("F22", "down", OpenWin) [/url]
TAPL Posted September 16, 2013 Posted September 16, 2013 (edited) WTF? bindKey("F02", "down", OpenWin) WTF? bindKey("F06", "down", OpenWin) WTF? bindKey("F22", "down", OpenWin) And what about the table: GUIEditor? Also you have same variable name for button and windows, use diffrent name. Edited September 16, 2013 by Guest
Mr.Co00oL Posted September 16, 2013 Author Posted September 16, 2013 i just wirte it the maine wnd is the first and the others open withe boutone understand !
TAPL Posted September 16, 2013 Posted September 16, 2013 i just wirte it the maine wnd is the first and the others open withe boutone understand ! And what about the table: GUIEditor?Also you have same variable name for button and windows, use diffrent name.
Mr.Co00oL Posted September 16, 2013 Author Posted September 16, 2013 the guieditor i maked open withe guiAddInterpolateEffect function and when the script start the main wnd dont show onley 2 boutouns and not in his place and idk what the problem becouse i m new in that function i just learn some cods and want make this wnd open withe it sory for bad eng
kevenvz Posted September 16, 2013 Posted September 16, 2013 GUIEditor = {} GUIEditor.staticimage = {} GUIEditor.label = {} function guiCreateWindow(x2, y2, width2, height2, titleBarText2, relative2) local mainBackground = guiCreateStaticImage(x2, y2, width2, height2, "wnd.png", relative2) local mainBackgroundLabel = guiCreateLabel(0, 0, 0, 0, titleBarText2, false, mainBackground) guiSetEnabled(mainBackgroundLabel, false) return mainBackground end wnd = guiCreateWindow(0, 518, 1020, 198, "", false) guiWindowSetSizable(wnd, false) specials = guiCreateButton(0.02, 0.62, 0.24, 0.29, "Show List", false, wnd) guiSetProperty(specials, "NormalTextColour", "FFAAAAAA") animals = guiCreateButton(420, 122, 248, 57, "Show List", false, wnd) guiSetProperty(animals, "NormalTextColour", "FFAAAAAA") carton = guiCreateButton(758, 122, 248, 57, "Show List", false, wnd) guiSetProperty(carton, "NormalTextColour", "FFAAAAAA") GUIEditor.staticimage[1] = guiCreateStaticImage(54, 64, 180, 48, "specials.png", false, wnd) GUIEditor.staticimage[2] = guiCreateStaticImage(448, 63, 181, 49, "animal.png", false, wnd) GUIEditor.staticimage[4] = guiCreateStaticImage(800, 63, 146, 42, "cartoon.png", false, wnd) GUIEditor.label[1] = guiCreateLabel(422, 24, 247, 29, ".:: Skins Panel V.3 ::.", false, wnd) guiSetVisible ( wnd, false ) function guiAddInterpolateEffect( ... ) return call( getResourceFromName( "GIE" ), "guiAddInterpolateEffect", unpack( { ... } ) ) end local screen = { guiGetScreenSize( ) } local w, h = 392,88 local x, y = ( screen[1] - w ) / 2, ( screen[2] - h ) / 2 function OpenWin() local cx, cy = guiGetPosition( wnd, false ) local cw, ch = guiGetSize( wnd, false ) if guiGetVisible ( wnd ) then showCursor(false) guiSetInputEnabled(false) guiSetVisible ( specials, false ) guiSetVisible ( animal, false ) guiSetVisible ( cartoon, false ) guiAddInterpolateEffect( wnd, cx, cy, cw, ch, 0, 0, 0, 0, 2,"Linear","Linear",false ) else guiAddInterpolateEffect( wnd, 218,514,392,88, x, y, w, h, 2,"Linear","Linear",true ) showCursor(true) guiSetInputEnabled(true) end end bindKey("F2", "down", OpenWin) addEventHandler("onClientGUIClick",root, function () if source == specials then guiSetVisible ( specials, true ) guiSetVisible ( animals, false ) guiSetVisible ( carton, false ) showCursor(true) end end ) addEventHandler("onClientGUIClick",root, function () if source == animals then guiSetVisible ( specials, false ) guiSetVisible ( animals, true ) guiSetVisible ( carton, false ) showCursor(false) end end ) addEventHandler("onClientGUIClick",root, function () if source == carton then guiSetVisible ( specials, false ) guiSetVisible ( animals, false ) guiSetVisible ( carton, true ) showCursor(true) end end ) specials = guiCreateWindow(104, 0, 760, 522, "", false) guiWindowSetSizable(specials, false) skins = guiCreateLabel(234, 31, 317, 43, ".:Skins Panel V.3::.", false, specials) guiLabelSetColor(skins, 120, 110, 249) GUIEditor.staticimage[1] = guiCreateStaticImage(218, 84, 364, 70, "specials.png", false, specials) joker = guiCreateStaticImage(10, 165, 126, 188, "joker.png", false, specials) michel = guiCreateStaticImage(214, 165, 126, 188, "michel.png", false, specials) PSY = guiCreateStaticImage(420, 164, 126, 188, "PSY.png", false, specials) arabian = guiCreateStaticImage(598, 164, 124, 188, "arabian.png", false, specials) joker = guiCreateButton(9, 371, 127, 36, ".::[OK]::.", false, specials) guiSetProperty(joker, "NormalTextColour", "FFC3F96D") michel = guiCreateButton(213, 371, 127, 36, ".::[OK]::.", false, specials) guiSetProperty(michel, "NormalTextColour", "FFC3F96D") PSY = guiCreateButton(419, 371, 127, 36, ".::[OK]::.", false, specials) guiSetProperty(PSY, "NormalTextColour", "FFC3F96D") arabian = guiCreateButton(600, 371, 122, 36, ".::[OK]::.", false, specials) guiSetProperty(arabian, "NormalTextColour", "FFC3F96D") Co00oL = guiCreateLabel(9, 467, 330, 42, "CreateD by Mr.Co00oL ", false, specials) guiLabelSetColor(Co00oL, 244, 21, 63) close = guiCreateButton(623, 482, 127, 30, "CLose", false, specials) guiSetProperty(Close, "NormalTextColour", "FF8DF315") addEventHandler("onClientGUIClick",root, function () if ( source == close ) then guiSetVisible(specials,false) guiSetVisible(wnd,false) showCursor(false) guiSetInputEnabled(false) end end ) guiSetVisible (specials, false) function OpenWin() if guiGetVisible ( specials ) then guiSetVisible ( specials, false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( specials, true ) showCursor(true) guiSetInputEnabled(true) end end bindKey("F02", "down", OpenWin) animals = guiCreateWindow(104, 0, 760, 522, "", false) guiWindowSetSizable(animals, false) skins = guiCreateLabel(234, 31, 317, 43, ".:: Skins Panel V.3 ::.", false, animals) guiLabelSetColor(skins, 120, 110, 249) GUIEditor.staticimage[1] = guiCreateStaticImage(218, 84, 364, 70, "animals.png", false, animals) bear = guiCreateStaticImage(10, 165, 126, 188, "bear.png", false, animals) lion = guiCreateStaticImage(214, 165, 126, 188, "lion.png", false, animals) monkey = guiCreateStaticImage(420, 164, 126, 188, "monkey.png", false, animals) shep = guiCreateStaticImage(598, 164, 124, 188, "shep.png", false, animals) bear = guiCreateButton(9, 371, 127, 36, ".::[OK]::.", false, animals) guiSetProperty(bear, "NormalTextColour", "FFC3F96D") lion = guiCreateButton(213, 371, 127, 36, ".::[OK]::.", false, animals) guiSetProperty(lion, "NormalTextColour", "FFC3F96D") monkey = guiCreateButton(419, 371, 127, 36, ".::[OK]::.", false, animals) guiSetProperty(monkey, "NormalTextColour", "FFC3F96D") shep = guiCreateButton(600, 371, 122, 36, ".::[OK]::.", false, animals) guiSetProperty(shep, "NormalTextColour", "FFC3F96D") Co00oL = guiCreateLabel(9, 467, 330, 42, "CreateD by Mr.Co00oL ", false, animals) guiLabelSetColor(Co00oL, 244, 21, 63) close2 = guiCreateButton(623, 482, 127, 30, "CLose", false, animals) guiSetProperty(close2, "NormalTextColour", "FF8DF315") addEventHandler("onClientGUIClick",root, function () if ( source == close2 ) then guiSetVisible(animals,false) guiSetVisible(wnd,false) showCursor(false) guiSetInputEnabled(false) end end ) guiSetVisible (animals, false) function OpenWin() if guiGetVisible ( animals ) then guiSetVisible ( animals, false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( animals, true ) showCursor(true) guiSetInputEnabled(true) end end bindKey("F06", "down", OpenWin) carton = guiCreateWindow(104, 0, 760, 522, "", false) guiWindowSetSizable(carton, false) skins = guiCreateLabel(234, 31, 317, 43, ".:: Skins Panel V.3 ::.", false, carton) guiLabelSetColor(skins, 120, 110, 249) GUIEditor.staticimage[1] = guiCreateStaticImage(218, 84, 364, 70, "carton.png", false, carton) conan = guiCreateStaticImage(10, 165, 126, 188, "conan.png", false, carton) ninja = guiCreateStaticImage(214, 165, 126, 188, "ninja.png", false, carton) super = guiCreateStaticImage(420, 164, 126, 188, "super.png", false, carton) squed = guiCreateStaticImage(598, 164, 124, 188, "squed.png", false, carton) conan = guiCreateButton(9, 371, 127, 36, ".::[OK]::.", false, carton) guiSetProperty(conan, "NormalTextColour", "FFC3F96D") ninja = guiCreateButton(213, 371, 127, 36, ".::[OK]::.", false, carton) guiSetProperty(ninja, "NormalTextColour", "FFC3F96D") super = guiCreateButton(419, 371, 127, 36, ".::[OK]::.", false, carton) guiSetProperty(super, "NormalTextColour", "FFC3F96D") squed = guiCreateButton(600, 371, 122, 36, ".::[OK]::.", false, carton) guiSetProperty(squed, "NormalTextColour", "FFC3F96D") Co00oL = guiCreateLabel(9, 467, 330, 42, "CreateD by Mr.Co00oL ", false, carton) guiLabelSetColor(Co00oL, 244, 21, 63) close4 = guiCreateButton(623, 482, 127, 30, "CLose", false, carton) guiSetProperty(close4, "NormalTextColour", "FF8DF315") addEventHandler("onClientGUIClick",root, function () if ( source == close4 ) then guiSetVisible(carton,false) guiSetVisible(wnd,false) showCursor(false) guiSetInputEnabled(false) end end ) guiSetVisible (carton, false) function OpenWin() if guiGetVisible ( carton ) then guiSetVisible ( carton, false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( carton, true ) showCursor(true) guiSetInputEnabled(true) end end bindKey("F22", "down", OpenWin)
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