Atton Posted July 10, 2014 Posted July 10, 2014 I have been having a few issues with my GUI where if you click on blank space. It triggers random buttons and causes confusion is I have posted the relevant code below. Any ideas would be wonderful. local screenWidth, screenHeight = guiGetScreenSize() local windowWidth, windowHeight = 552, 476 local left = screenWidth/2 - windowWidth/2 local top = screenHeight/2 - windowHeight/2 Agui = guiCreateWindow(left, top, windowWidth, windowHeight, "Fuck Around Panel v1.2", false) guiWindowSetSizable(Agui, false) guiSetVisible(Agui, false) function CCF (button,state) if (button == "left" and state == "up") then triggerServerEvent("aCore.cloakCar", localPlayer, localPlayer) else -- Place Holder end end addEventHandler("onClientGUIClick",CCB,CCF) CCB = guiCreateButton(280, 175, 121, 61, "Cloak Car", false, Agui) Nikola Tesla is love Nikola Tesla is light. Email: [email protected]
Max+ Posted July 10, 2014 Posted July 10, 2014 (edited) screenWidth, screenHeight = guiGetScreenSize() local windowWidth, windowHeight = 552, 476 local left = screenWidth/2 - windowWidth/2 local top = screenHeight/2 - windowHeight/2 Agui = guiCreateWindow(left, top, windowWidth, windowHeight, ":O Around Panel v1.2", false) CCB = guiCreateButton(280, 175, 121, 61, "Cloak Car", false, Agui) guiWindowSetSizable(Agui, false) guiSetVisible(Agui, false) addEventHandler(' onClientGUIClick', root, function ( ) if ( source == CCB ) then triggerServerEvent ( 'aCore.cloak', localPlayer ); end end ); Edited July 10, 2014 by Guest - New , Kill System - New, GameMode Intro - Leve / Exp System - New nametag showing style - New , Hud For Players - Skin Selection from SA-MP - Money System / Buy Weapons - Drop Weapons - New, Flood System - New , Group Assign - Gun license For Weapons - Random Rule System For Money
Atton Posted July 10, 2014 Author Posted July 10, 2014 screenWidth, screenHeight = guiGetScreenSize() local windowWidth, windowHeight = 552, 476 local left = screenWidth/2 - windowWidth/2 local top = screenHeight/2 - windowHeight/2 Agui = guiCreateWindow(left, top, windowWidth, windowHeight, ":O Around Panel v1.2", false) guiWindowSetSizable(Agui, false) guiSetVisible(Agui, false) addEventHandler(' onClientGUIClick', root, function ( ) if ( source == CCB ) then triggerServerEvent ( 'aCore.cloak', localPlayer ); end end ); It brings up errors expecting () and shit not sure about it. Nikola Tesla is love Nikola Tesla is light. Email: [email protected]
Max+ Posted July 10, 2014 Posted July 10, 2014 screenWidth, screenHeight = guiGetScreenSize() local windowWidth, windowHeight = 552, 476 local left = screenWidth/2 - windowWidth/2 local top = screenHeight/2 - windowHeight/2 Agui = guiCreateWindow(left, top, windowWidth, windowHeight, ":O Around Panel v1.2", false) guiWindowSetSizable(Agui, false) guiSetVisible(Agui, false) addEventHandler(' onClientGUIClick', root, function ( ) if ( source == CCB ) then triggerServerEvent ( 'aCore.cloak', localPlayer ); end end ); It brings up errors expecting () and :~ not sure about it. lol i forgot the button , post edit , copy it again . - New , Kill System - New, GameMode Intro - Leve / Exp System - New nametag showing style - New , Hud For Players - Skin Selection from SA-MP - Money System / Buy Weapons - Drop Weapons - New, Flood System - New , Group Assign - Gun license For Weapons - Random Rule System For Money
Atton Posted July 10, 2014 Author Posted July 10, 2014 screenWidth, screenHeight = guiGetScreenSize() local windowWidth, windowHeight = 552, 476 local left = screenWidth/2 - windowWidth/2 local top = screenHeight/2 - windowHeight/2 Agui = guiCreateWindow(left, top, windowWidth, windowHeight, ":O Around Panel v1.2", false) guiWindowSetSizable(Agui, false) guiSetVisible(Agui, false) CCB = guiCreateButton(280, 175, 121, 61, "Cloak Car", false, Agui) addEventHandler(' onClientGUIClick', root, function ( ) if ( source == CCB ) then triggerServerEvent ( 'aCore.cloak', localPlayer ); end end ); It brings up errors expecting () and :~ not sure about it. lol i forgot the button , post edit , copy it again . addEventHandler(' onClientGUIClick', root, function ( ) if ( source == CCB ) then triggerServerEvent ( 'aCore.cloak', localPlayer ); end end ); Nikola Tesla is love Nikola Tesla is light. Email: [email protected]
Max+ Posted July 10, 2014 Posted July 10, 2014 i said copy my post , and test it /debugscript 3 - New , Kill System - New, GameMode Intro - Leve / Exp System - New nametag showing style - New , Hud For Players - Skin Selection from SA-MP - Money System / Buy Weapons - Drop Weapons - New, Flood System - New , Group Assign - Gun license For Weapons - Random Rule System For Money
Atton Posted July 10, 2014 Author Posted July 10, 2014 i said copy my post , and test it /debugscript 3 I cannot copy debugscript3. Nikola Tesla is love Nikola Tesla is light. Email: [email protected]
Et-win Posted July 10, 2014 Posted July 10, 2014 In game typ: /debugscript 3 :facepalm: https://wiki.multitheftauto.com/wiki/Debugging Read it. ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
MTA Team botder Posted July 10, 2014 MTA Team Posted July 10, 2014 addEventHandler("onClientGUIClick",CCB,CCF) --> addEventHandler("onClientGUIClick",CCB,CCF, false) GitHub: Debug Console • MTA-Discord Relay Scripting: How to draw a line chart with DirectX functions? • Doppler Effect in MTA • Get the client's FPS • Customizable Blur Shader
Atton Posted July 20, 2014 Author Posted July 20, 2014 addEventHandler("onClientGUIClick",CCB,CCF) --> addEventHandler("onClientGUIClick",CCB,CCF, false) Thanks my script is completely fixed and operational. Nikola Tesla is love Nikola Tesla is light. Email: [email protected]
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