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

GetEntityModel server side is unreliable on RedM #2944

Open
Gltch3d opened this issue Nov 18, 2024 · 1 comment
Open

GetEntityModel server side is unreliable on RedM #2944

Gltch3d opened this issue Nov 18, 2024 · 1 comment
Labels
bug RedM Issues/PRs related to RedM triage Needs a preliminary assessment to determine the urgency and required action

Comments

@Gltch3d
Copy link

Gltch3d commented Nov 18, 2024

What happened?

I was working on a resource to handle removing mission ped spawns server side when I noticed the GetEntityModel is almost entirely unreliable.

I understand this is known to be the case for objects but the same can also be said for peds.

Expected result

Return a valid model hash for the entity

Reproduction steps

AddEventHandler("entityCreating", function(entity) print('GetEntityType', GetEntityType(entity), 'GetEntityModel:', GetEntityModel(entity)) end)

It will sometimes return something that is valid in other cases it will return 0 when the entity type is 1 (peds)

704d505d15cf5916d0a80fa67434445f

Importancy

Slight inconvenience

Area(s)

RedM, FXServer, OneSync

Specific version(s)

RedM Build 1491 (Windows) | Server Build 10573 (Linux)

Additional information

Onesync is active as getting the entity from the netId works and the server can check whether it exists successfully, however the model still returns 0

@Gltch3d Gltch3d added bug triage Needs a preliminary assessment to determine the urgency and required action labels Nov 18, 2024
@github-actions github-actions bot added the RedM Issues/PRs related to RedM label Nov 18, 2024
@Korioz
Copy link
Contributor

Korioz commented Nov 18, 2024

It does not work for animals & objects, i've worked on PR #2044 to fix those but it still need some edits to be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug RedM Issues/PRs related to RedM triage Needs a preliminary assessment to determine the urgency and required action
Projects
None yet
Development

No branches or pull requests

2 participants