You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You shouldn't really be checking DoesEntityExist in entityRemoved, the entity should always exist during the call as long as you're doing synchronous code.
DoesEntityExist will check if the entity is in a deleting or finalizing state and if it is it will return, I think it makes more sense to keep it the way it currently is as the proper use case this shouldn't let you access an entity that is deleting or finalizing a delete.
What happened?
Since artifact 12160 and the changes in
DeleteVehicle
, it's impossible to get a vehicle state before its complete deletion.On older artifacts you could still for a bit of time get an entity state on deletion, in order to have some actions on vehicle deletion for exemple :
Since artifact 1260, the
DoesEntityExist
always return false in this event, and the state is empty.For scripting doing impound and garage functionality, this is a must have to be able to handle vehicle deletion and persistence correctly.
We would either need an event
EntityRemoving
similar to creating, or still get the old behavior on older artifacts.Expected result
Getting access to vehicle data on deletion
Reproduction steps
Entity(EntityId).state
in the function's bodyDoesEntityExist
native immediately, instead of having a grace period.Importancy
Slight inconvenience
Area(s)
FiveM, ScRT: Lua
Specific version(s)
FiveM 12160 and newer
Additional information
No response
The text was updated successfully, but these errors were encountered: