| Property | Value |
|---|---|
| Native Name | GET_ENTITY_MODEL |
| Hash | 0x9F47B058362C84B5 |
| Return Type | Hash |
| Parameters | entity (Entity) |
Description: Returns the model hash from an entity.
Parameters
entity(Entity) — The entity to get the model for.
Examples
local hash = GetEntityModel(PlayerPedId())
if hash == `mp_m_freemode_01` then
print("This player is using the male freemode model.")
end
const hash = GetEntityModel(PlayerPedId());
if (hash === GetHashKey('mp_m_freemode_01')) {
console.log('This player is using the male freemode model.');
}
using static CitizenFX.Core.Native.API;
// ...
uint hash = GetEntityModel(PlayerPedId());
if(hash == GetHashKey("mp_m_freemode_01"))
{
Debug.WriteLine("This player is using the male freemode model.");
}
// or the preferred use of C# wrapper
if(Game.PlayerPed.Model.Hash == Game.GenerateHash("mp_m_freemode_01"))
{
Debug.WriteLine("This player is using the male freemode model.");
}