Jump to content

OnVehicleDeath doesn't get called (Bug? C# 1.1.0-DP1-2)


Recommended Posts

Posted

OnVehicleDeath won't get called if the player isn't in vehicle... How to respawn and repair single death vehicle in that case single, without looping through all vehicles ?

In SAMP OVD would be called with and without player in veh

Posted (edited)

Also interested in this question. A vehicle cannot respawn if it is destroyed without a driver. If you forcefully send it to respawn or add health, then you cannot sit in it.

Edited by Maximus
  • 3 weeks later...
Posted

This is an issue with JS too. From some previous discussions on Discord, it seems to be a known issue. It will only detect properly if there is a driver in the vehicle at the time of vehicle death. I've yet to figure out a workaround myself, but it is indeed very frustrating.

  • 4 months later...
  • 4 months later...
Posted

This is still an issue unfortunately. Everyone keeps suggesting to check if the vehicle's health is -2000 or lower, but that doesn't help if there's no way to trigger the check. :( 

Posted
9 hours ago, SugarD-x said:

This is still an issue unfortunately. Everyone keeps suggesting to check if the vehicle's health is -2000 or lower, but that doesn't help if there's no way to trigger the check. :( 

Sadly, you have to do a global timer that loops through all spawned vehicles 😕

  • Sad 1
Posted
7 hours ago, Champa said:

Sadly, you have to do a global timer that loops through all spawned vehicles 😕

Unfortunately that is not a proper fix, though. That would cause extreme unnecessary memory and processing usage if you have a lot of players and vehicles.

I don't understand why this bug has been present for years without even so much as being acknowledged by the development team. It's a pretty big issue for a lot of servers. I don't know of a single other multiplayer mod for GTA that has this problem.

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