FiveM Docs / Native Reference
API Set:
  • all
  • server
  • client
Language:
  • raw
  • lua
  • c#
  • js
Namespace: CFXAPI set: servereditImprove

GET_ENTITY_TYPE

0xB1BD08D
// GetEntityType
int GET_ENTITY_TYPE(Entity entity);
Parameters:
  • entity:

    The entity to get the type of.

Returns:

The entity type returned as an integer value.

Gets the entity type (as an integer), which can be one of the following defined down below:

The following entities will return type 1:

  • Ped
  • Player
  • Animal (Red Dead Redemption 2)
  • Horse (Red Dead Redemption 2)

The following entities will return type 2:

  • Automobile
  • Bike
  • Boat
  • Heli
  • Plane
  • Submarine
  • Trailer
  • Train
  • DraftVeh (Red Dead Redemption 2)

The following entities will return type 3:

  • Object
  • Door
  • Pickup

Otherwise, a value of 0 will be returned.

Privacy
•
Cookie Policy
•
Cookie Settings
GET_CURRENT_GAME_NAME()
GET_CURRENT_PED_WEAPON(Ped ped)
GET_CURRENT_RESOURCE_NAME()
GET_CURRENT_SERVER_ENDPOINT()
GET_DUI_HANDLE(long duiObject)
GET_ENTITY_ADDRESS(Entity entity)
GET_ENTITY_ARCHETYPE_NAME(Entity entity)
GET_ENTITY_ATTACHED_TO(Entity entity)
GET_ENTITY_COLLISION_DISABLED(Entity entity)
GET_ENTITY_COORDS(Entity entity)
GET_ENTITY_FROM_STATE_BAG_NAME(char* bagName)
GET_ENTITY_HEADING(Entity entity)
GET_ENTITY_HEALTH(Entity entity)
GET_ENTITY_INDEX_FROM_MAPDATA(int mapdata, int entity)
GET_ENTITY_MAPDATA_OWNER(Entity entity, int* mapdataHandle, int* entityHandle)
GET_ENTITY_MAX_HEALTH(Entity entity)
GET_ENTITY_MODEL(Entity entity)
GET_ENTITY_ORPHAN_MODE(Entity entity)
GET_ENTITY_POPULATION_TYPE(Entity entity)
GET_ENTITY_ROTATION(Entity entity)
GET_ENTITY_ROTATION_VELOCITY(Entity entity)
GET_ENTITY_ROUTING_BUCKET(Entity entity)
GET_ENTITY_SCRIPT(Entity entity)
GET_ENTITY_SPEED(Entity entity)
GET_ENTITY_TYPE(Entity entity)
GET_ENTITY_VELOCITY(Entity entity)
GET_EXTERNAL_KVP_FLOAT(char* resource, char* key)
GET_EXTERNAL_KVP_INT(char* resource, char* key)
GET_EXTERNAL_KVP_STRING(char* resource, char* key)
GET_FUEL_CONSUMPTION_RATE_MULTIPLIER()
GET_FUEL_CONSUMPTION_STATE()
GET_GAME_BUILD_NUMBER()
GET_GAME_NAME()
GET_GAME_POOL(char* poolName)
GET_GAME_TIMER()