Jump to content

Ayuda con un Gui de Reglas


Daniel1zD

Recommended Posts

Posted

Disculpen pero soy nuevo en esto estoy creando un gui pero no puedo crear el BindKey para que se abra y cierre el Panel de Regla por favor alludenme

GUIEditor = { 
    memo = {}, 
    button = {}, 
    window = {}, 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(289, 115, 811, 461, "", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        GUIEditor.memo[1] = guiCreateMemo(31, 30, 760, 346, "", false, GUIEditor.window[1]) 
        GUIEditor.button[1] = guiCreateButton(34, 388, 188, 64, "  Exit", false, GUIEditor.window[1])     
    end 
) 
  
addEventHandler("onClientRender", root, 
    function() 
        dxDrawText("By Flaky", 934, 515, 1174, 576, tocolor(255, 255, 255, 255), 1, "bankgothic", "left", "top", false, false, true, false, false) 
    end 
) 
  

Posted

Utiliza el "bindKey"

en tu Caso Deberias Utilizar:

[color=#0000FF]bindKey[/color]("[color=#FF0000]h[/color]", [color=#0000FF]opengui[/color]) 

La Tecla H se la Cambias por Cualquiera

Owner Of Juramento Freeroam.

IP:

205.234.152.187:22010

Oficial Site of the Clan:

http://www.mtajuraclan.net

Oficial Forum:

http://mtajuraclan.foroactivo.com/

If You Need a Active Cheap and Nice Mapper or Scripter, Contact Me: [email protected]

Posted

@TigreBlanco, te faltan argumentos y no existe 'opengui' lo único que hiciste bien es poner la H y utiliza lua tags que son mas cómodos al leer.

 

@Flaky

 

GUIEditor = { 
    memo = {}, 
    button = {}, 
    window = {}, 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(289, 115, 811, 461, "", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        GUIEditor.memo[1] = guiCreateMemo(31, 30, 760, 346, "", false, GUIEditor.window[1]) 
        GUIEditor.button[1] = guiCreateButton(34, 388, 188, 64, "  Exit", false, GUIEditor.window[1])     
         --guiSetVisible ( GUIEditor.window[1] , false) --Si quieres que el GUi no aparezca cuando el jugador se conecte, habilita esta linea. (Borra el '--' del principio) 
    end 
) 
  
addEventHandler("onClientRender", root, 
    function() 
        dxDrawText("By Flaky", 934, 515, 1174, 576, tocolor(255, 255, 255, 255), 1, "bankgothic", "left", "top", false, false, true, false, false) 
    end 
) 
function toggleVisible (  ) 
  guiSetVisible ( GUIEditor.window[1] , not guiGetVisible(GUIEditor.window[1]) ) 
 end 
end 
  
bindKey( "F1", "down", toggleVisible) --Cambia F1 por cualquier tecla que desees.  

Developer @ MYVAL

Posted

Alex_steel que daria asi no

GUIEditor = { 
    memo = {}, 
    button = {}, 
    window = {}, 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(289, 115, 811, 461, "", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        GUIEditor.memo[1] = guiCreateMemo(31, 30, 760, 346, "", false, GUIEditor.window[1]) 
        GUIEditor.button[1] = guiCreateButton(34, 388, 188, 64, "  Exit", false, GUIEditor.window[1])     
    end 
) 
  
addEventHandler("onClientRender", root, 
    function() 
        dxDrawText("By Flaky", 934, 515, 1174, 576, tocolor(255, 255, 255, 255), 1, "bankgothic", "left", "top", false, false, true, false, false) 
    end 
     
  
  
) 
function toggleVisible (  ) 
  guiSetVisible ( GUIEditor.window[1] , not guiGetVisible(GUIEditor.window[1]) ) 
 end 
end 
  
bindKey( "F1", "down", toggleVisible) 

Posted
function toggleVisible (  ) 
     guiSetVisible ( GUIEditor.window[1] , not guiGetVisible(GUIEditor.window[1]) ) 
end 
bindKey( "F1", "down", toggleVisible) 

Tenias un 'end' de mas.

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.

  • Recently Browsing   0 members

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