Skip to content
This repository was archived by the owner on Apr 7, 2023. It is now read-only.

fix (baseevents/deathevents): use GetConvarInt instead of hardcoded 32 for GetPlayerByEntityID(id).#214

Closed
IdrisDose wants to merge 1 commit intocitizenfx:masterfrom
IdrisDose:patch-1
Closed

fix (baseevents/deathevents): use GetConvarInt instead of hardcoded 32 for GetPlayerByEntityID(id).#214
IdrisDose wants to merge 1 commit intocitizenfx:masterfrom
IdrisDose:patch-1

Conversation

@IdrisDose
Copy link

This should hopefully remedy people needing to edit their base resources to listen for base death events.

@AvarianKnight
Copy link

Would it not be better to just use GetActivePlayers?

@fl-lo
Copy link

fl-lo commented Apr 3, 2022

Would it not be better to just use GetActivePlayers?

If you use onesync infinity, GetActivePlayers will only return the players "around you", not everyone

My PR #211 fix that on a lot of these resources

@AvarianKnight
Copy link

This is the case no matter what you do on the client, they will always only get the players in their scope, using sv_maxclients to iterate doesn't magically get around that

@Rubylium
Copy link

Rubylium commented Apr 3, 2022

Would it not be better to just use GetActivePlayers?

If you use onesync infinity, GetActivePlayers will only return the players "around you", not everyone

My PR #211 fix that on a lot of these resources

Using convar as you do will also return only the player in your scope

@blattersturm
Copy link
Contributor

If you use onesync infinity, GetActivePlayers will only return the players "around you", not everyone

When did this misleading thing spread?! :/

@IdrisDose
Copy link
Author

Closing due to better solution from #199

@IdrisDose IdrisDose closed this May 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants