Jump to content

Recommended Posts

Posted (edited)

So as recommended I always work on server side for vehicle engines and it's ok. But the problem is that, when in movement, I suddenly want to turn off the engine, the engine turns off successfully, the car stops, but it slightly shakes. Like really slightly, it's not a big deal but still if someones know how to correct that shaking it will be cool. Logically I'm waiting a client side solution(stop an animation ? default animation stop for default engine behavior doesn't help.), but I will provide my server side code anyway.

mp.events.addCommand("en", (player) => {
    let vehicle = player.vehicle;
    if (vehicle) {
        let engineState = vehicle.engine;
        vehicle.engine = !engineState;
        if (vehicle.engine) {
            player.outputChatBox("ON Man");
        } else {
            player.outputChatBox("It's off dude");
        }
    } else {
        return
    }
});

 

 

Edited by Robert_Easter

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