Closed Chris0x closed 3 years ago
Also on clientside it would be usefull to only get players in range
This should just be added to the C++ SDK as a shared method. Because this would be useful on both client- and serverside.
It would be actually nice to have something like alt.Player.streamedIn or alt.Vehicle.streamedIn. It would allow to e.g. render nametags / find nearest player more efficiently
You can use the gameEntityCreate
and gameEntityDestroy
event to keep track of streamed entities already.
I actually do this rn to render nicknames, but i think this is something that would be nice to have in altv itself
Available as alt.Player.streamedIn
etc. on clientside in newest dev
Suggestion
Add a function/property to get all current streamed in players for a player Use cases
When you want to emit an event but dont want to iterate through all players, this should be the way to go Describe the solution you'd like
I think alt:V already caches somehow these players, so make them available Describe alternatives you've considered
client.EmitInRange(event, args...) Additional context
/