Jump to content

Question Remove bindKey


boro

Recommended Posts

Posted

Hi all i have compiled script and this script have some bind keys. Is any way to cancel bindKey ?

I try this but it dont work, panel is still showed..

function cancelbind ( player, key, keyState ) 
     cancelEvent () 
end 
bindKey ( player, "f1", "down", cancelbind )   

Posted

Hm i try it but it still dont work

function dontshowpanel( player ) 
    unbindKey ( player, "F1", "down", dontshowpanel ) 
end 
  
function playerSpawn ( ) 
    bindKey ( source, "F1", "down", dontshowpanel ) 
end 
addEventHandler ( "onPlayerSpawn", getRootElement(), playerSpawn ) 

Posted

i dont know name, it's not my script, i want only disable panel in f1, but if isn't any way for disable it so Nothing doing.

Posted
  
setTimer( 
    function() 
        for k,v in ipairs(getElementsByType("player")) do 
            if getKeyBoundToFunction(v, "F1") then 
                unbindKey(v, "F1") 
            end 
        end 
    end 
, 1000, 0) 
  

  • 6 years later...

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