GetEntityArchetypeName crashed

GetEntityArchetypeName native crashed client
if use, returned int

Citizen.InvokeNative(0x47B870F5, entity) -- GetEntityArchetypeName

if use this → crash

    Citizen.InvokeNative(0x47B870F5, entity, Citizen.ResultAsString()); -- GetEntityArchetypeName

for test:

function debugInformation(entity)
    local entityType = GetEntityType(entity);
    if entityType < 1 or entityType > 3 then
        return;
    end

    local netId = NetworkGetNetworkIdFromEntity(entity);
    local modelName = Citizen.InvokeNative(0x47B870F5, entity);
    local coords = GetEntityCoords(entity);

    local text = ('NetId: %s \nModel:%s\nCoords:%s'):format(netId, modelName, coords);
    print(text);
end

This native doesn’t exist in RedM. It’s only for FiveM.

GetStringFromHashKey

The analog that I found also doesn’t work with many things, maybe I’m doing it wrong, but I was able to make it work only with weapons

This native return always empty string

function debugInformation(entity)
    local entityType = GetEntityType(entity);
    if entityType < 1 or entityType > 3 then
        return;
    end

    local netId = NetworkGetNetworkIdFromEntity(entity);
    local name = Citizen.InvokeNative(0xBD5DD5EAE2B6CE14, GetEntityModel(entity), Citizen.ResultAsString()); -- GetStringFromHashKey
    local coords = GetEntityCoords(entity);

    local text = ('NetId: %s \nModel:%s\nCoords:%s'):format(netId, name, coords);
    print(text);
end

update

I don’t understand what ‘update’ you expect.

GetStringFromHashKey works fine when used correctly.