Server artifact: 2949 (latest)
Steps to reproduce: 1. Create a vehicle on server side
2. Try to use GetEntityHealth on that vehicle.
3. Always returns 0
Proof:
Server artifact: 2949 (latest)
Steps to reproduce: 1. Create a vehicle on server side
2. Try to use GetEntityHealth on that vehicle.
3. Always returns 0
Proof:
Bumping this as it is really important.
I have just tested it again and I figured out that everything else works (like GetEntityHeading
, GetEntityCoords
, etc.) the only issue is GetEntityHealth
.
Currently it only works with peds.
You could experiment with the unparsed CVehicleHealthDataNode
fields to determine if any correlate to entity health. For example, checking (https://docs.fivem.net/docs/client-manual/console-commands/#netobjviewer) if unk16
and unk17
of https://github.com/citizenfx/fivem/blob/master/code/components/citizen-server-impl/include/state/SyncTrees_Five.h#L1188 correlate to “has max health” and “health” respectively.