The RedM 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 / RedM
Native reference
- CFXlong
CREATE_RUNTIME_TEXTURE_FROM_DUI_HANDLE
Creates a runtime texture from a DUI handle.
0xB135472B - CFXlong
CREATE_RUNTIME_TEXTURE_FROM_IMAGE
Creates a runtime texture from the specified file in the current resource or a base64 data URL.
0x786D8BC3 - CFXlong
CREATE_RUNTIME_TXD
Creates a runtime texture dictionary with the specified name. Example: ```lua local txd = CreateRuntimeTxd('meow') ```
0x1F3AC778 - CFXint
CREATE_TIMECYCLE_MODIFIER
Create a clean timecycle modifier. See [`SET_TIMECYCLE_MODIFIER_VAR`](#\_0x6E0A422B) to add variables.
0x70FA2AFA - CFXEntity
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 ``` **This is the server-side RPC native equivalent of the client native [CREATE_VEHICLE](?\_0xAF35D0D2583051B0).**
0xDD75460A - CFXVehicle
CREATE_VEHICLE_SERVER_SETTER
Equivalent to CREATE_VEHICLE, but it uses 'server setter' logic (like the former CREATE_AUTOMOBILE) as a workaround for reliability concerns regarding entity creation RPC. Unlike CREATE_AUTOMOBILE, this supports other vehicle types as well.
0x6AE51D4B - CFXvoid
DELETE_ENTITY
Deletes the specified entity. **NOTE**: For trains this will only work if called on the train engine, it will not work on its carriages.
0xFAA3D236 - CFXvoid
DELETE_FUNCTION_REFERENCE
Description not yet documented
0x1E86F206 - CFXvoid
DELETE_RESOURCE_KVP
Description not yet documented
0x7389B5DF - CFXvoid
DELETE_RESOURCE_KVP_NO_SYNC
Nonsynchronous [DELETE_RESOURCE_KVP](#\_0x7389B5DF) operation; see [FLUSH_RESOURCE_KVP](#\_0x5240DA5A).
0x4152C90 - CFXvoid
DELETE_TRAIN
Deletes the specified `entity` and any carriage its attached to, or that is attached to it.
0x523BA3DA - CFXvoid
DESTROY_DUI
Destroys a DUI browser.
0xA085CB10 - CFXvoid
DISABLE_EDITOR_RUNTIME
Disables the editor runtime mode, changing game behavior to not track entity metadata. This function supports SDK infrastructure and is not intended to be used directly from your code.
0xB1622B17 - CFXvoid
DISABLE_IDLE_CAMERA
Disables the game's afk camera that starts panning around after 30 seconds of inactivity.
0x3D5AB7F0 - CFXBOOL
DISABLE_RAW_KEY_THIS_FRAME
Disables the specified `rawKeyIndex`, making it not trigger the regular `IS_RAW_KEY_*` natives. Virtual key codes can be found [here](https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes)
0x8BCF0014 - CFXvoid
DISABLE_VEHICLE_PASSENGER_IDLE_CAMERA
Disables the game's afk camera that starts panning around after 30 seconds of inactivity(While riding in a car as a passenger)
0x5C140555 - CFXvoid
DISABLE_WORLDHORIZON_RENDERING
Disables the game's world horizon lods rendering (see `farlods.#dd`). Using the island hopper natives might also affect this state.
0xA9C92CDC - CFXbool
DOES_BOAT_SINK_WHEN_WRECKED
Description not yet documented
0x43F15989 - CFXBOOL
DOES_ENTITY_EXIST
Description not yet documented
0x3AC90869 - CFXBOOL
DOES_PLAYER_EXIST
Returns whether or not the player exists
0x12038599 - CFXBOOL
DOES_PLAYER_OWN_SKU
Requests whether or not the player owns the specified SKU.
0x167ABA27 - CFXBOOL
DOES_PLAYER_OWN_SKU_EXT
Requests whether or not the player owns the specified package.
0xDEF0480B - CFXbool
DOES_TEXTURE_EXIST
In compare to `0x31DC8D3F216D8509` return true if texture its created when `0x31DC8D3F216D8509` return true if you put there any id in valid range
0x8B25BC20 - CFXBOOL
DOES_TIMECYCLE_MODIFIER_HAS_VAR
Description not yet documented
0xC53BB6D3 - CFXBOOL
DOES_TRAIN_STOP_AT_STATIONS
Description not yet documented
0x77CC80DC - CFXBOOL
DOES_VEHICLE_USE_FUEL
Checks whether the vehicle consumes fuel. The check is done based on petrol tank volume and vehicle type. Bicycles and vehicles with petrol tank volume equal to zero (only bicycles by default) do not use fuel. All other vehicles do. You can customize petrol tank volume using [`SET_HANDLING_FLOAT`](#\_0x90DD01C)/[`SET_VEHICLE_HANDLING_FLOAT`](#\_0x488C86D2) natives with `fieldName` equal to `fPetrolTankVolume`.
0xEF30A696 - CFXobject
DOOR_SYSTEM_GET_ACTIVE
Returns a list of door system entries: a door system hash (see [ADD_DOOR_TO_SYSTEM](#\_0x6F8838D03D1DC226)) and its object handle. The data returned adheres to the following layout: ``` [{doorHash1, doorHandle1}, ..., {doorHashN, doorHandleN}] ```
0xF65BBA4B - CFXint
DOOR_SYSTEM_GET_SIZE
Description not yet documented
0x237613B3 - CFXvoid
DRAW_BOX
Description not yet documented
0xCD4D9DD5 - CFXvoid
DRAW_CORONA
Allows drawing advanced light effects, known as coronas, which support flares, volumetric lighting, and customizable glow properties.
0xFF44780E - CFXBOOL
DRAW_GIZMO
Draws a gizmo. This function supports SDK infrastructure and is not intended to be used directly from your code. This should be used from JavaScript or another language supporting mutable buffers like ArrayBuffer. Matrix layout is as follows: * Element \[0], \[1] and \[2] should represent the right vector. * Element \[4], \[5] and \[6] should represent the forward vector. * Element \[8], \[9] and \[10] should represent the up vector. * Element \[12], \[13] and \[14] should represent X, Y and Z translation coordinates. * All other elements should be \[0, 0, 0, 1].
0xEB2EDCA2 - CFXvoid
DRAW_GLOW_SPHERE
Draw a glow sphere this frame. Up to 256 per single frame.
0xBD25EC89 - CFXvoid
DRAW_LINE
Description not yet documented
0xB3426BCC - CFXvoid
DRAW_LINE_2D
Like DRAW_RECT, but it's a line.
0xB856A90 - CFXvoid
DRAW_POLY
Description not yet documented
0xABD19253 - CFXvoid
DRAW_RECT_ROTATED
DRAW_RECT, but with a rotation. Seems to be broken.
0xEC37C168 - CFXvoid
DROP_PLAYER
Description not yet documented
0xBA0613E1 - CFXchar*
DUPLICATE_FUNCTION_REFERENCE
Description not yet documented
0xF4E2079D - CFXvoid
ENABLE_EDITOR_RUNTIME
Enables the editor runtime mode, changing game behavior to track entity metadata. This function supports SDK infrastructure and is not intended to be used directly from your code.
0xC383871D - CFXvoid
ENABLE_ENHANCED_HOST_SUPPORT
Description not yet documented
0xF97B1C93
A living reference. Documentation coverage varies by native and source.