The FiveM developer’s field guide
Know the native.
Build the world.
Engine functions, framework docs, and game assets.
One reference. From the first lookup to the last line.
knowledge base
Explore / FiveM
Native reference
- ENTITYint
_GET_ENTITY_BONE_COUNT
Description not yet documented
0xB328DCC3A3AA401B - ENTITYint
GET_ENTITY_BONE_INDEX_BY_NAME
``` Returns the index of the bone. If the bone was not found, -1 will be returned. list: pastebin.com/D7JMnX1g BoneNames: chassis, windscreen, seat_pside_r, seat_dside_r, bodyshell, suspension_lm, suspension_lr, platelight, attach_female, attach_male, bonnet, boot, chassis_dummy, //Center of the dummy chassis_Control, //Not found yet door_dside_f, //Door left, front door_dside_r, //Door left, back door_pside_f, //Door right, front door_pside_r, //Door right, back Gun_GripR, windscreen_f, platelight, //Position where the light above the numberplate is located VFX_Emitter, window_lf, //Window left, front window_lr, //Window left, back window_rf, //Window right, front window_rr, //Window right, back engine, //Position of the engine gun_ammo, ROPE_ATTATCH, //Not misspelled. In script "finale_heist2b.c4". wheel_lf, //Wheel left, front wheel_lr, //Wheel left, back wheel_rf, //Wheel right, front wheel_rr, //Wheel right, back exhaust, //Exhaust. shows only the position of the stock-exhaust overheat, //A position on the engine(not exactly sure, how to name it) misc_e, //Not a car-bone. seat_dside_f, //Driver-seat seat_pside_f, //Seat next to driver Gun_Nuzzle, seat_r I doubt that the function is case-sensitive, since I found a "Chassis" and a "chassis". - Just tested: Definitely not case-sensitive. ```
0xFB71170B7E76ACBA - ENTITYVector3
_GET_ENTITY_BONE_POSITION_2
``` Gets the world rotation of the specified bone of the specified entity. This native is used in casinoroulette.c but I don't know yet what is the difference with _GET_ENTITY_BONE_ROTATION ```
0x46F8696933A63C9B - ENTITYVector3
_GET_ENTITY_BONE_ROTATION
``` Gets the world rotation of the specified bone of the specified entity. ```
0xCE6294A232D03786 - ENTITYVector3
_GET_ENTITY_BONE_ROTATION_LOCAL
Gets the local rotation of the specified bone of the specified entity. ``` NativeDB Introduced: v1734 ```
0xBD8D32550E5CEBFE - ENTITYBOOL
GET_ENTITY_CAN_BE_DAMAGED
Description not yet documented
0xD95CC5D2AB15A09F - ENTITYBOOL
GET_ENTITY_COLLISION_DISABLED
Description not yet documented
0xCCF1E97BEFDAE480 - ENTITYVector3
GET_ENTITY_COORDS
Gets the current coordinates (world position) for a specified entity.
0x3FEF770D40960D5A - ENTITYVector3
GET_ENTITY_FORWARD_VECTOR
``` Gets the entity's forward vector. ```
0x0A794A5A57F8DF91 - ENTITYfloat
GET_ENTITY_FORWARD_X
``` Gets the X-component of the entity's forward vector. ```
0x8BB4EF4214E0E6D5 - ENTITYfloat
GET_ENTITY_FORWARD_Y
``` Gets the Y-component of the entity's forward vector. ```
0x866A4A5FAE349510 - ENTITYfloat
GET_ENTITY_HEADING
``` Returns the heading of the entity in degrees. Also know as the "Yaw" of an entity. ```
0xE83D4F9BA2A38914 - ENTITYfloat
GET_ENTITY_HEADING_FROM_EULERS
Gets the heading of the entity physics in degrees, which tends to be more accurate than just [`GET_ENTITY_HEADING`](#\_0xE83D4F9BA2A38914). This can be clearly seen while, for example, ragdolling a ped/player.
0x846BF6291198A71E - ENTITYint
GET_ENTITY_HEALTH
``` Returns an integer value of entity's current health. Example of range for ped: - Player [0 to 200] - Ped [100 to 200] - Vehicle [0 to 1000] - Object [0 to 1000] Health is actually a float value but this native casts it to int. In order to get the actual value, do: float health = *(float *)(entityAddress + 0x280); ```
0xEEF059FAD016D209 - ENTITYfloat
GET_ENTITY_HEIGHT
Description not yet documented
0x5A504562485944DD - ENTITYfloat
GET_ENTITY_HEIGHT_ABOVE_GROUND
``` Return height (z-dimension) above ground. Example: The pilot in a titan plane is 1.844176 above ground. How can i convert it to meters? Everything seems to be in meters, probably this too. ```
0x1DD55701034110E5 - ENTITYint
GET_ENTITY_LOD_DIST
``` Returns the LOD distance of an entity. ```
0x4159C2762B5791D6 - ENTITYvoid
GET_ENTITY_MATRIX
Description not yet documented
0xECB2FC7235A7D137 - ENTITYint
GET_ENTITY_MAX_HEALTH
``` Return an integer value of entity's maximum health. Example: - Player = 200 ```
0x15D757606D170C3C - ENTITYHash
GET_ENTITY_MODEL
Returns the model hash from an entity.
0x9F47B058362C84B5 - ENTITYEntity
_GET_ENTITY_PICKUP
``` GET_ENTITY_* Seems to return the handle of the entity's portable pickup. NativeDB Introduced: v1180 ```
0x1F922734E259BD26 - ENTITYfloat
GET_ENTITY_PITCH
Description not yet documented
0xD45DC2893621E1FE - ENTITYint
GET_ENTITY_POPULATION_TYPE
A population type, from the following enum: https://alloc8or.re/gta5/doc/enums/ePopulationType.txt
0xF6F5161F4534EDFF - ENTITYBOOL
_GET_ENTITY_PROOFS
``` NativeDB Introduced: v1604 ```
0xBE8CD9BE829BBEBF - ENTITYvoid
GET_ENTITY_QUATERNION
``` w is the correct parameter name! ```
0x7B3703D2D32DFA18 - ENTITYfloat
GET_ENTITY_ROLL
``` Displays the current ROLL axis of the entity [-180.0000/180.0000+] (Sideways Roll) such as a vehicle tipped on its side ```
0x831E0242595560DF - ENTITYVector3
GET_ENTITY_ROTATION
**NOTE**: What you use for rotationOrder when getting must be the same as rotationOrder when setting the rotation. ```cpp enum eRotationOrder { // Rotate around the z-axis, then the y-axis and finally the x-axis. ROT_ZYX = 0, // Rotate around the y-axis, then the z-axis and finally the x-axis. ROT_YZX = 1, // Rotate around the z-axis, then the x-axis and finally the y-axis. ROT_ZXY = 2, // Rotate around the x-axis, then the z-axis and finally the y-axis. ROT_XZY = 3, // Rotate around the y-axis, then the x-axis and finally the z-axis. ROT_YXZ = 4, // Rotate around the x-axis, then the y-axis and finally the z-axis. ROT_XYZ = 5, } ```
0xAFBD61CC738D9EB9 - ENTITYVector3
GET_ENTITY_ROTATION_VELOCITY
Description not yet documented
0x213B91045D09B983 - ENTITYchar*
GET_ENTITY_SCRIPT
``` All ambient entities in-world seem to have the same value for the second argument (Any *script), depending on when the scripthook was activated/re-activated. I've seen numbers from ~5 to almost 70 when the value was translated with to_string. The function return value seems to always be 0. ```
0xA6E9C38DB51D7748 - ENTITYfloat
GET_ENTITY_SPEED
Get the speed of a entity.
0xD5037BA82E12416F - ENTITYVector3
GET_ENTITY_SPEED_VECTOR
``` Relative can be used for getting speed relative to the frame of the vehicle, to determine for example, if you are going in reverse (-y speed) or not (+y speed). ```
0x9A8D700A51CB7B0D - ENTITYfloat
GET_ENTITY_SUBMERGED_LEVEL
``` Get how much of the entity is submerged. 1.0f is whole entity. ```
0xE81AFC1BC4CC41CE - ENTITYint
GET_ENTITY_TYPE
``` Returns: 0 = no entity 1 = ped 2 = vehicle 3 = object ```
0x8ACD366038D14505 - ENTITYfloat
GET_ENTITY_UPRIGHT_VALUE
Description not yet documented
0x95EED5A694951F9F - ENTITYVector3
GET_ENTITY_VELOCITY
Description not yet documented
0x4805D2B1D8CF94A9 - ENTITYHash
GET_LAST_MATERIAL_HIT_BY_ENTITY
Description not yet documented
0x5C3D0A935F535C4C - ENTITYPlayer
GET_NEAREST_PLAYER_TO_ENTITY
Description not yet documented
0x7196842CB375CDB3 - ENTITYPlayer
GET_NEAREST_PLAYER_TO_ENTITY_ON_TEAM
Description not yet documented
0x4DC9A62F844D9337 - ENTITYObject
GET_OBJECT_INDEX_FROM_ENTITY_INDEX
``` Simply returns whatever is passed to it (Regardless of whether the handle is valid or not). ```
0xD7E3B9735C0F89D6 - ENTITYVector3
GET_OFFSET_FROM_ENTITY_GIVEN_WORLD_COORDS
``` Converts world coords (posX - Z) to coords relative to the entity Example: posX = 50 posY = 1000 posZ = 60 Entity's coords are: x=30, y=1000, z=60. All three returned coords will then be in range of [-20,20] depending on rotation of the entity. ```
0x2274BC1C4885E333
A living reference. Documentation coverage varies by native and source.