CheiN Posted November 24, 2012 Share Posted November 24, 2012 i dont know why this doesnt work ._. GUIEditor = { button = {}, } GUIEditor.button[1] = guiCreateButton(234, 242, 94, 50, "Infernus Mod", false) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF29D59A") GUIEditor.button[2] = guiCreateButton(472, 242, 94, 50, "wheels", false) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF29D59A") bindKey ( "u", "down", ( GUIEditor.button[1], GUIEditor.button[2], dxDrawImage(433, 110, 172, 122, ":images/weel.png", 0, 0, 0, tocolor(206, 148, 47, 255), true), dxDrawImage(191, 110, 180, 122, ":images/infernus.png", 0, 0, 0, tocolor(82, 171, 80, 255), true) ) end ) can someone help me? Link to comment
Castillo Posted November 24, 2012 Share Posted November 24, 2012 bindKey ( "u", "down", ( GUIEditor.button[1], GUIEditor.button[2], What is that? All the DX drawing functions require onClientRender to work. Link to comment
CheiN Posted November 24, 2012 Author Share Posted November 24, 2012 ._. i want bind this but im new using GUI GUIEditor = { button = {}, } GUIEditor.button[1] = guiCreateButton(234, 242, 94, 50, "Infernus Mod", false) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF29D59A") GUIEditor.button[2] = guiCreateButton(472, 242, 94, 50, "wheels", false) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF29D59A") addEventHandler("onClientRender", root, function() dxDrawImage(433, 110, 172, 122, ":guieditor/images/weel.png", 0, 0, 0, tocolor(206, 148, 47, 255), true) dxDrawImage(191, 110, 180, 122, ":guieditor/images/infernus.png", 0, 0, 0, tocolor(82, 171, 80, 255), true) end ) Link to comment
Castillo Posted November 24, 2012 Share Posted November 24, 2012 GUIEditor = { button = {}, } state = false GUIEditor.button[1] = guiCreateButton(234, 242, 94, 50, "Infernus Mod", false) guiSetFont(GUIEditor.button[1], "default-bold-small") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FF29D59A") GUIEditor.button[2] = guiCreateButton(472, 242, 94, 50, "wheels", false) guiSetFont(GUIEditor.button[2], "default-bold-small") guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF29D59A") bindKey ( "U", "down", function ( ) state = ( not state ) removeEventHandler ( "onClientRender", root, draw ) guiSetVisible ( GUIEditor.button[1], state ) guiSetVisible ( GUIEditor.button[2], state ) if ( state ) then addEventHandler ( "onClientRender", root, draw ) end end ) function draw ( ) dxDrawImage(433, 110, 172, 122, ":guieditor/images/weel.png", 0, 0, 0, tocolor(206, 148, 47, 255), true) dxDrawImage(191, 110, 180, 122, ":guieditor/images/infernus.png", 0, 0, 0, tocolor(82, 171, 80, 255), true) end Link to comment
CheiN Posted November 24, 2012 Author Share Posted November 24, 2012 but i want press u to create the buttoms and the images, is that posibble? Link to comment
Castillo Posted November 24, 2012 Share Posted November 24, 2012 That's what it should do, have you tested 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