Machine Posted August 24, 2011 Share Posted August 24, 2011 i make a gui and it show up but when i prees f2 its dont be invisble and hiden. look! addEventHandler('onClientResourceStart', g_ResRoot, function() fadeCamera(true) setTimer(getPlayers, 1000, 1) bindKey('f2', 'down', toggleFRWindow) createWindow(wndMain) hideAllWindows() guiCheckBoxSetSelected(getControl(wndMain, 'jetpack'), doesPedHaveJetPack(g_Me)) guiCheckBoxSetSelected(getControl(wndMain, 'falloff'), canPedBeKnockedOffBike(g_Me)) setJetpackMaxHeight ( 9001 ) triggerServerEvent('onLoadedAtClient', g_ResRoot, g_Me) end ) GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Label = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(121,179,749,545,"",false) GUIEditor_TabPanel[1] = guiCreateTabPanel(13,19,727,517,false,GUIEditor_Window[1]) Stats = guiCreateTab("Stats",GUIEditor_TabPanel[1]) GUIEditor_Image[1] = guiCreateStaticImage(470,303,257,188,"images/mtalogo.png",false,Stats) Shop = guiCreateTab("Shop",GUIEditor_TabPanel[1]) Nitro = guiCreateButton(13,18,131,58,"Nitro",false,Shop) GhostMode = guiCreateButton(168,18,131,58,"GhostMode",false,Shop) Repair = guiCreateButton(12,91,131,58,"Repair",false,Shop) Hunter = guiCreateButton(13,162,131,58,"Hunter",false,Shop) Hydra = guiCreateButton(13,230,131,58,"Hydra",false,Shop) Barrel = guiCreateButton(168,92,131,58,"Barrel",false,Shop) Hay = guiCreateButton(169,163,131,58,"Hay",false,Shop) Motor_Strike = guiCreateButton(168,231,131,58,"Motor Strike",false,Shop) GUIEditor_Image[2] = guiCreateStaticImage(411,89,312,202,"images/shruk.png",false,Shop) Settings = guiCreateTab("Settings",GUIEditor_TabPanel[1]) GUIEditor_Image[3] = guiCreateStaticImage(429,101,279,214,"images/mtalogo.png",false,Settings) Calculator = guiCreateTab("Calculator",GUIEditor_TabPanel[1]) Games = guiCreateTab("Games",GUIEditor_TabPanel[1]) GUIEditor_Image[4] = guiCreateStaticImage(516,244,210,149,"images/mtalogo.png",false,Games) Rules = guiCreateTab("Rules",GUIEditor_TabPanel[1]) GUIEditor_Label[1] = guiCreateLabel(2,32,441,223,"(1)~ No Cheating OR Hacks",false,Rules) guiSetFont(GUIEditor_Label[1],"sa-header") GUIEditor_Label[2] = guiCreateLabel(3,80,385,49,"(2)~ No Spam Or Flood",false,Rules) guiSetFont(GUIEditor_Label[2],"sa-header") GUIEditor_Label[3] = guiCreateLabel(1,129,467,56,"(3)~ Respect Admins and Players",false,Rules) guiSetFont(GUIEditor_Label[3],"sa-header") Chat = guiCreateTab("Chat",GUIEditor_TabPanel[1]) GUIEditor_Image[5] = guiCreateStaticImage(474,179,251,197,"images/mtalogo.png",false,Chat) Bank = guiCreateTab("Bank",GUIEditor_TabPanel[1]) GUIEditor_Image[6] = guiCreateStaticImage(493,177,234,190,"images/mtalogo.png",false,Bank) Music = guiCreateTab("Music",GUIEditor_TabPanel[1]) GUIEditor_Image[7] = guiCreateStaticImage(479,151,246,209,"images/mtalogo.png",false,Music) Link to comment
SDK Posted August 24, 2011 Share Posted August 24, 2011 bindKey('f2', 'down', toggleFRWindow) createWindow(wndMain) hideAllWindows() So, what do these functions do? My guess is that you tried to modify the freeroam resource. Link to comment
Machine Posted August 24, 2011 Author Share Posted August 24, 2011 yes i did can give me code for making it show and hide working 100% Link to comment
Machine Posted August 24, 2011 Author Share Posted August 24, 2011 and this dont work GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Label = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(121,179,749,545,"",false) GUIEditor_TabPanel[1] = guiCreateTabPanel(13,19,727,517,false,GUIEditor_Window[1]) Stats = guiCreateTab("Stats",GUIEditor_TabPanel[1]) GUIEditor_Image[1] = guiCreateStaticImage(470,303,257,188,"images/mtalogo.png",false,Stats) Shop = guiCreateTab("Shop",GUIEditor_TabPanel[1]) Nitro = guiCreateButton(13,18,131,58,"Nitro",false,Shop) GhostMode = guiCreateButton(168,18,131,58,"GhostMode",false,Shop) Repair = guiCreateButton(12,91,131,58,"Repair",false,Shop) Hunter = guiCreateButton(13,162,131,58,"Hunter",false,Shop) Hydra = guiCreateButton(13,230,131,58,"Hydra",false,Shop) Barrel = guiCreateButton(168,92,131,58,"Barrel",false,Shop) Hay = guiCreateButton(169,163,131,58,"Hay",false,Shop) Motor_Strike = guiCreateButton(168,231,131,58,"Motor Strike",false,Shop) GUIEditor_Image[2] = guiCreateStaticImage(411,89,312,202,"images/shruk.png",false,Shop) Settings = guiCreateTab("Settings",GUIEditor_TabPanel[1]) GUIEditor_Image[3] = guiCreateStaticImage(429,101,279,214,"images/mtalogo.png",false,Settings) Calculator = guiCreateTab("Calculator",GUIEditor_TabPanel[1]) Games = guiCreateTab("Games",GUIEditor_TabPanel[1]) GUIEditor_Image[4] = guiCreateStaticImage(516,244,210,149,"images/mtalogo.png",false,Games) Rules = guiCreateTab("Rules",GUIEditor_TabPanel[1]) GUIEditor_Label[1] = guiCreateLabel(2,32,441,223,"(1)~ No Cheating OR Hacks",false,Rules) guiSetFont(GUIEditor_Label[1],"sa-header") GUIEditor_Label[2] = guiCreateLabel(3,80,385,49,"(2)~ No Spam Or Flood",false,Rules) guiSetFont(GUIEditor_Label[2],"sa-header") GUIEditor_Label[3] = guiCreateLabel(1,129,467,56,"(3)~ Respect Admins and Players",false,Rules) guiSetFont(GUIEditor_Label[3],"sa-header") Chat = guiCreateTab("Chat",GUIEditor_TabPanel[1]) GUIEditor_Image[5] = guiCreateStaticImage(474,179,251,197,"images/mtalogo.png",false,Chat) Bank = guiCreateTab("Bank",GUIEditor_TabPanel[1]) GUIEditor_Image[6] = guiCreateStaticImage(493,177,234,190,"images/mtalogo.png",false,Bank) Music = guiCreateTab("Music",GUIEditor_TabPanel[1]) GUIEditor_Image[7] = guiCreateStaticImage(479,151,246,209,"images/mtalogo.png",false,Music) addEventHandler ("onClientGUIClick", getRootElement(), guiClick) bindKey("F6","down",ToggleMenu) Link to comment
JR10 Posted August 24, 2011 Share Posted August 24, 2011 function ToggleMenu () guiSetVisible ( GUIEditor_Window[1] , not guiGetVisible ( GUIEditor_Window[1] ) ) end Link to comment
Machine Posted August 24, 2011 Author Share Posted August 24, 2011 GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Label = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(121,179,749,545,"",false) GUIEditor_TabPanel[1] = guiCreateTabPanel(13,19,727,517,false,GUIEditor_Window[1]) Stats = guiCreateTab("Stats",GUIEditor_TabPanel[1]) GUIEditor_Image[1] = guiCreateStaticImage(470,303,257,188,"images/mtalogo.png",false,Stats) Shop = guiCreateTab("Shop",GUIEditor_TabPanel[1]) Nitro = guiCreateButton(13,18,131,58,"Nitro",false,Shop) GhostMode = guiCreateButton(168,18,131,58,"GhostMode",false,Shop) Repair = guiCreateButton(12,91,131,58,"Repair",false,Shop) Hunter = guiCreateButton(13,162,131,58,"Hunter",false,Shop) Hydra = guiCreateButton(13,230,131,58,"Hydra",false,Shop) Barrel = guiCreateButton(168,92,131,58,"Barrel",false,Shop) Hay = guiCreateButton(169,163,131,58,"Hay",false,Shop) Motor_Strike = guiCreateButton(168,231,131,58,"Motor Strike",false,Shop) GUIEditor_Image[2] = guiCreateStaticImage(411,89,312,202,"images/shruk.png",false,Shop) Settings = guiCreateTab("Settings",GUIEditor_TabPanel[1]) GUIEditor_Image[3] = guiCreateStaticImage(429,101,279,214,"images/mtalogo.png",false,Settings) Calculator = guiCreateTab("Calculator",GUIEditor_TabPanel[1]) Games = guiCreateTab("Games",GUIEditor_TabPanel[1]) GUIEditor_Image[4] = guiCreateStaticImage(516,244,210,149,"images/mtalogo.png",false,Games) Rules = guiCreateTab("Rules",GUIEditor_TabPanel[1]) GUIEditor_Label[1] = guiCreateLabel(2,32,441,223,"(1)~ No Cheating OR Hacks",false,Rules) guiSetFont(GUIEditor_Label[1],"sa-header") GUIEditor_Label[2] = guiCreateLabel(3,80,385,49,"(2)~ No Spam Or Flood",false,Rules) guiSetFont(GUIEditor_Label[2],"sa-header") GUIEditor_Label[3] = guiCreateLabel(1,129,467,56,"(3)~ Respect Admins and Players",false,Rules) guiSetFont(GUIEditor_Label[3],"sa-header") Chat = guiCreateTab("Chat",GUIEditor_TabPanel[1]) GUIEditor_Image[5] = guiCreateStaticImage(474,179,251,197,"images/mtalogo.png",false,Chat) Bank = guiCreateTab("Bank",GUIEditor_TabPanel[1]) GUIEditor_Image[6] = guiCreateStaticImage(493,177,234,190,"images/mtalogo.png",false,Bank) Music = guiCreateTab("Music",GUIEditor_TabPanel[1]) GUIEditor_Image[7] = guiCreateStaticImage(479,151,246,209,"images/mtalogo.png",false,Music) function ToggleMenu () guiSetVisible ( GUIEditor_Window[1] , not guiGetVisible ( GUIEditor_Window[1] ) ) end addEventHandler ("onClientGUIClick", getRootElement(), guiClick) bindKey("F6","down",ToggleMenu) This Work 100% but wheres mouse for changing the taps theres no mouse botton to click Link to comment
50p Posted August 25, 2011 Share Posted August 25, 2011 add showCursor(true) That will show the cursor even after the window is closed. I'd suggest to use: showCursor( guiGetVisible( GUIEditor_Window[ 1 ] ) -- underneath the guiSetVisible Link to comment
Machine Posted August 25, 2011 Author Share Posted August 25, 2011 welll it work but how can we hide mouse when we close the gui lol mouse is still even when gui close thats bad man Link to comment
JR10 Posted August 25, 2011 Share Posted August 25, 2011 You use showCursor again. showCursor ( false ) Link to comment
50p Posted August 26, 2011 Share Posted August 26, 2011 Just read my message again, please. add showCursor(true) That will show the cursor even after the window is closed. I'd suggest to use: showCursor( guiGetVisible( GUIEditor_Window[ 1 ] ) -- underneath the guiSetVisible Link to comment
Machine Posted August 26, 2011 Author Share Posted August 26, 2011 man i wanna when when gui show show cursor and when close gui hide corsor can help with code Link to comment
CapY Posted August 26, 2011 Share Posted August 26, 2011 Can you read 50p post 10 more times ? 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