[Bug] GetEntityArchetypeName return nothing #130
Closed
i20h
started this conversation in
[BUG] FiveM for GTAV Enhanced
Replies: 4 comments 2 replies
|
Thanks, we are looking into this. |
0 replies
|
You are passing in the model, not the entity, to GetEntityArchetypeName. |
1 reply
|
A fix for this bug has been implemented and is available in the latest patch b96/97. Please try again and let us know if the issue persists. Thanks for your help! |
1 reply
|
I can confirm the bug is now fixed for me: local commandId = RegisterCommand('archtest', function()
local ped = PlayerPedId()
local coords = GetEntityCoords(ped) + vec3(0, 0, 1)
local model = `prop_beachball_02`
RequestModel(model)
while not HasModelLoaded(model) do
Wait(0)
end
local entity = CreateObject(model, coords.x, coords.y, coords.z, true, true, true)
assert(DoesEntityExist(entity), 'Entity does not exist')
local archetypeName = GetEntityArchetypeName(entity)
assert(type(archetypeName) == 'string', 'Result is not a string')
assert(archetypeName:len() > 0, ('String is empty: "%s"'):format(archetypeName))
print(('Result returned a non empty string: "%s"'):format(archetypeName))
print(('Length of the string: %d'):format(archetypeName:len()))
end)
AddEventHandler('onResourceStop', function(resourceName)
if GetCurrentResourceName() ~= resourceName then return end
UnregisterCommand(commandId)
end)Result: |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Summary
GetEntityArchetypeName return nothing
Issue type
Client
Repro rate
Always
Server build version
FXServer-early-access b93 win32
OS
Windows 11 24h2
CPU
No response
GPU
No response
RAM
No response
Storage type
None
Connection type
None
ISP and bandwidth
No response
DxDiag
No response
Network graph
No response
Platform
None
OS version / distribution
No response
CPU
No response
RAM
No response
Using txAdmin?
None
Hosting provider
None
Machine type
None
/perf endpoint output
No response
DDoS protection
No response
ulimit -n value (Linux only)
No response
Docker Compose file (Docker only)
No response
Steps to Reproduce
Expected Behavior
Expected output :
model: 136236575 archetypeName: prop_beachball_02
Actual Behavior
Actual output :

model: 136236575 archetypeName:
Evidence
No response
Additional Context
No response
All reactions