Jump to content

Ayuda con un Gui de Reglas


Daniel1zD

Recommended Posts

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 
) 
  

Link to comment

@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.  

Link to comment

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) 

Link to comment
  • Recently Browsing   0 members

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