Jump to content

[AYUDA] Saber cuando este Render


Recommended Posts

Posted

Defini una variable cuando lo empiezes a renderizar.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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

bandera_de_Venezuela.png

Posted
guiSetVisible 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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 ) 

bandera_de_Venezuela.png

Posted

Es porque estas creando el GUI una y otra vez, remplazando las variables usadas.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Creala afuera de todas las funciones, al principio del script.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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 ) 

bandera_de_Venezuela.png

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...