#RooTs Posted December 21, 2015 Posted December 21, 2015 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 )
Addlibs Posted December 21, 2015 Posted December 21, 2015 If you're using localPlayer variable I assume the code is client side. bindKey clientside does not take first argument as the player who's key to bind. Just remove "localPlayer" argument from first argument.
iPrestege Posted December 21, 2015 Posted December 21, 2015 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 !
#RooTs Posted December 21, 2015 Author Posted December 21, 2015 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 things ! solved, thanks Mr.Pres[T]ege and MrTasty
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now