Sign in to follow this  
Juance

Vehicles Engine

Recommended Posts

Posted (edited)

Hi everyone. My question is the following: Is there something so that the engines of the vehicles do not automatically turn on / off, if not controlled by the user? The only thing that I have done is that, if a player gets into the vehicle and the engine is "false" it does a "setEngineOn (false)" to physically turn off the engine.

Edited by Juance

Share this post


Link to post
Share on other sites
Posted (edited)

I solved the client side like this

mp.events.add({
    'playerEnterVehicle': (vehicle, seat) => {
        if (mp.players.local.getSeatIsTryingToEnter() == -1 || vehicle.getIsEngineRunning()) {
            return;
        }
    }
});

 

Edited by JensDerZocker

Share this post


Link to post
Share on other sites
Posted (edited)

i noticed the same bug playerEnterVehicle doesnt even get triggered on clientside

Edited by mDenis16

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.