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
- SHAPETESTint
GET_SHAPE_TEST_RESULT
Returns the result of a shape test. When used with an asynchronous shape test, this native should be looped until returning 0 or 2, after which the handle is invalidated. Unless the return value is 2, the other return values are undefined.
0x3D87450E15D98694 - SHAPETESTint
GET_SHAPE_TEST_RESULT_INCLUDING_MATERIAL
Returns the result of a shape test, also returning the material of any touched surface. When used with an asynchronous shape test, this native should be looped until returning 0 or 2, after which the handle is invalidated. Unless the return value is 2, the other return values are undefined.
0x65287525D951F6BE - SHAPETESTvoid
RELEASE_SCRIPT_GUID_FROM_ENTITY
Invalidates the entity handle passed by removing the fwScriptGuid from the entity. This should be used when receiving an ambient entity from shape testing natives, but can also be used for other natives returning an 'irrelevant' entity handle.
0x2B3334BCA57CD799 - SHAPETESTint
START_EXPENSIVE_SYNCHRONOUS_SHAPE_TEST_LOS_PROBE
Does the same as [START_SHAPE_TEST_LOS_PROBE](#\_0x7EE9F5D83DD4F90E), except blocking until the shape test completes. Use [START_SHAPE_TEST_LOS_PROBE](#\_0x7EE9F5D83DD4F90E) instead. Literally. Rockstar named this correctly: it's expensive, and it's synchronous.
0x377906D8A31E5586 - SHAPETESTint
START_SHAPE_TEST_BOUND
See [`START_SHAPE_TEST_LOS_PROBE`](#\_0x7EE9F5D83DD4F90E) for flags.
0x37181417CE7C8900 - SHAPETESTint
START_SHAPE_TEST_BOUNDING_BOX
See [`START_SHAPE_TEST_LOS_PROBE`](#\_0x7EE9F5D83DD4F90E) for flags.
0x052837721A854EC7 - SHAPETESTint
START_SHAPE_TEST_BOX
For more information, see [`START_EXPENSIVE_SYNCHRONOUS_SHAPE_TEST_LOS_PROBE`](#\_0x377906D8A31E5586) and [`START_SHAPE_TEST_LOS_PROBE`](#\_0x7EE9F5D83DD4F90E).
0xFE466162C4401D18 - SHAPETESTint
START_SHAPE_TEST_CAPSULE
Raycast from point to point, where the ray has a radius.
0x28579D1B8F8AAC80 - SHAPETESTint
START_SHAPE_TEST_LOS_PROBE
Asynchronously starts a line-of-sight (raycast) world probe shape test. ```cpp enum eTraceFlags { None = 0, IntersectWorld = 1, IntersectVehicles = 2, IntersectPeds = 4, IntersectRagdolls = 8, IntersectObjects = 16, IntersectPickup = 32, IntersectGlass = 64, IntersectRiver = 128, IntersectFoliage = 256, IntersectEverything = 511 } ``` ```cpp enum eTraceOptionFlags { None = 0, OptionIgnoreGlass = 1, OptionIgnoreSeeThrough = 2, OptionIgnoreNoCollision = 4, OptionDefault = 7 } ``` NOTE: Raycasts that intersect with mission_entites (flag = 2) has limited range and will not register for far away entites. The range seems to be about 30 metres. Use the handle with [GET_SHAPE_TEST_RESULT](#\_0x3D87450E15D98694) or [GET_SHAPE_TEST_RESULT_INCLUDING_MATERIAL](#\_0x65287525D951F6BE) until it returns 0 or 2.
0x7EE9F5D83DD4F90E - SHAPETESTint
_START_SHAPE_TEST_SURROUNDING_COORDS
Since it is only used in the PC version, likely some mouse-friendly shape test. Uses **in** vector arguments. Asynchronous. ``` it returns a ShapeTest handle that can be used with GET_SHAPE_TEST_RESULT. In its only usage in game scripts its called with flag set to 511, entity to player_ped_id and flag2 set to 7 ``` See [`START_SHAPE_TEST_LOS_PROBE`](#\_0x7EE9F5D83DD4F90E) for flags.
0xFF6BE494C7987F34 - SHAPETESTint
START_SHAPE_TEST_SWEPT_SPHERE
Performs the same type of trace as START_SHAPE_TEST_CAPSULE, but with some different hardcoded parameters.
0xE6AC6C45FBE83004
A living reference. Documentation coverage varies by native and source.