Jump to content

Nodejs Event.VehicleDeath don't work


kustoki

Recommended Posts

Hello everyone!! Trying to use this code from ragemp wiki but nothing happens

https://wiki.rage.mp/index.php?title=VehicleDeath

mp.events.add("vehicleDeath", (vehicle) => {
    vehicle.destroy()
});

Can't understand... am i doing something wrong or is that some kind of a bug?

Link to comment
Share on other sites

  • 1 month later...
  • 6 months later...

It only works if someone is in the vehicle. I've been complaining about this issue for awhile, but sadly there is no decent workaround. The only suggestions I've heard involve abusing vehicle updates every tick, which is a VERY bad idea if you intend to have more than 5 or so people online at once because of the crazy processing you'll cause.

Link to comment
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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...