Jump to content

Ayuda con Guía


Platin

Recommended Posts

Hola eh creado una "Guía para N00bs" en la cual tengo unos problemas para que anda, quiero que funcione al apretar el F1 y que al apretar el botón cerrar se cierre, el problema es que no se abré

Código:

GUIEditor = { 
    memo = {}, 
    button = {}, 
    window = {}, 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function guiapanel() 
        GUIEditor.window[1] = guiCreateWindow(471, 179, 342, 356, "Guía para gente nueva", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        GUIEditor.memo[1] = guiCreateMemo(24, 38, 294, 267, "1- Al principio, si apareces en cualquier lado en el cual no sea una base, pon /reconnect\n\n2- Si no te aparece un Login, pon /reconnect\n\n3- El Cilindro Amarillo es para Armas, el Rojo para Banco, el Verde para Skins, el Celeste para  Comida y el Azul para autos.\n\n4- La Z es para elegir animaciones.\n\n5- El F2 te sirve para comprar Skills.\n\n6- F3 para el menú de los Autos.\n\nCualquier otra duda contactar con VIPs, con  Mods, SuperMods y con Admins.", false, GUIEditor.window[1]) 
        GUIEditor.button[1] = guiCreateButton(322, -4991, 10, 633, "", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[2] = guiCreateButton(316, -3978, 16, 625, "", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[3] = guiCreateButton(326, -3164, 5, 15, "", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[4] = guiCreateButton(322, -3427, 9, 15, "", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[5] = guiCreateButton(264, 327, 54, 16, "Cerrar", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FFAAAAAA")   
     
    addEventHandler( "OnClientGUIclick", Cerrar, Exit, false) 
     
end 
  
end 
function Exit() 
     
showcursor (false)   
guiSetVisible (GUIEditor.window[1], not guiGetVisible ( GUIEditor.window[1] ) ) 
  
bindKey("F2", "down",  
function () 
    if (guiGetVisible(GUIEditor.window[1]) == true) then 
        guiSetVisible(GUIEditor.window[1], false) 
        showCursor(false) 
    else 
        guiSetVisible(GUIEditor.window[1], true) 
        showCursor(true) 
    end 
end 
) 
  
addEventHandler("onClientResourceStart", root, 
  
  
  
  
  
  
  
  
function () 
    guiSetVisible(GUIEditor.window[1], false) 
    showCursor(false) 
end 
) 
  
end 
addEventHandler("onClientResourceStart", resourceRoot, guiapanel) 

Link to comment
Pues claro que no anda, la función 'Exit' no tiene ningún end. También has usado el evento 'onClientResourceStart' dos veces para la función 'guiapanel', y para la última función que no tiene nombre no le hiciste nada.

Nada cambio, mira te muestro ahora como esta:

GUIEditor = { 
    memo = {}, 
    button = {}, 
    window = {}, 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function guiapanel() 
        GUIEditor.window[1] = guiCreateWindow(471, 179, 342, 356, "Guía para gente nueva", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        GUIEditor.memo[1] = guiCreateMemo(24, 38, 294, 267, "1- Al principio, si apareces en cualquier lado en el cual no sea una base, pon /reconnect\n\n2- Si no te aparece un Login, pon /reconnect\n\n3- El Cilindro Amarillo es para Armas, el Rojo para Banco, el Verde para Skins, el Celeste para  Comida y el Azul para autos.\n\n4- La Z es para elegir animaciones.\n\n5- El F2 te sirve para comprar Skills.\n\n6- F3 para el menú de los Autos.\n\nCualquier otra duda contactar con VIPs, con  Mods, SuperMods y con Admins.", false, GUIEditor.window[1]) 
        GUIEditor.button[1] = guiCreateButton(322, -4991, 10, 633, "", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[2] = guiCreateButton(316, -3978, 16, 625, "", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[3] = guiCreateButton(326, -3164, 5, 15, "", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[4] = guiCreateButton(322, -3427, 9, 15, "", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[5] = guiCreateButton(264, 327, 54, 16, "Cerrar", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FFAAAAAA")   
     
    addEventHandler( "OnClientGUIclick", Cerrar, Exit, false) 
     
end 
  
end 
function Exit() 
     
showcursor (false)   
guiSetVisible (GUIEditor.window[1], not guiGetVisible ( GUIEditor.window[1] ) ) 
end 
  
bindKey("F1", "down",  
function () 
    if (guiGetVisible(GUIEditor.window[1]) == true) then 
        guiSetVisible(GUIEditor.window[1], false) 
        showCursor(false) 
    else 
        guiSetVisible(GUIEditor.window[1], true) 
        showCursor(true) 
    end 
end 
) 
  
addEventHandler("onClientResourceStart", root, 
  
  
  
  
  
  
  
  
function () 
    guiSetVisible(GUIEditor.window[1], false) 
    showCursor(false) 
end 
) 
  
end 
addEventHandler("onClientResourceStart", resourceRoot, guiapanel) 

Link to comment
GUIEditor = { 
    memo = {}, 
    button = {}, 
    window = {}, 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(471, 179, 342, 356, "Guía para gente nueva", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        GUIEditor.memo[1] = guiCreateMemo(24, 38, 294, 267, "1- Al principio, si apareces en cualquier lado en el cual no sea una base, pon /reconnect\n\n2- Si no te aparece un Login, pon /reconnect\n\n3- El Cilindro Amarillo es para Armas, el Rojo para Banco, el Verde para Skins, el Celeste para  Comida y el Azul para autos.\n\n4- La Z es para elegir animaciones.\n\n5- El F2 te sirve para comprar Skills.\n\n6- F3 para el menú de los Autos.\n\nCualquier otra duda contactar con VIPs, con  Mods, SuperMods y con Admins.", false, GUIEditor.window[1]) 
        GUIEditor.button[1] = guiCreateButton(322, -4991, 10, 633, "", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[2] = guiCreateButton(316, -3978, 16, 625, "", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[3] = guiCreateButton(326, -3164, 5, 15, "", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[4] = guiCreateButton(322, -3427, 9, 15, "", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFAAAAAA") 
        cerrarPanel = guiCreateButton(264, 327, 54, 16, "Cerrar", false, GUIEditor.window[1]) 
        guiSetProperty(cerrarPanel, "NormalTextColour", "FFAAAAAA")   
    
        addEventHandler ( "onClientGUIClick", cerrarPanel, Exit, false ) 
    end 
) 
  
function onresourceStart () 
  bindKey ("F1", "down", abrirPanel) 
  guiSetVisible (GUIEditor.window[1], false) 
end 
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onresourceStart) 
  
function abrirPanel () 
getVisible = guiGetVisible (GUIEditor.window[1]) 
if (getVisible == false) then 
    guiSetVisible (GUIEditor.window[1], true) 
    showCursor (true) 
    end 
end 
  
function Exit () 
guiSetVisible (GUIEditor.window[1], not guiGetVisible ( GUIEditor.window[1] ) ) 
showCursor ( false ) 
end 

Link to comment
GUIEditor = { 
    memo = {}, 
    button = {}, 
    window = {}, 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(471, 179, 342, 356, "Guía para gente nueva", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        GUIEditor.memo[1] = guiCreateMemo(24, 38, 294, 267, "1- Al principio, si apareces en cualquier lado en el cual no sea una base, pon /reconnect\n\n2- Si no te aparece un Login, pon /reconnect\n\n3- El Cilindro Amarillo es para Armas, el Rojo para Banco, el Verde para Skins, el Celeste para  Comida y el Azul para autos.\n\n4- La Z es para elegir animaciones.\n\n5- El F2 te sirve para comprar Skills.\n\n6- F3 para el menú de los Autos.\n\nCualquier otra duda contactar con VIPs, con  Mods, SuperMods y con Admins.", false, GUIEditor.window[1]) 
        GUIEditor.button[1] = guiCreateButton(322, -4991, 10, 633, "", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[2] = guiCreateButton(316, -3978, 16, 625, "", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[3] = guiCreateButton(326, -3164, 5, 15, "", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[3], "NormalTextColour", "FFAAAAAA") 
        GUIEditor.button[4] = guiCreateButton(322, -3427, 9, 15, "", false, GUIEditor.window[1]) 
        guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FFAAAAAA") 
        cerrarPanel = guiCreateButton(264, 327, 54, 16, "Cerrar", false, GUIEditor.window[1]) 
        guiSetProperty(cerrarPanel, "NormalTextColour", "FFAAAAAA")   
    
        addEventHandler ( "onClientGUIClick", cerrarPanel, Exit, false ) 
    end 
) 
  
function onresourceStart () 
  bindKey ("F1", "down", abrirPanel) 
  guiSetVisible (GUIEditor.window[1], false) 
end 
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onresourceStart) 
  
function abrirPanel () 
getVisible = guiGetVisible (GUIEditor.window[1]) 
if (getVisible == false) then 
    guiSetVisible (GUIEditor.window[1], true) 
    showCursor (true) 
    end 
end 
  
function Exit () 
guiSetVisible (GUIEditor.window[1], not guiGetVisible ( GUIEditor.window[1] ) ) 
showCursor ( false ) 
end 

Muchas Gracias :D

Link to comment
  • Recently Browsing   0 members

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