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

GetPedCollectionLocalIndex Natives Returning Wrong Value #2829

Open
1A3Dev opened this issue Oct 2, 2024 · 0 comments
Open

GetPedCollectionLocalIndex Natives Returning Wrong Value #2829

1A3Dev opened this issue Oct 2, 2024 · 0 comments
Assignees
Labels
bug triage Needs a preliminary assessment to determine the urgency and required action

Comments

@1A3Dev
Copy link
Contributor

1A3Dev commented Oct 2, 2024

What happened?

When using GetPedCollectionLocalIndexFromDrawable or GetPedCollectionLocalIndexFromProp which were added in 7dad6da it returns 0 when the componentId/anchorPoint isn't valid and also if the global index is out of bounds.

Expected result

According to the native docs it should return -1 not 0 in the situations mentioned above

Reproduction steps

print(GetPedCollectionLocalIndexFromDrawable(PlayerPedId(), 0, -1))
print(GetPedCollectionLocalIndexFromDrawable(PlayerPedId(), 100, 9999))
print(GetPedCollectionLocalIndexFromProp(PlayerPedId(), 0, -1))
print(GetPedCollectionLocalIndexFromProp(PlayerPedId(), 100, 9999))

Importancy

Slight inconvenience

Area(s)

FiveM, Natives

Specific version(s)

10072/canary

Additional information

No response

@1A3Dev 1A3Dev added bug triage Needs a preliminary assessment to determine the urgency and required action labels Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triage Needs a preliminary assessment to determine the urgency and required action
Projects
None yet
Development

No branches or pull requests

3 participants