Is there a function like this? (title) I want to get a Model name from Model Hash.
Please use the reference
https://runtime.fivem.net/doc/reference.html
Search it, nobody is going to do it for you.
I was looking for a vehicle
Found ```GetDisplayNameFromVehicleModel()````
Dunno for other things…
Yeah, I’ve found this, but I forgot to post it on the forum for the others. Anyway, thanks!
He didn’t say vehicle. I wasn’t aware this worked for peds?
Actually I’m using it with vehicles.
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. 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.
Or normally you want to retrieve ped skin and save it in DB
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 )
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)
I hope @d0p3t and the other mod’s will let it slide for once that i’m restructuring an old post
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
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)
Closed to prevent future bumps . Also see the above post for the script release…