heroes9898 Posted May 27, 2014 Posted May 27, 2014 I use "cancelEvent()" in that eventhandler. But it doesn't works. Player enters in the vehicle anyway.
heroes9898 Posted May 27, 2014 Author 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] )
Mr_Moose Posted May 27, 2014 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)
_DrXenon Posted May 27, 2014 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.
heroes9898 Posted May 27, 2014 Author Posted May 27, 2014 I found an other solution addEventHandler("onClientVehicleStartEnter", root, function(player,seat,door) setElementFrozen(player, true) setElementFrozen(player, false) end )
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