Jump to content

[HELP] GUI Window not working


RangeR..

Recommended Posts

Hi guys, idk what happened to my GUI window of help panel script, it's not working. The code is written below

  
GUIEditor = { 
    label = {}, 
    window = {}, 
    staticimage = {}, 
    memo = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(136, 22, 533, 505, "Help System - F1", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
        GUIEditor.label[1] = guiCreateLabel(0.17, 0.05, 0.67, 0.10, "Help System by Robin", true, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[1], "sa-gothic") 
  
        GUIEditor.memo[1] = guiCreateMemo(-8, 57, 83, 109, "", false, GUIEditor.label[1]) 
  
        GUIEditor.memo[2] = guiCreateMemo(92, 82, 355, 328, "HELP SYSTEM\n\nRules:\nNo Cheating.\nNo Bad Words.\nRespect Staff.\n\nCommands:\n\n/kill\n\nBinds:\n\nF1 - Freeroam\nF3 - Help", false, GUIEditor.window[1]) 
        GUIEditor.staticimage[1] = guiCreateStaticImage(92, 415, 355, 80, ":guieditor/images/examples/mtalogo.png", false, GUIEditor.window[1])     
        guiSetVisible(guiEditor.window[1], false) 
    end 
) 
function guiToggleVisible ( )         
        if ( guiGetVisible ( GUIEditor.window[1] ) == true ) then               
                guiSetVisible ( GUIEditor.window[1], false ) 
        else               
                guiSetVisible ( GUIEditor.window[1], true ) 
        end 
end 
bindKey ( "F1", "down", guiToggleVisible ) 
  

Link to comment
Error

WARNING: help/script.lua:23: bad argument @ 'bindKey' [Expected player at argument 1, got string '1'

GUIEditor = { 
    label = {}, 
    window = {}, 
    staticimage = {}, 
    memo = {} 
} 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
        GUIEditor.window[1] = guiCreateWindow(136, 22, 533, 505, "Help System - F1", false) 
        guiWindowSetSizable(GUIEditor.window[1], false) 
  
  
  
        GUIEditor.label[1] = guiCreateLabel(0.17, 0.05, 0.67, 0.10, "Help System by Robin", true, GUIEditor.window[1]) 
        guiSetFont(GUIEditor.label[1], "sa-gothic") 
  
  
  
  
        GUIEditor.memo[1] = guiCreateMemo(-8, 57, 83, 109, "", false, GUIEditor.label[1]) 
  
        GUIEditor.memo[2] = guiCreateMemo(92, 82, 355, 328, "HELP SYSTEM\n\nRules:\nNo Cheating.\nNo Bad Words.\nRespect Staff.\n\nCommands:\n\n/kill\n\nBinds:\n\nF1 - Freeroam\nF3 - Help", false, GUIEditor.window[1]) 
        GUIEditor.staticimage[1] = guiCreateStaticImage(92, 415, 355, 80, ":guieditor/images/examples/mtalogo.png", false, GUIEditor.window[1])     
        
    end 
) 
bindKey ( "F1", "down", 
    function ( ) 
        local state = ( not guiGetVisible (  GUIEditor.window[1] ) ) 
        guiSetVisible (  GUIEditor.window[1], state ) 
        showCursor ( state ) 
    end 
) 
  

also change the directory of the image.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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