Hi ive created a gui and want it to open when i hold f2 and when i release f2 it closes it worked but because i was just testig i changed the command handler for binding the keys to an event handler now the gui get stuck and doest go away when i release f2
hers new binkey code
addEventHandler("onClientPlayerSpawn",root,
function()
bindKey ( "F2", "down", openGui )
bindKey ( "F2", "up", closeGui )
bindKey ( "F2", "down", stats )
end )
old
function bindkeys()
bindKey ( "F2", "down", openGui )
bindKey ( "F2", "up", closeGui )
bindKey ( "F2", "down", stats )
end
addCommandHandler("bindme", bindkeys)