[HELP] Model name from hash

Is there a function like this? (title) I want to get a Model name from Model Hash.

1 Like

Please use the reference

https://runtime.fivem.net/doc/reference.html

Search it, nobody is going to do it for you.

2 Likes

I was looking for a vehicle :slight_smile:

Found ```GetDisplayNameFromVehicleModel()````

Dunno for other things…

1 Like

Yeah, I’ve found this, but I forgot to post it on the forum for the others. Anyway, thanks! :slight_smile:

1 Like

He didn’t say vehicle. I wasn’t aware this worked for peds?

1 Like

Actually I’m using it with vehicles. :slight_smile:

EDIT:
GetDisplayNameFromVehicleModel() not working with Ped Models btw.

Uhm, this should be normal ? isn’t it ? xDD

Maybe it’s normal, but there’s no function to retrieve model display name from hash. :slight_smile: Or maybe I just can’t find this.

I can’t too… But what are you trying to do if it’s not private ?

Just simply trying to get name like mp_m_freemode_01 from Hash

You can check here if there is a function for that : http://www.dev-c.com/nativedb/
I also don’t see why you want to know the name from the hash… Normally you know the name and convert it into a hash so that the game knows what to do.

1 Like

Or normally you want to retrieve ped skin and save it in DB :slight_smile:

1 Like

use GetLabelText on GetDisplayName…

No ways found? I want to get model from vehicle, real model name for spawning. (i know about wiki and list of all model names, but i want native :yum:)
Also need native to get ped models.
This functions not results what i need:

local ped = GetPlayerPed(-1)
local veh = GetVehiclePedIsIn(ped, false)
local model = GetEntityModel(veh)
local displaytext = GetDisplayNameFromVehicleModel(model)
local name = GetLabelText(displaytext)
5 Likes

I hope @d0p3t and the other mod’s will let it slide for once that i’m restructuring an old post :wink:

Especially since this is the first result you’ll get when searching “Model name from hash FiveM” on Google
(which what I was searching when I needed info on it, and so did two mates of mine whom where also
searching for that same possibility haha).

Therefor this 'one-time-resurrecting-post reply by me:
There is a ‘solution’ now I’ve made a list and function which gives you the model name to over 53.000
hashes :slight_smile:

Posting this here on this ‘old thread’ just to help others whom are in need of this information and also hope it’s received/seen this way (helping the community) :slight_smile:

3 Likes

Closed to prevent future bumps :stuck_out_tongue:. Also see the above post for the script release…