When a Player has a distance of like 5km to a Entity(vehicle, Player, Ped), FiveM is deleting this Entity because the Entity is out of stream range. The event should be fired.
[UseCase]
(My Usecase)
People like me, are saving vehicles on Server stop & spawn them when the Server Starts. But there is currently no way, to Apply Mods to vehicles serverside, so when a vehicle gets spawned bc it gets into the stream range, get the mods that have to be applied & apply them.
Not sure what this adds to the last request, which was closedâŚ
Try state bags and state bag change handlers? These should apply to entities that are recreated, though if vehicle mods arenât stored with vehicles already when they leave scope, thatâs a bug by itself and doesnât need such an event either.
What heâs asking is actually sounds like a workaround âfixâ for the real issue (which I also encountered myself): Itâs not really about vehicle enters scope and adding it mods, but to server to be able to add mods to vehicles by itself. Is this more/less doable than an event? As for now I use really strange workarounds to add liveries and extras to created streamed out vehicles
Mod natives rely on some weird state, so adding them as âsimplyâ RPC setters may not be reliable either. Ideally weâd have server-side direct setters for this â CVehicleAppearanceDataNode parsing/unparsing would also be required.