Jump to content

onClientVehicleStartEnter - Problem


Recommended Posts

Posted

I use "cancelEvent()" in that eventhandler. But it doesn't works. Player enters in the vehicle anyway. :|

Don´t let your fears stand in the way of your dreams!

Posted
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] 
) 
  

Don´t let your fears stand in the way of your dreams!

Posted

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.

 

●●●

Rage Gaming Society

Coming Soon

●●●

Posted

I found an other solution :mrgreen::mrgreen:

addEventHandler("onClientVehicleStartEnter", root, 
    function(player,seat,door) 
        setElementFrozen(player, true) 
        setElementFrozen(player, false) 
    end 
) 

Don´t let your fears stand in the way of your dreams!

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