[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ā€¦