Jump to content

bindKey and unbindKey is bad argument


#RooTs

Recommended Posts

I've tried everything and could not :(:(:(:(

function Enter ( ) 
    if getPedOccupiedVehicle(localPlayer) == 0 then 
        bindKey ( localPlayer, "f5", "down", abrir ) 
        outputChatBox ( "#ff0000painel f5.", root, 124, 252, 0, true ) 
    end 
end 
  
addEventHandler ( "onClientVehicleEnter", getRootElement(), Enter ) 
  
function Exit ( ) 
        unbindKey ( Player, "f5", "down", abrir ) 
end 
addEventHandler ( "onClientVehicleExit", getRootElement(), Exit ) 

Link to comment
function aBind (   ) 
        if ( eventName == 'onClientVehicleEnter' ) then 
            bindKey ( 'F5','down',abrir ) 
            outputChatBox ( '#ff0000painel f5.', 124, 252, 0, true ) 
        else 
            unbindKey ( 'F5','down',abrir ) 
    end 
end  
addEventHandler ( 'onClientVehicleEnter',root,aBind ) 
addEventHandler ( 'onClientVehicleExit',root,aBind ) 

Easier for you and fixed some fucked things :D!

Link to comment
function aBind (   ) 
        if ( eventName == 'onClientVehicleEnter' ) then 
            bindKey ( 'F5','down',abrir ) 
            outputChatBox ( '#ff0000painel f5.', 124, 252, 0, true ) 
        else 
            unbindKey ( 'F5','down',abrir ) 
    end 
end  
addEventHandler ( 'onClientVehicleEnter',root,aBind ) 
addEventHandler ( 'onClientVehicleExit',root,aBind ) 

Easier for you and fixed some :o things :D!

solved, thanks Mr.Pres[T]ege and MrTasty

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