Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve multiple functions and one event #1232

Merged
merged 8 commits into from
Oct 2, 2023
Merged

improve multiple functions and one event #1232

merged 8 commits into from
Oct 2, 2023

Conversation

Arctos2win
Copy link
Contributor

No description provided.

@Arctos2win Arctos2win changed the base branch from main to dev September 29, 2023 20:32
for i = 1, #pool do
if pool[i] ~= myPed then
peds[#peds + 1] = pool[i]
local pool = GetGamePool('CPed')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's lucky that the full pool is returned by default. Because then compatibility is broken because the default is to return an empty table, which is what the old method did. Now it will always return the pool. So it won't be backwards compatible.

Copy link
Contributor Author

@Arctos2win Arctos2win Sep 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

before if all the peds were requested the pool was returned and if not they would loop through
the pool table and add all peds except for the playerped to an empty table, now if the playerped is found then its removed from
the table and then the pool is being returned

[core]/es_extended/client/functions.lua Outdated Show resolved Hide resolved
@Arctos2win Arctos2win merged commit 3376ba6 into esx-framework:dev Oct 2, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants