heroes9898 Posted May 27, 2014 Share Posted May 27, 2014 I use "cancelEvent()" in that eventhandler. But it doesn't works. Player enters in the vehicle anyway. Link to comment
_DrXenon Posted May 27, 2014 Share Posted May 27, 2014 Can you write the whole function here please? Link to comment
heroes9898 Posted May 27, 2014 Author Share Posted May 27, 2014 Can you write the whole function here please? here addEventHandler("[color=#FFBF00]onClientVehicleStartEnter[/color]",root, [color=#0080BF]function[/color](player,seat,door) [color=#FF0000]cancelEvent()[/color] [color=#0080BF]end[/color] ) Link to comment
Mr_Moose Posted May 27, 2014 Share Posted May 27, 2014 I suppose that only triggers on client sided vehicles, try cancel that event server side instead. addEventHandler("onVehicleStartEnter",root, function(player,seat,door) cancelEvent() end) Link to comment
_DrXenon Posted May 27, 2014 Share Posted May 27, 2014 Yeah, It only lock vehicles that was made by clientside file. Even the freeroam cars, admin panel cars , if it was created via client side, then it will be locked, else if it was made server side, it won't be locked. I tested it and results were: Some cars are locked/cant be entered and others can be. Link to comment
heroes9898 Posted May 27, 2014 Author Share Posted May 27, 2014 Thanks for the information. Link to comment
heroes9898 Posted May 27, 2014 Author Share Posted May 27, 2014 I found an other solution addEventHandler("onClientVehicleStartEnter", root, function(player,seat,door) setElementFrozen(player, true) setElementFrozen(player, false) end ) Link to comment
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