GetEntityModel server side is unreliable on RedM
Gltch3d opened this issue · 1 comments
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)
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