Jump to content

Problem with bindKey


Recommended Posts

    function open () 
        vent = guiCreateWindow(485, 185, 314, 385, "WINDOW", false) 
        guiWindowSetSizable(vent, false) 
        guiSetVisible ( vent, false ) 
        imagen = guiCreateStaticImage(13, 133, 292, 120, "carm.png", false, vent)   
    end 
    addEventHandler ( 'onClientResourceStart', resourceRoot, open ) 
  
function windowopen ( ) 
    guiSetVisible ( vent, not guiGetVisible ( vent ) ) 
    showCursor ( guiGetVisible ( vent ) ) 
end 
bindKey ( 'f4', 'down', windowopen ) 

PS: I've other Buttons andEvents, but the problem is of the bind!

Link to comment
    function open () 
        vent = guiCreateWindow(485, 185, 314, 385, "WINDOW", false) 
        guiWindowSetSizable(vent, false) 
        guiSetVisible ( vent, false ) 
        imagen = guiCreateStaticImage(13, 133, 292, 120, "carm.png", false, vent)   
       bindKey ( 'f4', 'down', windowopen ) 
    end 
    addEventHandler ( 'onClientResourceStart', resourceRoot, open ) 
  
function windowopen ( ) 
    guiSetVisible ( vent, not guiGetVisible ( vent ) ) 
    showCursor ( guiGetVisible ( vent ) ) 
end 
  

Link to comment

thanks all is fixed :D But now I've other problem :( the debugscript 3 says "@ addEventHandler error line 16, got nil" something like that. And this is:

    addEventHandler ("onClientGUIClick", e, ea, false) 
  
function ea () 
outputChatBox ("lol", source, 0, 255, 0, true) 
showCursor (true) 
end 

Link to comment
    function open () 
        vent = guiCreateWindow(485, 185, 314, 385, "WINDOW", false) 
        guiWindowSetSizable(vent, false) 
        guiSetVisible ( vent, false ) 
  
        a = guiCreateButton(9, 31, 296, 58, "e", false, vent) 
        b = guiCreateButton(9, 259, 296, 58, "e", false, vent) 
        c = guiCreateButton(13, 94, 77, 30, "ele", false, vent) 
        d = guiCreateButton(222, 94, 77, 30, "ee", false, vent) 
        e = guiCreateButton(13, 323, 77, 30, "eble", false, vent) 
        f = guiCreateButton(222, 323, 77, 30, "eeble", false, vent) 
        imagen = guiCreateStaticImage(13, 133, 292, 120, "carm.png", false, vent)   
        bindKey ( 'f4', 'down', windowopen ) 
    end 
  
function aa () 
outputChatBox ("YOU PRESSED THE FUCKINGG BUTTON", source, 0, 255, 0, true) 
showCursor (true) 
end 
  
  
function bb () 
outputChatBox ("YOU PRESSED THE FUCKINGG BUTTON !!", source, 255, 0, 0, true) 
showCursor (true) 
end 
  
function cc () 
outputChatBox ("YOU PRESSED THE FUCKINGG BUTTON", source, 0, 255, 0, true) 
showCursor (true) 
end 
  
function dd () 
outputChatBox ("YOU PRESSED THE FUCKINGG BUTTON.", source, 255, 0, 0, true) 
showCursor (true) 
end 
  
function windowopen ( ) 
    guiSetVisible ( vent, not guiGetVisible ( vent ) ) 
    showCursor ( guiGetVisible ( vent ) ) 
end 
  
    addEventHandler ( 'onClientResourceStart', resourceRoot, open ) 
    addEventHandler ("onClientGUIClick", a, aa, false) 
    addEventHandler ("onClientGUIClick", b, bb, false) 
    addEventHandler ("onClientGUIClick", c, cc, false) 
    addEventHandler ("onClientGUIClick", d, dd, false)    

Link to comment
    function open () 
        vent = guiCreateWindow(485, 185, 314, 385, "WINDOW", false) 
        guiWindowSetSizable(vent, false) 
        guiSetVisible ( vent, false ) 
        a = guiCreateButton(9, 31, 296, 58, "e", false, vent) 
        b = guiCreateButton(9, 259, 296, 58, "e", false, vent) 
        c = guiCreateButton(13, 94, 77, 30, "ele", false, vent) 
        d = guiCreateButton(222, 94, 77, 30, "ee", false, vent) 
        e = guiCreateButton(13, 323, 77, 30, "eble", false, vent) 
        f = guiCreateButton(222, 323, 77, 30, "eeble", false, vent) 
        addEventHandler ("onClientGUIClick", a, aa, false) 
        addEventHandler ("onClientGUIClick", b, bb, false) 
        addEventHandler ("onClientGUIClick", c, cc, false) 
        addEventHandler ("onClientGUIClick", d, dd, false)   
        imagen = guiCreateStaticImage(13, 133, 292, 120, "carm.png", false, vent)   
        bindKey ( 'f4', 'down', windowopen ) 
end 
addEventHandler ( 'onClientResourceStart', resourceRoot, open ) 
  
function aa () 
outputChatBox ("YOU PRESSED THE  BUTTON", 0, 255, 0, true) 
showCursor (true) 
end 
  
  
function bb () 
outputChatBox ("YOU PRESSED THE  BUTTON !!", 255, 0, 0, true) 
showCursor (true) 
end 
  
function cc () 
outputChatBox ("YOU PRESSED THE  BUTTON", 0, 255, 0, true) 
showCursor (true) 
end 
  
function dd () 
outputChatBox ("YOU PRESSED THE  BUTTON.", 255, 0, 0, true) 
showCursor (true) 
end 
  
function windowopen ( ) 
    guiSetVisible ( vent, not guiGetVisible ( vent ) ) 
    showCursor ( guiGetVisible ( vent ) ) 
end 

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