ns |
---|
ENTITY |
// 0x9F47B058362C84B5 0xDAFCB3EC
Hash GET_ENTITY_MODEL(Entity entity);
Returns the model hash from the entity
- entity: The entity to get the model for.
The model hash from the entity.
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.");
}