AlvareZ_ Posted July 8, 2013 Share Posted July 8, 2013 Ps como dice el titulo, como puedo saber cuando un dxDraw ya esta Rendirizado para que no realize nada Link to comment
Castillo Posted July 8, 2013 Share Posted July 8, 2013 Defini una variable cuando lo empiezes a renderizar. Link to comment
AlvareZ_ Posted July 8, 2013 Author Share Posted July 8, 2013 Muchas Gracias, Ya lo logre, Pero mira tengo la dxDraw como una ventana animada luego salen los complementos los botones y eso, al darles dos veces seguidas a el bindKey, solo se desaparece la dx y los botones salen mi duda es como cancelar esos botones tambies function main() if enabled == false then showCursor(true) start = getTickCount() addEventHandler("onClientRender",getRootElement(),window) setTimer( function() GUIEditor = { gridlist = {}, staticimage = {}, button = {} } GUIEditor.button[1] = guiCreateButton(0.51, 0.48, 0.15, 0.09, "Darmelo", true) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.button[2] = guiCreateButton(0.51, 0.63, 0.15, 0.09, "Cerrar", true) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") GUIEditor.gridlist[1] = guiCreateGridList(0.32, 0.48, 0.14, 0.26, true) guiGridListAddColumn(GUIEditor.gridlist[1], "V.I.P", 0.9) for i = 1, 3 do guiGridListAddRow(GUIEditor.gridlist[1]) end guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "Jetpack", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "Spray", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 2, 1, "Armor 50%", false, false) GUIEditor.staticimage[1] = guiCreateStaticImage(0.32, 0.23, 0.36, 0.22, "logo.png", true) end, 1500, 1 ) else removeEventHandler("onClientRender",getRootElement(),window) showCursor(false) end enabled = not enabled end bindKey ( "o", "down", main ) Asi es para que se quite la dx pero no encuentro la manera de parar los botones también intente con destroyElement pero no sirvio Link to comment
AlvareZ_ Posted July 8, 2013 Author Share Posted July 8, 2013 Igual sale :c enabled = false function main() if enabled == false then showCursor(true) start = getTickCount() addEventHandler("onClientRender",getRootElement(),window) setTimer( function() GUIEditor = { gridlist = {}, staticimage = {}, button = {} } GUIEditor.button[1] = guiCreateButton(0.51, 0.48, 0.15, 0.09, "Darmelo", true) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.button[2] = guiCreateButton(0.51, 0.63, 0.15, 0.09, "Cerrar", true) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") GUIEditor.gridlist[1] = guiCreateGridList(0.32, 0.48, 0.14, 0.26, true) guiGridListAddColumn(GUIEditor.gridlist[1], "V.I.P", 0.9) for i = 1, 3 do guiGridListAddRow(GUIEditor.gridlist[1]) end guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "Jetpack", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, "Spray", false, false) guiGridListSetItemText(GUIEditor.gridlist[1], 2, 1, "Armor 50%", false, false) GUIEditor.staticimage[1] = guiCreateStaticImage(0.32, 0.23, 0.36, 0.22, "logo.png", true) end, 1500, 1 ) else cancelEvent() removeEventHandler("onClientRender",getRootElement(),window) guiSetVisible(GUIEditor.button[1], false) guiSetVisible(GUIEditor.button[2], false) guiSetVisible(GUIEditor.gridlist[1], false) guiSetVisible(GUIEditor.staticimage[1], false) showCursor(false) end enabled = not enabled end bindKey ( "o", "down", main ) Link to comment
Castillo Posted July 8, 2013 Share Posted July 8, 2013 Es porque estas creando el GUI una y otra vez, remplazando las variables usadas. Link to comment
AlvareZ_ Posted July 8, 2013 Author Share Posted July 8, 2013 entonces debería crear la gui en otra función y usando en esta solo guiSetVisible, no? Link to comment
Castillo Posted July 8, 2013 Share Posted July 8, 2013 Creala afuera de todas las funciones, al principio del script. Link to comment
AlvareZ_ Posted July 8, 2013 Author Share Posted July 8, 2013 nada :c se crea como loco al darle seguido a f2 function main() if enabled == false then showCursor(true) start = getTickCount() addEventHandler("onClientRender",getRootElement(),window) setTimer( function() guiSetVisible(GUIEditor.button[1], true) guiSetVisible(GUIEditor.button[2], true) guiSetVisible(GUIEditor.gridlist[1], true) guiSetVisible(GUIEditor.staticimage[1], true) end, 1500, 1) else cancelEvent() removeEventHandler("onClientRender",getRootElement(),window) guiSetVisible(GUIEditor.button[1], false) guiSetVisible(GUIEditor.button[2], false) guiSetVisible(GUIEditor.gridlist[1], false) guiSetVisible(GUIEditor.staticimage[1], false) showCursor(false) end enabled = not enabled end bindKey ( "o", "down", main ) Link to comment
Recommended Posts