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
- VEHICLEvoid
ATTACH_ENTITY_TO_CARGOBOB
Description not yet documented
0xA1DD82F3CCF9A01E - VEHICLEvoid
ATTACH_VEHICLE_ON_TO_TRAILER
Description not yet documented
0x16B5E274BDE402F8 - VEHICLEvoid
ATTACH_VEHICLE_TO_CARGOBOB
Description not yet documented
0x4127F1D84E347769 - VEHICLEvoid
ATTACH_VEHICLE_TO_TOW_TRUCK
``` HookOffset defines where the hook is attached. leave at 0 for default attachment. ```
0x29A16F8D621C4508 - VEHICLEvoid
ATTACH_VEHICLE_TO_TRAILER
Description not yet documented
0x3C7D42D58F770B54 - VEHICLEvoid
BRING_VEHICLE_TO_HALT
This native makes the vehicle stop immediately, as it happens when we enter a multiplayer garage.
0x260BE8F09E326A20 - VEHICLEBOOL
CAN_ANCHOR_BOAT_HERE
Checks if a boat can be anchored at its present position without possibly intersecting collision later. ``` NativeDB Introduced: v323 ```
0x26C10ECBDA5D043B - VEHICLEBOOL
CAN_ANCHOR_BOAT_HERE_IGNORE_PLAYERS
Checks if a boat can be anchored at its present position, ignoring any players standing on the boat. ``` NativeDB Introduced: v678 ```
0x24F4121D07579880 - VEHICLEBOOL
CAN_CARGOBOB_PICK_UP_ENTITY
Determines whether the specified Cargobob can pick up a given entity.
0x2C1D8B3B19E517CC - VEHICLEBOOL
CAN_SHUFFLE_SEAT
Description not yet documented
0x30785D90C956BF35 - VEHICLEvoid
CLEAR_LAST_DRIVEN_VEHICLE
Description not yet documented
0xE01903C47C7AC89E - VEHICLEvoid
CLEAR_NITROUS
``` NativeDB Introduced: 3095 ``` Resets or clears the nitrous system for a specified vehicle. You can check if a vehicle has nitrous with [`IS_NITROUS_ACTIVE`](#\_0x491E822B2C464FE4)
0xC889AE921400E1ED - VEHICLEvoid
CLEAR_VEHICLE_CUSTOM_PRIMARY_COLOUR
Description not yet documented
0x55E1D2758F34E437 - VEHICLEvoid
CLEAR_VEHICLE_CUSTOM_SECONDARY_COLOUR
Description not yet documented
0x5FFBDEEC3E8E2009 - VEHICLEvoid
CLEAR_VEHICLE_GENERATOR_AREA_OF_INTEREST
Removes the cargen area of interest and resumes normal cargen spawning. You can set the area of interest with [`SET_VEHICLE_GENERATOR_AREA_OF_INTEREST`](#\_0x9A75585FB2E54FAD)
0x0A436B8643716D14 - VEHICLEvoid
_CLEAR_VEHICLE_PHONE_EXPLOSIVE_DEVICE
Description not yet documented
0xAA3F739ABDDCF21F - VEHICLEvoid
CLEAR_VEHICLE_ROUTE_HISTORY
Description not yet documented
0x6D6AF961B72728AE - VEHICLEvoid
CLOSE_BOMB_BAY_DOORS
Description not yet documented
0x3556041742A0DC74 - VEHICLEvoid
CONTROL_LANDING_GEAR
``` Works for vehicles with a retractable landing gear landing gear states: 0: Deployed 1: Closing 2: Opening 3: Retracted ```
0xCFC8BE9A5E1FE575 - VEHICLEvoid
COPY_VEHICLE_DAMAGES
Copies sourceVehicle's damage (broken bumpers, broken lights, etc.) to targetVehicle.
0xE44A982368A4AF23 - VEHICLEVehicle
CREATE_MISSION_TRAIN
Train models must be [requested](#\_0x963D27A58DF860AC) before use. See trains.xml (located in `Grand Theft Auto V\update\update.rpf\common\data\levels\gta5\trains.xml`) for freight and metro variations. Model names to request can be found by searching `model_name` in the file. The `Lua` usage example provided down below has been provided in such way so users can test each and every train variation. ### Newly added parameters (seen in 2372 build) ``` NativeDB Added Parameter 6: BOOL isNetwork NativeDB Added Parameter 7: BOOL netMissionEntity ``` * **isNetwork**: Whether to create a network object for the train. If false, the train exists only locally. * **netMissionEntity**: Whether to register the train as pinned to the script host in the R\* network model. ### Train Models: * freight ### Carriage Models: * freightcar * freightcar2 (Added v2372) * freightcont1 * freightcont2 * freightgrain * metrotrain * tankercar ### Some train variations (default from trains.xml as of build 2372) * 17. Very long train and freight variation. * 18. Freight train only. * 26. Double metro train (with both models flipped opposite to each other). This used to be `25` before the 2802 build, it also used to be `24` before the 2372 build.
0x63C6CCA8E68AE8C8 - VEHICLEvoid
CREATE_PICK_UP_ROPE_FOR_CARGOBOB
Drops the Hook/Magnet on a cargobob ```cpp enum eCargobobHook { CARGOBOB_HOOK = 0, CARGOBOB_MAGNET = 1, }; ```
0x7BEB0C7A235F6F3B - VEHICLEint
CREATE_SCRIPT_VEHICLE_GENERATOR
``` Creates a script vehicle generator at the given coordinates. Most parameters after the model hash are unknown. Parameters: a/w/s - Generator position heading - Generator heading p4 - Unknown (always 5.0) p5 - Unknown (always 3.0) modelHash - Vehicle model hash p7/8/9/10 - Unknown (always -1) p11 - Unknown (usually TRUE, only one instance of FALSE) p12/13 - Unknown (always FALSE) p14 - Unknown (usally FALSE, only two instances of TRUE) p15 - Unknown (always TRUE) p16 - Unknown (always -1) Vector3 coords = GET_ENTITY_COORDS(PLAYER_PED_ID(), 0); CREATE_SCRIPT_VEHICLE_GENERATOR(coords.x, coords.y, coords.z, 1.0f, 5.0f, 3.0f, GET_HASH_KEY("adder"), -1. -1, -1, -1, -1, true, false, false, false, true, -1); ```
0x9DEF883114668116 - VEHICLEVehicle
CREATE_VEHICLE
Creates a vehicle with the specified model at the specified position. This vehicle will initially be owned by the creating script as a mission entity, and the model should be loaded already (e.g. using REQUEST_MODEL). ``` NativeDB Added Parameter 8: BOOL p7 ```
0xAF35D0D2583051B0 - VEHICLEvoid
DELETE_ALL_TRAINS
Description not yet documented
0x736A718577F39C7D - VEHICLEvoid
DELETE_MISSION_TRAIN
Used to delete mission trains created with [`CREATE_MISSION_TRAIN`](#\_0x63C6CCA8E68AE8C8).
0x5B76B14AE875C795 - VEHICLEvoid
DELETE_SCRIPT_VEHICLE_GENERATOR
Removes a scripted vehicle generator.
0x22102C9ABFCF125D - VEHICLEvoid
DELETE_VEHICLE
``` Deletes a vehicle. The vehicle must be a mission entity to delete, so call this before deleting: SET_ENTITY_AS_MISSION_ENTITY(vehicle, true, true); eg how to use: SET_ENTITY_AS_MISSION_ENTITY(vehicle, true, true); DELETE_VEHICLE(&vehicle); Deletes the specified vehicle, then sets the handle pointed to by the pointer to NULL. ```
0xEA386986E786A54F - VEHICLEvoid
DETACH_CONTAINER_FROM_HANDLER_FRAME
Description not yet documented
0x7C0043FDFF6436BC - VEHICLEAny
DETACH_ENTITY_FROM_CARGOBOB
Detaches the specified entity currently being carried by a Cargobob.
0xAF03011701811146 - VEHICLEBOOL
DETACH_VEHICLE_FROM_ANY_CARGOBOB
Description not yet documented
0xADF7BE450512C12F - VEHICLEBOOL
DETACH_VEHICLE_FROM_ANY_TOW_TRUCK
Description not yet documented
0xD0E9CE05A1E68CD8 - VEHICLEvoid
DETACH_VEHICLE_FROM_CARGOBOB
Description not yet documented
0x0E21D3DF1051399D - VEHICLEvoid
DETACH_VEHICLE_FROM_TOW_TRUCK
``` First two parameters swapped. Scripts verify that towTruck is the first parameter, not the second. ```
0xC2DB6B6708350ED8 - VEHICLEvoid
DETACH_VEHICLE_FROM_TRAILER
Description not yet documented
0x90532EDF0D2BDD86 - VEHICLEvoid
DETONATE_VEHICLE_PHONE_EXPLOSIVE_DEVICE
Description not yet documented
0xEF49CF0270307CBE - VEHICLEvoid
DISABLE_INDIVIDUAL_PLANE_PROPELLER
``` NativeDB Introduced: v323 ```
0x500873A45724C863 - VEHICLEvoid
DISABLE_PLANE_AILERON
Description not yet documented
0x23428FC53C60919C - VEHICLEvoid
_DISABLE_VEHICLE_NEON_LIGHTS
Description not yet documented
0x83F813570FF519DE - VEHICLEvoid
_DISABLE_VEHICLE_TURRET_MOVEMENT_THIS_FRAME
Description not yet documented
0x32CAEDF24A583345
A living reference. Documentation coverage varies by native and source.