From the reference libraryRedM

CFX CFX Server Natives

natives/CFX/CFX_natives_cfx_server.md

CFX CFX Server Natives

ADD_AUTHORIZED_PARACHUTE_MODEL

Property Value
Native Name ADD_AUTHORIZED_PARACHUTE_MODEL
Hash 0x8AC7AE9
Return Type void
API Set client
Parameters modelNameHash (int)

Description: Adds the given model name hash to the list of valid models for the player ped's parachute.

Parameters

  • modelNameHash (int) — Name hash of the model to allow to be used for the player ped's parachute

ADD_AUDIO_SUBMIX_OUTPUT

Property Value
Native Name ADD_AUDIO_SUBMIX_OUTPUT
Hash 0xAC6E290D
Return Type void
API Set client
Parameters submixId (int), outputSubmixId (int)

Description: Adds an output for the specified audio submix.

Parameters

  • submixId (int) — The input submix.
  • outputSubmixId (int) — The output submix. Use 0 for the master game submix.

ADD_MINIMAP_OVERLAY

Property Value
Native Name ADD_MINIMAP_OVERLAY
Hash 0x4AFD2499
Return Type int
API Set client
Parameters name (char*)

Description: Loads a minimap overlay from a GFx file in the current resource.

If you need to control the depth of overlay use ADD_MINIMAP_OVERLAY_WITH_DEPTH.

Parameters

  • name (char*) — The path to a .gfx file in the current resource. It has to be specified as a file.

ADD_AUTHORIZED_PARACHUTE_PACK_MODEL

Property Value
Native Name ADD_AUTHORIZED_PARACHUTE_PACK_MODEL
Hash 0x2E86DEA5
Return Type void
API Set client
Parameters modelNameHash (int)

Description: Adds the given model name hash to the list of valid models for the player ped's parachute pack.

Parameters

  • modelNameHash (int) — Name hash of the model to allow to be used for the player ped's parachute pack

ACTIVATE_TIMECYCLE_EDITOR

Property Value
Native Name ACTIVATE_TIMECYCLE_EDITOR
Hash 0xEEB9B76A
Return Type void
API Set client

Description: Activates built-in timecycle editing tool.

ADD_HEALTH_CONFIG

Property Value
Native Name ADD_HEALTH_CONFIG
Hash 0x9CBFD5C1
Return Type void
API Set client
Parameters configName (char*), defaultHealth (float), defaultArmor (float), defaultEndurance (float), fatiguedHealthThreshold (float), injuredHealthThreshold (float), dyingHealthThreshold (float), hurtHealthThreshold (float), dogTakedownThreshold (float), writheFromBulletThreshold (float), meleeCardinalFatalAttack (BOOL), invincible (BOOL)

Description: Adds new health config.

Parameters

  • configName (char*) — Name of health config. Cannot be default game health config name.
  • defaultHealth (float) — Default health value.
  • defaultArmor (float) — Default armor value.
  • defaultEndurance (float)
  • fatiguedHealthThreshold (float) — Fatigued health threshold value.
  • injuredHealthThreshold (float) — Injured health threshold value.
  • dyingHealthThreshold (float) — Dying health threshold value.
  • hurtHealthThreshold (float) — Hurt health threshold value.
  • dogTakedownThreshold (float) — Dog takedown threshold value.
  • writheFromBulletThreshold (float) — Writhe from bulled threshold value.
  • meleeCardinalFatalAttack (BOOL) — Melee cardinal fatal attack check value.
  • invincible (BOOL) — Invincible value.

ADD_TEXT_ENTRY

Property Value
Native Name ADD_TEXT_ENTRY
Hash 0x32CA01C3
Return Type void
API Set client
Parameters entryKey (char*), entryText (char*)

ADD_CONVAR_CHANGE_LISTENER

Property Value
Native Name ADD_CONVAR_CHANGE_LISTENER
Hash 0xAB7F7241
Return Type int
API Set shared
Parameters conVarFilter (char*), handler (func)

Description: Adds a listener for Console Variable changes.

The function called expects to match the following signature:

function ConVarChangeListener(conVarName: string, reserved: any);
  • conVarName: The ConVar that changed.
  • reserved: Currently unused.

Parameters

  • conVarFilter (char*) — The Console Variable to listen for, this can be a pattern like "test:*", or null for any
  • handler (func) — The handler function.

Examples

// listen for all convar changes
AddConvarChangeListener(null, (conVarName, reserved) => {
    print(GetConvarInt(conVarName))
})

// listen to convars that start with "script:"
AddConvarChangeListener("script:*", (conVarName, reserved) => {
    print(GetConvarInt(conVarName))
})

ADD_REPLACE_TEXTURE

Property Value
Native Name ADD_REPLACE_TEXTURE
Hash 0xA66F8F75
Return Type void
API Set client
Parameters origTxd (char*), origTxn (char*), newTxd (char*), newTxn (char*)

Description: Experimental natives, please do not use in a live environment.

ADD_MINIMAP_OVERLAY_WITH_DEPTH

Property Value
Native Name ADD_MINIMAP_OVERLAY_WITH_DEPTH
Hash 0xED0935B5
Return Type int
API Set client
Parameters name (char*), depth (int)

Description: Loads a minimap overlay from a GFx file in the current resource.

Parameters

  • name (char*) — The path to a .gfx file in the current resource. It has to be specified as a file.
  • depth (int) — The depth of new overlay on the minimap. Pass -1 for game to figure out the highest depth itself. Should not be greater than 0x7EFFFFFD.

CREATE_AUDIO_SUBMIX

Property Value
Native Name CREATE_AUDIO_SUBMIX
Hash 0x658D2BC8
Return Type int
API Set client
Parameters name (char*)

Description: Creates an audio submix with the specified name, or gets the existing audio submix by that name.

Parameters

  • name (char*) — The audio submix name.

CALL_MINIMAP_SCALEFORM_FUNCTION

Property Value
Native Name CALL_MINIMAP_SCALEFORM_FUNCTION
Hash 0x4C89C0ED
Return Type BOOL
API Set client
Parameters miniMap (int), fnName (char*)

Description: This is similar to the PushScaleformMovieFunction natives, except it calls in the TIMELINE of a minimap overlay.

Parameters

  • miniMap (int) — The minimap overlay ID.
  • fnName (char*) — A function in the overlay's TIMELINE.

CANCEL_EVENT

Property Value
Native Name CANCEL_EVENT
Hash 0xFA29D35D
Return Type void
API Set shared

Description: Cancels the currently executing event.

ADD_STATE_BAG_CHANGE_HANDLER

Property Value
Native Name ADD_STATE_BAG_CHANGE_HANDLER
Hash 0x5BA35AAF
Return Type int
API Set shared
Parameters keyFilter (char*), bagFilter (char*), handler (func)

Description: Adds a handler for changes to a state bag.

The function called expects to match the following signature:

function StateBagChangeHandler(bagName: string, key: string, value: any, reserved: number, replicated: boolean);
  • bagName: The internal bag ID for the state bag which changed. This is usually player:Source, entity:NetID or localEntity:Handle.
  • key: The changed key.
  • value: The new value stored at key. The old value is still stored in the state bag at the time this callback executes.
  • reserved: Currently unused.
  • replicated: Whether the set is meant to be replicated.

At this time, the change handler can't opt to reject changes.

If bagName refers to an entity, use GET_ENTITY_FROM_STATE_BAG_NAME to get the entity handle If bagName refers to a player, use GET_PLAYER_FROM_STATE_BAG_NAME to get the player handle

Parameters

  • keyFilter (char*) — The key to check for, or null for no filter.
  • bagFilter (char*) — The bag ID to check for such as entity:65535, or null for no filter.
  • handler (func) — The handler function.

Examples

AddStateBagChangeHandler("blockTasks", null, async (bagName, key, value /* boolean */) => {
    let entity = GetEntityFromStateBagName(bagName);
    // Whoops, we don't have a valid entity!
    if (entity === 0) return;
    // We don't want to freeze the entity position if the entity collision hasn't loaded yet
    while (!HasCollisionLoadedAroundEntity(entity)) {
        // The entity went out of our scope before the collision loaded
        if (!DoesEntityExist(entity)) return;
        await Delay(250);
    }
    SetEntityInvincible(entity, value)
    FreezeEntityPosition(entity, value)
    TaskSetBlockingOfNonTemporaryEvents(entity, value)
})
AddStateBagChangeHandler("blockTasks", nil, function(bagName, key, value) 
    local entity = GetEntityFromStateBagName(bagName)
    -- Whoops, we don't have a valid entity!
    if entity == 0 then return end
    -- We don't want to freeze the entity position if the entity collision hasn't loaded yet
    while not HasCollisionLoadedAroundEntity(entity) do
        -- The entity went out of our scope before the collision loaded
        if not DoesEntityExist(entity) then return end
        Wait(250)
    end
    SetEntityInvincible(entity, value)
    FreezeEntityPosition(entity, value)
    TaskSetBlockingOfNonTemporaryEvents(entity, value)
end)
AddStateBagChangeHandler("blockTasks", null,
    new Action<string, string, object, int, bool>
    (async (bagName, key, value, res, rep) =>
    {
        bool val = (bool)value;

        var entity = GetEntityFromStateBagName(bagName);
        //-- Whoops, we don't have a valid entity!
        if (entity == 0) return;
        //-- We don't want to freeze the entity position if the entity collision hasn't loaded yet
        while (!HasCollisionLoadedAroundEntity(entity))
        {
            //--The entity went out of our scope before the collision loaded
            if (!DoesEntityExist(entity)) return;

            await Delay(250);
        }
        SetEntityInvincible(entity, val);
        FreezeEntityPosition(entity, val);
        TaskSetBlockingOfNonTemporaryEvents(entity, val);
    }));

BREAK_OFF_VEHICLE_WHEEL

Property Value
Native Name BREAK_OFF_VEHICLE_WHEEL
Hash 0xA274CADB
Return Type void
API Set client
Parameters vehicle (Vehicle), wheelIndex (int), leaveDebrisTrail (BOOL), deleteWheel (BOOL), unknownFlag (BOOL), putOnFire (BOOL)

Description: Break off vehicle wheel by index. The leaveDebrisTrail flag requires putOnFire to be true.

Parameters

  • vehicle (Vehicle) — The vehicle handle.
  • wheelIndex (int) — The wheel index.
  • leaveDebrisTrail (BOOL) — Start "veh_debris_trail" ptfx.
  • deleteWheel (BOOL) — True to delete wheel, otherwise detach.
  • unknownFlag (BOOL) — Unknown flag.
  • putOnFire (BOOL) — Set wheel on fire once detached.

Examples

local vehicle = GetVehiclePedIsIn(PlayerPedId())

if DoesEntityExist(vehicle) then
  for i = 0, 3 do
    BreakOffVehicleWheel(vehicle, i, true, false, true, false)
  end
end

APPLY_WEATHER_CYCLES

Property Value
Native Name APPLY_WEATHER_CYCLES
Hash 0x3422291C
Return Type BOOL
API Set client
Parameters numEntries (int), msPerCycle (int)

Parameters

  • numEntries (int) — The number of cycle entries. Must be between 1 and 256
  • msPerCycle (int) — The duration in milliseconds of each cycle. Must be between 1000 and 86400000 (24 hours)

Examples

-- Cycle between XMAS weather for 30 seconds (3 * 10000 milliseconds), and SMOG weather for 20 seconds (2 * 10000 milliseconds)
local success = SetWeatherCycleEntry(0, "XMAS", 3) and
                SetWeatherCycleEntry(1, "SMOG", 2) and
                ApplyWeatherCycles(2, 10000)

CAN_PLAYER_START_COMMERCE_SESSION

Property Value
Native Name CAN_PLAYER_START_COMMERCE_SESSION
Hash 0x429461C3
Return Type BOOL
API Set server
Parameters playerSrc (char*)

Description: Returns whether or not the specified player has enough information to start a commerce session for.

Parameters

  • playerSrc (char*) — The player handle

CLONE_TIMECYCLE_MODIFIER

Property Value
Native Name CLONE_TIMECYCLE_MODIFIER
Hash 0x54D636B3
Return Type int
API Set client
Parameters sourceModifierName (char*), clonedModifierName (char*)

Parameters

  • sourceModifierName (char*) — The source timecycle name.
  • clonedModifierName (char*) — The clone timecycle name, must be unique.

Examples

local sourceName = "underwater"
local cloneName = "my_awesome_timecycle"

local clonedIndex = CloneTimecycleModifier(sourceName, cloneName)
if clonedIndex ~= -1 then
  SetTimecycleModifier(cloneName)
end

IS_HELI_TAIL_BOOM_BREAKABLE

Property Value
Native Name IS_HELI_TAIL_BOOM_BREAKABLE
Hash 0x23E46BD7
Return Type BOOL
API Set server
Parameters heli (Vehicle)

Description: This is a getter for SET_HELI_TAIL_EXPLODE_THROW_DASHBOARD

Parameters

  • heli (Vehicle) — The helicopter to check

ADD_TEXT_ENTRY_BY_HASH

Property Value
Native Name ADD_TEXT_ENTRY_BY_HASH
Hash 0x289DA860
Return Type void
API Set client
Parameters entryKey (Hash), entryText (char*)

CLEAR_DRAW_ORIGIN

Property Value
Native Name CLEAR_DRAW_ORIGIN
Hash 0xDD76B263
Return Type void
API Set client

Description: Resets the screen's draw-origin which was changed by the function SET_DRAW_ORIGIN back to x=0, y=0. See SET_DRAW_ORIGIN for further information.

CREATE_RUNTIME_TEXTURE_FROM_DUI_HANDLE

Property Value
Native Name CREATE_RUNTIME_TEXTURE_FROM_DUI_HANDLE
Hash 0xB135472B
Return Type long
API Set client
Parameters txd (long), txn (char*), duiHandle (char*)

Description: Creates a runtime texture from a DUI handle.

Parameters

  • txd (long) — A handle to the runtime TXD to create the runtime texture in.
  • txn (char*) — The name for the texture in the runtime texture dictionary.
  • duiHandle (char*) — The DUI handle returned from GET_DUI_HANDLE.

CLEAR_VEHICLE_XENON_LIGHTS_CUSTOM_COLOR

Property Value
Native Name CLEAR_VEHICLE_XENON_LIGHTS_CUSTOM_COLOR
Hash 0x2867ED8C
Return Type void
API Set client
Parameters vehicle (Vehicle)

Description: Removes vehicle xenon lights custom RGB color.

Parameters

  • vehicle (Vehicle) — The vehicle handle.

COMMIT_RUNTIME_TEXTURE

Property Value
Native Name COMMIT_RUNTIME_TEXTURE
Hash 0x19D81F4E
Return Type void
API Set client
Parameters tex (long)

Description: Commits the backing pixels to the specified runtime texture.

Parameters

  • tex (long) — The runtime texture handle.

CREATE_DRY_VOLUME

Property Value
Native Name CREATE_DRY_VOLUME
Hash 0xEB1C6DD
Return Type int
API Set client
Parameters xMin (float), yMin (float), zMin (float), xMax (float), yMax (float), zMax (float)

Description: Creates a volume where water effects do not apply. Useful for preventing water collisions from flooding areas underneath them. This has no effect on waterquads, only water created from drawables and collisions. Don't create volumes when your local ped is swimming (e.g. use IS_PED_SWIMMING in your scripts before you call this)

Parameters

  • xMin (float) — The min X component of the AABB volume where water does not affect the player.
  • yMin (float) — The min Y component for the AABB volume.
  • zMin (float) — The min Z component for the AABB volume.
  • xMax (float) — The max X component for the AABB volume.
  • yMax (float) — The max Y component for the AABB volume.
  • zMax (float) — The max Z component for the AABB volume.

DOES_PLAYER_EXIST

Property Value
Native Name DOES_PLAYER_EXIST
Hash 0x12038599
Return Type BOOL
API Set server
Parameters playerSrc (char*)

Description: Returns whether or not the player exists

Examples

local deferralMessages = { "Isn't this just magical!", "We can defer all day!", "You'll get in eventually", "You're totally not going to sit here forever", "The Fruit Tree is a lie" }
AddEventHandler("playerConnecting", function(name, setKickReason, deferrals)
    local source = source
    deferrals.defer()

    Wait(0)


    local messageIndex = 0

    repeat
        Wait(2000)
        if messageIndex >= #deferralMessages then
            deferrals.done()
        else
            messageIndex = messageIndex + 1
        end
        deferrals.update(deferralMessages[messageIndex])
    until not DoesPlayerExist(source)
end)

CREATE_RUNTIME_TXD

Property Value
Native Name CREATE_RUNTIME_TXD
Hash 0x1F3AC778
Return Type long
API Set client
Parameters name (char*)

Description: Creates a runtime texture dictionary with the specified name. Example:

local txd = CreateRuntimeTxd('meow')

Parameters

  • name (char*) — The name for the runtime TXD.

CREATE_TIMECYCLE_MODIFIER

Property Value
Native Name CREATE_TIMECYCLE_MODIFIER
Hash 0x70FA2AFA
Return Type int
API Set client
Parameters modifierName (char*)

Description: Create a clean timecycle modifier. See SET_TIMECYCLE_MODIFIER_VAR to add variables.

Parameters

  • modifierName (char*) — The new timecycle name, must be unique.

Examples

local modifierName = "my_awesome_timecycle"
local createdIndex = CreateTimecycleModifier(modifierName)

if createdIndex ~= -1 then
  SetTimecycleModifier(modifierName)
end

DELETE_ENTITY

Property Value
Native Name DELETE_ENTITY
Hash 0xFAA3D236
Return Type void
API Set server
Parameters entity (Entity)

Description: Deletes the specified entity.

NOTE: For trains this will only work if called on the train engine, it will not work on its carriages.

Parameters

  • entity (Entity) — The entity to delete.

CREATE_DUI

Property Value
Native Name CREATE_DUI
Hash 0x23EAF899
Return Type long
API Set client
Parameters url (char*), width (int), height (int)

Description: Creates a DUI browser. This can be used to draw on a runtime texture using CREATE_RUNTIME_TEXTURE_FROM_DUI_HANDLE.

Parameters

  • url (char*) — The initial URL to load in the browser.
  • width (int) — The width of the backing surface.
  • height (int) — The height of the backing surface.

DISABLE_VEHICLE_PASSENGER_IDLE_CAMERA

Property Value
Native Name DISABLE_VEHICLE_PASSENGER_IDLE_CAMERA
Hash 0x5C140555
Return Type void
API Set client
Parameters state (BOOL)

Description: Disables the game's afk camera that starts panning around after 30 seconds of inactivity(While riding in a car as a passenger)

Parameters

  • state (BOOL) — On/Off

DELETE_FUNCTION_REFERENCE

Property Value
Native Name DELETE_FUNCTION_REFERENCE
Hash 0x1E86F206
Return Type void
API Set shared
Parameters referenceIdentity (char*)

CREATE_RUNTIME_TEXTURE

Property Value
Native Name CREATE_RUNTIME_TEXTURE
Hash 0xFEC3766D
Return Type long
API Set client
Parameters txd (long), txn (char*), width (int), height (int)

Description: Creates a blank runtime texture.

Parameters

  • txd (long) — A handle to the runtime TXD to create the runtime texture in.
  • txn (char*) — The name for the texture in the runtime texture dictionary.
  • width (int) — The width of the new texture.
  • height (int) — The height of the new texture.

CREATE_RUNTIME_TEXTURE_FROM_IMAGE

Property Value
Native Name CREATE_RUNTIME_TEXTURE_FROM_IMAGE
Hash 0x786D8BC3
Return Type long
API Set client
Parameters txd (long), txn (char*), fileName (char*)

Description: Creates a runtime texture from the specified file in the current resource or a base64 data URL.

Parameters

  • txd (long) — A handle to the runtime TXD to create the runtime texture in.
  • txn (char*) — The name for the texture in the runtime texture dictionary.
  • fileName (char*) — The file name of an image to load or a base64 data URL. This should preferably be a PNG, and has to be specified as a file in the resource manifest.

DOES_PLAYER_OWN_SKU

Property Value
Native Name DOES_PLAYER_OWN_SKU
Hash 0x167ABA27
Return Type BOOL
API Set server
Parameters playerSrc (char*), skuId (int)

Description: Requests whether or not the player owns the specified SKU.

Parameters

  • playerSrc (char*) — The player handle
  • skuId (int) — The ID of the SKU.

DESTROY_DUI

Property Value
Native Name DESTROY_DUI
Hash 0xA085CB10
Return Type void
API Set client
Parameters duiObject (long)

Description: Destroys a DUI browser.

Parameters

  • duiObject (long) — The DUI browser handle.

DELETE_TRAIN

Property Value
Native Name DELETE_TRAIN
Hash 0x523BA3DA
Return Type void
API Set server
Parameters entity (Entity)

Description: Deletes the specified entity and any carriage its attached to, or that is attached to it.

Parameters

  • entity (Entity) — The carriage to delete.

DISABLE_IDLE_CAMERA

Property Value
Native Name DISABLE_IDLE_CAMERA
Hash 0x3D5AB7F0
Return Type void
API Set client
Parameters state (BOOL)

Description: Disables the game's afk camera that starts panning around after 30 seconds of inactivity.

Parameters

  • state (BOOL) — On/Off

DISABLE_RAW_KEY_THIS_FRAME

Property Value
Native Name DISABLE_RAW_KEY_THIS_FRAME
Hash 0x8BCF0014
Return Type BOOL
API Set client
Parameters rawKeyIndex (int)

Description: Disables the specified rawKeyIndex, making it not trigger the regular IS_RAW_KEY_* natives.

Virtual key codes can be found here

Parameters

  • rawKeyIndex (int) — Index of raw key from keyboard.

Examples

local KEY_SPACE = 32
DisableRawKeyThisFrame(KEY_SPACE)
-- This will not get triggered this frame
if IsRawKeyDown(KEY_SPACE) then
	print("unreachable :(")
end
-- this will get triggered
if IsDisabledRawKeyDown(KEY_SPACE) then
    print("Spacebar is down")
end

DOES_TIMECYCLE_MODIFIER_HAS_VAR

Property Value
Native Name DOES_TIMECYCLE_MODIFIER_HAS_VAR
Hash 0xC53BB6D3
Return Type BOOL
API Set client
Parameters modifierName (char*), varName (char*)

Parameters

  • modifierName (char*) — The name of timecycle modifier.
  • varName (char*) — The name of timecycle variable.

Examples

local modifierName = "superDARK"
local varName = "postfx_noise"

if DoesTimecycleModifierHasVar(modifierName, varName) then
  local success, value1, value2 = GetTimecycleModifierVar(modifierName, varName)

  if success then
    print(string.format("[%s] removed var %s with values: %f %f", modifierName, varName, value1, value2))
    RemoveTimecycleModifierVar(modifierName, varName)
  end
else
    SetTimecycleModifierVar(modifierName, varName, 1.0, 1.0)
    print(string.format("[%s] created var %s", modifierName, varName))
end

DOES_TRAIN_STOP_AT_STATIONS

Property Value
Native Name DOES_TRAIN_STOP_AT_STATIONS
Hash 0x77CC80DC
Return Type BOOL
API Set shared
Parameters train (Vehicle)

Parameters

  • train (Vehicle) — The train handle

DOES_VEHICLE_USE_FUEL

Property Value
Native Name DOES_VEHICLE_USE_FUEL
Hash 0xEF30A696
Return Type BOOL
API Set client
Parameters vehicle (Vehicle)

Description: 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/SET_VEHICLE_HANDLING_FLOAT natives with fieldName equal to fPetrolTankVolume.

Parameters

  • vehicle (Vehicle) — The vehicle handle.

DOES_ENTITY_EXIST

Property Value
Native Name DOES_ENTITY_EXIST
Hash 0x3AC90869
Return Type BOOL
API Set server
Parameters entity (Object)

DISABLE_WORLDHORIZON_RENDERING

Property Value
Native Name DISABLE_WORLDHORIZON_RENDERING
Hash 0xA9C92CDC
Return Type void
API Set client
Parameters state (BOOL)

Description: Disables the game's world horizon lods rendering (see farlods.#dd). Using the island hopper natives might also affect this state.

Parameters

  • state (BOOL) — On/Off

DOES_BOAT_SINK_WHEN_WRECKED

Property Value
Native Name DOES_BOAT_SINK_WHEN_WRECKED
Hash 0x43F15989
Return Type bool
API Set server
Parameters vehicle (Vehicle)

Parameters

  • vehicle (Vehicle) — The target vehicle.

DRAW_POLY

Property Value
Native Name DRAW_POLY
Hash 0xABD19253
Return Type void
API Set client
Parameters x1 (float), y1 (float), z1 (float), x2 (float), y2 (float), z2 (float), x3 (float), y3 (float), z3 (float), red (int), green (int), blue (int), alpha (int)

DOOR_SYSTEM_GET_ACTIVE

Property Value
Native Name DOOR_SYSTEM_GET_ACTIVE
Hash 0xF65BBA4B
Return Type object
API Set client

Description: Returns a list of door system entries: a door system hash (see ADD_DOOR_TO_SYSTEM) and its object handle.

The data returned adheres to the following layout:

[{doorHash1, doorHandle1}, ..., {doorHashN, doorHandleN}]

DOES_PLAYER_OWN_SKU_EXT

Property Value
Native Name DOES_PLAYER_OWN_SKU_EXT
Hash 0xDEF0480B
Return Type BOOL
API Set server
Parameters playerSrc (char*), skuId (int)

Description: Requests whether or not the player owns the specified package.

Parameters

  • playerSrc (char*) — The player handle
  • skuId (int) — The package ID on Tebex.

DOES_TEXTURE_EXIST

Property Value
Native Name DOES_TEXTURE_EXIST
Hash 0x8B25BC20
Return Type bool
API Set client
Parameters textureId (int)

Description: In compare to 0x31DC8D3F216D8509 return true if texture its created when 0x31DC8D3F216D8509 return true if you put there any id in valid range

Parameters

  • textureId (int) — texture id created by 0xC5E7204F322E49EB.

DRAW_LINE

Property Value
Native Name DRAW_LINE
Hash 0xB3426BCC
Return Type void
API Set client
Parameters x1 (float), y1 (float), z1 (float), x2 (float), y2 (float), z2 (float), red (int), green (int), blue (int), alpha (int)

DOOR_SYSTEM_GET_SIZE

Property Value
Native Name DOOR_SYSTEM_GET_SIZE
Hash 0x237613B3
Return Type int
API Set client

END_FIND_OBJECT

Property Value
Native Name END_FIND_OBJECT
Hash 0xDEDA4E50
Return Type void
API Set client
Parameters findHandle (int)

DRAW_BOX

Property Value
Native Name DRAW_BOX
Hash 0xCD4D9DD5
Return Type void
API Set client
Parameters x1 (float), y1 (float), z1 (float), x2 (float), y2 (float), z2 (float), red (int), green (int), blue (int), alpha (int)

FIND_FIRST_OBJECT

Property Value
Native Name FIND_FIRST_OBJECT
Hash 0xFAA6CB5D
Return Type int
API Set client
Parameters outEntity (Entity*)

DROP_PLAYER

Property Value
Native Name DROP_PLAYER
Hash 0xBA0613E1
Return Type void
API Set server
Parameters playerSrc (char*), reason (char*)

FIND_FIRST_PED

Property Value
Native Name FIND_FIRST_PED
Hash 0xFB012961
Return Type int
API Set client
Parameters outEntity (Entity*)

DRAW_CORONA

Property Value
Native Name DRAW_CORONA
Hash 0xFF44780E
Return Type void
API Set client
Parameters posX (float), posY (float), posZ (float), size (float), red (int), green (int), blue (int), alpha (int), intensity (float), zBias (float), dirX (float), dirY (float), dirZ (float), viewThreshold (float), innerAngle (float), outerAngle (float), flags (int)

Description: Allows drawing advanced light effects, known as coronas, which support flares, volumetric lighting, and customizable glow properties.

Parameters

  • posX (float) — The X position of the corona origin.
  • posY (float) — The Y position of the corona origin.
  • posZ (float) — The Z position of the corona origin.
  • size (float) — The size of the corona.
  • red (int) — The red component of the marker color, on a scale from 0-255.
  • green (int) — The green component of the marker color, on a scale from 0-255.
  • blue (int) — The blue component of the marker color, on a scale from 0-255.
  • alpha (int) — The alpha component of the marker color, on a scale from 0-255.
  • intensity (float) — The intensity of the corona.
  • zBias (float) — zBias slightly shifts the depth of surfaces to make sure they don’t overlap or cause visual glitches when they are very close together. The zBias value are usually in the range of 0.0 to 1.0.
  • dirX (float) — The X direction of the corona.
  • dirY (float) — The Y direction of the corona.
  • dirZ (float) — The Z direction of the corona.
  • viewThreshold (float) — The view threshold is to determine the fading of the corona based on the distance.
  • innerAngle (float) — The inner angle of the corona.
  • outerAngle (float) — The outer angle of the corona.
  • flags (int) — The corona flags.

Examples

local pedCoords = GetEntityCoords(PlayerPedId())
Citizen.CreateThread(function()
    while true do
        DrawCorona(pedCoords.x, pedCoords.y, pedCoords.z, 5.0, 255, 255, 255, 255, 4.0, 0.2, pedCoords.x, pedCoords.y, pedCoords.z, 1.0, 0.0, 90.0, 2)
        Wait(0)
    end
end)

DRAW_GLOW_SPHERE

Property Value
Native Name DRAW_GLOW_SPHERE
Hash 0xBD25EC89
Return Type void
API Set client
Parameters posX (float), posY (float), posZ (float), radius (float), colorR (int), colorG (int), colorB (int), intensity (float), invert (BOOL), marker (BOOL)

Description: Draw a glow sphere this frame. Up to 256 per single frame.

Parameters

  • posX (float) — Position X.
  • posY (float) — Position Y.
  • posZ (float) — Position Z.
  • radius (float) — Sphere radius.
  • colorR (int) — Red.
  • colorG (int) — Green.
  • colorB (int) — Blue.
  • intensity (float) — Intensity.
  • invert (BOOL) — Invert rendering.
  • marker (BOOL) — Draw as a marker, otherwise as an overlay.

DUPLICATE_FUNCTION_REFERENCE

Property Value
Native Name DUPLICATE_FUNCTION_REFERENCE
Hash 0xF4E2079D
Return Type char*
API Set shared
Parameters referenceIdentity (char*)

END_FIND_VEHICLE

Property Value
Native Name END_FIND_VEHICLE
Hash 0x9227415A
Return Type void
API Set client
Parameters findHandle (int)

DRAW_LINE_2D

Property Value
Native Name DRAW_LINE_2D
Hash 0xB856A90
Return Type void
API Set client
Parameters x1 (float), y1 (float), x2 (float), y2 (float), width (float), r (int), g (int), b (int), a (int)

Description: Like DRAW_RECT, but it's a line.

Parameters

  • x1 (float) — First x.
  • y1 (float) — First y.
  • x2 (float) — Second x.
  • y2 (float) — Second y.
  • width (float) — Width of line.
  • r (int) — Red.
  • g (int) — Green.
  • b (int) — Blue.
  • a (int) — Alpha.

END_FIND_PICKUP

Property Value
Native Name END_FIND_PICKUP
Hash 0x3C407D53
Return Type void
API Set client
Parameters findHandle (int)

ENABLE_ENHANCED_HOST_SUPPORT

Property Value
Native Name ENABLE_ENHANCED_HOST_SUPPORT
Hash 0xF97B1C93
Return Type void
API Set server
Parameters enabled (BOOL)

FIND_NEXT_PED

Property Value
Native Name FIND_NEXT_PED
Hash 0xAB09B548
Return Type BOOL
API Set client
Parameters findHandle (int), outEntity (Entity*)

EXECUTE_COMMAND

Property Value
Native Name EXECUTE_COMMAND
Hash 0x561C060B
Return Type void
API Set shared
Parameters commandString (char*)

Description: Depending on your use case you may need to use add_acl resource.<your_resource_name> command.<command_name> allow to use this native in your resource.

Examples

Citizen.CreateThread(function()
  -- stop the server after 1 minute
  Citizen.Wait(60000)
  ExecuteCommand("quit Shortlived")
end)

ENSURE_ENTITY_STATE_BAG

Property Value
Native Name ENSURE_ENTITY_STATE_BAG
Hash 0x3BB78F05
Return Type void
API Set shared
Parameters entity (Entity)

Description: Internal function for ensuring an entity has a state bag.

EXPERIMENTAL_LOAD_CLONE_CREATE

Property Value
Native Name EXPERIMENTAL_LOAD_CLONE_CREATE
Hash 0xD2CB95A3
Return Type Entity
API Set client
Parameters data (char*), objectId (int), tree (char*)

Description: This native is not implemented.

DRAW_RECT_ROTATED

Property Value
Native Name DRAW_RECT_ROTATED
Hash 0xEC37C168
Return Type void
API Set client
Parameters x (float), y (float), width (float), height (float), rotation (float), r (int), g (int), b (int), a (int)

Description: DRAW_RECT, but with a rotation. Seems to be broken.

FIND_NEXT_VEHICLE

Property Value
Native Name FIND_NEXT_VEHICLE
Hash 0x8839120D
Return Type BOOL
API Set client
Parameters findHandle (int), outEntity (Entity*)

GET_ALL_VEHICLE_MODELS

Property Value
Native Name GET_ALL_VEHICLE_MODELS
Hash 0xD7531645
Return Type object
API Set client

Description: Returns all registered vehicle model names, including non-dlc vehicles and custom vehicles in no particular order.

Example output

	["dubsta", "dubsta2", "dubsta3", "myverycoolcar", "sultan", "sultanrs", ...]

This native will not return vehicles that are unregistered (i.e from a resource being stopped) during runtime.

Examples

RegisterCommand("spawnrandomcar", function()
	local vehicles = GetAllVehicleModels()
	local veh = vehicles[math.random(1, #vehicles)]
	RequestModel(veh)
	repeat Wait(0) until HasModelLoaded(veh)
	local veh = CreateVehicle(veh, GetEntityCoords(PlayerPedId()), GetEntityHeading(PlayerPedId()), true, false)
	SetPedIntoVehicle(PlayerPedId(), veh, -1)
end)

GET_ALL_ROPES

Property Value
Native Name GET_ALL_ROPES
Hash 0x760A2D67
Return Type object
API Set client

Description: Returns all rope handles. The data returned adheres to the following layout:

[ 770, 1026, 1282, 1538, 1794, 2050, 2306, 2562, 2818, 3074, 3330, 3586, 3842, 4098, 4354, 4610, ...]

END_FIND_PED

Property Value
Native Name END_FIND_PED
Hash 0x9615C2AD
Return Type void
API Set client
Parameters findHandle (int)

EXPERIMENTAL_SAVE_CLONE_SYNC

Property Value
Native Name EXPERIMENTAL_SAVE_CLONE_SYNC
Hash 0x38D19210
Return Type char*
API Set client
Parameters entity (Entity)

Description: This native is not implemented.

EXPERIMENTAL_LOAD_CLONE_SYNC

Property Value
Native Name EXPERIMENTAL_LOAD_CLONE_SYNC
Hash 0x6BC189AC
Return Type void
API Set client
Parameters entity (Entity), data (char*)

Description: This native is not implemented.

FORCE_SNOW_PASS

Property Value
Native Name FORCE_SNOW_PASS
Hash 0xE6E16170
Return Type void
API Set client
Parameters enabled (BOOL)

Description: Forces the game snow pass to render.

Parameters

  • enabled (BOOL) — Whether or not to force rendering to use a snow pass.

FIND_NEXT_OBJECT

Property Value
Native Name FIND_NEXT_OBJECT
Hash 0x4E129DBF
Return Type BOOL
API Set client
Parameters findHandle (int), outEntity (Entity*)

FIND_FIRST_VEHICLE

Property Value
Native Name FIND_FIRST_VEHICLE
Hash 0x15E55694
Return Type int
API Set client
Parameters outEntity (Entity*)

FORMAT_STACK_TRACE

Property Value
Native Name FORMAT_STACK_TRACE
Hash 0xD70C3BCA
Return Type char*
API Set shared
Parameters traceData (object)

Description: An internal function for converting a stack trace object to a string.

GET_AIR_DRAG_MULTIPLIER_FOR_PLAYERS_VEHICLE

Property Value
Native Name GET_AIR_DRAG_MULTIPLIER_FOR_PLAYERS_VEHICLE
Hash 0x62FC38D0
Return Type float
API Set server
Parameters playerSrc (char*)

Parameters

  • playerSrc (char*) — The player handle

FLAG_SERVER_AS_PRIVATE

Property Value
Native Name FLAG_SERVER_AS_PRIVATE
Hash 0x13B6855D
Return Type void
API Set server
Parameters private_ (BOOL)

GET_ASPECT_RATIO

Property Value
Native Name GET_ASPECT_RATIO
Hash 0x2CA8F641
Return Type float
API Set client

Description: Gets the current aspect ratio

local ratio = GetAspectRatio()
print(string.format("%.2f", ratio))

FIND_FIRST_PICKUP

Property Value
Native Name FIND_FIRST_PICKUP
Hash 0x3FF9D340
Return Type int
API Set client
Parameters outEntity (Entity*)

GET_CALMING_QUAD_BOUNDS

Property Value
Native Name GET_CALMING_QUAD_BOUNDS
Hash 0xFF60E63
Return Type BOOL
API Set client
Parameters waterQuad (int), minX (int*), minY (int*), maxX (int*), maxY (int*)

Parameters

  • waterQuad (int) — The calming quad index
  • minX (int*) — The minX coordinate
  • minY (int*) — The minY coordinate
  • maxX (int*) — The maxX coordinate
  • maxY (int*) — The maxY coordinate

Examples

local success, minX, minY, maxX, maxY = GetCalmingQuadBounds(1)

GET_ACTIVE_PLAYERS

Property Value
Native Name GET_ACTIVE_PLAYERS
Hash 0xCF143FB9
Return Type object
API Set client

Description: Returns all player indices for 'active' physical players known to the client. The data returned adheres to the following layout:

[127, 42, 13, 37]

EXPERIMENTAL_SAVE_CLONE_CREATE

Property Value
Native Name EXPERIMENTAL_SAVE_CLONE_CREATE
Hash 0x9D65CAD2
Return Type char*
API Set client
Parameters entity (Entity)

Description: This native is not implemented.

GET_CURRENT_GAME_NAME

Property Value
Native Name GET_CURRENT_GAME_NAME
Hash 0xACA18ECD
Return Type char*
API Set client

Description: This native returns the currently used game's name.

GET_ALL_TRACK_JUNCTIONS

Property Value
Native Name GET_ALL_TRACK_JUNCTIONS
Hash 0x81A08523
Return Type object
API Set client

Description: Returns all track junctions on the client The data returned adheres to the following structure:

[1, 2, 4, 6, 69, 420]

GET_CONVAR_FLOAT

Property Value
Native Name GET_CONVAR_FLOAT
Hash 0x9E666D
Return Type float
API Set shared
Parameters varName (char*), defaultValue (float)

Description: This will have floating point inaccuracy.

Parameters

  • varName (char*) — The console variable to get
  • defaultValue (float) — The default value to set, if none are found.

GET_ALL_PEDS

Property Value
Native Name GET_ALL_PEDS
Hash 0xB8584FEF
Return Type object
API Set server

Description: Returns all peds handles known to the server. The data returned adheres to the following layout:

[127, 42, 13, 37]

Examples

-- This example prints information of every ped that has an owner.

for i, ped in ipairs(GetAllPeds()) do
    local pedOwner = NetworkGetEntityOwner(ped)
    if pedOwner > 0 then
       local playerName = GetPlayerName(pedOwner)
       local pedModel = GetEntityModel(ped)
       local pedArmour = GetPedArmour(ped)
       print("Ped : "..ped.." | Owner name : "..playerName.." | Model : "..pedModel.." | Armour : "..pedArmour)
    end
end

GET_CALMING_QUAD_COUNT

Property Value
Native Name GET_CALMING_QUAD_COUNT
Hash 0xCEBFC42
Return Type int
API Set client

Examples

local calmingQuadCount = GetCalmingQuadCount()

GET_AMBIENT_PED_RANGE_MULTIPLIER

Property Value
Native Name GET_AMBIENT_PED_RANGE_MULTIPLIER
Hash 0xB550232D
Return Type float
API Set client

Description: A getter for SET_AMBIENT_PED_RANGE_MULTIPLIER_THIS_FRAME.

GET_AMBIENT_VEHICLE_RANGE_MULTIPLIER

Property Value
Native Name GET_AMBIENT_VEHICLE_RANGE_MULTIPLIER
Hash 0x667EC929
Return Type float
API Set client

Description: A getter for SET_AMBIENT_VEHICLE_RANGE_MULTIPLIER_THIS_FRAME.

GET_CURRENT_SERVER_ENDPOINT

Property Value
Native Name GET_CURRENT_SERVER_ENDPOINT
Hash 0xEA11BFBA
Return Type char*
API Set client

Description: Returns the peer address of the remote game server that the user is currently connected to.

GET_CLOSEST_TRACK_NODES

Property Value
Native Name GET_CLOSEST_TRACK_NODES
Hash 0x59FC24A7
Return Type object
API Set client
Parameters position (Vector3), radius (float)

Description: Get all track nodes and their track ids within the radius of the specified coordinates.

Parameters

  • position (Vector3) — Get track nodes at position
  • radius (float) — Get track nodes within radius

GET_ALL_VEHICLES

Property Value
Native Name GET_ALL_VEHICLES
Hash 0x332169F5
Return Type object
API Set server

Description: Returns all vehicle handles known to the server. The data returned adheres to the following layout:

[127, 42, 13, 37]

FIND_NEXT_PICKUP

Property Value
Native Name FIND_NEXT_PICKUP
Hash 0x4107EF0F
Return Type BOOL
API Set client
Parameters findHandle (int), outEntity (Entity*)

GET_ENTITY_MODEL

Property Value
Native Name GET_ENTITY_MODEL
Hash 0xDAFCB3EC
Return Type Hash
API Set server
Parameters entity (Entity)

GET_CALMING_QUAD_DAMPENING

Property Value
Native Name GET_CALMING_QUAD_DAMPENING
Hash 0xB0E3A058
Return Type BOOL
API Set client
Parameters waterQuad (int), calmingQuadDampening (float*)

Parameters

  • waterQuad (int) — The calming quad index
  • calmingQuadDampening (float*)

Examples

local success, dampening = GetCalmingQuadDampening(1)

GET_CAM_MATRIX

Property Value
Native Name GET_CAM_MATRIX
Hash 0x8F57A89D
Return Type void
API Set client
Parameters camera (Cam), rightVector (Vector3*), forwardVector (Vector3*), upVector (Vector3*), position (Vector3*)

Description: Returns the world matrix of the specified camera. To turn this into a view matrix, calculate the inverse.

GET_ALL_OBJECTS

Property Value
Native Name GET_ALL_OBJECTS
Hash 0x6886C3FE
Return Type object
API Set server

Description: Returns all object handles known to the server. The data returned adheres to the following layout:

[127, 42, 13, 37]

GET_CONSOLE_BUFFER

Property Value
Native Name GET_CONSOLE_BUFFER
Hash 0xE57429FA
Return Type char*
API Set server

Description: Returns the current console output buffer.

GET_ENTITIES_IN_RADIUS

Property Value
Native Name GET_ENTITIES_IN_RADIUS
Hash 0xDFFBA12F
Return Type object
API Set shared
Parameters x (float), y (float), z (float), radius (float), entityType (int), sortByDistance (BOOL), models (object)

Description: ### Supported types

  • [1] : Peds (including animals) and players.
  • [2] : Vehicles.
  • [3] : Objects (props), doors, and projectiles.

Coordinates need to be send unpacked (x,y,z)


-- Define the allowed model hashes
local allowedModelHashes = { GetHashKey("p_crate03x"), GetHashKey("p_crate22x") }

-- Get the player's current coordinates
local playerCoords = GetEntityCoords(PlayerPedId())

-- Retrieve all entities of type Object (type 3) within a radius of 10.0 units
-- that match the allowed model hashes
-- and sort output entities by distance
local entities = GetEntitiesInRadius(playerCoords.x, playerCoords.y, playerCoords.z, 10.0, 3, true, allowedModelHashes)

-- Iterate through the list of entities and print their ids
for i = 1, #entities do
    local entity = entities[i]
    print(entity)
end

Parameters

  • x (float) — The X coordinate.
  • y (float) — The Y coordinate.
  • z (float) — The Z coordinate.
  • radius (float) — Max distance from coordinate to entity
  • entityType (int) — Entity types see list below
  • sortByDistance (BOOL) — Sort output entites by distance from nearest to farthest
  • models (object) — List of allowed models its also optional

GET_ENTITY_HEALTH

Property Value
Native Name GET_ENTITY_HEALTH
Hash 0x8E3222B7
Return Type int
API Set server
Parameters entity (Entity)

Description: Only works for vehicle and peds

Parameters

  • entity (Entity) — The entity to check the health of

GET_CURRENT_RESOURCE_NAME

Property Value
Native Name GET_CURRENT_RESOURCE_NAME
Hash 0xE5E9EBBB
Return Type char*
API Set shared

Description: Returns the name of the currently executing resource.

GET_ENTITY_ARCHETYPE_NAME

Property Value
Native Name GET_ENTITY_ARCHETYPE_NAME
Hash 0x47B870F5
Return Type char*
API Set client
Parameters entity (Entity)

Description: Returns entity's archetype name, if available.

Parameters

  • entity (Entity) — An entity handle.

GET_ENTITY_COLLISION_DISABLED

Property Value
Native Name GET_ENTITY_COLLISION_DISABLED
Hash 0xE8C0C629
Return Type bool
API Set server
Parameters entity (Entity)

Parameters

  • entity (Entity) — The target entity.

GET_CONVAR

Property Value
Native Name GET_CONVAR
Hash 0x6CCD2564
Return Type char*
API Set shared
Parameters varName (char*), default_ (char*)

Description: Can be used to get a console variable of type char*, for example a string.

Parameters

  • varName (char*) — The console variable to look up.
  • default_ (char*) — The default value to set if none is found.

Examples

if GetConvar('voice_useNativeAudio', 'false') == 'true' then
    Citizen.Trace('Native Audio is enabled.')
end

GET_CALMING_QUAD_AT_COORDS

Property Value
Native Name GET_CALMING_QUAD_AT_COORDS
Hash 0x870E8B40
Return Type int
API Set client
Parameters x (float), y (float)

Description: This native returns the index of a calming quad if the given point is inside its bounds.

Parameters

  • x (float) — The X coordinate
  • y (float) — The Y coordinate

Examples

local currentPedPosition = GetEntityCoords(PlayerPedId())
local calmingQuadIndex = GetCalmingQuadAtCoords(currentPedPosition.x, currentPedPosition.y)

GET_ENTITY_ATTACHED_TO

Property Value
Native Name GET_ENTITY_ATTACHED_TO
Hash 0xFE1589F9
Return Type Entity
API Set server
Parameters entity (Entity)

Description: Gets the entity that this entity is attached to.

Parameters

  • entity (Entity) — The entity to check.

GET_CONVAR_INT

Property Value
Native Name GET_CONVAR_INT
Hash 0x935C0AB2
Return Type int
API Set shared
Parameters varName (char*), default_ (int)

Description: Can be used to get a console variable casted back to int (an integer value).

Parameters

  • varName (char*) — The console variable to look up.
  • default_ (int) — The default value to set if none is found (variable not set using SET_CONVAR, or not accessible).

Examples

if GetConvarInt('remainingRounds', 0) < 900 then
    Citizen.Trace("Less than 900 rounds remaining...")
end

GET_CURRENT_SCREEN_RESOLUTION

Property Value
Native Name GET_CURRENT_SCREEN_RESOLUTION
Hash 0x337F0116
Return Type void
API Set client
Parameters width (int*), height (int*)

Description: Gets the current screen resolution.

local  width, height = GetCurrentScreenResolution()
print(string.format("Current screen resolution: %dx%d", width, height))

GET_ENTITY_ROUTING_BUCKET

Property Value
Native Name GET_ENTITY_ROUTING_BUCKET
Hash 0xED4B0486
Return Type int
API Set server
Parameters entity (Entity)

Description: Gets the routing bucket for the specified entity.

Routing buckets are also known as 'dimensions' or 'virtual worlds' in past echoes, however they are population-aware.

Parameters

  • entity (Entity) — The entity to get the routing bucket for.

GET_CURRENT_PED_WEAPON

Property Value
Native Name GET_CURRENT_PED_WEAPON
Hash 0xB0237302
Return Type Hash
API Set server
Parameters ped (Ped)

Description: Returns the hash of weapon the Ped is currently using.

Parameters

  • ped (Ped) — The target ped.

GET_ENTITY_ROTATION

Property Value
Native Name GET_ENTITY_ROTATION
Hash 0x8FF45B04
Return Type Vector3
API Set server
Parameters entity (Entity)

GET_GLOBAL_PASSENGER_MASS_MULTIPLIER

Property Value
Native Name GET_GLOBAL_PASSENGER_MASS_MULTIPLIER
Hash 0x78951816
Return Type float
API Set client

Description: A getter for SET_GLOBAL_PASSENGER_MASS_MULTIPLIER.

GET_CONVAR_BOOL

Property Value
Native Name GET_CONVAR_BOOL
Hash 0x7E8EBFE5
Return Type BOOL
API Set shared
Parameters varName (char*), defaultValue (BOOL)

Description: Can be used to get a console variable casted back to bool.

Parameters

  • varName (char*) — The console variable to look up.
  • defaultValue (BOOL) — The default value to set if none is found.

Examples

if GetConvarBool('dev_mode', false) then
    print("Dev Mode is eanbled, load dev mode menus")
end

GET_ENTITY_COORDS

Property Value
Native Name GET_ENTITY_COORDS
Hash 0x1647F1CB
Return Type Vector3
API Set server
Parameters entity (Entity)

Description: Gets the current coordinates for a specified entity. This native is used server side when using OneSync.

See GET_ENTITY_COORDS for client side.

Parameters

  • entity (Entity) — The entity to get the coordinates from.

Examples

local function ShowCoordinates()
    local player = source
    local ped = GetPlayerPed(player)
    local playerCoords = GetEntityCoords(ped)

    print(playerCoords) -- vector3(...)
end

RegisterNetEvent("myCoordinates")
AddEventHandler("myCoordinates", ShowCoordinates)
onNet('myCoordinates', () => {
  const player = global.source; // use (global as any).source for Typescript
  const ped = GetPlayerPed(player);
  const [playerX, playerY, playerZ] = GetEntityCoords(ped);

  console.log(`${playerX}, ${playerY}, ${playerZ}`);
});
using static CitizenFX.Core.Native.API;
// ...

// In class constructor
EventHandlers["myCoordinates"] += new Action<Player>(ShowCoordinates);

// Delegate method
private void ShowCoordinates([FromSource]Player player) {
    Vector3 playerCoords = GetEntityCoords(player.Character);

    // or the preferred use of C# wrapper
    Vector3 playerCoords = player.Character.Position;

    Debug.WriteLine($"{playerCoords}");
}

GET_GAME_NAME

Property Value
Native Name GET_GAME_NAME
Hash 0xE8EAA18B
Return Type char*
API Set shared

Description: Returns the current game being executed.

Possible values:

Return value Meaning
fxserver Server-side code ('Duplicity')
fivem FiveM for GTA V
libertym LibertyM for GTA IV
redm RedM for Red Dead Redemption 2

GET_ENTITY_ADDRESS

Property Value
Native Name GET_ENTITY_ADDRESS
Hash 0x9A3144BC
Return Type Any*
API Set client
Parameters entity (Entity)

Description: Experimental: This native may be altered or removed in future versions of CitizenFX without warning.

Returns the memory address of an entity.

This native is intended for singleplayer debugging, and may not be available during multiplayer.

Parameters

  • entity (Entity) — The handle of the entity to get the address of.

GET_ENTITY_VELOCITY

Property Value
Native Name GET_ENTITY_VELOCITY
Hash 0xC14C9B6B
Return Type Vector3
API Set server
Parameters entity (Entity)

GET_ENTITY_POPULATION_TYPE

Property Value
Native Name GET_ENTITY_POPULATION_TYPE
Hash 0xFC30DDFF
Return Type int
API Set server
Parameters entity (Entity)

Description: This native gets an entity's population type.

Parameters

  • entity (Entity) — the entity to obtain the population type from

GET_ENTITY_SPEED

Property Value
Native Name GET_ENTITY_SPEED
Hash 0x9E1E4798
Return Type float
API Set server
Parameters entity (Entity)

Description: Gets the current speed of the entity in meters per second.

To convert to MPH: speed * 2.236936
To convert to KPH: speed * 3.6

Parameters

  • entity (Entity) — The entity to get the speed of

GET_ENTITY_FROM_STATE_BAG_NAME

Property Value
Native Name GET_ENTITY_FROM_STATE_BAG_NAME
Hash 0x4BDF1867
Return Type Entity
API Set shared
Parameters bagName (char*)

Description: Returns the entity handle for the specified state bag name. For use with ADD_STATE_BAG_CHANGE_HANDLER.

Parameters

  • bagName (char*) — An internal state bag ID from the argument to a state bag change handler.

Examples

AddStateBagChangeHandler("blockTasks", null, async (bagName, key, value /* boolean */) => {
    let entity = GetEntityFromStateBagName(bagName);
    // Whoops, we were don't have a valid entity!
    if (entity === 0) return;
    // We don't want to freeze the entity position if the entity collision hasn't loaded yet
    while (!HasCollisionLoadedAroundEntity(entity)) {
        // The entity went out of our scope before the collision loaded
        if (!DoesEntityExist(entity)) return;
        await Delay(250);
    }
    SetEntityInvincible(entity, value)
    FreezeEntityPosition(entity, value)
    TaskSetBlockingOfNonTemporaryEvents(entity, value)
})
AddStateBagChangeHandler("blockTasks", nil, function(bagName, key, value) 
    local entity = GetEntityFromStateBagName(bagName)
    -- Whoops, we don't have a valid entity!
    if entity == 0 then return end
    -- We don't want to freeze the entity position if the entity collision hasn't loaded yet
    while not HasCollisionLoadedAroundEntity(entity) do
        -- The entity went out of our scope before the collision loaded
        if not DoesEntityExist(entity) then return end
        Wait(250)
    end
    SetEntityInvincible(entity, value)
    FreezeEntityPosition(entity, value)
    TaskSetBlockingOfNonTemporaryEvents(entity, value)
end)

GET_ENTITY_MAX_HEALTH

Property Value
Native Name GET_ENTITY_MAX_HEALTH
Hash 0xC7AE6AA1
Return Type int
API Set server
Parameters entity (Entity)

Description: Currently it only works with peds.

GET_ENTITY_REMOTE_SYNCED_SCENES_ALLOWED

Property Value
Native Name GET_ENTITY_REMOTE_SYNCED_SCENES_ALLOWED
Hash 0x91B38FB6
Return Type BOOL
API Set server
Parameters entity (Entity)

Parameters

  • entity (Entity) — The entity to get the flag for.

GET_HOST_ID

Property Value
Native Name GET_HOST_ID
Hash 0x5F70F5A3
Return Type char*
API Set server

GET_ENTITY_HEADING

Property Value
Native Name GET_ENTITY_HEADING
Hash 0x972CC383
Return Type float
API Set server
Parameters entity (Entity)

GET_GAME_POOL

Property Value
Native Name GET_GAME_POOL
Hash 0x2B9D4F50
Return Type object
API Set shared
Parameters poolName (char*)

Description: Returns a list of entity handles (script GUID) for all entities in the specified pool - the data returned is an array as follows:

[ 770, 1026, 1282, 1538, 1794, 2050, 2306, 2562, 2818, 3074, 3330, 3586, 3842, 4098, 4354, 4610, ...]

Supported pools

  • CPed: Peds (including animals) and players.
  • CObject: Objects (props), doors, and projectiles.
  • CNetObject: Networked objects
  • CVehicle: Vehicles.
  • CPickup: Pickups.

Parameters

  • poolName (char*) — The pool name to get a list of entities from.

Examples

local vehiclePool = GetGamePool('CVehicle') -- Get the list of vehicles (entities) from the pool
for i = 1, #vehiclePool do -- loop through each vehicle (entity)
    if GetPedInVehicleSeat(vehiclePool[i], -1) == 0 then
        DeleteEntity(vehiclePool[i]) -- Delete vehicles (entities) that don't have a driver
    end
end

GET_ENTITY_TYPE

Property Value
Native Name GET_ENTITY_TYPE
Hash 0xB1BD08D
Return Type int
API Set server
Parameters entity (Entity)

Description: 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.

Parameters

  • entity (Entity) — The entity to get the type of.

GET_ENTITY_ORPHAN_MODE

Property Value
Native Name GET_ENTITY_ORPHAN_MODE
Hash 0xD16EA02F
Return Type int
API Set server
Parameters entity (Entity)

Parameters

  • entity (Entity) — The entity to get the orphan mode of

GET_FUEL_CONSUMPTION_RATE_MULTIPLIER

Property Value
Native Name GET_FUEL_CONSUMPTION_RATE_MULTIPLIER
Hash 0x5550BF9F
Return Type float
API Set client

GET_ENTITY_SCRIPT

Property Value
Native Name GET_ENTITY_SCRIPT
Hash 0xB7F70784
Return Type char*
API Set server
Parameters entity (Entity)

GET_DUI_HANDLE

Property Value
Native Name GET_DUI_HANDLE
Hash 0x1655D41D
Return Type char*
API Set client
Parameters duiObject (long)

Description: Returns the NUI window handle for a specified DUI browser object.

Parameters

  • duiObject (long) — The DUI browser handle.

GET_HELI_THROTTLE_CONTROL

Property Value
Native Name GET_HELI_THROTTLE_CONTROL
Hash 0x8E86238D
Return Type float
API Set server
Parameters heli (Vehicle)

Parameters

  • heli (Vehicle) — The helicopter to check.

GET_HELI_PITCH_CONTROL

Property Value
Native Name GET_HELI_PITCH_CONTROL
Hash 0x1944AC95
Return Type float
API Set server
Parameters heli (Vehicle)

Parameters

  • heli (Vehicle) — The helicopter to check.

GET_HELI_ENGINE_HEALTH

Property Value
Native Name GET_HELI_ENGINE_HEALTH
Hash 0xA0FA0354
Return Type int
API Set server
Parameters heli (Vehicle)

Description: Note This native will always return 1000.0 unless SET_VEHICLE_BODY_HEALTH, SET_VEHICLE_ENGINE_HEALTH, or SET_VEHICLE_PETROL_TANK_HEALTH have been called with a value greater than 1000.0.

Parameters

  • heli (Vehicle) — The helicopter to check

GET_HELI_MAIN_ROTOR_DAMAGE_SCALE

Property Value
Native Name GET_HELI_MAIN_ROTOR_DAMAGE_SCALE
Hash 0xC37D668
Return Type float
API Set server
Parameters heli (Vehicle)

Parameters

  • heli (Vehicle) — The helicopter to check

GET_HELI_DISABLE_EXPLODE_FROM_BODY_DAMAGE

Property Value
Native Name GET_HELI_DISABLE_EXPLODE_FROM_BODY_DAMAGE
Hash 0x82AFC0A3
Return Type BOOL
API Set server
Parameters heli (Vehicle)

Description: This is a getter for SET_DISABLE_HELI_EXPLODE_FROM_BODY_DAMAGE

Parameters

  • heli (Vehicle) — The helicopter to check

GET_FUEL_CONSUMPTION_STATE

Property Value
Native Name GET_FUEL_CONSUMPTION_STATE
Hash 0xC66CD90C
Return Type BOOL
API Set client

GET_INTERIOR_PORTAL_ENTITY_FLAG

Property Value
Native Name GET_INTERIOR_PORTAL_ENTITY_FLAG
Hash 0x9DA2E811
Return Type int
API Set client
Parameters interiorId (int), portalIndex (int), entityIndex (int)

Parameters

  • interiorId (int) — The target interior.
  • portalIndex (int) — Interior portal index.
  • entityIndex (int) — Portal entity index.

Examples

local playerPed = PlayerPedId()
local interiorId = GetInteriorFromEntity(playerPed)
local portalIndex = 0

if interiorId ~= 0 then
  local count = GetInteriorPortalEntityCount(interiorId, portalIndex)
  for i=0, count-1 do
    local flag = GetInteriorPortalEntityFlag(interiorId, portalIndex, i)
    print("portal " .. portalIndex .." entity " .. i .. " flag is: " .. flag)
  end
end

GET_GAME_TIMER

Property Value
Native Name GET_GAME_TIMER
Hash 0xA4EA0691
Return Type long
API Set server

Description: Gets the current game timer in milliseconds.

GET_HELI_TAIL_ROTOR_DAMAGE_SCALE

Property Value
Native Name GET_HELI_TAIL_ROTOR_DAMAGE_SCALE
Hash 0x22239130
Return Type float
API Set server
Parameters heli (Vehicle)

Parameters

  • heli (Vehicle) — The helicopter to check

GET_INTERIOR_PORTAL_ENTITY_ROTATION

Property Value
Native Name GET_INTERIOR_PORTAL_ENTITY_ROTATION
Hash 0x9F9CEB63
Return Type void
API Set client
Parameters interiorId (int), portalIndex (int), entityIndex (int), rotX (float*), rotY (float*), rotZ (float*), rotW (float*)

Parameters

  • interiorId (int) — The target interior.
  • portalIndex (int) — Interior portal index.
  • entityIndex (int) — Portal entity index.
  • rotX (float*)
  • rotY (float*)
  • rotZ (float*)
  • rotW (float*)

Examples

local playerPed = PlayerPedId()
local interiorId = GetInteriorFromEntity(playerPed)
local portalIndex = 0

if interiorId ~= 0 then
  local count = GetInteriorPortalEntityCount(interiorId, portalIndex)
  for i=0, count-1 do
    local x, y, z, w = GetInteriorPortalEntityRotation(interiorId, portalIndex, i)
    print("portal " .. portalIndex .." entity " .. i .. " rotation is: " .. vec4(x, y, z, w))
  end
end

GET_INTERIOR_ENTITIES_EXTENTS

Property Value
Native Name GET_INTERIOR_ENTITIES_EXTENTS
Hash 0x322B1192
Return Type void
API Set client
Parameters interiorId (int), bbMinX (float*), bbMinY (float*), bbMinZ (float*), bbMaxX (float*), bbMaxY (float*), bbMaxZ (float*)

Parameters

  • interiorId (int) — The target interior.
  • bbMinX (float*)
  • bbMinY (float*)
  • bbMinZ (float*)
  • bbMaxX (float*)
  • bbMaxY (float*)
  • bbMaxZ (float*)

Examples

local playerPed = PlayerPedId()
local interiorId = GetInteriorFromEntity(playerPed)

if interiorId ~= 0 then
  local minX, minY, minZ, maxX, maxY, maxZ = GetInteriorEntitiesExtents(interiorId, roomId)
  print("current entities extents is: " .. vec(minX, minY, minZ) .." / " .. vec(maxX, maxY, maxZ))
end

GET_HELI_BODY_HEALTH

Property Value
Native Name GET_HELI_BODY_HEALTH
Hash 0xA886495D
Return Type int
API Set server
Parameters heli (Vehicle)

Description: Note This native will always return 1000.0 unless SET_VEHICLE_BODY_HEALTH, SET_VEHICLE_ENGINE_HEALTH, or SET_VEHICLE_PETROL_TANK_HEALTH have been called with a value greater than 1000.0.

Parameters

  • heli (Vehicle) — The helicopter to check

GET_GAME_BUILD_NUMBER

Property Value
Native Name GET_GAME_BUILD_NUMBER
Hash 0x804B9F7B
Return Type int
API Set shared

Description: Returns the internal build number of the current game being executed.

Possible values:

  • FiveM
    • 1604
    • 2060
    • 2189
    • 2372
    • 2545
    • 2612
    • 2699
    • 2802
    • 2944
    • 3095
    • 3258
    • 3323
    • 3407
    • 3570
  • RedM
    • 1311
    • 1355
    • 1436
    • 1491
  • LibertyM
    • 43
  • FXServer
    • 0

GET_HELI_REAR_ROTOR_DAMAGE_SCALE

Property Value
Native Name GET_HELI_REAR_ROTOR_DAMAGE_SCALE
Hash 0xC40161E2
Return Type float
API Set server
Parameters heli (Vehicle)

Parameters

  • heli (Vehicle) — The helicopter to check

GET_HELI_MAIN_ROTOR_HEALTH

Property Value
Native Name GET_HELI_MAIN_ROTOR_HEALTH
Hash 0xF01E2AAB
Return Type float
API Set server
Parameters vehicle (Vehicle)

Parameters

  • vehicle (Vehicle) — The target vehicle.

GET_ENTITY_ROTATION_VELOCITY

Property Value
Native Name GET_ENTITY_ROTATION_VELOCITY
Hash 0x9BF8A73F
Return Type Vector3
API Set server
Parameters entity (Entity)

GET_HASH_KEY

Property Value
Native Name GET_HASH_KEY
Hash 0x98EFF6F1
Return Type Hash
API Set server
Parameters model (char*)

Description: This native converts the passed string to a hash.

GET_INTERIOR_PORTAL_ENTITY_ARCHETYPE

Property Value
Native Name GET_INTERIOR_PORTAL_ENTITY_ARCHETYPE
Hash 0x9A0E1700
Return Type int
API Set client
Parameters interiorId (int), portalIndex (int), entityIndex (int)

Parameters

  • interiorId (int) — The target interior.
  • portalIndex (int) — Interior portal index.
  • entityIndex (int) — Portal entity index.

Examples

local playerPed = PlayerPedId()
local interiorId = GetInteriorFromEntity(playerPed)
local portalIndex = 0

if interiorId ~= 0 then
  local count = GetInteriorPortalEntityCount(interiorId, portalIndex)
  for i=0, count-1 do
    local archetype = GetInteriorPortalEntityArchetype(interiorId, portalIndex, i)
    print("portal " .. portalIndex .." entity " .. i .. " archetype is: " .. archetype)
  end
end

GET_HUD_COMPONENT_NAME

Property Value
Native Name GET_HUD_COMPONENT_NAME
Hash 0xA91866BC
Return Type char*
API Set client
Parameters id (int)

Parameters

  • id (int) — The hud component id.

GET_INTERIOR_PORTAL_ROOM_FROM

Property Value
Native Name GET_INTERIOR_PORTAL_ROOM_FROM
Hash 0xAA9C141D
Return Type int
API Set client
Parameters interiorId (int), portalIndex (int)

Parameters

  • interiorId (int) — The target interior.
  • portalIndex (int) — Interior portal index.

Examples

local playerPed = PlayerPedId()
local interiorId = GetInteriorFromEntity(playerPed)

if interiorId ~= 0 then
  local roomIndex = 0

  local portalRoomFrom = GetInteriorPortalRoomFrom(interiorId, 0)
  print("portal " .. roomIndex .. " room FROM is: " .. portalRoomFrom)
end

GET_HELI_YAW_CONTROL

Property Value
Native Name GET_HELI_YAW_CONTROL
Hash 0x8FDC0768
Return Type float
API Set server
Parameters heli (Vehicle)

Parameters

  • heli (Vehicle) — The helicopter to check.

GET_HELI_TAIL_ROTOR_HEALTH

Property Value
Native Name GET_HELI_TAIL_ROTOR_HEALTH
Hash 0xA41BC13D
Return Type float
API Set server
Parameters vehicle (Vehicle)

Description: Note: This native is deprecated, please use GET_HELI_REAR_ROTOR_HEALTH instead.

Parameters

  • vehicle (Vehicle) — The target vehicle.

GET_HUD_COMPONENT_ALIGN

Property Value
Native Name GET_HUD_COMPONENT_ALIGN
Hash 0xCD949E20
Return Type void
API Set client
Parameters id (int), horizontalAlign (int*), verticalAlign (int*)

Description: See SET_SCRIPT_GFX_ALIGN for details about how gfx align works.

Parameters

  • id (int) — The hud component id.
  • horizontalAlign (int*)
  • verticalAlign (int*)

GET_IS_HELI_ENGINE_RUNNING

Property Value
Native Name GET_IS_HELI_ENGINE_RUNNING
Hash 0x3EFE38D1
Return Type BOOL
API Set server
Parameters heli (Vehicle)

Parameters

  • heli (Vehicle) — The helicopter to check

GET_INTERIOR_PORTAL_CORNER_POSITION

Property Value
Native Name GET_INTERIOR_PORTAL_CORNER_POSITION
Hash 0xF772BB2C
Return Type void
API Set client
Parameters interiorId (int), portalIndex (int), cornerIndex (int), posX (float*), posY (float*), posZ (float*)

Parameters

  • interiorId (int) — The target interior.
  • portalIndex (int) — Interior portal index.
  • cornerIndex (int) — Portal's corner index.
  • posX (float*)
  • posY (float*)
  • posZ (float*)

Examples

local playerPed = PlayerPedId()
local interiorId = GetInteriorFromEntity(playerPed)

if interiorId ~= 0 then
  local portalIndex = 0
  local cornerIndex = 0

  local x, y, z = GetInteriorPortalCornerPosition(interiorId, portalIndex, cornerIndex)
  print("position of portal " .. portalIndex .. "corner index " .. cornerIndex .. " is: " .. vec(x, y, z))
end

GET_INTERIOR_PORTAL_ENTITY_COUNT

Property Value
Native Name GET_INTERIOR_PORTAL_ENTITY_COUNT
Hash 0xC68021B
Return Type int
API Set client
Parameters interiorId (int), portalIndex (int)

Parameters

  • interiorId (int) — The target interior.
  • portalIndex (int) — Interior portal index.

Examples

local playerPed = PlayerPedId()
local interiorId = GetInteriorFromEntity(playerPed)
local portalIndex = 0

if interiorId ~= 0 then
  local count = GetInteriorPortalEntityCount(interiorId, portalIndex)
  print("portal " .. portalIndex .." entity count is: " .. count)
end

GET_HELI_REAR_ROTOR_HEALTH

Property Value
Native Name GET_HELI_REAR_ROTOR_HEALTH
Hash 0x33EE6E2B
Return Type float
API Set server
Parameters vehicle (Vehicle)

Description: This native is a getter for SET_HELI_TAIL_ROTOR_HEALTH

Parameters

  • vehicle (Vehicle) — The target vehicle.

GET_INTERIOR_ROOM_FLAG

Property Value
Native Name GET_INTERIOR_ROOM_FLAG
Hash 0x6B7AF743
Return Type int
API Set client
Parameters interiorId (int), roomIndex (int)

Parameters

  • interiorId (int) — The target interior.
  • roomIndex (int) — Interior room index.

Examples

local playerPed = PlayerPedId()
local interiorId = GetInteriorFromEntity(playerPed)
local roomHash = GetRoomKeyFromEntity(playerPed)
local roomId = GetInteriorRoomIndexByHash(interiorId, roomHash)

if roomId ~= -1 then
  local roomFlag = GetInteriorRoomFlag(interiorId, roomId)
  print("current room flag is: " .. roomFlag)
end

GET_INSTANCE_ID

Property Value
Native Name GET_INSTANCE_ID
Hash 0x9F1C4383
Return Type int
API Set shared

GET_HUD_COMPONENT_SIZE

Property Value
Native Name GET_HUD_COMPONENT_SIZE
Hash 0x12217D33
Return Type Vector3
API Set client
Parameters id (int)

Parameters

  • id (int) — The hud component id.

GET_IS_VEHICLE_ENGINE_RUNNING

Property Value
Native Name GET_IS_VEHICLE_ENGINE_RUNNING
Hash 0x7DC6D022
Return Type BOOL
API Set server
Parameters vehicle (Vehicle)

GET_INTERIOR_POSITION

Property Value
Native Name GET_INTERIOR_POSITION
Hash 0x77A435B0
Return Type void
API Set client
Parameters interiorId (int), posX (float*), posY (float*), posZ (float*)

Parameters

  • interiorId (int) — The target interior.
  • posX (float*)
  • posY (float*)
  • posZ (float*)

Examples

local playerPed = PlayerPedId()
local interiorId = GetInteriorFromEntity(playerPed)

if interiorId ~= 0 then
  local x, y, z = GetInteriorPosition(interiorId)
  print("current interior " .. interiorId .. " position is: " .. vec(x, y, z))
end

GET_INTERIOR_ROOM_NAME

Property Value
Native Name GET_INTERIOR_ROOM_NAME
Hash 0x11755DF2
Return Type char*
API Set client
Parameters interiorId (int), roomIndex (int)

Parameters

  • interiorId (int) — The target interior.
  • roomIndex (int) — Interior room index.

Examples

local playerPed = PlayerPedId()
local interiorId = GetInteriorFromEntity(playerPed)
local roomHash = GetRoomKeyFromEntity(playerPed)
local roomId = GetInteriorRoomIndexByHash(interiorId, roomHash)

if roomId ~= -1 then
  local roomName = GetInteriorRoomName(interiorId, roomId)
  print("current room name is: " .. roomName)
end

GET_HELI_GAS_TANK_HEALTH

Property Value
Native Name GET_HELI_GAS_TANK_HEALTH
Hash 0xD4EC7858
Return Type int
API Set server
Parameters heli (Vehicle)

Description: Note This native will always return 1000.0 unless SET_VEHICLE_BODY_HEALTH, SET_VEHICLE_ENGINE_HEALTH, or SET_VEHICLE_PETROL_TANK_HEALTH have been called with a value greater than 1000.0.

Parameters

  • heli (Vehicle) — The helicopter to check

GET_HELI_ROLL_CONTROL

Property Value
Native Name GET_HELI_ROLL_CONTROL
Hash 0x12948DE9
Return Type float
API Set server
Parameters heli (Vehicle)

Parameters

  • heli (Vehicle) — The helicopter to check.

GET_INTERIOR_PORTAL_ENTITY_POSITION

Property Value
Native Name GET_INTERIOR_PORTAL_ENTITY_POSITION
Hash 0x9B7AB83C
Return Type void
API Set client
Parameters interiorId (int), portalIndex (int), entityIndex (int), posX (float*), posY (float*), posZ (float*)

Parameters

  • interiorId (int) — The target interior.
  • portalIndex (int) — Interior portal index.
  • entityIndex (int) — Portal entity index.
  • posX (float*)
  • posY (float*)
  • posZ (float*)

Examples

local playerPed = PlayerPedId()
local interiorId = GetInteriorFromEntity(playerPed)
local portalIndex = 0

if interiorId ~= 0 then
  local count = GetInteriorPortalEntityCount(interiorId, portalIndex)
  for i=0, count-1 do
    local x, y, z = GetInteriorPortalEntityPosition(interiorId, portalIndex, i)
    print("portal " .. portalIndex .." entity " .. i .. " position is: " .. vec3(x, y, z))
  end
end

GET_INTERIOR_ROOM_COUNT

Property Value
Native Name GET_INTERIOR_ROOM_COUNT
Hash 0xA2737C2C
Return Type int
API Set client
Parameters interiorId (int)

Parameters

  • interiorId (int) — The target interior.

Examples

local playerPed = PlayerPedId()
local interiorId = GetInteriorFromEntity(playerPed)

if interiorId ~= 0 then
  local count = GetInteriorRoomCount(interiorId)
  print("interior " .. interiorId .. "has " .. count .. " rooms")
end

GET_INTERIOR_PORTAL_FLAG

Property Value
Native Name GET_INTERIOR_PORTAL_FLAG
Hash 0xC74DA47C
Return Type int
API Set client
Parameters interiorId (int), portalIndex (int)

Parameters

  • interiorId (int) — The target interior.
  • portalIndex (int) — Interior portal index.

Examples

local playerPed = PlayerPedId()
local interiorId = GetInteriorFromEntity(playerPed)

if interiorId ~= 0 then
  local portalFlag = GetInteriorPortalFlag(interiorId, 0)
  print("portal 0 flag is: " .. portalRoomFrom)
end

GET_LANDING_GEAR_STATE

Property Value
Native Name GET_LANDING_GEAR_STATE
Hash 0xA6F02670
Return Type int
API Set server
Parameters vehicle (Vehicle)

Description: See the client-side GET_LANDING_GEAR_STATE native for a description of landing gear states.

Parameters

  • vehicle (Vehicle) — The vehicle to check.

GET_INTERIOR_ROOM_INDEX_BY_HASH

Property Value
Native Name GET_INTERIOR_ROOM_INDEX_BY_HASH
Hash 0xE0EE05F8
Return Type int
API Set client
Parameters interiorId (int), roomHash (int)

Parameters

  • interiorId (int) — The target interior.
  • roomHash (int) — Interior room hash.

Examples

local playerPed = PlayerPedId()
local interiorId = GetInteriorFromEntity(playerPed)
local roomHash = GetRoomKeyFromEntity(playerPed)
local roomId = GetInteriorRoomIndexByHash(interiorId, roomHash)

if roomId ~= -1 then
  print("current room index is: " .. roomId)
end

GET_INVOKING_RESOURCE

Property Value
Native Name GET_INVOKING_RESOURCE
Hash 0x4D52FE5B
Return Type char*
API Set shared

GET_NUI_CURSOR_POSITION

Property Value
Native Name GET_NUI_CURSOR_POSITION
Hash 0xBDBA226F
Return Type void
API Set client
Parameters x (int*), y (int*)

GET_INTERIOR_PORTAL_ROOM_TO

Property Value
Native Name GET_INTERIOR_PORTAL_ROOM_TO
Hash 0x3F47F0E8
Return Type int
API Set client
Parameters interiorId (int), portalIndex (int)

Parameters

  • interiorId (int) — The target interior.
  • portalIndex (int) — Interior portal index.

Examples

local playerPed = PlayerPedId()
local interiorId = GetInteriorFromEntity(playerPed)

if interiorId ~= 0 then
  local roomIndex = 0

  local portalRoomTo = GetInteriorPortalRoomTo(interiorId, 0)
  print("portal " .. roomIndex .. " room TO is: " .. portalRoomTo)
end

GET_INTERIOR_ROOM_TIMECYCLE

Property Value
Native Name GET_INTERIOR_ROOM_TIMECYCLE
Hash 0x82BA3F88
Return Type int
API Set client
Parameters interiorId (int), roomIndex (int)

Parameters

  • interiorId (int) — The target interior.
  • roomIndex (int) — Interior room index.

Examples

local playerPed = PlayerPedId()
local interiorId = GetInteriorFromEntity(playerPed)
local roomHash = GetRoomKeyFromEntity(playerPed)
local roomId = GetInteriorRoomIndexByHash(interiorId, roomHash)

if roomId ~= -1 then
  local roomTimecycle = GetInteriorRoomTimecycle(interiorId, roomId)
  print("current room timecycle hash is: " .. roomTimecycle)
end

GET_INTERIOR_ROTATION

Property Value
Native Name GET_INTERIOR_ROTATION
Hash 0x5A039998
Return Type void
API Set client
Parameters interiorId (int), rotx (float*), rotY (float*), rotZ (float*), rotW (float*)

Parameters

  • interiorId (int) — The target interior.
  • rotx (float*)
  • rotY (float*)
  • rotZ (float*)
  • rotW (float*)

Examples

local playerPed = PlayerPedId()
local interiorId = GetInteriorFromEntity(playerPed)

if interiorId ~= 0 then
  local x, y, z, w = GetInteriorRotation(interiorId)
  print("current interior " .. interiorId .. " rotation is: " .. vec(x, y, z, w))
end

GET_NUMBER_OF_PED_COLLECTION_TEXTURE_VARIATIONS

Property Value
Native Name GET_NUMBER_OF_PED_COLLECTION_TEXTURE_VARIATIONS
Hash 0xD2C15D7
Return Type int
API Set client
Parameters ped (Ped), componentId (int), collection (char*), drawableId (int)

Description: An alternative to GET_NUMBER_OF_PED_TEXTURE_VARIATIONS that uses local collection indexing instead of the global one.

Parameters

GET_NET_TYPE_FROM_ENTITY

Property Value
Native Name GET_NET_TYPE_FROM_ENTITY
Hash 0x23B2A641
Return Type int
API Set server
Parameters entity (Entity)

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

FiveM:

enum eNetObjEntityType
{
    Automobile = 0,
    Bike = 1,
    Boat = 2,
    Door = 3,
    Heli = 4,
    Object = 5,
    Ped = 6,
    Pickup = 7,
    PickupPlacement = 8,
    Plane = 9,
    Submarine = 10,
    Player = 11,
    Trailer = 12,
    Train = 13
};

RedM:

enum eNetObjEntityType
{
    Animal = 0,
    Automobile = 1,
    Bike = 2,
    Boat = 3,
    Door = 4,
    Heli = 5,
    Object = 6,
    Ped = 7,
    Pickup = 8,
    PickupPlacement = 9,
    Plane = 10,
    Submarine = 11,
    Player = 12,
    Trailer = 13,
    Train = 14,
    DraftVeh = 15,
    StatsTracker = 16,
    PropSet = 17,
    AnimScene = 18,
    GroupScenario = 19,
    Herd = 20,
    Horse = 21,
    WorldState = 22,
    WorldProjectile = 23,
    Incident = 24,
    Guardzone = 25,
    PedGroup = 26,
    CombatDirector = 27,
    PedSharedTargeting = 28,
    Persistent = 29
};

Parameters

  • entity (Entity) — The entity to get the specific type of.

GET_INTERIOR_ROOM_EXTENTS

Property Value
Native Name GET_INTERIOR_ROOM_EXTENTS
Hash 0xF9E795DD
Return Type void
API Set client
Parameters interiorId (int), roomIndex (int), bbMinX (float*), bbMinY (float*), bbMinZ (float*), bbMaxX (float*), bbMaxY (float*), bbMaxZ (float*)

Parameters

  • interiorId (int) — The target interior.
  • roomIndex (int) — Interior room index.
  • bbMinX (float*)
  • bbMinY (float*)
  • bbMinZ (float*)
  • bbMaxX (float*)
  • bbMaxY (float*)
  • bbMaxZ (float*)

Examples

local playerPed = PlayerPedId()
local interiorId = GetInteriorFromEntity(playerPed)
local roomHash = GetRoomKeyFromEntity(playerPed)
local roomId = GetInteriorRoomIndexByHash(interiorId, roomHash)

if roomId ~= -1 then
  local minX, minY, minZ, maxX, maxY, maxZ = GetInteriorRoomExtents(interiorId, roomId)
  print("current room extents is: " .. vec(minX, minY, minZ) .." / " .. vec(maxX, maxY, maxZ))
end

GET_INTERIOR_PORTAL_COUNT

Property Value
Native Name GET_INTERIOR_PORTAL_COUNT
Hash 0xD05BB8B1
Return Type int
API Set client
Parameters interiorId (int)

Parameters

  • interiorId (int) — The target interior.

Examples

local playerPed = PlayerPedId()
local interiorId = GetInteriorFromEntity(playerPed)

if interiorId ~= 0 then
  local count = GetInteriorPortalCount(interiorId)
  print("interior " .. interiorId .. "has " .. count .. " portals")
end

GET_LAST_PED_IN_VEHICLE_SEAT

Property Value
Native Name GET_LAST_PED_IN_VEHICLE_SEAT
Hash 0xF7C6792D
Return Type Entity
API Set server
Parameters vehicle (Vehicle), seatIndex (int)

Parameters

  • vehicle (Vehicle) — The target vehicle.
  • seatIndex (int) — See eSeatPosition declared in IS_VEHICLE_SEAT_FREE.

GET_NUMBER_OF_PED_COLLECTION_PROP_DRAWABLE_VARIATIONS

Property Value
Native Name GET_NUMBER_OF_PED_COLLECTION_PROP_DRAWABLE_VARIATIONS
Hash 0x3B6A13E1
Return Type int
API Set client
Parameters ped (Ped), anchorPoint (int), collection (char*)

Description: An analogue of GET_NUMBER_OF_PED_PROP_DRAWABLE_VARIATIONS that returns number of prop variations inside a single collection instead of the total number across all collections.

Parameters

  • ped (Ped) — The target ped
  • anchorPoint (int) — One of the anchor points from SET_PED_PROP_INDEX
  • collection (char*) — Name of the collection. Empty string for the base game collection. See GET_PED_COLLECTION_NAME in order to list all available collections.

GET_NUM_RESOURCES

Property Value
Native Name GET_NUM_RESOURCES
Hash 0x863F27B
Return Type int
API Set shared

GET_PARKED_VEHICLE_DENSITY_MULTIPLIER

Property Value
Native Name GET_PARKED_VEHICLE_DENSITY_MULTIPLIER
Hash 0xFF72DF84
Return Type float
API Set client

Description: A getter for SET_PARKED_VEHICLE_DENSITY_MULTIPLIER_THIS_FRAME.

GET_IS_VEHICLE_PRIMARY_COLOUR_CUSTOM

Property Value
Native Name GET_IS_VEHICLE_PRIMARY_COLOUR_CUSTOM
Hash 0xD7EC8760
Return Type BOOL
API Set server
Parameters vehicle (Vehicle)

GET_PAUSE_MAP_POINTER_WORLD_POSITION

Property Value
Native Name GET_PAUSE_MAP_POINTER_WORLD_POSITION
Hash 0xE5AF7A82
Return Type Vector3
API Set client

Description: Returns the world position the pointer is hovering on the pause map.

GET_MAP_ZOOM_DATA_LEVEL

Property Value
Native Name GET_MAP_ZOOM_DATA_LEVEL
Hash 0x1363A998
Return Type BOOL
API Set client
Parameters index (int), zoomScale (float*), zoomSpeed (float*), scrollSpeed (float*), tilesX (float*), tilesY (float*)

Description: Returns the zoom level data by index from mapzoomdata.meta file.

Parameters

  • index (int) — Zoom level index.
  • zoomScale (float*) — fZoomScale value.
  • zoomSpeed (float*) — fZoomSpeed value.
  • scrollSpeed (float*) — fScrollSpeed value.
  • tilesX (float*) — vTiles X.
  • tilesY (float*) — vTiles Y.

GET_NUMBER_OF_PED_COLLECTION_PROP_TEXTURE_VARIATIONS

Property Value
Native Name GET_NUMBER_OF_PED_COLLECTION_PROP_TEXTURE_VARIATIONS
Hash 0x75CAF9CC
Return Type int
API Set client
Parameters ped (Ped), anchorPoint (int), collection (char*), propIndex (int)

Description: An alternative to GET_NUMBER_OF_PED_PROP_TEXTURE_VARIATIONS that uses local collection indexing instead of the global one.

Parameters

GET_NUM_PLAYER_IDENTIFIERS

Property Value
Native Name GET_NUM_PLAYER_IDENTIFIERS
Hash 0xFF7F66AB
Return Type int
API Set server
Parameters playerSrc (char*)

GET_PED_COLLECTION_NAME_FROM_DRAWABLE

Property Value
Native Name GET_PED_COLLECTION_NAME_FROM_DRAWABLE
Hash 0xD6BBA48B
Return Type char*
API Set client
Parameters ped (Ped), componentId (int), drawableId (int)

Description: Gets collection name for the given global drawable ID. Together with GET_PED_COLLECTION_LOCAL_INDEX_FROM_DRAWABLE is used to get collection and local index (inside the given collection) of the drawable. The collection name and index are used in functions like SET_PED_COLLECTION_COMPONENT_VARIATION.

Parameters

  • ped (Ped) — The target ped
  • componentId (int) — One of the components from SET_PED_COMPONENT_VARIATION
  • drawableId (int) — Global drawable ID. Same as set in SET_PED_COMPONENT_VARIATION. Global drawable ID points to drawables as if drawables from all collections for the given component are placed into one continuous array.

Examples

local ped = PlayerPedId()
-- Top for mp_f_freemode_01. From female_freemode_beach collection under index 1.
-- Global index is 17 because there is 16 top variations in the base game collection that goes before the female_freemode_beach collection.
local name = GetPedDrawableCollectionName(ped, 11, 17)
local index = GetPedDrawableCollectionLocalIndex(ped, 11, 17)
-- Equivalent to SetPedComponentVariation(ped, 11, 17, 0, 0)
SetPedCollectionComponentVariation(ped, 11, name, index, 0, 0)

GET_PED_DENSITY_MULTIPLIER

Property Value
Native Name GET_PED_DENSITY_MULTIPLIER
Hash 0xF5A904F9
Return Type float
API Set client

Description: A getter for SET_PED_DENSITY_MULTIPLIER_THIS_FRAME.

GET_IS_VEHICLE_SECONDARY_COLOUR_CUSTOM

Property Value
Native Name GET_IS_VEHICLE_SECONDARY_COLOUR_CUSTOM
Hash 0x288AD228
Return Type BOOL
API Set server
Parameters vehicle (Vehicle)

GET_NUM_PLAYER_INDICES

Property Value
Native Name GET_NUM_PLAYER_INDICES
Hash 0x63D13184
Return Type int
API Set server

GET_MINIMAP_TYPE

Property Value
Native Name GET_MINIMAP_TYPE
Hash 0xA6FF71C9
Return Type int
API Set client

Description: Get the minimap type:

0 = Off,
1 = Regular,
2 = Expanded,
3 = Simple,

GET_NUMBER_OF_PED_COLLECTION_DRAWABLE_VARIATIONS

Property Value
Native Name GET_NUMBER_OF_PED_COLLECTION_DRAWABLE_VARIATIONS
Hash 0x310D0271
Return Type int
API Set client
Parameters ped (Ped), componentId (int), collection (char*)

Description: An analogue of GET_NUMBER_OF_PED_DRAWABLE_VARIATIONS that returns number of drawable variations inside a single collection instead of the total number across all collections.

Parameters

  • ped (Ped) — The target ped
  • componentId (int) — One of the components from SET_PED_COMPONENT_VARIATION
  • collection (char*) — Name of the collection. Empty string for the base game collection. See GET_PED_COLLECTION_NAME in order to list all available collections.

GET_NETWORK_WALK_MODE

Property Value
Native Name GET_NETWORK_WALK_MODE
Hash 0x2CAFD5E9
Return Type bool
API Set client

GET_PED_CAUSE_OF_DEATH

Property Value
Native Name GET_PED_CAUSE_OF_DEATH
Hash 0x63458C27
Return Type Hash
API Set server
Parameters ped (Ped)

GET_NUM_PLAYER_TOKENS

Property Value
Native Name GET_NUM_PLAYER_TOKENS
Hash 0x619E4A3D
Return Type int
API Set server
Parameters playerSrc (char*)

GET_PASSWORD_HASH

Property Value
Native Name GET_PASSWORD_HASH
Hash 0x23473EA4
Return Type char*
API Set server
Parameters password (char*)

GET_PED_DESIRED_HEADING

Property Value
Native Name GET_PED_DESIRED_HEADING
Hash 0xC182F76E
Return Type float
API Set server
Parameters ped (Ped)

Parameters

  • ped (Ped) — The target ped

GET_PED_DRAWABLE_VARIATION_COLLECTION_LOCAL_INDEX

Property Value
Native Name GET_PED_DRAWABLE_VARIATION_COLLECTION_LOCAL_INDEX
Hash 0x9970386F
Return Type int
API Set client
Parameters ped (Ped), componentId (int)

Description: An analogue to GET_PED_DRAWABLE_VARIATION that returns collection local drawable index (inside GET_PED_DRAWABLE_VARIATION_COLLECTION_NAME collection) instead of the global drawable index.

Parameters

GET_PED_EYE_COLOR

Property Value
Native Name GET_PED_EYE_COLOR
Hash 0xA47B860F
Return Type int
API Set client
Parameters ped (Ped)

Description: A getter for _SET_PED_EYE_COLOR. Returns -1 if fails to get.

Parameters

  • ped (Ped) — The target ped

Examples

local pedEyeColour = GetPedEyeColor(PlayerPedId())
if pedEyeColour == 7 then
  print("Gray eyes!")
end

GET_PED_COLLECTION_LOCAL_INDEX_FROM_PROP

Property Value
Native Name GET_PED_COLLECTION_LOCAL_INDEX_FROM_PROP
Hash 0xFBDB885F
Return Type int
API Set client
Parameters ped (Ped), anchorPoint (int), propIndex (int)

Description: Gets local index inside a collection (which can be obtained using GET_PED_COLLECTION_NAME_FROM_PROP) for the given global prop index. The collection name and index are used in functions like SET_PED_COLLECTION_PROP_INDEX.

Parameters

  • ped (Ped) — The target ped
  • anchorPoint (int) — One of the anchor points from SET_PED_PROP_INDEX
  • propIndex (int) — Global prop index. Same as set by drawableId in SET_PED_PROP_INDEX. Global prop index points to prop as if props from all collections for the given component are placed into one continuous array.

Examples

local ped = PlayerPedId()
-- Hat for mp_f_freemode_01. From female_freemode_beach collection under index 1.
-- Global index is 21 because there is 20 head prop variations in the base game collection that goes before the female_freemode_beach collection.
local name = GetPedPropCollectionName(ped, 0, 21)
local index = GetPedPropCollectionLocalIndex(ped, 0, 21)
-- Equivalent to SetPedPropIndex(ped, 0, 21, 0, false)
SetPedCollectionPropIndex(ped, 0, name, index, 0, false)

GET_PED_COLLECTION_NAME_FROM_PROP

Property Value
Native Name GET_PED_COLLECTION_NAME_FROM_PROP
Hash 0x8ED0C17
Return Type char*
API Set client
Parameters ped (Ped), anchorPoint (int), propIndex (int)

Description: Gets collection name for the given global prop index. Together with GET_PED_COLLECTION_LOCAL_INDEX_FROM_PROP is used to get collection and local index (inside the given collection) of the prop. The collection name and index are used in functions like SET_PED_COLLECTION_PROP_INDEX.

Parameters

  • ped (Ped) — The target ped
  • anchorPoint (int) — One of the anchor points from SET_PED_PROP_INDEX
  • propIndex (int) — Global prop index. Same as set by drawableId in SET_PED_PROP_INDEX. Global prop index points to prop as if props from all collections for the given component are placed into one continuous array.

Examples

local ped = PlayerPedId()
-- Hat for mp_f_freemode_01. From female_freemode_beach collection under index 1.
-- Global index is 21 because there is 20 head prop variations in the base game collection that goes before the female_freemode_beach collection.
local name = GetPedPropCollectionName(ped, 0, 21)
local index = GetPedPropCollectionLocalIndex(ped, 0, 21)
-- Equivalent to SetPedPropIndex(ped, 0, 21, 0, false)
SetPedCollectionPropIndex(ped, 0, name, index, 0, false)

GET_PED_COLLECTION_LOCAL_INDEX_FROM_DRAWABLE

Property Value
Native Name GET_PED_COLLECTION_LOCAL_INDEX_FROM_DRAWABLE
Hash 0x94EB1FE4
Return Type int
API Set client
Parameters ped (Ped), componentId (int), drawableId (int)

Description: Gets local index inside a collection (which can be obtained using GET_PED_COLLECTION_NAME_FROM_DRAWABLE) for the given global drawable ID. The collection name and index are used in functions like SET_PED_COLLECTION_COMPONENT_VARIATION.

Parameters

  • ped (Ped) — The target ped
  • componentId (int) — One of the components from SET_PED_COMPONENT_VARIATION
  • drawableId (int) — Global drawable ID. Same as set in SET_PED_COMPONENT_VARIATION. Global drawable ID points to drawables as if drawables from all collections for the given component are placed into one continuous array.

Examples

local ped = PlayerPedId()
-- Top for mp_f_freemode_01. From female_freemode_beach collection under index 1.
-- Global index is 17 because there is 16 top variations in the base game collection that goes before the female_freemode_beach collection.
local name = GetPedDrawableCollectionName(ped, 11, 17)
local index = GetPedDrawableCollectionLocalIndex(ped, 11, 17)
-- Equivalent to SetPedComponentVariation(ped, 11, 17, 0, 0)
SetPedCollectionComponentVariation(ped, 11, name, index, 0, 0)

GET_NUM_RESOURCE_METADATA

Property Value
Native Name GET_NUM_RESOURCE_METADATA
Hash 0x776E864
Return Type int
API Set shared
Parameters resourceName (char*), metadataKey (char*)

Description: Gets the amount of metadata values with the specified key existing in the specified resource's manifest. See also: Resource manifest

Parameters

  • resourceName (char*) — The resource name.
  • metadataKey (char*) — The key to look up in the resource manifest.

GET_PED_FACE_FEATURE

Property Value
Native Name GET_PED_FACE_FEATURE
Hash 0xBA352ADD
Return Type float
API Set client
Parameters ped (Ped), index (int)

Description: A getter for _SET_PED_FACE_FEATURE. Returns 0.0 if fails to get.

Parameters

  • ped (Ped) — The target ped
  • index (int) — Face feature index

Examples

local noseWidth = GetPedFaceFeature(PlayerPedId(), 0)
if noseWidth == 1.0 then
  print("You have big nose!")
end

GET_PED_DRAWABLE_VARIATION_COLLECTION_NAME

Property Value
Native Name GET_PED_DRAWABLE_VARIATION_COLLECTION_NAME
Hash 0xBCE0AB63
Return Type char*
API Set client
Parameters ped (Ped), componentId (int)

Description: An analogue to GET_PED_DRAWABLE_VARIATION that returns collection name instead of the global drawable index.

Should be used together with GET_PED_DRAWABLE_VARIATION_COLLECTION_LOCAL_INDEX.

Parameters

GET_PED_COLLECTION_NAME

Property Value
Native Name GET_PED_COLLECTION_NAME
Hash 0xFED5D83A
Return Type char*
API Set client
Parameters ped (Ped), index (int)

Description: Returns name of collection under given index for the given Ped.

Collections are groups of drawable components or props available for the given Ped. Usually collection corresponds to a certain DLC or the base game. See SET_PED_COLLECTION_COMPONENT_VARIATION, SET_PED_COLLECTION_PROP_INDEX, GET_NUMBER_OF_PED_COLLECTION_DRAWABLE_VARIATIONS etc natives for more details on how to work with collections.

GET_PED_COLLECTION_NAME can be used together with GET_PED_COLLECTIONS_COUNT to list all collections attached to Ped.

Parameters

  • ped (Ped) — The target ped
  • index (int) — The target collection index

Examples

local ped = PlayerPedId()
local count = GetPedCollectionsCount(ped)
for i = 0, count - 1 do
  print(GetPedCollectionName(ped, i))
end

GET_PED_DECORATIONS

Property Value
Native Name GET_PED_DECORATIONS
Hash 0x7CCE1163
Return Type object
API Set client
Parameters ped (Ped)

Description: Returns a list of decorations applied to a ped.

The data returned adheres to the following layout:

[ [ collectionHash1, overlayHash1 ], ..., [c ollectionHashN, overlayHashN ] ]

This command will return undefined data if invoked on a remote player ped.

Parameters

  • ped (Ped) — The ped you want to retrieve data for.

GET_PED_HAIR_COLOR

Property Value
Native Name GET_PED_HAIR_COLOR
Hash 0xA3EA2893
Return Type int
API Set client
Parameters ped (Ped)

Description: A getter for _SET_PED_HAIR_COLOR. Returns -1 if fails to get.

Parameters

  • ped (Ped) — The target ped

Examples

local primaryColour = GetPedHairColor(PlayerPedId())
if primaryColour == 18 then
  print("You have red hair!")
end

GET_PED_ARMOUR

Property Value
Native Name GET_PED_ARMOUR
Hash 0x2CE311A7
Return Type int
API Set server
Parameters ped (Ped)

GET_PED_DRAWABLE_GLOBAL_INDEX_FROM_COLLECTION

Property Value
Native Name GET_PED_DRAWABLE_GLOBAL_INDEX_FROM_COLLECTION
Hash 0x280F1FC3
Return Type int
API Set client
Parameters ped (Ped), componentId (int), collection (char*), drawableId (int)

Description: Returns global drawable index based on the local one. Is it a reverse to GET_PED_COLLECTION_NAME_FROM_DRAWABLE and GET_PED_COLLECTION_LOCAL_INDEX_FROM_DRAWABLE natives.

Drawables are stored inside collections. Each collection usually corresponds to a certain DCL or the base game.

If all drawables from all collections are placed into one continuous array - the global index will correspond to the index of drawable in such array. Local index is index of drawable in this array relative to the start of the given collection.

Parameters

GET_PED_BONE_MATRIX

Property Value
Native Name GET_PED_BONE_MATRIX
Hash 0x9C5E7C9C
Return Type void
API Set client
Parameters ped (Ped), boneId (int), forwardVector (Vector3*), rightVector (Vector3*), upVector (Vector3*), position (Vector3*)

Description: Returns the bone matrix of the specified bone id. usefull for entity attachment

Examples

local fowardVector, rightVector, upVector, position = GetPedBoneMatrix(PlayerPedId(),boneId)

GET_PED_PROP_COLLECTION_NAME

Property Value
Native Name GET_PED_PROP_COLLECTION_NAME
Hash 0x6B5653E4
Return Type char*
API Set client
Parameters ped (Ped), anchorPoint (int)

Description: An analogue to GET_PED_PROP_INDEX that returns collection name instead of the global drawable index.

Should be used together with GET_PED_PROP_COLLECTION_LOCAL_INDEX.

Parameters

  • ped (Ped) — The target ped
  • anchorPoint (int) — One of the anchor points from SET_PED_PROP_INDEX

GET_PED_SCRIPT_TASK_COMMAND

Property Value
Native Name GET_PED_SCRIPT_TASK_COMMAND
Hash 0x84FE084
Return Type Hash
API Set server
Parameters ped (Ped)

Description: Gets the script task command currently assigned to the ped.

Parameters

  • ped (Ped) — The target ped.

GET_PED_PROP_GLOBAL_INDEX_FROM_COLLECTION

Property Value
Native Name GET_PED_PROP_GLOBAL_INDEX_FROM_COLLECTION
Hash 0x2CB45CDC
Return Type int
API Set client
Parameters ped (Ped), anchorPoint (int), collection (char*), propIndex (int)

Description: Returns global prop index based on the local one. Is it a reverse to GET_PED_COLLECTION_NAME_FROM_PROP and GET_PED_COLLECTION_LOCAL_INDEX_FROM_PROP natives.

Props are stored inside collections. Each collection usually corresponds to a certain DCL or the base game.

If all props from all collections are placed into one continuous array - the global index will correspond to the index of the prop in such array. Local index is index of the prop in this array relative to the start of the given collection.

Parameters

GET_PED_MOVEMENT_CLIPSET

Property Value
Native Name GET_PED_MOVEMENT_CLIPSET
Hash 0x69E81E3D
Return Type int
API Set client
Parameters ped (Ped)

Parameters

  • ped (Ped) — The target ped.

GET_PED_HAIR_HIGHLIGHT_COLOR

Property Value
Native Name GET_PED_HAIR_HIGHLIGHT_COLOR
Hash 0x4B087305
Return Type int
API Set client
Parameters ped (Ped)

Description: A getter for _SET_PED_HAIR_COLOR. Returns -1 if fails to get.

Parameters

  • ped (Ped) — The target ped

Examples

local secondaryColour = GetPedHairHighlightColor(PlayerPedId())
if secondaryColour == 32 then
  print("You have pink hair highlight colour!")
end

GET_PED_MAX_HEALTH

Property Value
Native Name GET_PED_MAX_HEALTH
Hash 0xA45B6C8D
Return Type int
API Set server
Parameters ped (Ped)

GET_PED_SCRIPT_TASK_STAGE

Property Value
Native Name GET_PED_SCRIPT_TASK_STAGE
Hash 0x44B0E5E2
Return Type int
API Set server
Parameters ped (Ped)

Description: Gets the stage of the peds scripted task.

Parameters

  • ped (Ped) — The target ped.

GET_PED_IN_VEHICLE_SEAT

Property Value
Native Name GET_PED_IN_VEHICLE_SEAT
Hash 0x388FDE9A
Return Type Entity
API Set server
Parameters vehicle (Vehicle), seatIndex (int)

Parameters

  • vehicle (Vehicle) — The target vehicle.
  • seatIndex (int) — See eSeatPosition declared in IS_VEHICLE_SEAT_FREE.

GET_PED_MODEL_PERSONALITY

Property Value
Native Name GET_PED_MODEL_PERSONALITY
Hash 0xFE08CAD6
Return Type Hash
API Set client
Parameters modelHash (Hash)

Description: Gets a ped model's personality type.

Parameters

  • modelHash (Hash) — Ped's model.

GET_PED_SOURCE_OF_DAMAGE

Property Value
Native Name GET_PED_SOURCE_OF_DAMAGE
Hash 0x535DB43F
Return Type Entity
API Set server
Parameters ped (Ped)

Description: Get the last entity that damaged the ped. This native is used server side when using OneSync.

Parameters

  • ped (Ped) — The target ped

GET_PLAYER_GUID

Property Value
Native Name GET_PLAYER_GUID
Hash 0xE52D9680
Return Type char*
API Set server
Parameters playerSrc (char*)

GET_PED_RELATIONSHIP_GROUP_HASH

Property Value
Native Name GET_PED_RELATIONSHIP_GROUP_HASH
Hash 0x354F283C
Return Type Hash
API Set server
Parameters ped (Ped)

Description: Gets the current relationship group hash of a ped.

Parameters

  • ped (Ped) — The target ped

GET_PED_COLLECTIONS_COUNT

Property Value
Native Name GET_PED_COLLECTIONS_COUNT
Hash 0x45946359
Return Type int
API Set client
Parameters ped (Ped)

Description: Returns number of variation collections available for the given Ped.

Collections are groups of drawable components or props available for the given Ped. Usually collection corresponds to a certain DLC or the base game. See SET_PED_COLLECTION_COMPONENT_VARIATION, SET_PED_COLLECTION_PROP_INDEX, GET_NUMBER_OF_PED_COLLECTION_DRAWABLE_VARIATIONS etc natives for more details on how to work with collections.

GET_PED_COLLECTIONS_COUNT can be used together with GET_PED_COLLECTION_NAME to list all collections attached to Ped.

Parameters

  • ped (Ped) — The target ped

Examples

local ped = PlayerPedId()
local count = GetPedCollectionsCount(ped)
for i = 0, count - 1 do
  print(GetPedCollectionName(ped, i))
end

GET_PLAYER_FAKE_WANTED_LEVEL

Property Value
Native Name GET_PLAYER_FAKE_WANTED_LEVEL
Hash 0x98D244
Return Type int
API Set server
Parameters playerSrc (char*)

Description: Gets the current fake wanted level for a specified player. This native is used server side when using OneSync.

Parameters

  • playerSrc (char*) — The target player

GET_PED_SWEAT

Property Value
Native Name GET_PED_SWEAT
Hash 0x44B91E94
Return Type float
API Set client
Parameters ped (Ped)

Description: A getter for SET_PED_SWEAT.

Parameters

  • ped (Ped) — The target ped

Examples

local sweat = GetPedSweat(PlayerPedId())

GET_PLAYER_FOCUS_POS

Property Value
Native Name GET_PLAYER_FOCUS_POS
Hash 0x586F80FF
Return Type Vector3
API Set server
Parameters playerSrc (char*)

Description: Gets the focus position (i.e. the position of the active camera in the game world) of a player.

Parameters

  • playerSrc (char*) — The player to get the focus position of

GET_PED_STEALTH_MOVEMENT

Property Value
Native Name GET_PED_STEALTH_MOVEMENT
Hash 0x40321B83
Return Type bool
API Set server
Parameters ped (Ped)

Parameters

  • ped (Ped) — The target ped.

GET_PED_PROP_COLLECTION_LOCAL_INDEX

Property Value
Native Name GET_PED_PROP_COLLECTION_LOCAL_INDEX
Hash 0xCD420AD1
Return Type int
API Set client
Parameters ped (Ped), anchorPoint (int)

Description: An analogue to GET_PED_PROP_INDEX that returns collection local prop index (inside GET_PED_PROP_COLLECTION_NAME collection) instead of the global prop index.

Parameters

  • ped (Ped) — The target ped
  • anchorPoint (int) — One of the anchor points from SET_PED_PROP_INDEX

GET_PED_HEAD_OVERLAY_DATA

Property Value
Native Name GET_PED_HEAD_OVERLAY_DATA
Hash 0xC46EE605
Return Type BOOL
API Set client
Parameters ped (Ped), index (int), overlayValue (int*), colourType (int*), firstColour (int*), secondColour (int*), overlayOpacity (float*)

Description: A getter for SET_PED_HEAD_OVERLAY and _SET_PED_HEAD_OVERLAY_COLOR natives.

Parameters

  • ped (Ped) — The target ped
  • index (int) — Overlay index
  • overlayValue (int*) — Overlay value pointer
  • colourType (int*) — Colour type pointer
  • firstColour (int*) — First colour pointer
  • secondColour (int*) — Second colour pointer
  • overlayOpacity (float*) — Opacity pointer

Examples

-- getting beard overlay data
local success, overlayValue, colourType, firstColour, secondColour, overlayOpacity = GetPedHeadOverlayData(PlayerPedId(), 1)
if success then
  -- incrementing value
  SetPedHeadOverlay(PlayerPedId(), 1, overlayValue + 1, overlayOpacity)
end

GET_PED_MODEL_HEALTH_CONFIG

Property Value
Native Name GET_PED_MODEL_HEALTH_CONFIG
Hash 0xF71542F7
Return Type Hash
API Set client
Parameters modelHash (Hash)

Description: Gets a ped model's health config.

Parameters

  • modelHash (Hash) — Ped's model.

Examples

GetPedModelHealthConfig(`mp_f_freemode_01`)

GET_PLAYER_IDENTIFIER

Property Value
Native Name GET_PLAYER_IDENTIFIER
Hash 0x7302DBCF
Return Type char*
API Set server
Parameters playerSrc (char*), identiferIndex (int)

Description: To get the number of identifiers, use GET_NUM_PLAYER_IDENTIFIERS

To get a specific type of identifier, use GET_PLAYER_IDENTIFIER_BY_TYPE

GET_PED_SPECIFIC_TASK_TYPE

Property Value
Native Name GET_PED_SPECIFIC_TASK_TYPE
Hash 0x7F4563D3
Return Type int
API Set server
Parameters ped (Ped), index (int)

Description: Gets the type of a ped's specific task given an index of the CPedTaskSpecificDataNode nodes. A ped will typically have a task at index 0, if a ped has multiple tasks at once they will be in the order 0, 1, 2, etc.

Parameters

  • ped (Ped) — The target ped.
  • index (int) — A zero-based index with a maximum value of 7.

GET_PLAYER_ENDPOINT

Property Value
Native Name GET_PLAYER_ENDPOINT
Hash 0xFEE404F9
Return Type char*
API Set server
Parameters playerSrc (char*)

GET_PLAYER_LAST_MSG

Property Value
Native Name GET_PLAYER_LAST_MSG
Hash 0x427E8E6A
Return Type int
API Set server
Parameters playerSrc (char*)

GET_PLAYER_INVINCIBLE

Property Value
Native Name GET_PLAYER_INVINCIBLE
Hash 0x680C90EE
Return Type BOOL
API Set server
Parameters playerSrc (char*)

Parameters

  • playerSrc (char*) — The player handle

GET_PLAYER_NAME

Property Value
Native Name GET_PLAYER_NAME
Hash 0x406B4B20
Return Type char*
API Set server
Parameters playerSrc (char*)

GET_PED_SOURCE_OF_DEATH

Property Value
Native Name GET_PED_SOURCE_OF_DEATH
Hash 0x84ADF9EB
Return Type Entity
API Set server
Parameters ped (Ped)

Description: Get the entity that killed the ped. This native is used server side when using OneSync.

Parameters

  • ped (Ped) — The target ped

GET_PLAYER_TEAM

Property Value
Native Name GET_PLAYER_TEAM
Hash 0x9873E404
Return Type int
API Set server
Parameters playerSrc (char*)

Parameters

  • playerSrc (char*) — The player handle

GET_PLAYER_CAMERA_ROTATION

Property Value
Native Name GET_PLAYER_CAMERA_ROTATION
Hash 0x433C765D
Return Type Vector3
API Set server
Parameters playerSrc (char*)

Description: Gets the current camera rotation for a specified player. This native is used server side when using OneSync.

Parameters

  • playerSrc (char*) — The player handle.

GET_PLAYER_MAX_ARMOUR

Property Value
Native Name GET_PLAYER_MAX_ARMOUR
Hash 0x2A50657
Return Type int
API Set server
Parameters playerSrc (char*)

Parameters

  • playerSrc (char*) — The player handle

GET_PLAYER_FROM_SERVER_ID

Property Value
Native Name GET_PLAYER_FROM_SERVER_ID
Hash 0x344EA166
Return Type Player
API Set client
Parameters serverId (int)

Description: Gets a local client's Player ID from its server ID counterpart, assuming the passed serverId exists on the client.

If no matching client is found, or an invalid value is passed over as the serverId native's parameter, the native result will be -1.

It's worth noting that this native method can only retrieve information about clients that are culled to the connected client.

Parameters

  • serverId (int) — The player's server ID.

Examples

--We will assume the serverId is '4' in this scenario and that it's a valid serverId.

-- Passing invalid Player IDs such as 'nil' or IDs that don't exist will result in playerId being -1.

local playerId = GetPlayerFromServerId(serverId);

-- If the resulting playerId is not invalid (not equal to -1)
if playerId ~= -1 then
    -- Do our stuff on this player.
end

GET_PLAYER_FROM_STATE_BAG_NAME

Property Value
Native Name GET_PLAYER_FROM_STATE_BAG_NAME
Hash 0xA56135E0
Return Type int
API Set shared
Parameters bagName (char*)

Description: On the server this will return the players source, on the client it will return the player handle.

Parameters

  • bagName (char*) — An internal state bag ID from the argument to a state bag change handler.

Examples

AddStateBagChangeHandler("isDead", null, async (bagName, key, value /* boolean */) => {
    const ply = GetPlayerFromStateBagName(bagName);
    // The player doesn't exist!
    if (ply === 0) return;
    console.log(`Player: ${GetPlayerName(ply)} ${value ? 'died!' : 'is alive!'`)
})
AddStateBagChangeHandler("isDead", nil, function(bagName, key, value) 
    local ply = GetPlayerFromStateBagName(bagName)
    -- The player doesn't exist!
    if ply == 0 then return end
    print("Player: " .. GetPlayerName(ply) .. value and 'died!' or 'is alive!')
end)

GET_PLAYER_TIME_IN_PURSUIT

Property Value
Native Name GET_PLAYER_TIME_IN_PURSUIT
Hash 0x7ADE63E1
Return Type int
API Set server
Parameters playerSrc (char*), lastPursuit (BOOL)

Description: ``` Gets the amount of time player has spent evading the cops. Counter starts and increments only when cops are chasing the player. If the player is evading, the timer will pause.


### Parameters
- **`playerSrc`** (`char*`) — The target player
- **`lastPursuit`** (`BOOL`) — False = CurrentPursuit, True = LastPursuit

## GET_PLAYER_SERVER_ID

| Property | Value |
|----------|-------|
| Native Name | `GET_PLAYER_SERVER_ID` |
| Hash | `0x4D97BCC7` |
| Return Type | `int` |
| API Set | `client` |
| Parameters | `player` (Player) |

## GET_PLAYER_IDENTIFIER_BY_TYPE

| Property | Value |
|----------|-------|
| Native Name | `GET_PLAYER_IDENTIFIER_BY_TYPE` |
| Hash | `0xA61C8FC6` |
| Return Type | `char*` |
| API Set | `server` |
| Parameters | `playerSrc` (char*), `identifierType` (char*) |

**Description:** Get an identifier from a player by the type of the identifier.
Known [Identifiers](https://docs.fivem.net/docs/scripting-reference/runtimes/lua/functions/GetPlayerIdentifiers/#identifier-types)

### Parameters
- **`playerSrc`** (`char*`) — The player to get the identifier for
- **`identifierType`** (`char*`) — The string to match in an identifier, this can be `"license"` for example.

### Examples
```lua
local playerLicenses = {}

AddEventHandler('playerJoining', function()
    playerLicenses[source] = GetPlayerIdentifierByType(source, 'license')
end)
let playerLicenses = {};

on('playerJoining', () => {
    playerLicenses[source] = GetPlayerIdentifierByType(source, 'license');
});
using System.Collections.Generic;
using static CitizenFX.Core.Native.API;
// ...

// In class
private Dictionary<int, string> PlayerLicenses = new Dictionary<int, string>();

// In class constructor
EventHandlers["playerJoining"] += new Action<Player>(SetLicense);

// Delegate method
private void SetLicense([FromSource]Player player) {
    PlayerLicenses.Add(player.Handle, GetPlayerIdentifierByType(player.Handle, "license"));
}

GET_PLAYER_MAX_HEALTH

Property Value
Native Name GET_PLAYER_MAX_HEALTH
Hash 0x8154E470
Return Type int
API Set server
Parameters playerSrc (char*)

Parameters

  • playerSrc (char*) — The player handle

GET_PLAYER_INVINCIBLE_2

Property Value
Native Name GET_PLAYER_INVINCIBLE_2
Hash 0xF2E3912B
Return Type BOOL
API Set client
Parameters player (Player)

Description: Unlike GET_PLAYER_INVINCIBLE this native gets both SET_PLAYER_INVINCIBLE_KEEP_RAGDOLL_ENABLED and SET_PLAYER_INVINCIBLE invincibility state.

Parameters

  • player (Player) — The player id

GET_PLAYER_FROM_INDEX

Property Value
Native Name GET_PLAYER_FROM_INDEX
Hash 0xC8A9CE08
Return Type char*
API Set server
Parameters index (int)

GET_PLAYER_PING

Property Value
Native Name GET_PLAYER_PING
Hash 0xFF1290D4
Return Type int
API Set server
Parameters playerSrc (char*)

Description: See GET_PLAYER_PEER_STATISTICS if you want more detailed information, like packet loss, and packet/rtt variance

GET_PLAYER_MAX_STAMINA

Property Value
Native Name GET_PLAYER_MAX_STAMINA
Hash 0xD014AB79
Return Type float
API Set client
Parameters playerId (Player)

Parameters

  • playerId (Player) — The player index.

GET_PLAYER_MELEE_WEAPON_DAMAGE_MODIFIER

Property Value
Native Name GET_PLAYER_MELEE_WEAPON_DAMAGE_MODIFIER
Hash 0x8689A825
Return Type float
API Set shared
Parameters playerId (Player)

Description: A getter for SET_PLAYER_MELEE_WEAPON_DAMAGE_MODIFIER.

Parameters

  • playerId (Player) — The player index.

GET_PLAYER_TIME_ONLINE

Property Value
Native Name GET_PLAYER_TIME_ONLINE
Hash 0x67D2E605
Return Type int
API Set server
Parameters playerSrc (char*)

Description: Gets the current time online for a specified player.

Parameters

  • playerSrc (char*) — A player.

Examples

local function ShowTimeOnline()
    local player = source
    local secondsTotalOnline = GetPlayerTimeOnline(player)

    print(("Time online : %f H %f min %f"):format(
        (secondsTotalOnline / 3600),
        ((secondsTotalOnline / 60) % 60),
        (secondsTotalOnline % 60)
    ))
end

RegisterNetEvent("myTimeOnline", ShowTimeOnline)

GET_RESOURCE_PATH

Property Value
Native Name GET_RESOURCE_PATH
Hash 0x61DCF017
Return Type char*
API Set server
Parameters resourceName (char*)

Description: Returns the physical on-disk path of the specified resource.

Parameters

  • resourceName (char*) — The name of the resource.

GET_RANDOM_VEHICLE_DENSITY_MULTIPLIER

Property Value
Native Name GET_RANDOM_VEHICLE_DENSITY_MULTIPLIER
Hash 0x7B0D00C5
Return Type float
API Set client

Description: A getter for SET_RANDOM_VEHICLE_DENSITY_MULTIPLIER_THIS_FRAME. Same as vehicle density multiplier.

GET_PLAYER_PED

Property Value
Native Name GET_PLAYER_PED
Hash 0x6E31E993
Return Type Entity
API Set server
Parameters playerSrc (char*)

Description: Used to get the player's Ped Entity ID when a valid playerSrc is passed.

Parameters

  • playerSrc (char*) — The player source, passed as a string.

Examples

-- Let's assume source is a valid ID
local pedId = GetPlayerPed(source);

-- If pedId is valid (not equal to 0)
if pedId ~= 0 then
    -- Do something with this ped!
end

GET_PLAYER_MELEE_WEAPON_DEFENSE_MODIFIER

Property Value
Native Name GET_PLAYER_MELEE_WEAPON_DEFENSE_MODIFIER
Hash 0x27E94EF8
Return Type float
API Set client
Parameters playerId (Player)

Description: A getter for SET_PLAYER_MELEE_WEAPON_DEFENSE_MODIFIER.

Parameters

  • playerId (Player) — The player index.

GET_PLAYER_VEHICLE_DEFENSE_MODIFIER

Property Value
Native Name GET_PLAYER_VEHICLE_DEFENSE_MODIFIER
Hash 0x8326E7CD
Return Type float
API Set client
Parameters playerId (Player)

Description: A getter for SET_PLAYER_VEHICLE_DEFENSE_MODIFIER.

Parameters

  • playerId (Player) — The player index.

GET_PLAYER_VEHICLE_DAMAGE_MODIFIER

Property Value
Native Name GET_PLAYER_VEHICLE_DAMAGE_MODIFIER
Hash 0x78F27B1F
Return Type float
API Set client
Parameters playerId (Player)

Description: A getter for SET_PLAYER_VEHICLE_DAMAGE_MODIFIER.

Parameters

  • playerId (Player) — The player index.

GET_PLAYER_STAMINA

Property Value
Native Name GET_PLAYER_STAMINA
Hash 0xE415EC5C
Return Type float
API Set client
Parameters playerId (Player)

Parameters

  • playerId (Player) — The player index.

GET_PLAYER_WANTED_CENTRE_POSITION

Property Value
Native Name GET_PLAYER_WANTED_CENTRE_POSITION
Hash 0x821F2D2C
Return Type Vector3
API Set server
Parameters playerSrc (char*)

Description: Gets the current known coordinates for the specified player from cops perspective. This native is used server side when using OneSync.

Parameters

  • playerSrc (char*) — The target player

GET_PLAYER_PEER_STATISTICS

Property Value
Native Name GET_PLAYER_PEER_STATISTICS
Hash 0x9A928294
Return Type int
API Set server
Parameters playerSrc (char*), peerStatistic (int)

Description: ```cpp const int ENET_PACKET_LOSS_SCALE = 65536;

enum PeerStatistics { // PacketLoss will only update once every 10 seconds, use PacketLossEpoch if you want the time // since the last time the packet loss was updated.

// the amount of packet loss the player has, needs to be scaled with PACKET_LOSS_SCALE
PacketLoss = 0,
// The variance in the packet loss
PacketLossVariance = 1,
// The time since the last packet update in ms, relative to the peers connection time
PacketLossEpoch = 2,
// The mean amount of time it takes for a packet to get to the client (ping)
RoundTripTime = 3,
// The variance in the round trip time
RoundTripTimeVariance = 4,
// Despite their name, these are only updated once every 5 seconds, you can get the last time this was updated with PacketThrottleEpoch
// The last recorded round trip time of a packet
LastRoundTripTime = 5,
// The last round trip time variance
LastRoundTripTimeVariance = 6,
// The time since the last packet throttle update, relative to the peers connection time
PacketThrottleEpoch = 7,

};


These statistics only update once every 10 seconds.

### Parameters
- **`playerSrc`** (`char*`) — The player to get the stats of
- **`peerStatistic`** (`int`) — The statistic to get, this will error if its out of range

### Examples
```js

setInterval(() => {
	const ENET_PACKET_LOSS_SCALE = 65536;

	const PLAYER_SERVER_ID = 1;

	const packetLoss = GetPlayerPeerStatistics(PLAYER_SERVER_ID, 0 /* PacketLoss */);
	const packetLossVariance = GetPlayerPeerStatistics(PLAYER_SERVER_ID, 1 /* PacketLossVariance */);
	const packetLossEpoch = GetPlayerPeerStatistics(PLAYER_SERVER_ID, 2 /* PacketLossEpoch */)
	const rtt = GetPlayerPeerStatistics(PLAYER_SERVER_ID, 3 /* RoundTripTime */);
	const rttVariance = GetPlayerPeerStatistics(PLAYER_SERVER_ID, 4 /* RoundTripTimeVariance */);
	const lastRtt = GetPlayerPeerStatistics(PLAYER_SERVER_ID, 5 /* LastRoundTripTime */);
	const lastRttVariance = GetPlayerPeerStatistics(PLAYER_SERVER_ID, 6 /* LastRoundTripTimeVariance */);
	const packetThrottleEpoch = GetPlayerPeerStatistics(PLAYER_SERVER_ID, 7 /* PacketThrottleEpoch */);

	console.log(`packetLoss: ${packetLoss}`);
	console.log(`packetLossVariance: ${packetLossVariance}`);
	console.log(`packetLossEpch: ${packetLossEpoch}`);

	console.log(`packetLossScaled: ${packetLoss / ENET_PACKET_LOSS_SCALE}`);
	console.log(`packetLossVarianceScaled: ${packetLossVariance / ENET_PACKET_LOSS_SCALE}`);

	console.log(`rtt: ${rtt}`);
	console.log(`rttVariance: ${rttVariance}`);

	console.log(`lastRtt: ${lastRtt}`);
	console.log(`lastRttVariance: ${lastRttVariance}`);
	console.log(`packetThrottleEpoch: ${packetThrottleEpoch}`);
}, 10000)

GET_PLAYER_WEAPON_DAMAGE_MODIFIER

Property Value
Native Name GET_PLAYER_WEAPON_DAMAGE_MODIFIER
Hash 0x2A3D7CDA
Return Type float
API Set shared
Parameters playerId (Player)

Description: A getter for SET_PLAYER_WEAPON_DAMAGE_MODIFIER.

Parameters

  • playerId (Player) — The player index.

GET_PLAYER_ROUTING_BUCKET

Property Value
Native Name GET_PLAYER_ROUTING_BUCKET
Hash 0x52441C34
Return Type int
API Set server
Parameters playerSrc (char*)

Description: Gets the routing bucket for the specified player.

Routing buckets are also known as 'dimensions' or 'virtual worlds' in past echoes, however they are population-aware.

Parameters

  • playerSrc (char*) — The player to get the routing bucket for.

GET_PLAYER_WEAPON_DEFENSE_MODIFIER

Property Value
Native Name GET_PLAYER_WEAPON_DEFENSE_MODIFIER
Hash 0xF1543251
Return Type float
API Set shared
Parameters playerId (Player)

Description: A getter for SET_PLAYER_WEAPON_DEFENSE_MODIFIER.

Parameters

  • playerId (Player) — The player index.

GET_RESOURCE_COMMANDS

Property Value
Native Name GET_RESOURCE_COMMANDS
Hash 0x97628584
Return Type object
API Set shared
Parameters resource (char*)

Description: Returns all commands registered by the specified resource. The data returned adheres to the following layout:

[
{
"name": "cmdlist",
"resource": "example_resource",
"arity" = -1,
},
{
"name": "command1"
"resource": "example_resource2",
"arity" = -1,
}
]

GET_PLAYER_TOKEN

Property Value
Native Name GET_PLAYER_TOKEN
Hash 0x54C06897
Return Type char*
API Set server
Parameters playerSrc (char*), index (int)

Description: Gets a player's token. Tokens can be used to enhance banning logic, however are specific to a server.

Parameters

  • playerSrc (char*) — A player.
  • index (int) — Index between 0 and GET_NUM_PLAYER_TOKENS.

GET_RESOURCE_STATE

Property Value
Native Name GET_RESOURCE_STATE
Hash 0x4039B485
Return Type char*
API Set shared
Parameters resourceName (char*)

Description: Returns the current state of the specified resource.

Parameters

  • resourceName (char*) — The name of the resource.

GET_SHAPE_TEST_RESULT_INCLUDING_MATERIAL

Property Value
Native Name GET_SHAPE_TEST_RESULT_INCLUDING_MATERIAL
Hash 0x4301E10C
Return Type int
API Set client
Parameters shapeTestHandle (int), hit (BOOL*), endCoords (Vector3*), surfaceNormal (Vector3*), materialHash (Hash*), entityHit (Entity*)

Description: 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.

Parameters

  • shapeTestHandle (int) — A shape test handle.
  • hit (BOOL*) — Whether or not the shape test hit any collisions.
  • endCoords (Vector3*) — The resulting coordinates where the shape test hit a collision.
  • surfaceNormal (Vector3*) — The surface normal of the hit position.
  • materialHash (Hash*) — hash of the hit material or surface type, see materialFX.dat
  • entityHit (Entity*) — Any dynamic entity hit by the shape test.

GET_PLAYER_WANTED_LEVEL

Property Value
Native Name GET_PLAYER_WANTED_LEVEL
Hash 0xBDCDD163
Return Type int
API Set server
Parameters playerSrc (char*)

Description: ``` Returns given players wanted level server-side.


### Parameters
- **`playerSrc`** (`char*`) — The target player

## GET_RESOURCE_BY_FIND_INDEX

| Property | Value |
|----------|-------|
| Native Name | `GET_RESOURCE_BY_FIND_INDEX` |
| Hash | `0x387246B7` |
| Return Type | `char*` |
| API Set | `shared` |
| Parameters | `findIndex` (int) |

### Parameters
- **`findIndex`** (`int`) — The index of the resource (starting at 0)

### Examples
```lua
local resourceList = {}
for i = 0, GetNumResources(), 1 do
  local resource_name = GetResourceByFindIndex(i)
  if resource_name and GetResourceState(resource_name) == "started" then
    table.insert(resourceList, resource_name)
  end
end
print(table.unpack(resourceList))

GET_STATE_BAG_KEYS

Property Value
Native Name GET_STATE_BAG_KEYS
Hash 0x78D864C7
Return Type object
API Set shared
Parameters bagName (char*)

Parameters

  • bagName (char*) — The name of the bag.

GET_RUNTIME_TEXTURE_HEIGHT

Property Value
Native Name GET_RUNTIME_TEXTURE_HEIGHT
Hash 0x3574AACE
Return Type int
API Set client
Parameters tex (long)

Description: Gets the height of the specified runtime texture.

Parameters

  • tex (long) — A handle to the runtime texture.

GET_PLAYER_WEAPON_DEFENSE_MODIFIER_2

Property Value
Native Name GET_PLAYER_WEAPON_DEFENSE_MODIFIER_2
Hash 0x986B65FF
Return Type float
API Set shared
Parameters playerId (Player)

Description: A getter for _SET_PLAYER_WEAPON_DEFENSE_MODIFIER_2.

Parameters

  • playerId (Player) — The player index.

GET_REGISTERED_COMMANDS

Property Value
Native Name GET_REGISTERED_COMMANDS
Hash 0xD4BEF069
Return Type object
API Set shared

Description: Returns all commands that are registered in the command system. The data returned adheres to the following layout:

[
{
"name": "cmdlist",
"resource": "resource",
"arity" = -1,
},
{
"name": "command1"
"resource": "resource_2",
"arity" = -1,
}
]

GET_RUNTIME_TEXTURE_PITCH

Property Value
Native Name GET_RUNTIME_TEXTURE_PITCH
Hash 0xCA0A085F
Return Type int
API Set client
Parameters tex (long)

Description: Gets the row pitch of the specified runtime texture, for use when creating data for SET_RUNTIME_TEXTURE_ARGB_DATA.

Parameters

  • tex (long) — A handle to the runtime texture.

GET_ROPE_UPDATE_ORDER

Property Value
Native Name GET_ROPE_UPDATE_ORDER
Hash 0x2AB2E0F6
Return Type int
API Set client
Parameters rope (int)

Parameters

  • rope (int) — The rope to get the update order for.

GET_ROPE_FLAGS

Property Value
Native Name GET_ROPE_FLAGS
Hash 0xA80FFE99
Return Type int
API Set client
Parameters rope (int)

Description: ```cpp enum eRopeFlags { DrawShadowEnabled = 2, Breakable = 4, RopeUnwindingFront = 8, RopeWinding = 32 }


### Parameters
- **`rope`** (`int`) — The rope to get the flags for.

## GET_RESOURCE_METADATA

| Property | Value |
|----------|-------|
| Native Name | `GET_RESOURCE_METADATA` |
| Hash | `0x964BAB1D` |
| Return Type | `char*` |
| API Set | `shared` |
| Parameters | `resourceName` (char*), `metadataKey` (char*), `index` (int) |

**Description:** Gets the metadata value at a specified key/index from a resource's manifest.
See also: [Resource manifest](https://docs.fivem.net/docs/scripting-reference/resource-manifest/resource-manifest/)

### Parameters
- **`resourceName`** (`char*`) — The resource name.
- **`metadataKey`** (`char*`) — The key in the resource manifest.
- **`index`** (`int`) — The value index, in a range from \[0..GET_NUM_RESOURCE_METDATA-1].

## GET_THRUSTER_SIDE_RCS_THROTTLE

| Property | Value |
|----------|-------|
| Native Name | `GET_THRUSTER_SIDE_RCS_THROTTLE` |
| Hash | `0x1C939E87` |
| Return Type | `float` |
| API Set | `server` |
| Parameters | `jetpack` (Vehicle) |

### Parameters
- **`jetpack`** (`Vehicle`) — The jetpack to check.

## GET_SCENARIO_PED_DENSITY_MULTIPLIER

| Property | Value |
|----------|-------|
| Native Name | `GET_SCENARIO_PED_DENSITY_MULTIPLIER` |
| Hash | `0x77C598B2` |
| Return Type | `float` |
| API Set | `client` |

**Description:** A getter for [SET_SCENARIO_PED_DENSITY_MULTIPLIER_THIS_FRAME](#\_0x7A556143A1C03898).

## GET_ROPE_LENGTH_CHANGE_RATE

| Property | Value |
|----------|-------|
| Native Name | `GET_ROPE_LENGTH_CHANGE_RATE` |
| Hash | `0x66D70EA3` |
| Return Type | `float` |
| API Set | `client` |
| Parameters | `rope` (int) |

### Parameters
- **`rope`** (`int`) — The rope to get the length change rate for.

## GET_ROPE_TIME_MULTIPLIER

| Property | Value |
|----------|-------|
| Native Name | `GET_ROPE_TIME_MULTIPLIER` |
| Hash | `0xF341E6CA` |
| Return Type | `float` |
| API Set | `client` |
| Parameters | `rope` (int) |

### Parameters
- **`rope`** (`int`) — The rope to get the time multiplier for.

## GET_TIMECYCLE_MODIFIER_STRENGTH

| Property | Value |
|----------|-------|
| Native Name | `GET_TIMECYCLE_MODIFIER_STRENGTH` |
| Hash | `0xBE54124A` |
| Return Type | `float` |
| API Set | `client` |

**Description:** A getter for [SET_TIMECYCLE_MODIFIER_STRENGTH](#\_0x82E7FFCD5B2326B3).

## GET_TRACK_MAX_SPEED

| Property | Value |
|----------|-------|
| Native Name | `GET_TRACK_MAX_SPEED` |
| Hash | `0x34EE2BF3` |
| Return Type | `float` |
| API Set | `client` |
| Parameters | `track` (int) |

### Parameters
- **`track`** (`int`) — The track id (between 0 - 27)

## GET_TIMECYCLE_MODIFIER_INDEX_BY_NAME

| Property | Value |
|----------|-------|
| Native Name | `GET_TIMECYCLE_MODIFIER_INDEX_BY_NAME` |
| Hash | `0x5F4CD0E2` |
| Return Type | `int` |
| API Set | `client` |
| Parameters | `modifierName` (char*) |

### Parameters
- **`modifierName`** (`char*`) — The timecycle modifier name.

### Examples
```lua
local modifierIndex = GetTimecycleModifierIndexByName("underwater")
local currentIndex = GetTimecycleModifierIndex()

if currentIndex ~= -1 and currentIndex == modifierIndex then
  print("we're actually using 'underwater' timecycle!")
end

GET_THRUSTER_THROTTLE

Property Value
Native Name GET_THRUSTER_THROTTLE
Hash 0x94E24C96
Return Type float
API Set server
Parameters jetpack (Vehicle)

Parameters

  • jetpack (Vehicle) — The jetpack to check.

GET_RUNTIME_TEXTURE_WIDTH

Property Value
Native Name GET_RUNTIME_TEXTURE_WIDTH
Hash 0xC9F55558
Return Type int
API Set client
Parameters tex (long)

Description: Gets the width of the specified runtime texture.

Parameters

  • tex (long) — A handle to the runtime texture.

GET_TIMECYCLE_MODIFIER_VAR_NAME_BY_INDEX

Property Value
Native Name GET_TIMECYCLE_MODIFIER_VAR_NAME_BY_INDEX
Hash 0xE874AB1D
Return Type char*
API Set client
Parameters modifierName (char*), modifierVarIndex (int)

Parameters

  • modifierName (char*) — The name of timecycle modifier.
  • modifierVarIndex (int) — The index of a variable on the specified timecycle modifier.

Examples

local varCount = GetTimecycleModifierVarCount("underwater")

if varCount ~= 0 then
  for index = 0, varCount - 1 do
    local varName = GetTimecycleModifierVarNameByIndex(index)

    print(string.format("[%d] %s", index, varName))
  end
end

GET_TIMECYCLE_MODIFIER_VAR

Property Value
Native Name GET_TIMECYCLE_MODIFIER_VAR
Hash 0xA7109E12
Return Type BOOL
API Set client
Parameters modifierName (char*), varName (char*), value1 (float*), value2 (float*)

Parameters

  • modifierName (char*) — The name of timecycle modifier.
  • varName (char*) — The name of timecycle variable.
  • value1 (float*)
  • value2 (float*)

Examples

local modifierName = "superDARK"
local varName = "postfx_noise"

if DoesTimecycleModifierHasVar(modifierName, varName) then
  local success, value1, value2 = GetTimecycleModifierVar(modifierName, varName)

  if success then
    print(string.format("[%s] removed var %s with values: %f %f", modifierName, varName, value1, value2))
    RemoveTimecycleModifierVar(modifierName, varName)
  end
else
    SetTimecycleModifierVar(modifierName, varName, 1.0, 1.0)
    print(string.format("[%s] created var %s", modifierName, varName))
end

GET_TRAIN_BACKWARD_CARRIAGE

Property Value
Native Name GET_TRAIN_BACKWARD_CARRIAGE
Hash 0x456E34A
Return Type int
API Set server
Parameters train (Vehicle)

Parameters

  • train (Vehicle) — The train handle

GET_TIMECYCLE_MODIFIER_COUNT

Property Value
Native Name GET_TIMECYCLE_MODIFIER_COUNT
Hash 0xFE2A1D4D
Return Type int
API Set client

Examples

local count = GetTimecycleModifierCount()
print("we have  " .. count .. "timecycle modifiers loaded")

GET_TIMECYCLE_VAR_DEFAULT_VALUE_BY_INDEX

Property Value
Native Name GET_TIMECYCLE_VAR_DEFAULT_VALUE_BY_INDEX
Hash 0x3B90238
Return Type float
API Set client
Parameters varIndex (int)

Description: See GET_TIMECYCLE_VAR_COUNT.

Parameters

  • varIndex (int) — The index of variable.

Examples

local varCount = GetTimecycleVarCount()

if varCount ~= 0 then
  for index = 0, varCount - 1 do
    local varName = GetTimecycleVarNameByIndex(index)
    local varDefault = GetTimecycleVarDefaultValueByIndex(index)

    print(string.format("[%d] %s (%f)", index, varName, varDefault))
  end
end

GET_SELECTED_PED_WEAPON

Property Value
Native Name GET_SELECTED_PED_WEAPON
Hash 0xD240123E
Return Type Hash
API Set server
Parameters ped (Ped)

Description: An alias of GET_CURRENT_PED_WEAPON.

Note, the client-side GET_SELECTED_PED_WEAPON native returns the weapon selected via the HUD (weapon wheel). This data is not available to FXServer.

Parameters

  • ped (Ped) — The target ped.

GET_STATE_BAG_VALUE

Property Value
Native Name GET_STATE_BAG_VALUE
Hash 0x637F4C75
Return Type object
API Set shared
Parameters bagName (char*), key (char*)

Description: Returns the value of a state bag key.

GET_TIMECYCLE_MODIFIER_NAME_BY_INDEX

Property Value
Native Name GET_TIMECYCLE_MODIFIER_NAME_BY_INDEX
Hash 0x28CB8608
Return Type char*
API Set client
Parameters modifierIndex (int)

Parameters

  • modifierIndex (int) — The timecycle modifier index.

Examples

local modifierIndex = GetTimecycleModifierIndex()

if modifierIndex ~= -1 then
  local modifierName = GetTimecycleModifierNameByIndex(modifierIndex)
  print("current timecycle name is " .. modifierName)
end

GET_TIMECYCLE_VAR_COUNT

Property Value
Native Name GET_TIMECYCLE_VAR_COUNT
Hash 0x838B34D8
Return Type int
API Set client

Description: Returns the amount of variables available to be applied on timecycle modifiers.

Examples

local varCount = GetTimecycleVarCount()

if varCount ~= 0 then
  for index = 0, varCount - 1 do
    local varName = GetTimecycleVarNameByIndex(index)
    local varDefault = GetTimecycleVarDefaultValueByIndex(index)

    print(string.format("[%d] %s (%f)", index, varName, varDefault))
  end
end

GET_TIMECYCLE_MODIFIER_VAR_COUNT

Property Value
Native Name GET_TIMECYCLE_MODIFIER_VAR_COUNT
Hash 0x60FB60FE
Return Type int
API Set client
Parameters modifierName (char*)

Parameters

  • modifierName (char*) — The timecycle modifier name.

Examples

local varCount = GetTimecycleModifierVarCount("underwater")

if varCount ~= 0 then
  for index = 0, varCount - 1 do
    local varName = GetTimecycleModifierVarNameByIndex(index)

    print(string.format("[%d] %s", index, varName))
  end
end

GET_TRAIN_DIRECTION

Property Value
Native Name GET_TRAIN_DIRECTION
Hash 0x8DAF79B6
Return Type BOOL
API Set shared
Parameters train (Vehicle)

Description: Gets the direction the train is facing

Parameters

  • train (Vehicle) — The train handle

GET_TRACK_NODE_COORDS

Property Value
Native Name GET_TRACK_NODE_COORDS
Hash 0x1628548E
Return Type bool
API Set client
Parameters trackIndex (int), trackNode (int), coords (Vector3*)

Description: Gets the coordinates of a specific track node.

Parameters

  • trackIndex (int) — The track index
  • trackNode (int) — The track node
  • coords (Vector3*) — The resulting track node coords

GET_TIMECYCLE_VAR_NAME_BY_INDEX

Property Value
Native Name GET_TIMECYCLE_VAR_NAME_BY_INDEX
Hash 0xC6C55AAF
Return Type char*
API Set client
Parameters varIndex (int)

Description: See GET_TIMECYCLE_VAR_COUNT.

Parameters

  • varIndex (int) — The index of variable.

Examples

local varCount = GetTimecycleVarCount()

if varCount ~= 0 then
  for index = 0, varCount - 1 do
    local varName = GetTimecycleVarNameByIndex(index)
    local varDefault = GetTimecycleVarDefaultValueByIndex(index)

    print(string.format("[%d] %s (%f)", index, varName, varDefault))
  end
end

GET_TRAIN_CARRIAGE_ENGINE

Property Value
Native Name GET_TRAIN_CARRIAGE_ENGINE
Hash 0x95070FA
Return Type int
API Set server
Parameters train (Vehicle)

Parameters

  • train (Vehicle) — The entity handle.

GET_TRAIN_FORWARD_CARRIAGE

Property Value
Native Name GET_TRAIN_FORWARD_CARRIAGE
Hash 0x24DC88D9
Return Type int
API Set server
Parameters train (Vehicle)

Parameters

  • train (Vehicle) — The train handle

GET_TRAIN_CRUISE_SPEED

Property Value
Native Name GET_TRAIN_CRUISE_SPEED
Hash 0xA4921EF5
Return Type float
API Set shared
Parameters train (Vehicle)

Description: Gets the trains desired speed.

Parameters

  • train (Vehicle) — The train handle

GET_TRAIN_CARRIAGE_INDEX

Property Value
Native Name GET_TRAIN_CARRIAGE_INDEX
Hash 0x4B8285CF
Return Type int
API Set server
Parameters train (Vehicle)

Parameters

  • train (Vehicle) — The entity handle.

GET_TRACK_BRAKING_DISTANCE

Property Value
Native Name GET_TRACK_BRAKING_DISTANCE
Hash 0xBF482A5E
Return Type float
API Set client
Parameters track (int)

Parameters

  • track (int) — The track id (between 0 - 27)

GET_TRAIN_CURRENT_TRACK_NODE

Property Value
Native Name GET_TRAIN_CURRENT_TRACK_NODE
Hash 0xE015E854
Return Type int
API Set client
Parameters train (Vehicle)

Parameters

  • train (Vehicle) — The target train.

GET_VEHICLE_ALARM_TIME_LEFT

Property Value
Native Name GET_VEHICLE_ALARM_TIME_LEFT
Hash 0xC62AAC98
Return Type int
API Set client
Parameters vehicle (Vehicle)

GET_TRACK_NODE_COUNT

Property Value
Native Name GET_TRACK_NODE_COUNT
Hash 0x896A0C11
Return Type int
API Set client
Parameters trackIndex (int)

Description: Gets the specified tracks node count.

Parameters

  • trackIndex (int) — The track index

GET_TRAIN_DOOR_OPEN_RATIO

Property Value
Native Name GET_TRAIN_DOOR_OPEN_RATIO
Hash 0x40B16551
Return Type float
API Set client
Parameters train (Vehicle), doorIndex (int)

Description: Gets the ratio that a door is open for on a train.

Parameters

  • train (Vehicle) — The train to obtain the door ratio for.
  • doorIndex (int) — Zero-based door index.

Examples

local doorCount = GetTrainDoorCount(train)
for doorIndex = 0, doorCount - 1 do
    local ratio = GetTrainDoorOpenRatio(train, doorIndex)
    print("Door " .. tostring(doorIndex) .. " is open by a ratio of " .. tostring(ratio))
end
int doorCount = API.GetTrainDoorCount(train);
for (int doorIndex = 0; doorIndex < doorCount; doorIndex++)
{
    float ratio = API.GetTrainDoorOpenRatio(train, doorIndex);
    Debug.WriteLine($"Door {doorIndex} is open by a ratio of {ratio}");
}

GET_TRAIN_TRACK_INDEX

Property Value
Native Name GET_TRAIN_TRACK_INDEX
Hash 0x9AA339D
Return Type int
API Set shared
Parameters train (Vehicle)

Parameters

  • train (Vehicle) — The train handle

GET_VEHICLE_CHEAT_POWER_INCREASE

Property Value
Native Name GET_VEHICLE_CHEAT_POWER_INCREASE
Hash 0xC3C93F28
Return Type float
API Set client
Parameters vehicle (Vehicle)

Description: A getter for SET_VEHICLE_CHEAT_POWER_INCREASE.

Parameters

  • vehicle (Vehicle) — The target vehicle.

GET_TRAIN_DOOR_COUNT

Property Value
Native Name GET_TRAIN_DOOR_COUNT
Hash 0x99974721
Return Type int
API Set client
Parameters train (Vehicle)

Description: Gets the door count for the specified train.

Parameters

  • train (Vehicle) — The train to obtain the door count for.

GET_VEHICLE_CURRENT_GEAR

Property Value
Native Name GET_VEHICLE_CURRENT_GEAR
Hash 0xB4F4E566
Return Type int
API Set client
Parameters vehicle (Vehicle)

GET_TRAIN_SPEED

Property Value
Native Name GET_TRAIN_SPEED
Hash 0x428668B7
Return Type float
API Set client
Parameters train (Vehicle)

Description: Gets the speed the train is currently going.

Parameters

  • train (Vehicle) — The train handle

GET_TRAIN_STATE

Property Value
Native Name GET_TRAIN_STATE
Hash 0x81B50033
Return Type int
API Set shared
Parameters train (Vehicle)

Parameters

  • train (Vehicle) — The train handle

GET_VEHICLE_CURRENT_RPM

Property Value
Native Name GET_VEHICLE_CURRENT_RPM
Hash 0xE7B12B54
Return Type float
API Set client
Parameters vehicle (Vehicle)

GET_VEHICLE_CLUTCH

Property Value
Native Name GET_VEHICLE_CLUTCH
Hash 0x1DAD4583
Return Type float
API Set client
Parameters vehicle (Vehicle)

GET_VEHICLE_DASHBOARD_BOOST

Property Value
Native Name GET_VEHICLE_DASHBOARD_BOOST
Hash 0xDFFABA2A
Return Type float
API Set client

GET_VEHICLE_CUSTOM_SECONDARY_COLOUR

Property Value
Native Name GET_VEHICLE_CUSTOM_SECONDARY_COLOUR
Hash 0x3FF247A2
Return Type void
API Set server
Parameters vehicle (Vehicle), r (int*), g (int*), b (int*)

GET_VEHICLE_DASHBOARD_COLOUR

Property Value
Native Name GET_VEHICLE_DASHBOARD_COLOUR
Hash 0xA0DBD08D
Return Type void
API Set server
Parameters vehicle (Vehicle), color (int*)

GET_VEHICLE_COLOURS

Property Value
Native Name GET_VEHICLE_COLOURS
Hash 0x40D82D88
Return Type void
API Set server
Parameters vehicle (Vehicle), colorPrimary (int*), colorSecondary (int*)

GET_VEHICLE_DASHBOARD_RPM

Property Value
Native Name GET_VEHICLE_DASHBOARD_RPM
Hash 0xF9716A11
Return Type float
API Set client

GET_VEHICLE_DIRT_LEVEL

Property Value
Native Name GET_VEHICLE_DIRT_LEVEL
Hash 0xFD15C065
Return Type float
API Set server
Parameters vehicle (Vehicle)

GET_VEHICLE_BODY_HEALTH

Property Value
Native Name GET_VEHICLE_BODY_HEALTH
Hash 0x2B2FCC28
Return Type float
API Set server
Parameters vehicle (Vehicle)

GET_VEHICLE_CUSTOM_PRIMARY_COLOUR

Property Value
Native Name GET_VEHICLE_CUSTOM_PRIMARY_COLOUR
Hash 0x1C2B9FEF
Return Type void
API Set server
Parameters vehicle (Vehicle), r (int*), g (int*), b (int*)

GET_VEHICLE_DASHBOARD_LIGHTS

Property Value
Native Name GET_VEHICLE_DASHBOARD_LIGHTS
Hash 0x500FFE9D
Return Type int
API Set client

Description: Gets the state of the player vehicle's dashboard lights as a bit set indicator_left = 1 indicator_right = 2 handbrakeLight = 4 engineLight = 8 ABSLight = 16 gasLight = 32 oilLight = 64 headlights = 128 highBeam = 256 batteryLight = 512

GET_VEHICLE_DENSITY_MULTIPLIER

Property Value
Native Name GET_VEHICLE_DENSITY_MULTIPLIER
Hash 0xEF7C6538
Return Type float
API Set client

Description: A getter for SET_VEHICLE_DENSITY_MULTIPLIER_THIS_FRAME.

GET_VEHICLE_DASHBOARD_OIL_PRESSURE

Property Value
Native Name GET_VEHICLE_DASHBOARD_OIL_PRESSURE
Hash 0x3856D767
Return Type float
API Set client

GET_VEHICLE_DASHBOARD_OIL_TEMP

Property Value
Native Name GET_VEHICLE_DASHBOARD_OIL_TEMP
Hash 0x1F5996AA
Return Type float
API Set client

GET_VEHICLE_DASHBOARD_FUEL

Property Value
Native Name GET_VEHICLE_DASHBOARD_FUEL
Hash 0x19B0B2CE
Return Type float
API Set client

GET_VEHICLE_DOOR_STATUS

Property Value
Native Name GET_VEHICLE_DOOR_STATUS
Hash 0x6E35C49C
Return Type int
API Set server
Parameters vehicle (Vehicle), doorIndex (int)

Description: Returns the open position of the specified door on the target vehicle.

Parameters

  • vehicle (Vehicle) — The target vehicle.
  • doorIndex (int) — Index of door to check (0-6).

GET_VEHICLE_HANDBRAKE

Property Value
Native Name GET_VEHICLE_HANDBRAKE
Hash 0x483B013C
Return Type BOOL
API Set shared
Parameters vehicle (Vehicle)

GET_VEHICLE_EXTRA_COLOURS

Property Value
Native Name GET_VEHICLE_EXTRA_COLOURS
Hash 0x80E4659B
Return Type void
API Set server
Parameters vehicle (Vehicle), pearlescentColor (int*), wheelColor (int*)

GET_VEHICLE_DASHBOARD_TEMP

Property Value
Native Name GET_VEHICLE_DASHBOARD_TEMP
Hash 0x6B6ADAFA
Return Type float
API Set client

GET_VEHICLE_FLIGHT_NOZZLE_POSITION

Property Value
Native Name GET_VEHICLE_FLIGHT_NOZZLE_POSITION
Hash 0xAD40AD55
Return Type float
API Set server
Parameters vehicle (Vehicle)

Description: Gets the flight nozzel position for the specified vehicle. See the client-side _GET_VEHICLE_FLIGHT_NOZZLE_POSITION native for usage examples.

Parameters

  • vehicle (Vehicle) — The vehicle to check.

GET_VEHICLE_DASHBOARD_VACUUM

Property Value
Native Name GET_VEHICLE_DASHBOARD_VACUUM
Hash 0xFABE67A9
Return Type float
API Set client

GET_VEHICLE_DOORS_LOCKED_FOR_PLAYER

Property Value
Native Name GET_VEHICLE_DOORS_LOCKED_FOR_PLAYER
Hash 0x1DC50247
Return Type int
API Set server
Parameters vehicle (Vehicle)

Description: Currently it only works when set to "all players".

GET_VEHICLE_DASHBOARD_CURRENT_GEAR

Property Value
Native Name GET_VEHICLE_DASHBOARD_CURRENT_GEAR
Hash 0x435C86F4
Return Type float
API Set client

Description: Retrieves the current gear displayed on the dashboard of the vehicle the player is in, returned as a float. This value represents the gear shown in the instrument cluster, such as "R" (0.0) or positive values (e.g., 1.0, 2.0, etc.) for drive gears.

GET_VEHICLE_FUEL_LEVEL

Property Value
Native Name GET_VEHICLE_FUEL_LEVEL
Hash 0x5F739BB8
Return Type float
API Set client
Parameters vehicle (Vehicle)

GET_VEHICLE_GRAVITY_AMOUNT

Property Value
Native Name GET_VEHICLE_GRAVITY_AMOUNT
Hash 0xB48A1292
Return Type float
API Set client
Parameters vehicle (Vehicle)

GET_VEHICLE_HANDLING_VECTOR

Property Value
Native Name GET_VEHICLE_HANDLING_VECTOR
Hash 0xFB341304
Return Type Vector3
API Set client
Parameters vehicle (Vehicle), class_ (char*), fieldName (char*)

Description: Returns the effective handling data of a vehicle as a vector value. Example: local inertiaMultiplier = GetVehicleHandlingVector(vehicle, 'CHandlingData', 'vecInertiaMultiplier')

Parameters

  • vehicle (Vehicle) — The vehicle to obtain data for.
  • class_ (char*) — The handling class to get. Only "CHandlingData" is supported at this time.
  • fieldName (char*) — The field name to get. These match the keys in handling.meta.

GET_VEHICLE_ENGINE_TEMPERATURE

Property Value
Native Name GET_VEHICLE_ENGINE_TEMPERATURE
Hash 0xF4F495CB
Return Type float
API Set client
Parameters vehicle (Vehicle)

GET_VEHICLE_DOOR_LOCK_STATUS

Property Value
Native Name GET_VEHICLE_DOOR_LOCK_STATUS
Hash 0xD72CEF2
Return Type int
API Set server
Parameters vehicle (Vehicle)

Description: ```lua enum_VehicleLockStatus = { None = 0, Locked = 2, LockedForPlayer = 3, StickPlayerInside = 4, -- Doesn't allow players to exit the vehicle with the exit vehicle key. CanBeBrokenInto = 7, -- Can be broken into the car. If the glass is broken, the value will be set to 1 CanBeBrokenIntoPersist = 8, -- Can be broken into persist CannotBeTriedToEnter = 10, -- Cannot be tried to enter (Nothing happens when you press the vehicle enter key). }


It should be [noted](https://forum.cfx.re/t/4863241) that while the [client-side command](#\_0x25BC98A59C2EA962) and its
setter distinguish between states 0 (unset) and 1 (unlocked), the game will synchronize both as state 0, so the server-side
command will return only '0' if unlocked.

### Parameters
- **`vehicle`** (`Vehicle`) — A vehicle handle.

## GET_VEHICLE_ENGINE_HEALTH

| Property | Value |
|----------|-------|
| Native Name | `GET_VEHICLE_ENGINE_HEALTH` |
| Hash | `0x8880038A` |
| Return Type | `float` |
| API Set | `server` |
| Parameters | `vehicle` (Vehicle) |

## GET_VEHICLE_DASHBOARD_SPEED

| Property | Value |
|----------|-------|
| Native Name | `GET_VEHICLE_DASHBOARD_SPEED` |
| Hash | `0x9AAD420E` |
| Return Type | `float` |
| API Set | `client` |
| Parameters | `vehicle` (Vehicle) |

## GET_VEHICLE_DRAWN_WHEEL_ANGLE_MULT

| Property | Value |
|----------|-------|
| Native Name | `GET_VEHICLE_DRAWN_WHEEL_ANGLE_MULT` |
| Hash | `0x21C1DA8E` |
| Return Type | `float` |
| API Set | `client` |
| Parameters | `vehicle` (Vehicle) |

**Description:** Gets a vehicle's multiplier used with a wheel's GET_VEHICLE_WHEEL_STEERING_ANGLE to determine the angle the wheel is rendered.

## GET_VEHICLE_HORN_TYPE

| Property | Value |
|----------|-------|
| Native Name | `GET_VEHICLE_HORN_TYPE` |
| Hash | `0xDEA49773` |
| Return Type | `Hash` |
| API Set | `server` |
| Parameters | `vehicle` (Vehicle) |

**Description:** This is a getter for the client-side native [`START_VEHICLE_HORN`](#\_0x9C8C6504B5B63D2C), which allows you to return the horn type of the vehicle.

**Note**: This native only gets the hash value set with `START_VEHICLE_HORN`. If a wrong hash is passed into `START_VEHICLE_HORN`, it will return this wrong hash.

```cpp
enum eHornTypes
{
    NORMAL = 1330140148,
    HELDDOWN = -2087385909,
    AGGRESSIVE = -92810745
}

Parameters

  • vehicle (Vehicle) — The vehicle to check the horn type.

GET_VEHICLE_LIGHTS_STATE

Property Value
Native Name GET_VEHICLE_LIGHTS_STATE
Hash 0x7C278621
Return Type BOOL
API Set server
Parameters vehicle (Vehicle), lightsOn (BOOL*), highbeamsOn (BOOL*)

GET_VEHICLE_INDICATOR_LIGHTS

Property Value
Native Name GET_VEHICLE_INDICATOR_LIGHTS
Hash 0x83070354
Return Type int
API Set client
Parameters vehicle (Vehicle)

Description: Gets the vehicle indicator light state. 0 = off, 1 = left, 2 = right, 3 = both

GET_VEHICLE_HANDLING_FLOAT

Property Value
Native Name GET_VEHICLE_HANDLING_FLOAT
Hash 0x642FC12F
Return Type float
API Set client
Parameters vehicle (Vehicle), class_ (char*), fieldName (char*)

Description: Returns the effective handling data of a vehicle as a floating-point value. Example: local fSteeringLock = GetVehicleHandlingFloat(vehicle, 'CHandlingData', 'fSteeringLock')

Parameters

  • vehicle (Vehicle) — The vehicle to obtain data for.
  • class_ (char*) — The handling class to get. Only "CHandlingData" is supported at this time.
  • fieldName (char*) — The field name to get. These match the keys in handling.meta.

GET_VEHICLE_GEAR_RATIO

Property Value
Native Name GET_VEHICLE_GEAR_RATIO
Hash 0x82E794B7
Return Type float
API Set client
Parameters vehicle (Vehicle), gear (int)

Description: Gets vehicles gear ratio on choosen gear.

Parameters

  • vehicle (Vehicle) — The vehicle handle.
  • gear (int) — The vehicles gear you want to get.

Examples

local vehicle = GetVehiclePedIsIn(PlayerPedId(-1))
local currentGear = GetVehicleCurrentGear(Vehicle)

print(GetVehicleGearRatio(vehicle, currentGear)) -- will print current vehicle gear to console
const vehicle = GetVehiclePedIsIn(PlayerPedId(-1));
const currentGear = GetVehicleCurrentGear(Vehicle);

console.log(GetVehicleGearRatio(vehicle, currentGear)); // will print current vehicle gear to console
using static CitizenFX.Core.API;

Vehicle vehicle = Game.PlayerPed.CurrentVehicle;
int currentGear = GetVehicleCurrentGear(vehicle.Handle);

Debug.WriteLine($"{GetVehicleGearRatio(vehicle.Handle, currentGear)}");

GET_VEHICLE_LOCK_ON_TARGET

Property Value
Native Name GET_VEHICLE_LOCK_ON_TARGET
Hash 0x4A557117
Return Type Vehicle
API Set server
Parameters vehicle (Vehicle)

Description: Gets the vehicle that is locked on to for the specified vehicle.

Parameters

  • vehicle (Vehicle) — The vehicle to check.

GET_VEHICLE_HEADLIGHTS_COLOUR

Property Value
Native Name GET_VEHICLE_HEADLIGHTS_COLOUR
Hash 0xD7147656
Return Type int
API Set server
Parameters vehicle (Vehicle)

GET_VEHICLE_INTERIOR_COLOUR

Property Value
Native Name GET_VEHICLE_INTERIOR_COLOUR
Hash 0xCCFF3B6E
Return Type void
API Set server
Parameters vehicle (Vehicle), color (int*)

GET_VEHICLE_NUMBER_OF_WHEELS

Property Value
Native Name GET_VEHICLE_NUMBER_OF_WHEELS
Hash 0xEDF4B0FC
Return Type int
API Set client
Parameters vehicle (Vehicle)

GET_VEHICLE_HOMING_LOCKON_STATE

Property Value
Native Name GET_VEHICLE_HOMING_LOCKON_STATE
Hash 0xFBDE9FD8
Return Type int
API Set server
Parameters vehicle (Vehicle)

Description: Gets the lock on state for the specified vehicle. See the client-side GET_VEHICLE_HOMING_LOCKON_STATE native for a description of lock on states.

Parameters

  • vehicle (Vehicle) — The vehicle to check.

GET_VEHICLE_HIGH_GEAR

Property Value
Native Name GET_VEHICLE_HIGH_GEAR
Hash 0xF1D1D689
Return Type int
API Set client
Parameters vehicle (Vehicle)

GET_VEHICLE_LIGHT_MULTIPLIER

Property Value
Native Name GET_VEHICLE_LIGHT_MULTIPLIER
Hash 0x7E6E219C
Return Type float
API Set client
Parameters vehicle (Vehicle)

GET_VEHICLE_NEXT_GEAR

Property Value
Native Name GET_VEHICLE_NEXT_GEAR
Hash 0xDDB298AE
Return Type int
API Set client
Parameters vehicle (Vehicle)

GET_VEHICLE_LIVERY

Property Value
Native Name GET_VEHICLE_LIVERY
Hash 0xEC82A51D
Return Type int
API Set server
Parameters vehicle (Vehicle)

GET_VEHICLE_PETROL_TANK_HEALTH

Property Value
Native Name GET_VEHICLE_PETROL_TANK_HEALTH
Hash 0xE41595CE
Return Type float
API Set server
Parameters vehicle (Vehicle)

GET_VEHICLE_HAS_FLAG

Property Value
Native Name GET_VEHICLE_HAS_FLAG
Hash 0xD85C9F57
Return Type bool
API Set client
Parameters vehicle (Vehicle), flagIndex (int)

Description: Note: Flags are not the same based on your gamebuild. Please see here to see a complete list of all vehicle flags.

Get vehicle.meta flag by index. Useful examples include FLAG_LAW_ENFORCEMENT (31), FLAG_RICH_CAR (36), FLAG_IS_ELECTRIC (43), FLAG_IS_OFFROAD_VEHICLE (48).

Parameters

  • vehicle (Vehicle) — The vehicle to obtain flags for.
  • flagIndex (int) — Flag index.

GET_VEHICLE_TOTAL_REPAIRS

Property Value
Native Name GET_VEHICLE_TOTAL_REPAIRS
Hash 0x9963D5F9
Return Type int
API Set server
Parameters vehicle (Vehicle)

GET_VEHICLE_HANDLING_INT

Property Value
Native Name GET_VEHICLE_HANDLING_INT
Hash 0x27396C75
Return Type int
API Set client
Parameters vehicle (Vehicle), class_ (char*), fieldName (char*)

Description: Returns the effective handling data of a vehicle as an integer value. Example: local modelFlags = GetVehicleHandlingInt(vehicle, 'CHandlingData', 'strModelFlags')

Parameters

  • vehicle (Vehicle) — The vehicle to obtain data for.
  • class_ (char*) — The handling class to get. Only "CHandlingData" is supported at this time.
  • fieldName (char*) — The field name to get. These match the keys in handling.meta.

GET_VEHICLE_THROTTLE_OFFSET

Property Value
Native Name GET_VEHICLE_THROTTLE_OFFSET
Hash 0xD1D07351
Return Type float
API Set client
Parameters vehicle (Vehicle)

GET_VEHICLE_TOP_SPEED_MODIFIER

Property Value
Native Name GET_VEHICLE_TOP_SPEED_MODIFIER
Hash 0x998B7FEE
Return Type float
API Set client
Parameters vehicle (Vehicle)

Description: A getter for MODIFY_VEHICLE_TOP_SPEED. Returns -1.0 if a modifier is not set.

Parameters

  • vehicle (Vehicle) — The target vehicle.

GET_VEHICLE_STEERING_ANGLE

Property Value
Native Name GET_VEHICLE_STEERING_ANGLE
Hash 0x1382FCEA
Return Type float
API Set shared
Parameters vehicle (Vehicle)

GET_VEHICLE_TYRE_SMOKE_COLOR

Property Value
Native Name GET_VEHICLE_TYRE_SMOKE_COLOR
Hash 0x75280015
Return Type void
API Set server
Parameters vehicle (Vehicle), r (int*), g (int*), b (int*)

GET_VEHICLE_NUMBER_PLATE_TEXT_INDEX

Property Value
Native Name GET_VEHICLE_NUMBER_PLATE_TEXT_INDEX
Hash 0x499747B6
Return Type int
API Set server
Parameters vehicle (Vehicle)

GET_VEHICLE_RADIO_STATION_INDEX

Property Value
Native Name GET_VEHICLE_RADIO_STATION_INDEX
Hash 0x57037960
Return Type int
API Set server
Parameters vehicle (Vehicle)

GET_VEHICLE_OIL_LEVEL

Property Value
Native Name GET_VEHICLE_OIL_LEVEL
Hash 0xFC7F8EF4
Return Type float
API Set client
Parameters vehicle (Vehicle)

GET_VEHICLE_ROOF_LIVERY

Property Value
Native Name GET_VEHICLE_ROOF_LIVERY
Hash 0x872CF42
Return Type int
API Set server
Parameters vehicle (Vehicle)

GET_VEHICLE_NEON_COLOUR

Property Value
Native Name GET_VEHICLE_NEON_COLOUR
Hash 0xD9319DCB
Return Type void
API Set server
Parameters vehicle (Vehicle), red (int*), green (int*), blue (int*)

Description: Getter to check the neon colour of a vehicle. This native is the server side getter of GET_VEHICLE_NEON_LIGHTS_COLOUR.

Parameters

  • vehicle (Vehicle) — The vehicle to check.
  • red (int*) — Pointer to an integer where the red component of the neon color will be stored.
  • green (int*) — Pointer to an integer where the green component of the neon color will be stored.
  • blue (int*) — Pointer to an integer where the blue component of the neon color will be stored.

Examples

local vehicle = GetVehiclePedIsIn(GetPlayerPed(1), false) -- 1 is the source here
local red, green, blue = GetVehicleNeonColour(vehicle)
print(red, green, blue)
const vehicle = GetVehiclePedIsIn(GetPlayerPed(1), false); // 1 is the source here
const [red, green, blue] = GetVehicleNeonColour(vehicle);
console.log(red, green, blue);
using static CitizenFX.Core.Native.API;

int vehicle = GetVehiclePedIsIn(GetPlayerPed(1), false); // 1 is the source here
int red, green, blue;
GetVehicleNeonColour(vehicle, out red, out green, out blue);
Debug.WriteLine($"{red}, {green}, {blue}");

GET_VEHICLE_TURBO_PRESSURE

Property Value
Native Name GET_VEHICLE_TURBO_PRESSURE
Hash 0xE02B51D7
Return Type float
API Set client
Parameters vehicle (Vehicle)

GET_VEHICLE_NUMBER_PLATE_TEXT

Property Value
Native Name GET_VEHICLE_NUMBER_PLATE_TEXT
Hash 0xE8522D58
Return Type char*
API Set server
Parameters vehicle (Vehicle)

GET_VEHICLE_PED_IS_IN

Property Value
Native Name GET_VEHICLE_PED_IS_IN
Hash 0xAFE92319
Return Type Vehicle
API Set server
Parameters ped (Ped), lastVehicle (BOOL)

Description: Gets the vehicle the specified Ped is/was in depending on bool value. This native is used server side when using OneSync.

Parameters

  • ped (Ped) — The target ped
  • lastVehicle (BOOL) — False = CurrentVehicle, True = LastVehicle

GET_VEHICLE_STEERING_SCALE

Property Value
Native Name GET_VEHICLE_STEERING_SCALE
Hash 0x954465DE
Return Type float
API Set client
Parameters vehicle (Vehicle)

GET_VEHICLE_NEON_ENABLED

Property Value
Native Name GET_VEHICLE_NEON_ENABLED
Hash 0x684BDBF2
Return Type BOOL
API Set server
Parameters vehicle (Vehicle), neonIndex (int)

Description: Getter to check if one of the neon lights of a vehicle is enabled. This native is the server side getter of IS_VEHICLE_NEON_LIGHT_ENABLED.

enum neonIndex
{
    NEON_BACK = 0,   // Back neon
    NEON_RIGHT = 1,  // Right neon
    NEON_LEFT = 2,   // Left neon
    NEON_FRONT = 3   // Front neon
};

Parameters

  • vehicle (Vehicle) — The vehicle to check.
  • neonIndex (int) — A value from the neonIndex enum representing the neon light to check.

Examples

local vehicle = GetVehiclePedIsIn(GetPlayerPed(1), false) -- 1 is the source here
local isRightNeonOn = GetVehicleNeonEnabled(vehicle, 1)
print(isRightNeonOn)
const vehicle = GetVehiclePedIsIn(GetPlayerPed(1), false); // 1 is the source here
const isRightNeonOn = GetVehicleNeonEnabled(vehicle, 1);
console.log(isRightNeonOn);
using static CitizenFX.Core.Native.API;

int vehicle = GetVehiclePedIsIn(GetPlayerPed(1), false); // 1 is the source here
bool isRightNeonOn = GetVehicleNeonEnabled(vehicle, 1);
Debug.WriteLine($"{isRightNeonOn}");

GET_VEHICLE_WHEEL_ROTATION_SPEED

Property Value
Native Name GET_VEHICLE_WHEEL_ROTATION_SPEED
Hash 0xEA1859E5
Return Type float
API Set client
Parameters vehicle (Vehicle), wheelIndex (int)

Description: Gets the rotation speed of a wheel. This is used internally to calcuate GET_VEHICLE_WHEEL_SPEED. Max number of wheels can be retrieved with the native GET_VEHICLE_NUMBER_OF_WHEELS.

GET_VEHICLE_WHEEL_RIM_COLLIDER_SIZE

Property Value
Native Name GET_VEHICLE_WHEEL_RIM_COLLIDER_SIZE
Hash 0xCEE21AB2
Return Type float
API Set client
Parameters vehicle (Vehicle), wheelIndex (int)

Parameters

  • vehicle (Vehicle) — The vehicle to obtain data for.
  • wheelIndex (int) — Index of wheel, 0-3.

GET_VEHICLE_WHEELIE_STATE

Property Value
Native Name GET_VEHICLE_WHEELIE_STATE
Hash 0x137260D1
Return Type int
API Set client
Parameters vehicle (Vehicle)

Description: List of known states:

1: Not wheeling.
65: Vehicle is ready to do wheelie (burnouting).
129: Vehicle is doing wheelie.

Parameters

  • vehicle (Vehicle) — Vehicle

Examples

Citizen.CreateThread(function()
  while true do
    Wait(1)

    local veh = GetVehiclePedIsUsing(PlayerPedId())
    if veh ~= 0 then
      local wheelieState = GetVehicleWheelieState(veh)
      if wheelieState == 1 then
        print("Nothing")
      elseif wheelieState == 65 then
        print("Ready to wheelie!")
      elseif wheelieState == 129 then
        print("Doing wheelie!")
      end
    end
  end
end)

GET_VEHICLE_WHEEL_STEERING_ANGLE

Property Value
Native Name GET_VEHICLE_WHEEL_STEERING_ANGLE
Hash 0xA0867448
Return Type float
API Set client
Parameters vehicle (Vehicle), wheelIndex (int)

Description: Gets steering angle of a wheel. Max number of wheels can be retrieved with the native GET_VEHICLE_NUMBER_OF_WHEELS.

GET_VEHICLE_WHEEL_BRAKE_PRESSURE

Property Value
Native Name GET_VEHICLE_WHEEL_BRAKE_PRESSURE
Hash 0x70FE2EFF
Return Type float
API Set client
Parameters vehicle (Vehicle), wheelIndex (int)

Description: Gets brake pressure of a wheel. Max number of wheels can be retrieved with the native GET_VEHICLE_NUMBER_OF_WHEELS. Normal values around 1.0f when braking.

GET_VEHICLE_WHEEL_TIRE_COLLIDER_WIDTH

Property Value
Native Name GET_VEHICLE_WHEEL_TIRE_COLLIDER_WIDTH
Hash 0xEF65929C
Return Type float
API Set client
Parameters vehicle (Vehicle), wheelIndex (int)

Parameters

  • vehicle (Vehicle) — The vehicle to obtain data for.
  • wheelIndex (int) — Index of wheel, 0-3.

GET_VEHICLE_WHEEL_IS_POWERED

Property Value
Native Name GET_VEHICLE_WHEEL_IS_POWERED
Hash 0x3CCF1B49
Return Type BOOL
API Set client
Parameters vehicle (Vehicle), wheelIndex (int)

Description: Gets whether the wheel is powered. Max number of wheels can be retrieved with the native GET_VEHICLE_NUMBER_OF_WHEELS. This is a shortcut to a flag in GET_VEHICLE_WHEEL_FLAGS.

GET_VEHICLE_WHEEL_POWER

Property Value
Native Name GET_VEHICLE_WHEEL_POWER
Hash 0xD203287
Return Type float
API Set client
Parameters vehicle (Vehicle), wheelIndex (int)

Description: Gets power being sent to a wheel. Max number of wheels can be retrieved with the native GET_VEHICLE_NUMBER_OF_WHEELS.

GET_VEHICLE_TYPE_RAW

Property Value
Native Name GET_VEHICLE_TYPE_RAW
Hash 0xDE73BC10
Return Type int
API Set client
Parameters vehicle (Vehicle)

Description: Returns the model type of the vehicle as defined by:

enum VehicleType
{
	VEHICLE_TYPE_NONE = -1,
	VEHICLE_TYPE_CAR = 0,
	VEHICLE_TYPE_PLANE = 1,
	VEHICLE_TYPE_TRAILER = 2,
	VEHICLE_TYPE_QUADBIKE = 3,
	VEHICLE_TYPE_DRAFT = 4,
	VEHICLE_TYPE_SUBMARINECAR = 5,
	VEHICLE_TYPE_AMPHIBIOUS_AUTOMOBILE = 6,
	VEHICLE_TYPE_AMPHIBIOUS_QUADBIKE = 7,
	VEHICLE_TYPE_HELI = 8,
	VEHICLE_TYPE_BLIMP = 9,
	VEHICLE_TYPE_AUTOGYRO = 10,
	VEHICLE_TYPE_BIKE = 11,
	VEHICLE_TYPE_BICYCLE = 12,
	VEHICLE_TYPE_BOAT = 13,
	VEHICLE_TYPE_TRAIN = 14,
	VEHICLE_TYPE_SUBMARINE = 15,
};

Parameters

  • vehicle (Vehicle) — The vehicle's entity handle.

GET_VEHICLE_WHEEL_HEALTH

Property Value
Native Name GET_VEHICLE_WHEEL_HEALTH
Hash 0x54A677F5
Return Type float
API Set client
Parameters vehicle (Vehicle), wheelIndex (int)

GET_VEHICLE_WHEEL_SPEED

Property Value
Native Name GET_VEHICLE_WHEEL_SPEED
Hash 0x149C9DA0
Return Type float
API Set client
Parameters vehicle (Vehicle), wheelIndex (int)

Description: Gets speed of a wheel at the tyre. Max number of wheels can be retrieved with the native GET_VEHICLE_NUMBER_OF_WHEELS.

GET_VEHICLE_TYPE

Property Value
Native Name GET_VEHICLE_TYPE
Hash 0xA273060E
Return Type char*
API Set shared
Parameters vehicle (Vehicle)

Description: Returns the type of the passed vehicle.

For client scripts, reference the more detailed GET_VEHICLE_TYPE_RAW native.

Vehicle types

  • automobile
  • bike
  • boat
  • heli
  • plane
  • submarine
  • trailer
  • train

Parameters

  • vehicle (Vehicle) — The vehicle's entity handle.

GET_VEHICLE_WHEEL_FLAGS

Property Value
Native Name GET_VEHICLE_WHEEL_FLAGS
Hash 0xC70FA0C7
Return Type int
API Set client
Parameters vehicle (Vehicle), wheelIndex (int)

Description: Gets the flags of a wheel. Max number of wheels can be retrieved with the native GET_VEHICLE_NUMBER_OF_WHEELS.

GET_VEHICLE_WHEEL_TIRE_COLLIDER_SIZE

Property Value
Native Name GET_VEHICLE_WHEEL_TIRE_COLLIDER_SIZE
Hash 0xE0BA9FE6
Return Type float
API Set client
Parameters vehicle (Vehicle), wheelIndex (int)

Parameters

  • vehicle (Vehicle) — The vehicle to obtain data for.
  • wheelIndex (int) — Index of wheel, 0-3.

GET_VEHICLE_WHEEL_SURFACE_MATERIAL

Property Value
Native Name GET_VEHICLE_WHEEL_SURFACE_MATERIAL
Hash 0xA7F04022
Return Type int
API Set client
Parameters vehicle (Vehicle), wheelIndex (int)

Parameters

  • vehicle (Vehicle) — The vehicle to obtain data for.
  • wheelIndex (int) — Index of wheel, 0-3.

GET_VEHICLE_WHEEL_TRACTION_VECTOR_LENGTH

Property Value
Native Name GET_VEHICLE_WHEEL_TRACTION_VECTOR_LENGTH
Hash 0x3BCFEE14
Return Type float
API Set client
Parameters vehicle (Vehicle), wheelIndex (int)

Description: Gets the traction vector length of a wheel. Max number of wheels can be retrieved with the native GET_VEHICLE_NUMBER_OF_WHEELS.

GET_VEHICLE_WHEEL_Y_ROTATION

Property Value
Native Name GET_VEHICLE_WHEEL_Y_ROTATION
Hash 0x2EA4AFFE
Return Type float
API Set client
Parameters vehicle (Vehicle), wheelIndex (int)

GET_VEHICLE_WHEEL_SIZE

Property Value
Native Name GET_VEHICLE_WHEEL_SIZE
Hash 0x4046B66
Return Type float
API Set client
Parameters vehicle (Vehicle)

Description: Returns vehicle's wheels' size (size is the same for all the wheels, cannot get/set specific wheel of vehicle). Only works on non-default wheels (returns 0 in case of default wheels).

Parameters

  • vehicle (Vehicle) — The vehicle to obtain data for.

GET_VEHICLE_WINDOW_TINT

Property Value
Native Name GET_VEHICLE_WINDOW_TINT
Hash 0x13D53892
Return Type int
API Set server
Parameters vehicle (Vehicle)

GET_VEHICLE_XMAS_SNOW_FACTOR

Property Value
Native Name GET_VEHICLE_XMAS_SNOW_FACTOR
Hash 0x16605B30
Return Type float
API Set client

Description: A getter for SET_VEHICLE_XMAS_SNOW_FACTOR.

GET_WATER_QUAD_COUNT

Property Value
Native Name GET_WATER_QUAD_COUNT
Hash 0xB1884159
Return Type int
API Set client

Examples

local waterQuadCount = GetWaterQuadCount()

GET_VEHICLE_WHEEL_WIDTH

Property Value
Native Name GET_VEHICLE_WHEEL_WIDTH
Hash 0x9C7B59F9
Return Type float
API Set client
Parameters vehicle (Vehicle)

Description: Returns vehicle's wheels' width (width is the same for all the wheels, cannot get/set specific wheel of vehicle). Only works on non-default wheels (returns 0 in case of default wheels).

Parameters

  • vehicle (Vehicle) — The vehicle to obtain data for.

GET_WATER_QUAD_AT_COORDS

Property Value
Native Name GET_WATER_QUAD_AT_COORDS
Hash 0x17321452
Return Type int
API Set client
Parameters x (float), y (float)

Description: This native returns the index of a water quad if the given point is inside its bounds.

If you also want to check for water level, check out GetWaterQuadAtCoords_3d

Parameters

  • x (float) — The X coordinate
  • y (float) — The Y coordinate

Examples

local currentPedPosition = GetEntityCoords(PlayerPedId())
local waterQuadIndex = GetWaterQuadAtCoords(currentPedPosition.x, currentPedPosition.y)

GET_VEHICLE_WHEEL_SUSPENSION_COMPRESSION

Property Value
Native Name GET_VEHICLE_WHEEL_SUSPENSION_COMPRESSION
Hash 0x2B48175B
Return Type float
API Set client
Parameters vehicle (Vehicle), wheelIndex (int)

Description: Gets the current suspension compression of a wheel. Returns a positive value. 0 means the suspension is fully extended, the wheel is off the ground. Max number of wheels can be retrieved with the native GET_VEHICLE_NUMBER_OF_WHEELS.

GET_WATER_QUAD_BOUNDS

Property Value
Native Name GET_WATER_QUAD_BOUNDS
Hash 0x42E9A06A
Return Type BOOL
API Set client
Parameters waterQuad (int), minX (int*), minY (int*), maxX (int*), maxY (int*)

Parameters

  • waterQuad (int) — The water quad index
  • minX (int*) — The minX coordinate
  • minY (int*) — The minY coordinate
  • maxX (int*) — The maxX coordinate
  • maxY (int*) — The maxY coordinate

Examples

local success, minX, minY, maxX, maxY = GetWaterQuadBounds(1)

GET_WATER_QUAD_LEVEL

Property Value
Native Name GET_WATER_QUAD_LEVEL
Hash 0x6523816B
Return Type BOOL
API Set client
Parameters waterQuad (int), waterQuadLevel (float*)

Description: level is defined as "z" in water.xml

Parameters

  • waterQuad (int) — The returned water quad level
  • waterQuadLevel (float*)

Examples

local success, waterQuadLevel = GetWaterQuadLevel(0)

GET_VISUAL_SETTING_FLOAT

Property Value
Native Name GET_VISUAL_SETTING_FLOAT
Hash 0x15346B4D
Return Type float
API Set client
Parameters name (char*)

Description: A getter for SET_VISUAL_SETTING_FLOAT.

Parameters

  • name (char*) — The name of the value to get, such as pedLight.color.red.

GET_VEHICLE_XENON_LIGHTS_CUSTOM_COLOR

Property Value
Native Name GET_VEHICLE_XENON_LIGHTS_CUSTOM_COLOR
Hash 0xC715F730
Return Type BOOL
API Set client
Parameters vehicle (Vehicle), red (int*), green (int*), blue (int*)

Description: Returns vehicle xenon lights custom RGB color values. Do note this native doesn't return non-RGB colors that was set with _SET_VEHICLE_XENON_LIGHTS_COLOR.

Parameters

  • vehicle (Vehicle) — The vehicle handle.
  • red (int*) — Red color (0-255).
  • green (int*) — Green color (0-255).
  • blue (int*) — Blue color (0-255).

GET_VEHICLE_WHEEL_TYPE

Property Value
Native Name GET_VEHICLE_WHEEL_TYPE
Hash 0xDA58D7AE
Return Type int
API Set server
Parameters vehicle (Vehicle)

GET_WATER_QUAD_ALPHA

Property Value
Native Name GET_WATER_QUAD_ALPHA
Hash 0x14088095
Return Type BOOL
API Set client
Parameters waterQuad (int), a0 (int*), a1 (int*), a2 (int*), a3 (int*)

Parameters

  • waterQuad (int) — The water quad index
  • a0 (int*) — The a0 level
  • a1 (int*) — The a1 level
  • a2 (int*) — The a2 level
  • a3 (int*) — The a3 level

Examples

local success, a0, a1, a2, a3 = GetWaterQuadAlpha(0)

GET_VEHICLE_WHEEL_X_OFFSET

Property Value
Native Name GET_VEHICLE_WHEEL_X_OFFSET
Hash 0xCC90CBCA
Return Type float
API Set client
Parameters vehicle (Vehicle), wheelIndex (int)

Description: Returns the offset of the specified wheel relative to the wheel's axle center.

GET_WATER_QUAD_AT_COORDS_3D

Property Value
Native Name GET_WATER_QUAD_AT_COORDS_3D
Hash 0xF8E03DB8
Return Type int
API Set client
Parameters x (float), y (float), z (float)

Description: This alternative implementation of GetWaterQuadAtCoords also checks the height of the water level.

Parameters

  • x (float) — The X coordinate
  • y (float) — The Y coordinate
  • z (float) — The water level inside the water quad

Examples

local currentPedPosition = GetEntityCoords(PlayerPedId())
local waterQuadIndex = GetWaterQuadAtCoords(currentPedPosition.x, currentPedPosition.y, currentPedPosition.z)

GET_WEAPON_ACCURACY_SPREAD

Property Value
Native Name GET_WEAPON_ACCURACY_SPREAD
Hash 0x5343721
Return Type float
API Set client
Parameters weaponHash (Hash)

Description: A getter for the accuracy spread of a weapon.

Parameters

  • weaponHash (Hash) — Weapon name hash.

GET_WAVE_QUAD_AT_COORDS

Property Value
Native Name GET_WAVE_QUAD_AT_COORDS
Hash 0x3F5A61A7
Return Type int
API Set client
Parameters x (float), y (float)

Description: This native returns the index of a wave quad if the given point is inside its bounds.

Parameters

  • x (float) — The X coordinate
  • y (float) — The Y coordinate

Examples

local currentPedPosition = GetEntityCoords(PlayerPedId())
local waveQuadIndex = GetWaveQuadAtCoords(currentPedPosition.x, currentPedPosition.y)

GET_WAVE_QUAD_BOUNDS

Property Value
Native Name GET_WAVE_QUAD_BOUNDS
Hash 0xF86136DB
Return Type BOOL
API Set client
Parameters waveQuad (int), minX (int*), minY (int*), maxX (int*), maxY (int*)

Parameters

  • waveQuad (int) — The wave quad index
  • minX (int*) — The minX coordinate
  • minY (int*) — The minY coordinate
  • maxX (int*) — The maxX coordinate
  • maxY (int*) — The maxY coordinate

Examples

local success, minX, minY, maxX, maxY = GetWaveQuadBounds(1)

GET_WATER_QUAD_TYPE

Property Value
Native Name GET_WATER_QUAD_TYPE
Hash 0xE2501B8B
Return Type BOOL
API Set client
Parameters waterQuad (int), waterType (int*)

Description: Valid type definitions:

  • 0 Square
  • 1 Right triangle where the 90 degree angle is at maxX, minY
  • 2 Right triangle where the 90 degree angle is at minX, minY
  • 3 Right triangle where the 90 degree angle is at minX, maxY
  • 4 Right triangle where the 90 degree angle is at maxY, maxY

Parameters

  • waterQuad (int) — The water quad index
  • waterType (int*)

Examples

local success, type = GetWaterQuadType(0)

GET_WEAPON_COMPONENT_DAMAGE_MODIFIER

Property Value
Native Name GET_WEAPON_COMPONENT_DAMAGE_MODIFIER
Hash 0x4A0E3855
Return Type float
API Set client
Parameters componentHash (Hash)

Description: A getter for CWeaponDamageModifier in a weapon component.

Parameters

  • componentHash (Hash) — Weapon component name hash.

GET_WEAPON_RECOIL_SHAKE_AMPLITUDE

Property Value
Native Name GET_WEAPON_RECOIL_SHAKE_AMPLITUDE
Hash 0x5E1AF5F
Return Type float
API Set client
Parameters weaponHash (Hash)

Description: A getter for the recoil shake amplitude of a weapon.

Parameters

  • weaponHash (Hash) — Weapon name hash.

GET_WEAPON_ANIMATION_OVERRIDE

Property Value
Native Name GET_WEAPON_ANIMATION_OVERRIDE
Hash 0x63ED2E7
Return Type Hash
API Set client
Parameters ped (Ped)

Description: A getter for SET_WEAPON_ANIMATION_OVERRIDE.

Parameters

  • ped (Ped) — The target ped.

Examples

local weaponAnimation = GetWeaponAnimationOverride(PlayerPedId())

GET_WATER_QUAD_IS_INVISIBLE

Property Value
Native Name GET_WATER_QUAD_IS_INVISIBLE
Hash 0x1DEDBD77
Return Type BOOL
API Set client
Parameters waterQuad (int), isInvisible (int*)

Parameters

  • waterQuad (int) — The water quad index
  • isInvisible (int*)

Examples

local success, isInvisible = GetWaterQuadIsInvisible(0)

GET_WATER_QUAD_NO_STENCIL

Property Value
Native Name GET_WATER_QUAD_NO_STENCIL
Hash 0x6F4ACBA
Return Type BOOL
API Set client
Parameters waterQuad (int), noStencil (int*)

Parameters

  • waterQuad (int) — The water quad index
  • noStencil (int*)

Examples

local success, noStencil = GetWaterQuadNoStencil(0)

HAS_ENTITY_BEEN_MARKED_AS_NO_LONGER_NEEDED

Property Value
Native Name HAS_ENTITY_BEEN_MARKED_AS_NO_LONGER_NEEDED
Hash 0x9C9A3BE0
Return Type BOOL
API Set server
Parameters vehicle (Vehicle)

GET_WEAPON_COMPONENT_CAMERA_HASH

Property Value
Native Name GET_WEAPON_COMPONENT_CAMERA_HASH
Hash 0xACB7E68F
Return Type int
API Set client
Parameters componentHash (Hash)

Description: A getter for CameraHash in a weapon scope component.

Parameters

  • componentHash (Hash) — Weapon component name hash.

IS_DISABLED_RAW_KEY_DOWN

Property Value
Native Name IS_DISABLED_RAW_KEY_DOWN
Hash 0x36366EC3
Return Type BOOL
API Set client
Parameters rawKeyIndex (int)

Description: Gets if the specified rawKeyIndex is pressed down, even if the key is disabled with DISABLE_RAW_KEY_THIS_FRAME.

Virtual key codes can be found here

Parameters

  • rawKeyIndex (int) — Index of raw key from keyboard.

Examples

if IsDisabledRawKeyDown(32) then -- KEY_SPACE
    print("Spacebar is down")
end

GET_WAVE_QUAD_COUNT

Property Value
Native Name GET_WAVE_QUAD_COUNT
Hash 0x9250C76
Return Type int
API Set client

Examples

local waveQuadCount = GetWaveQuadCount()

GET_WEAPON_COMPONENT_RANGE_MODIFIER

Property Value
Native Name GET_WEAPON_COMPONENT_RANGE_MODIFIER
Hash 0x2FD0BC1B
Return Type float
API Set client
Parameters componentHash (Hash)

Description: A getter for CWeaponFallOffModifier range modifier value in a weapon component.

Parameters

  • componentHash (Hash) — Weapon component name hash.

GET_WEAPON_COMPONENT_ACCURACY_MODIFIER

Property Value
Native Name GET_WEAPON_COMPONENT_ACCURACY_MODIFIER
Hash 0xC693E278
Return Type float
API Set client
Parameters componentHash (Hash)

Description: A getter for CWeaponAccuracyModifier in a weapon component.

Parameters

  • componentHash (Hash) — Weapon component name hash.

GET_WEAPON_COMPONENT_CLIP_SIZE

Property Value
Native Name GET_WEAPON_COMPONENT_CLIP_SIZE
Hash 0xE14CF665
Return Type int
API Set client
Parameters componentHash (Hash)

Description: A getter for ClipSize in a weapon component.

Parameters

  • componentHash (Hash) — Weapon component name hash.

GET_WAVE_QUAD_AMPLITUDE

Property Value
Native Name GET_WAVE_QUAD_AMPLITUDE
Hash 0x865139A3
Return Type BOOL
API Set client
Parameters waveQuad (int), waveQuadAmplitude (float*)

Parameters

  • waveQuad (int) — The wave quad index
  • waveQuadAmplitude (float*)

Examples

local success, amplitude = GetWaveQuadAmplitude(1)

GET_WEAPON_COMPONENT_RETICULE_HASH

Property Value
Native Name GET_WEAPON_COMPONENT_RETICULE_HASH
Hash 0xF9AB9297
Return Type int
API Set client
Parameters componentHash (Hash)

Description: A getter for ReticuleHash in a weapon scope component.

Parameters

  • componentHash (Hash) — Weapon component name hash.

GET_WAVE_QUAD_DIRECTION

Property Value
Native Name GET_WAVE_QUAD_DIRECTION
Hash 0xCCE49A1C
Return Type BOOL
API Set client
Parameters waveQuad (int), directionX (float*), directionY (float*)

Parameters

  • waveQuad (int) — The wave quad index
  • directionX (float*) — The wave quad X direction
  • directionY (float*) — The wave quad Y direction

Examples

local success, directionX, directionY = GetWaveQuadDirection(1)

IS_BOAT_WRECKED

Property Value
Native Name IS_BOAT_WRECKED
Hash 0x9049DB44
Return Type bool
API Set server
Parameters vehicle (Vehicle)

Parameters

  • vehicle (Vehicle) — The target vehicle.

GET_WATER_QUAD_HAS_LIMITED_DEPTH

Property Value
Native Name GET_WATER_QUAD_HAS_LIMITED_DEPTH
Hash 0x22EA3BD8
Return Type BOOL
API Set client
Parameters waterQuad (int), hasLimitedDepth (int*)

Parameters

  • waterQuad (int) — The water quad index
  • hasLimitedDepth (int*)

Examples

local success, hasLimitedDepth = GetWaterQuadHasLimitedDepth(0)

IS_ENTITY_VISIBLE

Property Value
Native Name IS_ENTITY_VISIBLE
Hash 0x120B4ED5
Return Type BOOL
API Set server
Parameters entity (Entity)

Description: This native checks if the given entity is visible.

IS_ACE_ALLOWED

Property Value
Native Name IS_ACE_ALLOWED
Hash 0x7EBB9929
Return Type BOOL
API Set shared
Parameters object (char*)

IS_DUPLICITY_VERSION

Property Value
Native Name IS_DUPLICITY_VERSION
Hash 0xCF24C52E
Return Type BOOL
API Set shared

Description: Gets whether or not this is the CitizenFX server.

IS_BOAT_ANCHORED_AND_FROZEN

Property Value
Native Name IS_BOAT_ANCHORED_AND_FROZEN
Hash 0xD5C39EE6
Return Type bool
API Set server
Parameters vehicle (Vehicle)

Parameters

  • vehicle (Vehicle) — The target vehicle.

HAS_VEHICLE_BEEN_DAMAGED_BY_BULLETS

Property Value
Native Name HAS_VEHICLE_BEEN_DAMAGED_BY_BULLETS
Hash 0xB8AF3137
Return Type BOOL
API Set server
Parameters vehicle (Vehicle)

Parameters

  • vehicle (Vehicle) — The target vehicle.

GET_WORLD_COORD_FROM_SCREEN_COORD

Property Value
Native Name GET_WORLD_COORD_FROM_SCREEN_COORD
Hash 0xC81D0659
Return Type void
API Set client
Parameters screenX (float), screenY (float), worldVector (Vector3*), normalVector (Vector3*)

Description: Converts a screen coordinate into its relative world coordinate.

Parameters

  • screenX (float) — A screen horizontal axis coordinate (0.0 - 1.0).
  • screenY (float) — A screen vertical axis coordinate (0.0 - 1.0).
  • worldVector (Vector3*) — The world coord vector pointer.
  • normalVector (Vector3*) — The screen normal vector pointer.

Examples

CreateThread(function()
  while true do
    local screenX = GetDisabledControlNormal(0, 239)
    local screenY = GetDisabledControlNormal(0, 240)

    local world, normal = GetWorldCoordFromScreenCoord(screenX, screenY)

    local depth = 10

    local target = world + normal * depth

    DrawSphere(target.x, target.y, target.z, 0.5, 255, 0, 0, 0.5)

    Wait(0)
  end
end)

HAS_MINIMAP_OVERLAY_LOADED

Property Value
Native Name HAS_MINIMAP_OVERLAY_LOADED
Hash 0xF7535F32
Return Type BOOL
API Set client
Parameters id (int)

Description: Returns whether or not the specific minimap overlay has loaded.

Parameters

  • id (int) — A minimap overlay ID.

HAS_VEHICLE_BEEN_OWNED_BY_PLAYER

Property Value
Native Name HAS_VEHICLE_BEEN_OWNED_BY_PLAYER
Hash 0xE4E83A5B
Return Type BOOL
API Set server
Parameters vehicle (Vehicle)

IS_BIGMAP_FULL

Property Value
Native Name IS_BIGMAP_FULL
Hash 0x66EE14B2
Return Type BOOL
API Set client

Examples

local expanded = IsBigmapActive()
local fullMap = IsBigmapFull()
print("The minimap is currently " .. (expanded and "expanded" or "normal size") .. " and the full map is currently " .. (fullMap and "revealed" or "not revealed") .. ".")
bool expanded = IsBigmapActive();
bool fullMap = IsBigmapFull();

Debug.WriteLine($"The minimap is currently {(expanded ? "expanded" : "normal size")} and the full map is currently {(fullMap ? "revealed" : "not revealed")}.");

IS_BIGMAP_ACTIVE

Property Value
Native Name IS_BIGMAP_ACTIVE
Hash 0xFFF65C63
Return Type BOOL
API Set client

Description: Returns true if the minimap is currently expanded. False if it's the normal minimap state. Use IsBigmapFull to check if the full map is currently revealed on the minimap.

Examples

local expanded = IsBigmapActive()
local fullMap = IsBigmapFull()
print("The minimap is currently " .. (expanded and "expanded" or "normal size") .. " and the full map is currently " .. (fullMap and "revealed" or "not revealed") .. ".")
bool expanded = IsBigmapActive();
bool fullMap = IsBigmapFull();

Debug.WriteLine($"The minimap is currently {(expanded ? "expanded" : "normal size")} and the full map is currently {(fullMap ? "revealed" : "not revealed")}.");

GET_WEAPON_DAMAGE_MODIFIER

Property Value
Native Name GET_WEAPON_DAMAGE_MODIFIER
Hash 0xD979143
Return Type float
API Set client
Parameters weaponHash (Hash)

Description: A getter for _SET_WEAPON_DAMAGE_MODIFIER.

Parameters

  • weaponHash (Hash) — Weapon name hash.

GET_WEAPON_COMPONENT_RANGE_DAMAGE_MODIFIER

Property Value
Native Name GET_WEAPON_COMPONENT_RANGE_DAMAGE_MODIFIER
Hash 0xE134FB8D
Return Type float
API Set client
Parameters componentHash (Hash)

Description: A getter for CWeaponFallOffModifier damage modifier value in a weapon component.

Parameters

  • componentHash (Hash) — Weapon component name hash.

IS_DISABLED_RAW_KEY_RELEASED

Property Value
Native Name IS_DISABLED_RAW_KEY_RELEASED
Hash 0x72B66C09
Return Type BOOL
API Set client
Parameters rawKeyIndex (int)

Description: Gets if the specified rawKeyIndex was released, even if the key is disabled with DISABLE_RAW_KEY_THIS_FRAME.

Virtual key codes can be found here

Parameters

  • rawKeyIndex (int) — Index of raw key from keyboard.

Examples

if IsDisabledRawKeyReleased(32) then -- KEY_SPACE
    print("Spacebar released")
end

IS_DISABLED_RAW_KEY_UP

Property Value
Native Name IS_DISABLED_RAW_KEY_UP
Hash 0x2C033875
Return Type BOOL
API Set client
Parameters rawKeyIndex (int)

Description: Gets if the specified rawKeyIndex is up, even if the key is disabled with DISABLE_RAW_KEY_THIS_FRAME.

Virtual key codes can be found here

Parameters

  • rawKeyIndex (int) — Index of raw key from keyboard.

Examples

if IsDisabledRawKeyUp(32) then -- KEY_SPACE
    print("Spacebar is up")
end

IS_PED_COLLECTION_COMPONENT_VARIATION_VALID

Property Value
Native Name IS_PED_COLLECTION_COMPONENT_VARIATION_VALID
Hash 0xCA63A52A
Return Type bool
API Set client
Parameters ped (Ped), componentId (int), collection (char*), drawableId (int), textureId (int)

Description: An alternative to IS_PED_COMPONENT_VARIATION_VALID that uses local collection indexing instead of the global one.

The local / collection relative indexing is useful because the global index may get shifted after Title Update. While local index will remain the same which simplifies migration to the newer game version.

Collection name and local index inside the collection can be obtained from the global index using GET_PED_COLLECTION_NAME_FROM_DRAWABLE and GET_PED_COLLECTION_LOCAL_INDEX_FROM_DRAWABLE natives.

Parameters

IS_PED_COMPONENT_VARIATION_GEN9_EXCLUSIVE

Property Value
Native Name IS_PED_COMPONENT_VARIATION_GEN9_EXCLUSIVE
Hash 0xC767B581
Return Type bool
API Set client
Parameters ped (Ped), componentId (int), drawableId (int)

Parameters

  • ped (Ped) — The target ped.
  • componentId (int) — The component id.
  • drawableId (int) — The drawable id.

Examples

local ped = PlayerPedId()

for component = 0, 12 do
  local count = GetNumberOfPedDrawableVariations(ped, component)

  for drawable = 0, count - 1 do
    if IsPedComponentVariationGen9Exclusive(ped, component, drawable) then
      print("Component " .. component .. " drawable " .. drawable .. " is a gen9 exclusive, skip!")
    end
  end
end

IS_NUI_FOCUS_KEEPING_INPUT

Property Value
Native Name IS_NUI_FOCUS_KEEPING_INPUT
Hash 0x39C9DC92
Return Type BOOL
API Set client

Description: Checks if keyboard input is enabled during NUI focus using SET_NUI_FOCUS_KEEP_INPUT.

IS_FLASH_LIGHT_ON

Property Value
Native Name IS_FLASH_LIGHT_ON
Hash 0x76876154
Return Type bool
API Set server
Parameters ped (Ped)

Parameters

  • ped (Ped) — The target ped.

IS_PED_RAGDOLL

Property Value
Native Name IS_PED_RAGDOLL
Hash 0xC833BBE1
Return Type bool
API Set server
Parameters ped (Ped)

Parameters

  • ped (Ped) — The target ped.

IS_NUI_FOCUSED

Property Value
Native Name IS_NUI_FOCUSED
Hash 0x98545E6D
Return Type BOOL
API Set client

Description: Returns the current NUI focus state previously set with SET_NUI_FOCUS.

IS_DISABLED_RAW_KEY_PRESSED

Property Value
Native Name IS_DISABLED_RAW_KEY_PRESSED
Hash 0x1F7CBBAA
Return Type BOOL
API Set client
Parameters rawKeyIndex (int)

Description: Gets if the specified rawKeyIndex is pressed, even if the key is disabled with DISABLE_RAW_KEY_THIS_FRAME.

Virtual key codes can be found here

Parameters

  • rawKeyIndex (int) — Index of raw key from keyboard.

Examples

if IsDisabledRawKeyPressed(32) then -- KEY_SPACE
    print("Spacebar pressed")
end

IS_PED_COLLECTION_COMPONENT_VARIATION_GEN9_EXCLUSIVE

Property Value
Native Name IS_PED_COLLECTION_COMPONENT_VARIATION_GEN9_EXCLUSIVE
Hash 0x33B2AFA2
Return Type bool
API Set client
Parameters ped (Ped), componentId (int), collection (char*), drawableId (int)

Description: An alternative to IS_PED_COMPONENT_VARIATION_GEN9_EXCLUSIVE that uses local collection indexing instead of the global one.

The local / collection relative indexing is useful because the global index may get shifted after Title Update. While local index will remain the same which simplifies migration to the newer game version.

Collection name and local index inside the collection can be obtained from the global index using GET_PED_COLLECTION_NAME_FROM_DRAWABLE and GET_PED_COLLECTION_LOCAL_INDEX_FROM_DRAWABLE natives.

Parameters

IS_DUI_AVAILABLE

Property Value
Native Name IS_DUI_AVAILABLE
Hash 0x7AAC3B4C
Return Type BOOL
API Set client
Parameters duiObject (long)

Description: Returns whether or not a browser is created for a specified DUI browser object.

Parameters

  • duiObject (long) — The DUI browser handle.

IS_HELI_TAIL_BOOM_BROKEN

Property Value
Native Name IS_HELI_TAIL_BOOM_BROKEN
Hash 0x2C59F987
Return Type BOOL
API Set server
Parameters heli (Vehicle)

Parameters

  • heli (Vehicle) — The helicopter to check

IS_PED_A_PLAYER

Property Value
Native Name IS_PED_A_PLAYER
Hash 0x404794CA
Return Type BOOL
API Set server
Parameters ped (Ped)

Description: This native checks if the given ped is a player.

IS_PED_USING_ACTION_MODE

Property Value
Native Name IS_PED_USING_ACTION_MODE
Hash 0x5AE7EDA2
Return Type bool
API Set server
Parameters ped (Ped)

Parameters

  • ped (Ped) — The target ped.

IS_ENTITY_POSITION_FROZEN

Property Value
Native Name IS_ENTITY_POSITION_FROZEN
Hash 0xEDBE6ADD
Return Type bool
API Set shared
Parameters entity (Entity)

Description: A getter for FREEZE_ENTITY_POSITION.

Parameters

  • entity (Entity) — The entity to check for

Examples

local isFrozen = IsEntityPositionFrozen(PlayerPedId())
const isFrozen = IsEntityPositionFrozen(PlayerPedId());

IS_PLAYER_IN_FREE_CAM_MODE

Property Value
Native Name IS_PLAYER_IN_FREE_CAM_MODE
Hash 0x1F14F2AC
Return Type bool
API Set server
Parameters playerSrc (char*)

Parameters

  • playerSrc (char*) — The player to get the free camera mode status of

IS_PLAYER_COMMERCE_INFO_LOADED

Property Value
Native Name IS_PLAYER_COMMERCE_INFO_LOADED
Hash 0xBEFE93F4
Return Type BOOL
API Set server
Parameters playerSrc (char*)

Description: Requests whether or not the commerce data for the specified player has loaded.

Parameters

  • playerSrc (char*) — The player handle

IS_RAW_KEY_UP

Property Value
Native Name IS_RAW_KEY_UP
Hash 0x36F4E505
Return Type BOOL
API Set client
Parameters rawKeyIndex (int)

Description: Gets if the specified rawKeyIndex is up on the keyboard.

This will not be triggered if the key is disabled with DISABLE_RAW_KEY_THIS_FRAME

Virtual key codes can be found here

Parameters

  • rawKeyIndex (int) — Index of raw key from keyboard.

Examples

if IsRawKeyUp(32) then -- KEY_SPACE
    print("Spacebar is up")
end

IS_RAW_KEY_RELEASED

Property Value
Native Name IS_RAW_KEY_RELEASED
Hash 0xEAA50861
Return Type BOOL
API Set client
Parameters rawKeyIndex (int)

Description: Gets if the specified rawKeyIndex was just released on the keyboard.

This will not be triggered if the key is disabled with DISABLE_RAW_KEY_THIS_FRAME

Virtual key codes can be found here

Parameters

  • rawKeyIndex (int) — Index of raw key from keyboard.

Examples

if IsRawKeyReleased(32) then -- KEY_SPACE
    print("Spacebar released")
end

IS_STREAMING_FILE_READY

Property Value
Native Name IS_STREAMING_FILE_READY
Hash 0xA194934D
Return Type BOOL
API Set client
Parameters registerAs (char*)

Description: Experimental: This native may be altered or removed in future versions of CitizenFX without warning.

Returns whether an asynchronous streaming file registration completed.

Parameters

  • registerAs (char*) — The file name to check, for example asset.ydr.

IS_PLAYER_USING_SUPER_JUMP

Property Value
Native Name IS_PLAYER_USING_SUPER_JUMP
Hash 0xC7D2C20C
Return Type BOOL
API Set server
Parameters playerSrc (char*)

Parameters

  • playerSrc (char*) — The player handle

IS_PED_HANDCUFFED

Property Value
Native Name IS_PED_HANDCUFFED
Hash 0x25865633
Return Type bool
API Set server
Parameters ped (Ped)

Parameters

  • ped (Ped) — The target ped.

IS_PLAYER_EVADING_WANTED_LEVEL

Property Value
Native Name IS_PLAYER_EVADING_WANTED_LEVEL
Hash 0x89A3881A
Return Type BOOL
API Set server
Parameters playerSrc (char*)

Description: ``` This will return true if the player is evading wanted level, meaning that the wanted level stars are blink. Otherwise will return false.

If the player is not wanted, it simply returns false.


### Parameters
- **`playerSrc`** (`char*`) — The target player

## IS_PED_STRAFING

| Property | Value |
|----------|-------|
| Native Name | `IS_PED_STRAFING` |
| Hash | `0xEFEED13C` |
| Return Type | `bool` |
| API Set | `server` |
| Parameters | `ped` (Ped) |

### Parameters
- **`ped`** (`Ped`) — The target ped.

## IS_PRINCIPAL_ACE_ALLOWED

| Property | Value |
|----------|-------|
| Native Name | `IS_PRINCIPAL_ACE_ALLOWED` |
| Hash | `0x37CF52CE` |
| Return Type | `BOOL` |
| API Set | `shared` |
| Parameters | `principal` (char*), `object` (char*) |

## IS_VEHICLE_NEEDS_TO_BE_HOTWIRED

| Property | Value |
|----------|-------|
| Native Name | `IS_VEHICLE_NEEDS_TO_BE_HOTWIRED` |
| Hash | `0xF9933BF4` |
| Return Type | `BOOL` |
| API Set | `client` |
| Parameters | `vehicle` (Vehicle) |

## IS_RAW_KEY_DOWN

| Property | Value |
|----------|-------|
| Native Name | `IS_RAW_KEY_DOWN` |
| Hash | `0xD95A7387` |
| Return Type | `BOOL` |
| API Set | `client` |
| Parameters | `rawKeyIndex` (int) |

**Description:** Gets if the specified `rawKeyIndex` is pressed down on the keyboard.

This will not be triggered if the key is disabled with [DISABLE_RAW_KEY_THIS_FRAME](#\_0x8BCF0014)

Virtual key codes can be found [here](https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes)

### Parameters
- **`rawKeyIndex`** (`int`) — Index of raw key from keyboard.

### Examples
```lua
if IsRawKeyDown(32) then -- KEY_SPACE
    print("Spacebar is down")
end

IS_TRAIN_CABOOSE

Property Value
Native Name IS_TRAIN_CABOOSE
Hash 0xFA9336E5
Return Type bool
API Set server
Parameters train (Vehicle)

Parameters

  • train (Vehicle) — The train handle

IS_VEHICLE_ALARM_SET

Property Value
Native Name IS_VEHICLE_ALARM_SET
Hash 0xDC921211
Return Type BOOL
API Set client
Parameters vehicle (Vehicle)

IS_PLAYER_COMMERCE_INFO_LOADED_EXT

Property Value
Native Name IS_PLAYER_COMMERCE_INFO_LOADED_EXT
Hash 0x1D14F4FE
Return Type BOOL
API Set server
Parameters playerSrc (char*)

Description: Requests whether or not the commerce data for the specified player has loaded from Tebex.

Parameters

  • playerSrc (char*) — The player handle

IS_PLAYER_ACE_ALLOWED

Property Value
Native Name IS_PLAYER_ACE_ALLOWED
Hash 0xDEDAE23D
Return Type BOOL
API Set server
Parameters playerSrc (char*), object (char*)

IS_RAW_KEY_PRESSED

Property Value
Native Name IS_RAW_KEY_PRESSED
Hash 0x69F7C29E
Return Type BOOL
API Set client
Parameters rawKeyIndex (int)

Description: Gets if the specified rawKeyIndex is pressed on the keyboard.

This will not be triggered if the key is disabled with DISABLE_RAW_KEY_THIS_FRAME

Virtual key codes can be found here

Parameters

  • rawKeyIndex (int) — Index of raw key from keyboard.

Examples

if IsRawKeyPressed(32) then -- KEY_SPACE
    print("Spacebar pressed")
end

IS_TRACK_ENABLED

Property Value
Native Name IS_TRACK_ENABLED
Hash 0x31E695CB
Return Type bool
API Set client
Parameters track (int)

Description: Getter for SET_TRACK_ENABLED

Parameters

  • track (int) — The track id (between 0 - 27)

IS_VEHICLE_SIREN_ON

Property Value
Native Name IS_VEHICLE_SIREN_ON
Hash 0x25EB5873
Return Type BOOL
API Set server
Parameters vehicle (Vehicle)

IS_VEHICLE_TYRE_BURST

Property Value
Native Name IS_VEHICLE_TYRE_BURST
Hash 0x48C80210
Return Type BOOL
API Set server
Parameters vehicle (Vehicle), wheelID (int), completely (BOOL)

IS_VEHICLE_WINDOW_INTACT

Property Value
Native Name IS_VEHICLE_WINDOW_INTACT
Hash 0xAC4EF23D
Return Type BOOL
API Set server
Parameters vehicle (Vehicle), windowIndex (int)

Description: See the client-side IS_VEHICLE_WINDOW_INTACT for a window indexes list.

Parameters

  • vehicle (Vehicle) — The target vehicle.
  • windowIndex (int) — The window index.

IS_VEHICLE_WANTED

Property Value
Native Name IS_VEHICLE_WANTED
Hash 0xA7DAF7C
Return Type BOOL
API Set client
Parameters vehicle (Vehicle)

IS_VEHICLE_EXTRA_TURNED_ON

Property Value
Native Name IS_VEHICLE_EXTRA_TURNED_ON
Hash 0x42098B5
Return Type BOOL
API Set server
Parameters vehicle (Vehicle), extraId (int)

LOAD_RESOURCE_FILE

Property Value
Native Name LOAD_RESOURCE_FILE
Hash 0x76A9EE1F
Return Type char*
API Set shared
Parameters resourceName (char*), fileName (char*)

Description: Reads the contents of a text file in a specified resource. If executed on the client, this file has to be included in files in the resource manifest. Example: local data = LoadResourceFile("devtools", "data.json")

Parameters

  • resourceName (char*) — The resource name.
  • fileName (char*) — The file in the resource.

IS_VEHICLE_INTERIOR_LIGHT_ON

Property Value
Native Name IS_VEHICLE_INTERIOR_LIGHT_ON
Hash 0xA411F72C
Return Type BOOL
API Set client
Parameters vehicle (Vehicle)

MUMBLE_ADD_VOICE_TARGET_PLAYER

Property Value
Native Name MUMBLE_ADD_VOICE_TARGET_PLAYER
Hash 0x32C5355A
Return Type void
API Set client
Parameters targetId (int), player (Player)

Description: Adds the specified player to the target list for the specified Mumble voice target ID.

Parameters

  • targetId (int) — A Mumble voice target ID, ranging from 1..30 (inclusive).
  • player (Player) — A game player index.

MUMBLE_ADD_VOICE_CHANNEL_LISTEN

Property Value
Native Name MUMBLE_ADD_VOICE_CHANNEL_LISTEN
Hash 0xC79F44BF
Return Type void
API Set client
Parameters channel (int)

Description: Starts listening to the specified channel, when available.

Parameters

  • channel (int) — A game voice channel ID.

IS_TRACK_SWITCHED_OFF

Property Value
Native Name IS_TRACK_SWITCHED_OFF
Hash 0xE0C53765
Return Type bool
API Set client
Parameters track (int)

Description: Getter for SWITCH_TRAIN_TRACK. Determines if ambient trains are able to spawn on this track.

Parameters

  • track (int) — The track id (between 0 - 27)

MUMBLE_CLEAR_VOICE_CHANNEL

Property Value
Native Name MUMBLE_CLEAR_VOICE_CHANNEL
Hash 0xBF847807
Return Type void
API Set client

IS_VEHICLE_WHEEL_BROKEN_OFF

Property Value
Native Name IS_VEHICLE_WHEEL_BROKEN_OFF
Hash 0xCF1BC668
Return Type BOOL
API Set client
Parameters vehicle (Vehicle), wheelIndex (int)

Description: Getter for BREAK_OFF_VEHICLE_WHEEL.

Parameters

  • vehicle (Vehicle) — The vehicle handle.
  • wheelIndex (int) — The wheel index.

Examples

local vehicle = GetVehiclePedIsIn(PlayerPedId())

if DoesEntityExist(vehicle) then
  local isWheelBroken = IsVehicleWheelBrokenOff(vehicle, 1)
  print("Is wheel 1 broken? ", isWheelBroken)
end

LOAD_PLAYER_COMMERCE_DATA_EXT

Property Value
Native Name LOAD_PLAYER_COMMERCE_DATA_EXT
Hash 0x7995539E
Return Type void
API Set server
Parameters playerSrc (char*)

Description: Requests the commerce data from Tebex for the specified player, including the owned SKUs.

Use IS_PLAYER_COMMERCE_INFO_LOADED_EXT to check if it has loaded.

This will not automatically update whenever a client purchases a package, if you want to fetch new purchases you will need to call this native again.

This native will temporarily cache the players commerce data for 10 seconds, a call to this native after 10 seconds will re-fetch the players commerce data.

Parameters

  • playerSrc (char*) — The player handle

Examples

RegisterNetEvent("doesOwnPackage", function(packageIdSku)
	-- source isn't valid across waits, so we localize it
	local source = source

	-- input isn't right
	if type(packageIdSku) ~= "number" then
		return
	end

	-- The native will cache the results
	LoadPlayerCommerceDataExt(source)
	-- Wait for the players data to load
	while not IsPlayerCommerceInfoLoadedExt(source) do
		Wait(0)
	end

	-- Tell the client if they own the package or not
	TriggerClientEvent("doesOwnPackage", source, DoesPlayerOwnSkuExt(source, packageIdSku))
end)

IS_VEHICLE_PREVIOUSLY_OWNED_BY_PLAYER

Property Value
Native Name IS_VEHICLE_PREVIOUSLY_OWNED_BY_PLAYER
Hash 0xF849ED67
Return Type BOOL
API Set client
Parameters vehicle (Vehicle)

IS_VEHICLE_ENGINE_STARTING

Property Value
Native Name IS_VEHICLE_ENGINE_STARTING
Hash 0xBB340D04
Return Type BOOL
API Set shared
Parameters vehicle (Vehicle)

LOAD_PLAYER_COMMERCE_DATA

Property Value
Native Name LOAD_PLAYER_COMMERCE_DATA
Hash 0xA8F63EAB
Return Type void
API Set server
Parameters playerSrc (char*)

Description: Requests the commerce data for the specified player, including the owned SKUs. Use IS_PLAYER_COMMERCE_INFO_LOADED to check if it has loaded.

Parameters

  • playerSrc (char*) — The player handle

MUMBLE_ADD_VOICE_TARGET_CHANNEL

Property Value
Native Name MUMBLE_ADD_VOICE_TARGET_CHANNEL
Hash 0x4D386C9E
Return Type void
API Set client
Parameters targetId (int), channel (int)

Description: Adds the specified channel to the target list for the specified Mumble voice target ID.

Parameters

  • targetId (int) — A Mumble voice target ID, ranging from 1..30 (inclusive).
  • channel (int) — A game voice channel ID.

LOAD_WATER_FROM_PATH

Property Value
Native Name LOAD_WATER_FROM_PATH
Hash 0xF5102568
Return Type BOOL
API Set client
Parameters resourceName (char*), fileName (char*)

Description: Define the xml in a resources fxmanifest, under the file(s) section.

Parameters

  • resourceName (char*) — The name of the resource containing your modified water definition
  • fileName (char*) — The name of the file

Examples

local success = LoadWaterFromPath('my-resource-name', 'water-all-over-the-place.xml')

MUMBLE_GET_VOICE_CHANNEL_FROM_SERVER_ID

Property Value
Native Name MUMBLE_GET_VOICE_CHANNEL_FROM_SERVER_ID
Hash 0x221C09F1
Return Type int
API Set client
Parameters serverId (int)

Description: Returns the mumble voice channel from a player's server id.

Parameters

  • serverId (int) — The player's server id.

MUMBLE_GET_TALKER_PROXIMITY

Property Value
Native Name MUMBLE_GET_TALKER_PROXIMITY
Hash 0x84E02A32
Return Type float
API Set client

MUMBLE_REMOVE_VOICE_CHANNEL_LISTEN

Property Value
Native Name MUMBLE_REMOVE_VOICE_CHANNEL_LISTEN
Hash 0x231523B7
Return Type void
API Set client
Parameters channel (int)

Description: Stops listening to the specified channel.

Parameters

  • channel (int) — A game voice channel ID.

MUMBLE_REMOVE_VOICE_TARGET_PLAYER

Property Value
Native Name MUMBLE_REMOVE_VOICE_TARGET_PLAYER
Hash 0x88CD646F
Return Type void
API Set client
Parameters targetId (int), player (Player)

Description: Removes the specified player from the user's voice targets.

Performs the opposite operation of MUMBLE_ADD_VOICE_TARGET_PLAYER

Parameters

  • targetId (int) — A Mumble voice target ID, ranging from 1..30 (inclusive).
  • player (Player) — The player index to remove from the target.

MUMBLE_CLEAR_VOICE_TARGET_PLAYERS

Property Value
Native Name MUMBLE_CLEAR_VOICE_TARGET_PLAYERS
Hash 0x912E21DA
Return Type void
API Set client
Parameters targetId (int)

Description: Clears players from the target list for the specified Mumble voice target ID.

Parameters

  • targetId (int) — A Mumble voice target ID, ranging from 1..30 (inclusive).

MUMBLE_REMOVE_VOICE_TARGET_CHANNEL

Property Value
Native Name MUMBLE_REMOVE_VOICE_TARGET_CHANNEL
Hash 0x268DB867
Return Type void
API Set client
Parameters targetId (int), channel (int)

Description: Removes the specified voice channel from the user's voice targets.

Performs the opposite operation of MUMBLE_ADD_VOICE_TARGET_CHANNEL

Parameters

  • targetId (int) — A Mumble voice target ID, ranging from 1..30 (inclusive).
  • channel (int) — The game voice channel ID to remove from the target.

MUMBLE_IS_ACTIVE

Property Value
Native Name MUMBLE_IS_ACTIVE
Hash 0xE820BC10
Return Type BOOL
API Set client

MUMBLE_IS_PLAYER_MUTED

Property Value
Native Name MUMBLE_IS_PLAYER_MUTED
Hash 0x1D5D50C2
Return Type BOOL
API Set server
Parameters playerSrc (int)

Description: Checks if the player is currently muted

Parameters

  • playerSrc (int) — The player to get the mute state for

MUMBLE_IS_CONNECTED

Property Value
Native Name MUMBLE_IS_CONNECTED
Hash 0xB816370A
Return Type BOOL
API Set client

Description: This native will return true if the user succesfully connected to the voice server. If the user disabled the voice-chat setting it will return false.

MUMBLE_IS_PLAYER_TALKING

Property Value
Native Name MUMBLE_IS_PLAYER_TALKING
Hash 0x33EEF97F
Return Type BOOL
API Set client
Parameters player (Player)

Parameters

  • player (Player) — The target player.

MUMBLE_CLEAR_VOICE_TARGET_CHANNELS

Property Value
Native Name MUMBLE_CLEAR_VOICE_TARGET_CHANNELS
Hash 0x5EA72E76
Return Type void
API Set client
Parameters targetId (int)

Description: Clears channels from the target list for the specified Mumble voice target ID.

Parameters

  • targetId (int) — A Mumble voice target ID, ranging from 1..30 (inclusive).

MUMBLE_DOES_CHANNEL_EXIST

Property Value
Native Name MUMBLE_DOES_CHANNEL_EXIST
Hash 0xCC8CA25
Return Type BOOL
API Set client
Parameters channel (int)

Description: Check whether specified channel exists on the Mumble server.

Parameters

  • channel (int) — A game voice channel ID.

MUMBLE_CREATE_CHANNEL

Property Value
Native Name MUMBLE_CREATE_CHANNEL
Hash 0x262663C5
Return Type void
API Set server
Parameters id (int)

Description: Create a permanent voice channel.

Parameters

  • id (int) — ID of the channel.

MUMBLE_SET_PLAYER_MUTED

Property Value
Native Name MUMBLE_SET_PLAYER_MUTED
Hash 0xCC6C2EB1
Return Type void
API Set server
Parameters playerSrc (int), toggle (bool)

Description: Mutes or unmutes the specified player

Parameters

  • playerSrc (int) — The player to set the mute state of
  • toggle (bool) — Whether to mute or unmute the player

MUMBLE_ADD_VOICE_TARGET_PLAYER_BY_SERVER_ID

Property Value
Native Name MUMBLE_ADD_VOICE_TARGET_PLAYER_BY_SERVER_ID
Hash 0x25F2B65F
Return Type void
API Set client
Parameters targetId (int), serverId (int)

Description: Adds the specified player to the target list for the specified Mumble voice target ID.

Parameters

  • targetId (int) — A Mumble voice target ID, ranging from 1..30 (inclusive).
  • serverId (int) — The player's server id.

MUMBLE_SET_AUDIO_OUTPUT_DISTANCE

Property Value
Native Name MUMBLE_SET_AUDIO_OUTPUT_DISTANCE
Hash 0x74C597D9
Return Type void
API Set client
Parameters distance (float)

Description: Sets the current output distance. The player will be able to hear other players talking within this distance.

Parameters

  • distance (float) — The output distance.

MUMBLE_CLEAR_VOICE_TARGET

Property Value
Native Name MUMBLE_CLEAR_VOICE_TARGET
Hash 0x8555DCBA
Return Type void
API Set client
Parameters targetId (int)

Description: Clears the target list for the specified Mumble voice target ID.

Parameters

  • targetId (int) — A Mumble voice target ID, ranging from 1..30 (inclusive).

NETWORK_DOES_ENTITY_EXIST_WITH_NETWORK_ID

Property Value
Native Name NETWORK_DOES_ENTITY_EXIST_WITH_NETWORK_ID
Hash 0x1E2E3177
Return Type BOOL
API Set client
Parameters netId (int)

Parameters

  • netId (int) — The network id to check

MUMBLE_SET_VOLUME_OVERRIDE

Property Value
Native Name MUMBLE_SET_VOLUME_OVERRIDE
Hash 0x61C309E3
Return Type void
API Set client
Parameters player (Player), volume (float)

Description: Overrides the output volume for a particular player on Mumble. This will also bypass 3D audio and distance calculations. -1.0 to reset the override.

Set to -1.0 to reset the Volume override.

Parameters

  • player (Player) — A game player index.
  • volume (float) — The volume, ranging from 0.0 to 1.0 (or above).

MUMBLE_SET_TALKER_PROXIMITY

Property Value
Native Name MUMBLE_SET_TALKER_PROXIMITY
Hash 0x74E927B0
Return Type void
API Set client
Parameters value (float)

Parameters

  • value (float) — Proximity value.

MUMBLE_SET_ACTIVE

Property Value
Native Name MUMBLE_SET_ACTIVE
Hash 0xD932A3F3
Return Type void
API Set client
Parameters state (BOOL)

Parameters

  • state (BOOL) — Voice chat state.

MUMBLE_SET_AUDIO_INPUT_DISTANCE

Property Value
Native Name MUMBLE_SET_AUDIO_INPUT_DISTANCE
Hash 0x1B1052E2
Return Type void
API Set client
Parameters distance (float)

Description: Sets the current input distance. The player will be able to talk to other players within this distance.

Parameters

  • distance (float) — The input distance.

MUMBLE_SET_SUBMIX_FOR_SERVER_ID

Property Value
Native Name MUMBLE_SET_SUBMIX_FOR_SERVER_ID
Hash 0xFE3A3054
Return Type void
API Set client
Parameters serverId (int), submixId (int)

Description: Sets the audio submix ID for a specified player using Mumble 'Native Audio' functionality.

Parameters

  • serverId (int) — The player's server ID.
  • submixId (int) — The submix ID.

MUMBLE_SET_SERVER_ADDRESS

Property Value
Native Name MUMBLE_SET_SERVER_ADDRESS
Hash 0xE6EB2CD8
Return Type void
API Set client
Parameters address (char*), port (int)

Description: Changes the Mumble server address to connect to, and reconnects to the new address.

Setting the address to an empty string and the port to -1 will reset to the built in FXServer Mumble Implementation.

Parameters

  • address (char*) — The address of the mumble server.
  • port (int) — The port of the mumble server.

MUMBLE_SET_VOICE_CHANNEL

Property Value
Native Name MUMBLE_SET_VOICE_CHANNEL
Hash 0x8737EEE8
Return Type void
API Set client
Parameters channel (int)

Parameters

  • channel (int) — A game voice channel ID.

MUMBLE_SET_VOLUME_OVERRIDE_BY_SERVER_ID

Property Value
Native Name MUMBLE_SET_VOLUME_OVERRIDE_BY_SERVER_ID
Hash 0xCE8E25B4
Return Type void
API Set client
Parameters serverId (int), volume (float)

Description: Overrides the output volume for a particular player with the specified server id and player name on Mumble. This will also bypass 3D audio and distance calculations. -1.0 to reset the override.

Parameters

  • serverId (int) — The player's server id.
  • volume (float) — The volume, ranging from 0.0 to 1.0 (or above).

NETWORK_GET_NETWORK_ID_FROM_ENTITY

Property Value
Native Name NETWORK_GET_NETWORK_ID_FROM_ENTITY
Hash 0x9E35DAB6
Return Type int
API Set server
Parameters entity (Entity)

NETWORK_GET_FIRST_ENTITY_OWNER

Property Value
Native Name NETWORK_GET_FIRST_ENTITY_OWNER
Hash 0x1E546224
Return Type int
API Set server
Parameters entity (Entity)

Description: Returns the first owner ID of the specified entity.

Parameters

  • entity (Entity) — The entity to get the first owner for.

OVERRIDE_REACTION_TO_VEHICLE_SIREN

Property Value
Native Name OVERRIDE_REACTION_TO_VEHICLE_SIREN
Hash 0x3F3EB3F7
Return Type void
API Set client
Parameters state (BOOL), reaction (int)

Description: Setting the state to true and a value between 0 and 2 will cause pedestrian vehicles to react accordingly to sirens.

enum Reactions {
    Left = 0,
    Right = 1,
    Stop = 2
}

Parameters

  • state (BOOL) — Toggle on or off
  • reaction (int) — Decide how they should react

MUMBLE_REMOVE_VOICE_TARGET_PLAYER_BY_SERVER_ID

Property Value
Native Name MUMBLE_REMOVE_VOICE_TARGET_PLAYER_BY_SERVER_ID
Hash 0x930BD34B
Return Type void
API Set client
Parameters targetId (int), serverId (int)

Description: Removes the specified player from the user's voice targets.

Performs the opposite operation of MUMBLE_ADD_VOICE_TARGET_PLAYER_BY_SERVER_ID

Parameters

  • targetId (int) — A Mumble voice target ID, ranging from 1..30 (inclusive).
  • serverId (int) — The player's server id to remove from the target.

MUMBLE_SET_VOICE_TARGET

Property Value
Native Name MUMBLE_SET_VOICE_TARGET
Hash 0x960A4A95
Return Type void
API Set client
Parameters targetId (int)

Description: Sets the current Mumble voice target ID to broadcast voice to.

Parameters

  • targetId (int) — A Mumble voice target ID, ranging from 1..30 (inclusive). 0 disables voice targets, and 31 is server loopback.

NETWORK_GET_ENTITY_FROM_NETWORK_ID

Property Value
Native Name NETWORK_GET_ENTITY_FROM_NETWORK_ID
Hash 0x5B912C3F
Return Type Entity
API Set server
Parameters netId (int)

MUMBLE_SET_AUDIO_INPUT_INTENT

Property Value
Native Name MUMBLE_SET_AUDIO_INPUT_INTENT
Hash 0x6383526B
Return Type void
API Set client
Parameters intentHash (Hash)

Description: Use this native to disable noise suppression and high pass filters.

The possible intents for this are as follows (backticks are used to represent hashes):

Index Description
`speech` Default intent
`music` Disable noise suppression and high pass filter

Parameters

  • intentHash (Hash) — The intent hash.

Examples

-- disable noise suppression and high pass filter
MumbleSetAudioInputIntent(`music`)

-- set the default intent (enable noise suppression and high pass filter)
MumbleSetAudioInputIntent(`speech`)

PROFILER_IS_RECORDING

Property Value
Native Name PROFILER_IS_RECORDING
Hash 0xF8B7D7BB
Return Type BOOL
API Set shared

Description: Returns true if the profiler is active.

PROFILER_ENTER_SCOPE

Property Value
Native Name PROFILER_ENTER_SCOPE
Hash 0xC795A4A9
Return Type void
API Set shared
Parameters scopeName (char*)

Description: Scope entry for profiler.

Parameters

  • scopeName (char*) — Scope name.

REGISTER_ARCHETYPES

Property Value
Native Name REGISTER_ARCHETYPES
Hash 0x3C2F9037
Return Type void
API Set client
Parameters factory (func)

Description: Experimental: This native may be altered or removed in future versions of CitizenFX without warning.

Registers a set of archetypes with the game engine. These should match CBaseArchetypeDef class information from the game.

Parameters

  • factory (func) — A function returning a list of archetypes.

Examples

RegisterArchetypes(function()
	return {
		{
			flags = 32,
			bbMin = vector3(-39.99570000, -8.00155600, -2.56818800),
			bbMax = vector3(40.00439000, 7.99858000, 1.44575100),
			bsCentre = vector3(0.00434110, -0.00148870, -0.56121830),
			bsRadius = 40.84160000,
			name = 'my_asset',
			textureDictionary = 'my_asset',
			physicsDictionary = 'my_asset',
			assetName = 'my_asset',
			assetType = 'ASSET_TYPE_DRAWABLE',
			lodDist = 450.45,
			specialAttribute = 0
		}
	}
end)

PERFORM_HTTP_REQUEST_INTERNAL

Property Value
Native Name PERFORM_HTTP_REQUEST_INTERNAL
Hash 0x8E8CC653
Return Type int
API Set server
Parameters requestData (char*), requestDataLength (int)

NETWORK_GET_ENTITY_OWNER

Property Value
Native Name NETWORK_GET_ENTITY_OWNER
Hash 0x526FEE31
Return Type int
API Set shared
Parameters entity (Entity)

Description: Returns the owner ID of the specified entity.

Parameters

  • entity (Entity) — The entity to get the owner for.

OVERRIDE_PEDS_USE_DEFAULT_DRIVE_BY_CLIPSET

Property Value
Native Name OVERRIDE_PEDS_USE_DEFAULT_DRIVE_BY_CLIPSET
Hash 0xB14F8EAD
Return Type void
API Set client
Parameters flag (BOOL)

Description: Allows the bypassing of default game behavior that prevents the use of SET_PED_DRIVE_BY_CLIPSET_OVERRIDE in certain scenarios to avoid clipping issues (e.g., when there is more than one Ped in a vehicle).

Note: This flag and the overridden clipset are not replicated values and require synchronization through user scripts. Additionally, current game behavior also restricts applying this clipset locally when in first-person mode and will require a temporary workaround.

Parameters

  • flag (BOOL) — true to override, false to use default game behavior.

REGISTER_FONT_FILE

Property Value
Native Name REGISTER_FONT_FILE
Hash 0x1B3A363
Return Type void
API Set client
Parameters fileName (char*)

Description: Registers a specified .gfx file as GFx font library. The .gfx file has to be registered with the streamer already.

Parameters

  • fileName (char*) — The name of the .gfx file, without extension.

OVERRIDE_POP_GROUPS

Property Value
Native Name OVERRIDE_POP_GROUPS
Hash 0xD3BC438F
Return Type void
API Set client
Parameters path (char*)

Description: Replaces the popgroups (CPopGroupList) meta file with the file in the specified path.

Parameters

  • path (char*) — The file path to load (popgroups, @resource/popgroups), or null to reload the default population groups file.

Examples

-- fxmanifest.lua:
file 'popgroups_dlc.xml'

-- client.lua:
OverridePopGroups('popgroups_dlc.xml')

-- restore the original after five minutes
Wait(1000 * 60 * 5)
OverridePopGroups(nil)

PERFORM_HTTP_REQUEST_INTERNAL_EX

Property Value
Native Name PERFORM_HTTP_REQUEST_INTERNAL_EX
Hash 0x6B171E87
Return Type int
API Set server
Parameters requestData (object)

NETWORK_GET_VOICE_PROXIMITY_OVERRIDE_FOR_PLAYER

Property Value
Native Name NETWORK_GET_VOICE_PROXIMITY_OVERRIDE_FOR_PLAYER
Hash 0xFFEEF513
Return Type Vector3
API Set server
Parameters playerSrc (char*)

Parameters

  • playerSrc (char*) — The player handle

ONESYNC_ENABLE_REMOTE_ATTACHMENT_SANITIZATION

Property Value
Native Name ONESYNC_ENABLE_REMOTE_ATTACHMENT_SANITIZATION
Hash 0x30CE39D8
Return Type void
API Set client
Parameters enable (BOOL)

Description: Toggles a check that prevents attaching (networked) entities to remotely owned peds. This is disabled by default.

Parameters

  • enable (BOOL) — Whether to enable sanitization.

OVERRIDE_VEHICLE_PEDS_CAN_STAND_ON_TOP_FLAG

Property Value
Native Name OVERRIDE_VEHICLE_PEDS_CAN_STAND_ON_TOP_FLAG
Hash 0x7FA03E76
Return Type void
API Set client
Parameters vehicle (Vehicle), can (BOOL)

Description: Overrides whether or not peds can stand on top of the specified vehicle.

Note this flag is not replicated automatically, you will have to manually do so.

Parameters

  • vehicle (Vehicle) — The vehicle.
  • can (BOOL) — Can they?

REGISTER_FONT_ID

Property Value
Native Name REGISTER_FONT_ID
Hash 0xACF6D8EE
Return Type int
API Set client
Parameters fontName (char*)

Description: Registers a specified font name for use with text draw commands.

Parameters

  • fontName (char*) — The name of the font in the GFx font library.

PROFILER_EXIT_SCOPE

Property Value
Native Name PROFILER_EXIT_SCOPE
Hash 0xB39CA35C
Return Type void
API Set shared

Description: Scope exit for profiler.

OVERRIDE_PEDS_CAN_STAND_ON_TOP_FLAG

Property Value
Native Name OVERRIDE_PEDS_CAN_STAND_ON_TOP_FLAG
Hash 0x90A9E0B2
Return Type void
API Set client
Parameters flag (BOOL)

Description: Sets whether peds can stand on top of all vehicles without falling off.

Note this flag is not replicated automatically, you will have to manually do so.

Parameters

  • flag (BOOL) — true to override, false to use default game behavior.

REMAP_RAW_KEYMAP

Property Value
Native Name REMAP_RAW_KEYMAP
Hash 0x6E38C1B9
Return Type void
API Set client
Parameters keymapName (char*), newRawKeyIndex (int)

Description: Remaps the keymap bound to keymapName to newRawKeyIndex

Virtual key codes can be found here

Parameters

  • keymapName (char*) — the name given to the keymap in REGISTER_RAW_KEYMAP
  • newRawKeyIndex (int) — Index of raw key from keyboard.

Examples


function on_key_up()
	print("key no longer pressed")
end

function on_key_down()
	print("key is pressed")
end

local KEY_SPACE = 32
local canBeDisabled = false

local KEY_E = 69

RegisterRawKeymap("our_keymap", on_key_up, on_key_down, KEY_SPACE, canBeDisabled)

RemapRawKeymap("our_keymap", KEY_E)

REGISTER_STREAMING_FILE_FROM_KVS

Property Value
Native Name REGISTER_STREAMING_FILE_FROM_KVS
Hash 0x1493DCC1
Return Type void
API Set client
Parameters kvsKey (char*)

Description: Experimental: This native may be altered or removed in future versions of CitizenFX without warning.

Registers a KVP value as an asset with the GTA streaming module system. This function currently won't work.

Parameters

  • kvsKey (char*) — The KVP key in the current resource to register as an asset.

REGISTER_COMMAND

Property Value
Native Name REGISTER_COMMAND
Hash 0x5FA79B0F
Return Type void
API Set shared
Parameters commandName (char*), handler (func), restricted (BOOL)

Description: Registered commands can be executed by entering them in the client console (this works for client side and server side registered commands). Or by entering them in the server console/through an RCON client (only works for server side registered commands). Or if you use a supported chat resource, like the default one provided in the cfx-server-data repository, then you can enter the command in chat by prefixing it with a /.

Commands registered using this function can also be executed by resources, using the ExecuteCommand native.

The restricted bool is not used on the client side. Permissions can only be checked on the server side, so if you want to limit your command with an ace permission automatically, make it a server command (by registering it in a server script).

Example result:

Parameters

  • commandName (char*) — The command you want to register.
  • handler (func) — A handler function that gets called whenever the command is executed.
  • restricted (BOOL) — If this is a server command and you set this to true, then players will need the command.yourCommandName ace permission to execute this command.

Examples

-- (server side script)
-- Registers a command named 'ping'.
RegisterCommand("ping", function(source, args, rawCommand)
    -- If the source is > 0, then that means it must be a player.
    if (source > 0) then
    
        -- result (using the default GTA:O chat theme) https://i.imgur.com/TaCnG09.png
        TriggerClientEvent("chat:addMessage", -1, {
            args = {
                GetPlayerName(source),
                "PONG!"
            },
            color = { 5, 255, 255 }
        })
    
    -- If it's not a player, then it must be RCON, a resource, or the server console directly.
    else
        print("This command was executed by the server console, RCON client, or a resource.")
    end
end, false --[[this command is not restricted, everyone can use this.]])
RegisterCommand("ping", new Action<int, List<object>, string>((source, args, rawCommand) =>
{
    if (source > 0) // it's a player.
    {
        // Create a message object.
        dynamic messageObject = new ExpandoObject();
        // Set the message object args (message author, message content)
        messageObject.args = new string[] { GetPlayerName(source.ToString()), "PONG!" };
        // Set the message color (r, g, b)
        messageObject.color = new int[] { 5, 255, 255 };

        // Trigger the client event with the message object on all clients.
        TriggerClientEvent("chat:addMessage", messageObject);
    }
    // It's not a player, so it's the server console, a RCON client, or a resource.
    else
    {
        Debug.WriteLine("This command was executed by the server console, RCON client, or a resource.");
    }
}), false /*This command is also not restricted, anyone can use it.*/ );

REGISTER_RESOURCE_ASSET

Property Value
Native Name REGISTER_RESOURCE_ASSET
Hash 0x9862B266
Return Type char*
API Set server
Parameters resourceName (char*), fileName (char*)

Description: Experimental: This native may be altered or removed in future versions of CitizenFX without warning.

Registers a cached resource asset with the resource system, similar to the automatic scanning of the stream/ folder.

Parameters

  • resourceName (char*) — The resource to add the asset to.
  • fileName (char*) — A file name in the resource.

REGISTER_RAW_NUI_CALLBACK

Property Value
Native Name REGISTER_RAW_NUI_CALLBACK
Hash 0xA8AE9C2F
Return Type void
API Set client
Parameters callbackType (char*), callback (func)

REGISTER_TRACK_JUNCTION

Property Value
Native Name REGISTER_TRACK_JUNCTION
Hash 0x35F743B5
Return Type int
API Set client
Parameters trackIndex (int), trackNode (int), newIndex (int), newNode (int), direction (bool)

Description: Registers a track junction that when enabled will cause a train on the defined trackIndex, node and direction to change its current track index and begin traveling on the new node

Parameters

  • trackIndex (int) — The track index a train should be on
  • trackNode (int) — The node a train should be on
  • newIndex (int) — The new track index for a train to be placed on
  • newNode (int) — The new track node for a train to be placed on
  • direction (bool) — The direction a train should be traveling for this junction

REGISTER_RESOURCE_AS_EVENT_HANDLER

Property Value
Native Name REGISTER_RESOURCE_AS_EVENT_HANDLER
Hash 0xD233A168
Return Type void
API Set shared
Parameters eventName (char*)

Description: An internal function which allows the current resource's HLL script runtimes to receive state for the specified event.

Parameters

  • eventName (char*) — An event name, or "*" to disable HLL event filtering for this resource.

REGISTER_NUI_CALLBACK

Property Value
Native Name REGISTER_NUI_CALLBACK
Hash 0xC59B980C
Return Type void
API Set client
Parameters callbackType (char*), callback (func)

REGISTER_KEY_MAPPING

Property Value
Native Name REGISTER_KEY_MAPPING
Hash 0xD7664FD1
Return Type void
API Set client
Parameters commandString (char*), description (char*), defaultMapper (char*), defaultParameter (char*)

Description: Registers a key mapping for the current resource.

See the related cookbook post for more information.

Below you can find some examples on how to create these keybindings as well as the alternate keybinding syntax, which is preceded by ~! to indicate that it's an alternate key.

Parameters

  • commandString (char*) — The command to execute, and the identifier of the binding.
  • description (char*) — A description for in the settings menu.
  • defaultMapper (char*) — The mapper ID to use for the default binding, e.g. keyboard.
  • defaultParameter (char*) — The IO parameter ID to use for the default binding, e.g. f3.

Examples

local handsUp = false
CreateThread(function()
    while true do
        Wait(0)
        if handsUp then
            TaskHandsUp(PlayerPedId(), 250, PlayerPedId(), -1, true)
        end
    end
end)
RegisterCommand('+handsup', function()
    handsUp = true
end, false)
RegisterCommand('-handsup', function()
    handsUp = false
end, false)

RegisterKeyMapping('+handsup', 'Hands Up', 'keyboard', 'i')

-- Alternate keybinding syntax
RegisterKeyMapping('~!+handsup', 'Hands Up - Alternate Key', 'keyboard', 'o')

REGISTER_STREAMING_FILE_FROM_URL

Property Value
Native Name REGISTER_STREAMING_FILE_FROM_URL
Hash 0xF44BFB95
Return Type void
API Set client
Parameters registerAs (char*), url (char*)

Description: Experimental: This native may be altered or removed in future versions of CitizenFX without warning.

Registers a file from an URL as a streaming asset in the GTA streaming subsystem. This will asynchronously register the asset, and caching is done based on the URL itself - cache headers are ignored.

Use IS_STREAMING_FILE_READY to check if the asset has been registered successfully.

Parameters

  • registerAs (char*) — The file name to register as, for example asset.ydr.
  • url (char*) — The URL to fetch the asset from.

REMOVE_CONVAR_CHANGE_LISTENER

Property Value
Native Name REMOVE_CONVAR_CHANGE_LISTENER
Hash 0xEAC49841
Return Type void
API Set shared
Parameters cookie (int)

Parameters

REGISTER_RAW_KEYMAP

Property Value
Native Name REGISTER_RAW_KEYMAP
Hash 0x49C1F6DC
Return Type void
API Set client
Parameters keymapName (char*), onKeyDown (func), onKeyUp (func), rawKeyIndex (int), canBeDisabled (BOOL)

Description: Registers a keymap that will be triggered whenever rawKeyIndex is pressed or released.

onKeyUp and onKeyDown will not provide any arguments.

function onStateChange();

Parameters

  • keymapName (char*) — A unique name that the keymap will be bound to, duplicates will result in the keymap not being registered.
  • onKeyDown (func) — The function to run when the key is being pressed, or nil.
  • onKeyUp (func) — The function to run when the key is no longer being pressed, or nil.
  • rawKeyIndex (int) — The virtual key to bind this keymap to, see a list here
  • canBeDisabled (BOOL) — If calls to DISABLE_RAW_KEY_THIS_FRAME will disable this keymap, if a keymap was disabled when the key was pressed down it will still call onKeyUp on release.

Examples

function on_key_up()
	print("key no longer pressed")
end

function on_key_down()
	print("key is pressed")
end

local KEY_E = 69
local canBeDisabled = false


RegisterRawKeymap("our_keymap", on_key_up, on_key_down, KEY_E, canBeDisabled)

REGISTER_ROPE_DATA

Property Value
Native Name REGISTER_ROPE_DATA
Hash 0xF213AE8D
Return Type int
API Set client
Parameters numSections (int), radius (float), diffuseTextureName (char*), normalMapName (char*), distanceMappingScale (float), uvScaleX (float), uvScaleY (float), specularFresnel (float), specularFalloff (float), specularIntensity (float), bumpiness (float), color (int)

Description: Registers a custom rope data with the game. For guidance on what these values should be use common:/data/ropedata.xml as a reference. Returns a rope type which can be passed into ADD_ROPE to use a custom rope design. Once a rope data is registered it can be used indefinitely and you should take caution not too register too many as to exceed the games limit.

Examples

-- Create a thick steel cable rope above the players head
local ropeType = RegisterRopeData(6, 0.15, "steel_cable", "steel_cable_n", 1.0, 1.0, 8.775, 0.97, 30.0, 0.25, 1.775, 0x00FFFF00)
if ropeType ~= -1 then
    local coords = GetEntityCoords(PlayerPedId()) + vector3(0.0, 0.0, 5.0)
	AddRope(coords.x, coords.y, coords.z, 0.0, 0.0, 0.0, 25.0, ropeType, 10.0, 0.0, 1.0, false, false, false, 1.0, false, 0)
    RopeLoadTextures()
end

REGISTER_NUI_CALLBACK_TYPE

Property Value
Native Name REGISTER_NUI_CALLBACK_TYPE
Hash 0xCD03CDA9
Return Type void
API Set client
Parameters callbackType (char*)

REGISTER_CONSOLE_LISTENER

Property Value
Native Name REGISTER_CONSOLE_LISTENER
Hash 0x281B5448
Return Type void
API Set server
Parameters listener (func)

Description: Registers a listener for console output messages.

Parameters

  • listener (func) — A function of (channel: string, message: string) => void. The message might contain \n.

REGISTER_RESOURCE_BUILD_TASK_FACTORY

Property Value
Native Name REGISTER_RESOURCE_BUILD_TASK_FACTORY
Hash 0x285B43CA
Return Type void
API Set server
Parameters factoryId (char*), factoryFn (func)

Description: Registers a build task factory for resources. The function should return an object (msgpack map) with the following fields:

{
// returns whether the specific resource should be built
shouldBuild = func(resourceName: string): bool,

// asynchronously start building the specific resource.
// call cb when completed
build = func(resourceName: string, cb: func(success: bool, status: string): void): void
}

Parameters

  • factoryId (char*) — The identifier for the build task.
  • factoryFn (func) — The factory function.

RESET_PED_MODEL_PERSONALITY

Property Value
Native Name RESET_PED_MODEL_PERSONALITY
Hash 0x79A12861
Return Type void
API Set client
Parameters modelHash (Hash)

Description: Restores an overridden ped model personality type to the default value.

Parameters

  • modelHash (Hash) — Ped's model.

REGISTER_STREAMING_FILE_FROM_CACHE

Property Value
Native Name REGISTER_STREAMING_FILE_FROM_CACHE
Hash 0xCEAD2D4B
Return Type void
API Set client
Parameters resourceName (char*), fileName (char*), cacheString (char*)

Description: Experimental: This native may be altered or removed in future versions of CitizenFX without warning.

Registers a dynamic streaming asset from the server with the GTA streaming module system.

Parameters

  • resourceName (char*) — The resource to add the asset to.
  • fileName (char*) — A file name in the resource.
  • cacheString (char*) — The string returned from REGISTER_RESOURCE_ASSET on the server.

RESET_MAP_ZOOM_DATA_LEVEL

Property Value
Native Name RESET_MAP_ZOOM_DATA_LEVEL
Hash 0x11A5B7ED
Return Type void
API Set client
Parameters index (int)

Description: Resets values from the zoom level data by index to defaults from mapzoomdata.meta.

Parameters

  • index (int) — Zoom level index.

RESET_WATER

Property Value
Native Name RESET_WATER
Hash 0x1DA4791
Return Type void
API Set client

Description: Resets the water to the games default water.xml.

Examples

ResetWater()

REMOVE_HEALTH_CONFIG

Property Value
Native Name REMOVE_HEALTH_CONFIG
Hash 0xE0ED5FB
Return Type void
API Set client
Parameters configName (char*)

Description: Removes health config.

Parameters

  • configName (char*) — Removes config name. Cannot be default game health config name.

REMOVE_TIMECYCLE_MODIFIER_VAR

Property Value
Native Name REMOVE_TIMECYCLE_MODIFIER_VAR
Hash 0x5A5E0D05
Return Type void
API Set client
Parameters modifierName (char*), varName (char*)

Parameters

  • modifierName (char*) — The name of timecycle modifier.
  • varName (char*) — The name of timecycle variable.

Examples

local modifierName = "superDARK"
local varName = "postfx_noise"

if DoesTimecycleModifierHasVar(modifierName, varName) then
  local success, value1, value2 = GetTimecycleModifierVar(modifierName, varName)

  if success then
    print(string.format("[%s] removed var %s with values: %f %f", modifierName, varName, value1, value2))
    RemoveTimecycleModifierVar(modifierName, varName)
  end
else
    SetTimecycleModifierVar(modifierName, varName, 1.0, 1.0)
    print(string.format("[%s] created var %s", modifierName, varName))
end

SAVE_RESOURCE_FILE

Property Value
Native Name SAVE_RESOURCE_FILE
Hash 0xA09E7E7B
Return Type BOOL
API Set server
Parameters resourceName (char*), fileName (char*), data (char*), dataLength (int)

Description: Writes the specified data to a file in the specified resource. Using a length of -1 will automatically detect the length assuming the data is a C string.

Parameters

  • resourceName (char*) — The name of the resource.
  • fileName (char*) — The name of the file.
  • data (char*) — The data to write to the file.
  • dataLength (int) — The length of the written data.

REMOVE_DRY_VOLUME

Property Value
Native Name REMOVE_DRY_VOLUME
Hash 0x7BCAA6E7
Return Type void
API Set client
Parameters handle (int)

Description: Removes a dry volume from the game session. See CREATE_DRY_VOLUME for more info

Parameters

  • handle (int) — The handle of the dry volume that needs to be removed.

REMOVE_TRACK_JUNCTION

Property Value
Native Name REMOVE_TRACK_JUNCTION
Hash 0x4F3D2B2A
Return Type bool
API Set client
Parameters junctionIndex (int)

Description: Removes the specified track junction.

Parameters

  • junctionIndex (int) — The junctions index

REMOVE_TIMECYCLE_MODIFIER

Property Value
Native Name REMOVE_TIMECYCLE_MODIFIER
Hash 0x36DF8612
Return Type void
API Set client
Parameters modifierName (char*)

Parameters

  • modifierName (char*) — The timecycle modifier name.

Examples

local modifierName = "my_awesome_timecycle"
RemoveTimecycleModifier(modifierName)

REMOVE_REPLACE_TEXTURE

Property Value
Native Name REMOVE_REPLACE_TEXTURE
Hash 0xA896B20A
Return Type void
API Set client
Parameters origTxd (char*), origTxn (char*)

Description: Experimental natives, please do not use in a live environment.

SCHEDULE_RESOURCE_TICK

Property Value
Native Name SCHEDULE_RESOURCE_TICK
Hash 0xB88A73AD
Return Type void
API Set server
Parameters resourceName (char*)

Description: Schedules the specified resource to run a tick as soon as possible, bypassing the server's fixed tick rate.

Parameters

  • resourceName (char*) — The resource to tick.

REMOVE_TEXTURE

Property Value
Native Name REMOVE_TEXTURE
Hash 0x1582C7F2
Return Type void
API Set client
Parameters textureId (int)

Description: Removes the specified texture and remove it from the ped. Unlike 0x6BEFAA907B076859 which only marks the texture as "can be reused" (and keeps it until will be reused), this function deletes it right away. Can fix some sync issues. DOES_TEXTURE_EXIST can be use to wait until fully unloaded by game

RemoveTexture(textureId)
while DoesTextureExist(textureId) do 
    Wait(0)
end

Parameters

  • textureId (int) — texture id created by 0xC5E7204F322E49EB.

RESET_FLY_THROUGH_WINDSCREEN_PARAMS

Property Value
Native Name RESET_FLY_THROUGH_WINDSCREEN_PARAMS
Hash 0x6D712937
Return Type void
API Set client

Description: Resets parameters which is used by the game for checking is ped needs to fly through windscreen after a crash to default values.

REQUEST_RESOURCE_FILE_SET

Property Value
Native Name REQUEST_RESOURCE_FILE_SET
Hash 0xE7490533
Return Type BOOL
API Set client
Parameters setName (char*)

Description: Requests a resource file set with the specified name to be downloaded and mounted on top of the current resource.

Resource file sets are specified in fxmanifest.lua with the following syntax:

file_set 'addon_ui' {
    'ui/addon/index.html',
    'ui/addon/**.js',
}

This command will trigger a script error if the request failed.

Parameters

  • setName (char*) — The name of the file set as specified in fxmanifest.lua.

Examples

-- fxmanifest.lua
file_set 'dummies' {
    'dummy/**.txt',
    'potato.txt',
}

-- main script
local function PrintTest()
    local tests = { 'potato.txt', 'dummy/1.txt', 'dummy/b/2.txt' }

    for _, v in ipairs(tests) do
        local data = LoadResourceFile(GetCurrentResourceName(), v)
        print(v, data)
    end
end

RegisterCommand('fileset', function()
    PrintTest()

    while not RequestResourceFileSet('dummies') do
        Wait(100)
    end

    PrintTest()
end)

REQUEST_PLAYER_COMMERCE_SESSION

Property Value
Native Name REQUEST_PLAYER_COMMERCE_SESSION
Hash 0x96F93CCE
Return Type void
API Set server
Parameters playerSrc (char*), skuId (int)

Description: Requests the specified player to buy the passed SKU. This'll pop up a prompt on the client, which upon acceptance will open the browser prompting further purchase details.

Parameters

  • playerSrc (char*) — The player handle
  • skuId (int) — The ID of the SKU.

REMOVE_STATE_BAG_CHANGE_HANDLER

Property Value
Native Name REMOVE_STATE_BAG_CHANGE_HANDLER
Hash 0xD36BE661
Return Type void
API Set shared
Parameters cookie (int)

Description: Experimental: This native may be altered or removed in future versions of CitizenFX without warning.

Removes a handler for changes to a state bag.

Parameters

  • cookie (int) — The cookie.

RESET_VEHICLE_PEDS_CAN_STAND_ON_TOP_FLAG

Property Value
Native Name RESET_VEHICLE_PEDS_CAN_STAND_ON_TOP_FLAG
Hash 0xDF62CFE2
Return Type void
API Set client
Parameters vehicle (Vehicle)

Description: Resets whether or not peds can stand on top of the specified vehicle.

Note this flag is not replicated automatically, you will have to manually do so.

Parameters

  • vehicle (Vehicle) — The vehicle.

SET_AUDIO_SUBMIX_OUTPUT_VOLUMES

Property Value
Native Name SET_AUDIO_SUBMIX_OUTPUT_VOLUMES
Hash 0x825DC0D1
Return Type void
API Set client
Parameters submixId (int), outputSlot (int), frontLeftVolume (float), frontRightVolume (float), rearLeftVolume (float), rearRightVolume (float), channel5Volume (float), channel6Volume (float)

Description: Sets the volumes for the sound channels in a submix effect. Values can be between 0.0 and 1.0. Channel 5 and channel 6 are not used in voice chat but are believed to be center and LFE channels. Output slot starts at 0 for the first ADD_AUDIO_SUBMIX_OUTPUT call then incremented by 1 on each subsequent call.

Parameters

  • submixId (int) — The submix.
  • outputSlot (int) — The output slot index.
  • frontLeftVolume (float) — The volume for the front left channel.
  • frontRightVolume (float) — The volume for the front right channel.
  • rearLeftVolume (float) — The volume for the rear left channel.
  • rearRightVolume (float) — The volume for the rear right channel.
  • channel5Volume (float) — The volume for channel 5.
  • channel6Volume (float) — The volume for channel 6.

SEND_DUI_MOUSE_UP

Property Value
Native Name SEND_DUI_MOUSE_UP
Hash 0x1D735B93
Return Type void
API Set client
Parameters duiObject (long), button (char*)

Description: Injects a 'mouse up' event for a DUI object. Coordinates are expected to be set using SEND_DUI_MOUSE_MOVE.

Parameters

  • duiObject (long) — The DUI browser handle.
  • button (char*) — Either 'left', 'middle' or 'right'.

SEND_DUI_MOUSE_MOVE

Property Value
Native Name SEND_DUI_MOUSE_MOVE
Hash 0xD9D7A0AA
Return Type void
API Set client
Parameters duiObject (long), x (int), y (int)

Description: Injects a 'mouse move' event for a DUI object. Coordinates are in browser space.

Parameters

  • duiObject (long) — The DUI browser handle.
  • x (int) — The mouse X position.
  • y (int) — The mouse Y position.

SEND_NUI_MESSAGE

Property Value
Native Name SEND_NUI_MESSAGE
Hash 0x78608ACB
Return Type BOOL
API Set client
Parameters jsonString (char*)

SET_AUDIO_SUBMIX_EFFECT_RADIO_FX

Property Value
Native Name SET_AUDIO_SUBMIX_EFFECT_RADIO_FX
Hash 0xAAA94D53
Return Type void
API Set client
Parameters submixId (int), effectSlot (int)

Description: Assigns a RadioFX effect to a submix effect slot.

The parameter values for this effect are as follows (backticks are used to represent hashes):

Index Type Description
`enabled` int Enables or disables RadioFX on this DSP.
`default` int Sets default parameters for the RadioFX DSP and enables it.
`freq_low` float
`freq_hi` float
`fudge` float
`rm_mod_freq` float
`rm_mix` float
`o_freq_lo` float
`o_freq_hi` float

Parameters

  • submixId (int) — The submix.
  • effectSlot (int) — The effect slot for the submix.

Examples

-- we want to change the master output
local submix = 0

-- add a RadioFX effect to slot 0
SetAudioSubmixEffectRadioFx(submix, 0)

-- set the default values
SetAudioSubmixEffectParamInt(submix, 0, `default`, 1)

SET_CALMING_QUAD_DAMPENING

Property Value
Native Name SET_CALMING_QUAD_DAMPENING
Hash 0x67977501
Return Type BOOL
API Set client
Parameters calmingQuad (int), dampening (float)

Parameters

  • calmingQuad (int) — The calming quad
  • dampening (float) — The dampening value

Examples

local success = SetCalmingQuadDampening(0, 1.0)

SET_CALMING_QUAD_BOUNDS

Property Value
Native Name SET_CALMING_QUAD_BOUNDS
Hash 0xC5945BD9
Return Type BOOL
API Set client
Parameters waterQuad (int), minX (int), minY (int), maxX (int), maxY (int)

Parameters

  • waterQuad (int) — The calming quad index
  • minX (int) — The minX coordinate
  • minY (int) — The minY coordinate
  • maxX (int) — The maxX coordinate
  • maxY (int) — The maxY coordinate

Examples

local success = SetCalmingQuadBounds(1, -500, -500, 500, 500)

SET_DUI_URL

Property Value
Native Name SET_DUI_URL
Hash 0xF761D9F3
Return Type void
API Set client
Parameters duiObject (long), url (char*)

Description: Navigates the specified DUI browser to a different URL.

Parameters

  • duiObject (long) — The DUI browser handle.
  • url (char*) — The new URL.

SET_AIM_COOLDOWN

Property Value
Native Name SET_AIM_COOLDOWN
Hash 0xA42A3DBF
Return Type void
API Set client
Parameters value (int)

Description: Adds a cooldown between instances of moving and then aiming. Can be optionally used to hinder 'speedboosting' To turn off, set value to 0

Parameters

  • value (int) — Number of milliseconds between allowed aiming

SET_CONVAR

Property Value
Native Name SET_CONVAR
Hash 0x341B16D2
Return Type void
API Set server
Parameters varName (char*), value (char*)

SET_BACKFACECULLING

Property Value
Native Name SET_BACKFACECULLING
Hash 0xC44C2F44
Return Type void
API Set client
Parameters toggle (BOOL)

SEND_DUI_MESSAGE

Property Value
Native Name SEND_DUI_MESSAGE
Hash 0xCD380DA9
Return Type void
API Set client
Parameters duiObject (long), jsonString (char*)

Description: Sends a message to the specific DUI root page. This is similar to SEND_NUI_MESSAGE.

Parameters

  • duiObject (long) — The DUI browser handle.
  • jsonString (char*) — The message, encoded as JSON.

SEND_LOADING_SCREEN_MESSAGE

Property Value
Native Name SEND_LOADING_SCREEN_MESSAGE
Hash 0x8BBE6CC0
Return Type BOOL
API Set client
Parameters jsonString (char*)

Description: Sends a message to the loadingScreen NUI frame, which contains the HTML page referenced in loadscreen resources.

Parameters

  • jsonString (char*) — The JSON-encoded message.

SET_AUDIO_SUBMIX_EFFECT_PARAM_FLOAT

Property Value
Native Name SET_AUDIO_SUBMIX_EFFECT_PARAM_FLOAT
Hash 0x9A209B3C
Return Type void
API Set client
Parameters submixId (int), effectSlot (int), paramIndex (int), paramValue (float)

Description: Sets a floating-point parameter for a submix effect.

Parameters

  • submixId (int) — The submix.
  • effectSlot (int) — The effect slot for the submix. It is expected that the effect is set in this slot beforehand.
  • paramIndex (int) — The parameter index for the effect.
  • paramValue (float) — The parameter value to set.

SEND_DUI_MOUSE_DOWN

Property Value
Native Name SEND_DUI_MOUSE_DOWN
Hash 0x5D01F191
Return Type void
API Set client
Parameters duiObject (long), button (char*)

Description: Injects a 'mouse down' event for a DUI object. Coordinates are expected to be set using SEND_DUI_MOUSE_MOVE.

Parameters

  • duiObject (long) — The DUI browser handle.
  • button (char*) — Either 'left', 'middle' or 'right'.

SET_AUDIO_SUBMIX_EFFECT_PARAM_INT

Property Value
Native Name SET_AUDIO_SUBMIX_EFFECT_PARAM_INT
Hash 0x77FAE2B8
Return Type void
API Set client
Parameters submixId (int), effectSlot (int), paramIndex (int), paramValue (int)

Description: Sets an integer parameter for a submix effect.

Parameters

  • submixId (int) — The submix.
  • effectSlot (int) — The effect slot for the submix. It is expected that the effect is set in this slot beforehand.
  • paramIndex (int) — The parameter index for the effect.
  • paramValue (int) — The parameter value to set.

SEND_DUI_MOUSE_WHEEL

Property Value
Native Name SEND_DUI_MOUSE_WHEEL
Hash 0x2D62133A
Return Type void
API Set client
Parameters duiObject (long), deltaY (int), deltaX (int)

Description: Injects a 'mouse wheel' event for a DUI object.

Parameters

  • duiObject (long) — The DUI browser handle.
  • deltaY (int) — The wheel Y delta.
  • deltaX (int) — The wheel X delta.

SET_EMITTER_PROBE_LENGTH

Property Value
Native Name SET_EMITTER_PROBE_LENGTH
Hash 0x8AA1F3C2
Return Type void
API Set client
Parameters probeLength (float)

Description: Allows StaticEmitter's without a linked entity to make use of environment features like occlusion and reverb even if they are located higher than 20.0 units above any static collision inside interiors.

This native allows you to extend the probe range up to 150.0 units.

Parameters

  • probeLength (float) — The desired probe length (20.0 - 150.0)

Examples

RegisterCommand("setEmitterProbeLength", function(src, args, raw)
    local probeLength = (tonumber(args[1]) + 0.0)

    print("Extending emitter probes to: ", probeLength)
    SetEmitterProbeLength(probeLength)
end)

RegisterCommand("resetEmitterProbeLength", function()
    print("Resetting emitter probes to default settings")
    SetEmitterProbeLength(20.0)
end)

SET_CONVAR_REPLICATED

Property Value
Native Name SET_CONVAR_REPLICATED
Hash 0xF292858C
Return Type void
API Set server
Parameters varName (char*), value (char*)

Description: Used to replicate a server variable onto clients.

Parameters

  • varName (char*) — The console variable name.
  • value (char*) — The value to set for the given console variable.

Examples

SetConvarReplicated('voice_useNativeAudio', 'true')

SET_ENTITY_DISTANCE_CULLING_RADIUS

Property Value
Native Name SET_ENTITY_DISTANCE_CULLING_RADIUS
Hash 0xD3A183A3
Return Type void
API Set server
Parameters entity (Entity), radius (float)

Description: It overrides the default distance culling radius of an entity. Set to 0.0 to reset. If you want to interact with an entity outside of your players' scopes set the radius to a huge number.

WARNING: Culling natives are deprecated and have known, unfixable issues

Parameters

  • entity (Entity) — The entity handle to override the distance culling radius.
  • radius (float) — The new distance culling radius.

SET_DISCORD_RICH_PRESENCE_ASSET_TEXT

Property Value
Native Name SET_DISCORD_RICH_PRESENCE_ASSET_TEXT
Hash 0xB029D2FA
Return Type void
API Set client
Parameters text (char*)

Description: This native sets the hover text of the image asset for the discord rich presence implementation.

Parameters

  • text (char*) — Text to be displayed when hovering over image asset. Note that you must also set a valid image asset using the SET_DISCORD_RICH_PRESENCE_ASSET native.

SET_DISCORD_APP_ID

Property Value
Native Name SET_DISCORD_APP_ID
Hash 0x6A02254D
Return Type void
API Set client
Parameters appId (char*)

Description: This native sets the app id for the discord rich presence implementation.

Parameters

SET_CONVAR_SERVER_INFO

Property Value
Native Name SET_CONVAR_SERVER_INFO
Hash 0x9338D547
Return Type void
API Set server
Parameters varName (char*), value (char*)

SET_DRAW_ORIGIN

Property Value
Native Name SET_DRAW_ORIGIN
Hash 0xE10198D5
Return Type void
API Set client
Parameters x (float), y (float), z (float), is2d (BOOL)

Description: Sets the on-screen drawing origin for draw-functions in world coordinates.

The effect can be reset by calling CLEAR_DRAW_ORIGIN and is limited to 32 different origins each frame.

SET_ENTITY_REMOTE_SYNCED_SCENES_ALLOWED

Property Value
Native Name SET_ENTITY_REMOTE_SYNCED_SCENES_ALLOWED
Hash 0xD3FC9D88
Return Type void
API Set server
Parameters entity (Entity), allow (bool)

Description: Enables or disables the owner check for the specified entity in network-synchronized scenes. When set to false, the entity cannot participate in synced scenes initiated by clients that do not own the entity.

By default, this is false for all entities, meaning only the entity's owner can include it in networked synchronized scenes.

Parameters

  • entity (Entity) — The entity to set the flag for.
  • allow (bool) — Whether to allow remote synced scenes for the entity.

SET_DISCORD_RICH_PRESENCE_ASSET_SMALL

Property Value
Native Name SET_DISCORD_RICH_PRESENCE_ASSET_SMALL
Hash 0xF61D04C4
Return Type void
API Set client
Parameters assetName (char*)

Description: This native sets the small image asset for the discord rich presence implementation.

Parameters

  • assetName (char*) — The name of a valid asset registered on Discordapp's developer dashboard. Note that the asset has to be registered under the same discord API application set using the SET_DISCORD_APP_ID native.

SET_DISCORD_RICH_PRESENCE_ASSET

Property Value
Native Name SET_DISCORD_RICH_PRESENCE_ASSET
Hash 0x53DFD530
Return Type void
API Set client
Parameters assetName (char*)

Description: This native sets the image asset for the discord rich presence implementation.

Parameters

  • assetName (char*) — The name of a valid asset registered on Discordapp's developer dashboard. note that the asset has to be registered under the same discord API application set using the SET_DISCORD_APP_ID native.

SET_DISCORD_RICH_PRESENCE_ACTION

Property Value
Native Name SET_DISCORD_RICH_PRESENCE_ACTION
Hash 0xCBBC3FAC
Return Type void
API Set client
Parameters index (int), label (char*), url (char*)

Description: Sets a clickable button to be displayed in a player's Discord rich presence.

Parameters

  • index (int) — The button index, either 0 or 1.
  • label (char*) — The text to display on the button.
  • url (char*) — The URL to open when clicking the button. This has to start with fivem://connect/ or https://.

SET_CURSOR_LOCATION

Property Value
Native Name SET_CURSOR_LOCATION
Hash 0x8A7A8DAC
Return Type BOOL
API Set client
Parameters x (float), y (float)

Parameters

  • x (float) — X position.
  • y (float) — Y position.

SET_ENTITY_IGNORE_REQUEST_CONTROL_FILTER

Property Value
Native Name SET_ENTITY_IGNORE_REQUEST_CONTROL_FILTER
Hash 0x9F7F8D36
Return Type void
API Set server
Parameters entity (Entity), ignore (bool)

Description: It allows to flag an entity to ignore the request control filter policy.

Parameters

  • entity (Entity) — The entity handle to ignore the request control filter.
  • ignore (bool) — Define if the entity ignores the request control filter policy.

SET_DEFAULT_VEHICLE_NUMBER_PLATE_TEXT_PATTERN

Property Value
Native Name SET_DEFAULT_VEHICLE_NUMBER_PLATE_TEXT_PATTERN
Hash 0x79780FD2
Return Type void
API Set client
Parameters plateIndex (int), pattern (char*)

Description: Sets the default number plate text pattern for vehicles seen on the local client with the specified plate index as their default index (plateProbabilities from carvariations).

For consistency, this should be used with the same value on all clients, since vehicles without custom text will use a seeded random number generator with this pattern to determine the default plate text.

The default value is 11AAA111, and using this or a NULL string will revert to the default game RNG.

Pattern string format

  • 1 will lead to a random number from 0-9.
  • A will lead to a random letter from A-Z.
  • . will lead to a random letter or number, with 50% probability of being either.
  • ^1 will lead to a literal 1 being emitted.
  • ^A will lead to a literal A being emitted.
  • Any other character will lead to said character being emitted.
  • A string shorter than 8 characters will be padded on the right.

Parameters

  • plateIndex (int) — A plate index, or -1 to set a default for any indices that do not have a specific value.
  • pattern (char*) — A number plate pattern string, or a null value to reset to default.

Examples

SetDefaultVehicleNumberPlateTextPattern(-1, ' AAA111 ')
SetDefaultVehicleNumberPlateTextPattern(4 , ' AAAAAA ')

-- fixed characters: plate will be FAYUM69C for example
SetDefaultVehicleNumberPlateTextPattern(-1, 'F^AYUM11A')

SET_HANDLING_INT

Property Value
Native Name SET_HANDLING_INT
Hash 0x8AB3F46C
Return Type void
API Set client
Parameters vehicle (char*), class_ (char*), fieldName (char*), value (int)

Description: Sets a global handling override for a specific vehicle class. The name is supposed to match the handlingName field from handling.meta.

Parameters

  • vehicle (char*) — The vehicle class to set data for.
  • class_ (char*) — The handling class to set. Only "CHandlingData" is supported at this time.
  • fieldName (char*) — The field name to set. These match the keys in handling.meta.
  • value (int) — The integer value to set.

SET_HEALTH_CONFIG_DEFAULT_ARMOR

Property Value
Native Name SET_HEALTH_CONFIG_DEFAULT_ARMOR
Hash 0x20A1E6A2
Return Type void
API Set client
Parameters configName (char*), newValue (float)

Description: Sets default armor value for specific health config.

Parameters

  • configName (char*) — Name of health config.
  • newValue (float) — Value

SET_ENTITY_ROUTING_BUCKET

Property Value
Native Name SET_ENTITY_ROUTING_BUCKET
Hash 0x635E5289
Return Type void
API Set server
Parameters entity (Entity), bucket (int)

Description: Sets the routing bucket for the specified entity.

Routing buckets are also known as 'dimensions' or 'virtual worlds' in past echoes, however they are population-aware.

Parameters

  • entity (Entity) — The entity to set the routing bucket for.
  • bucket (int) — The bucket ID.

SET_ENTITY_ORPHAN_MODE

Property Value
Native Name SET_ENTITY_ORPHAN_MODE
Hash 0x489E9162
Return Type void
API Set server
Parameters entity (Entity), orphanMode (int)

Description: ```cpp enum EntityOrphanMode { // Default, this will delete the entity when it isn't relevant to any players // NOTE: this doesn't mean when they're no longer in scope DeleteWhenNotRelevant = 0, // The entity will be deleted whenever its original owner disconnects // NOTE: if this is set when the entities original owner has already left it will be // marked for deletion (similar to just calling DELETE_ENTITY) DeleteOnOwnerDisconnect = 1, // The entity will never be deleted by the server when it does relevancy checks // you should only use this on entities that need to be relatively persistent KeepEntity = 2 }


Sets what the server will do when the entity no longer has its original owner. By default the server will cleanup entities that it considers "no longer relevant".

When used on trains, this native will recursively call onto all attached carriages.

**NOTE**: When used with `KeepEntity` (2) this native only guarantees that the ***server*** will not delete the entity, client requests to delete the entity will still work perfectly fine.

### Parameters
- **`entity`** (`Entity`) — The entity to set the orphan mode of
- **`orphanMode`** (`int`) — The mode that the server should use for determining if an entity should be removed.

## SET_DISCORD_RICH_PRESENCE_ASSET_SMALL_TEXT

| Property | Value |
|----------|-------|
| Native Name | `SET_DISCORD_RICH_PRESENCE_ASSET_SMALL_TEXT` |
| Hash | `0x35E62B6A` |
| Return Type | `void` |
| API Set | `client` |
| Parameters | `text` (char*) |

**Description:** This native sets the hover text of the small image asset for the discord rich presence implementation.

### Parameters
- **`text`** (`char*`) — Text to be displayed when hovering over small image asset. Note that you must also set a valid small image asset using the SET_DISCORD_RICH_PRESENCE_ASSET_SMALL native.

## SET_FLY_THROUGH_WINDSCREEN_PARAMS

| Property | Value |
|----------|-------|
| Native Name | `SET_FLY_THROUGH_WINDSCREEN_PARAMS` |
| Hash | `0x4D3118ED` |
| Return Type | `BOOL` |
| API Set | `client` |
| Parameters | `vehMinSpeed` (float), `unkMinSpeed` (float), `unkModifier` (float), `minDamage` (float) |

**Description:** Sets some in-game parameters which is used for checks is ped needs to fly through windscreen after a crash.

### Parameters
- **`vehMinSpeed`** (`float`) — Vehicle minimum speed (default 35.0).
- **`unkMinSpeed`** (`float`) — Unknown minimum speed (default 40.0).
- **`unkModifier`** (`float`) — Unknown modifier (default 17.0).
- **`minDamage`** (`float`) — Minimum damage (default 2000.0).

## SET_HANDLING_FIELD

| Property | Value |
|----------|-------|
| Native Name | `SET_HANDLING_FIELD` |
| Hash | `0xFE8064E3` |
| Return Type | `void` |
| API Set | `client` |
| Parameters | `vehicle` (char*), `class_` (char*), `fieldName` (char*), `value` (Any) |

**Description:** Sets a global handling override for a specific vehicle class. The name is supposed to match the `handlingName` field from handling.meta.
Example: `SetHandlingField('AIRTUG', 'CHandlingData', 'fSteeringLock', 360.0)`

### Parameters
- **`vehicle`** (`char*`) — The vehicle class to set data for.
- **`class_`** (`char*`) — The handling class to set. Only "CHandlingData" is supported at this time.
- **`fieldName`** (`char*`) — The field name to set. These match the keys in `handling.meta`.
- **`value`** (`Any`) — The value to set.

## SET_HEALTH_CONFIG_DEFAULT_ENDURANCE

| Property | Value |
|----------|-------|
| Native Name | `SET_HEALTH_CONFIG_DEFAULT_ENDURANCE` |
| Hash | `0x60F20B81` |
| Return Type | `void` |
| API Set | `client` |
| Parameters | `configName` (char*), `newValue` (float) |

**Description:** Sets default endurance value for specific health config.

### Parameters
- **`configName`** (`char*`) — Name of health config.
- **`newValue`** (`float`) — Value

## SET_HANDLING_VECTOR

| Property | Value |
|----------|-------|
| Native Name | `SET_HANDLING_VECTOR` |
| Hash | `0x7F9D543` |
| Return Type | `void` |
| API Set | `client` |
| Parameters | `vehicle` (char*), `class_` (char*), `fieldName` (char*), `value` (Vector3) |

**Description:** Sets a global handling override for a specific vehicle class. The name is supposed to match the `handlingName` field from handling.meta.
Example: `SetHandlingVector('AIRTUG', 'CHandlingData', 'vecCentreOfMassOffset', vector3(0.0, 0.0, -5.0))`

### Parameters
- **`vehicle`** (`char*`) — The vehicle class to set data for.
- **`class_`** (`char*`) — The handling class to set. Only "CHandlingData" is supported at this time.
- **`fieldName`** (`char*`) — The field name to set. These match the keys in `handling.meta`.
- **`value`** (`Vector3`) — The Vector3 value to set.

## SET_FUEL_CONSUMPTION_RATE_MULTIPLIER

| Property | Value |
|----------|-------|
| Native Name | `SET_FUEL_CONSUMPTION_RATE_MULTIPLIER` |
| Hash | `0x845F3E5C` |
| Return Type | `void` |
| API Set | `client` |
| Parameters | `multiplier` (float) |

**Description:** Sets fuel consumption rate multiplier for all vehicles operated by a player. This is a way to slow down or speed up fuel consumption for all vehicles at a time. If 0 - it practically means that fuel will not be consumed. By default is set to 1.

When the multiplier is set to 1 a default 65 litre gas tank car with average fuel consumption can stay idle for ~16.67 hours or run with max RPM for ~2.5 hours.

To customize fuel consumption per vehicle / vehicle class use [`SET_HANDLING_FLOAT`](#\_0x90DD01C)/[`SET_VEHICLE_HANDLING_FLOAT`](#\_0x488C86D2) natives with `fieldName` equal to `fPetrolConsumptionRate`. By default it is set to 0.5 for all vehicles.

### Parameters
- **`multiplier`** (`float`) — Global fuel consumption multiplier. If negative - 0 will be used instead.

## SET_FLASH_LIGHT_KEEP_ON_WHILE_MOVING

| Property | Value |
|----------|-------|
| Native Name | `SET_FLASH_LIGHT_KEEP_ON_WHILE_MOVING` |
| Hash | `0x7635B349` |
| Return Type | `void` |
| API Set | `client` |
| Parameters | `state` (BOOL) |

**Description:** Allows Weapon-Flashlight beams to stay visible while moving. Normally it only stays on while aiming.

### Parameters
- **`state`** (`BOOL`) — On/Off

## SET_FOG_VOLUME_RENDER_DISABLED

| Property | Value |
|----------|-------|
| Native Name | `SET_FOG_VOLUME_RENDER_DISABLED` |
| Hash | `0xFBC64DA3` |
| Return Type | `void` |
| API Set | `client` |
| Parameters | `state` (BOOL) |

**Description:** This completely disables rendering of fog volumes (vfxfogvolumeinfo.ymt).

### Parameters
- **`state`** (`BOOL`) — Toggle on or off.

## SET_GLOBAL_PASSENGER_MASS_MULTIPLIER

| Property | Value |
|----------|-------|
| Native Name | `SET_GLOBAL_PASSENGER_MASS_MULTIPLIER` |
| Hash | `0x1C47F6AC` |
| Return Type | `void` |
| API Set | `client` |
| Parameters | `massMul` (float) |

### Parameters
- **`massMul`** (`float`) — Weight of each passenger (not counting the driver) as a percentage of vehicle mass. Is applied to all vehicles. Default value is 0.05

## SET_GAME_TYPE

| Property | Value |
|----------|-------|
| Native Name | `SET_GAME_TYPE` |
| Hash | `0xF90B7469` |
| Return Type | `void` |
| API Set | `server` |
| Parameters | `gametypeName` (char*) |

## SET_HEALTH_CONFIG_INJURED_THRESHOLD

| Property | Value |
|----------|-------|
| Native Name | `SET_HEALTH_CONFIG_INJURED_THRESHOLD` |
| Hash | `0xF9D9B647` |
| Return Type | `void` |
| API Set | `client` |
| Parameters | `configName` (char*), `newValue` (float) |

**Description:** Sets default injured health threshold value for specific health config.

### Parameters
- **`configName`** (`char*`) — Name of health config.
- **`newValue`** (`float`) — Value

## SET_HEALTH_CONFIG_WRITHE_FROM_BULLET_THRESHOLD

| Property | Value |
|----------|-------|
| Native Name | `SET_HEALTH_CONFIG_WRITHE_FROM_BULLET_THRESHOLD` |
| Hash | `0xE97633CB` |
| Return Type | `void` |
| API Set | `client` |
| Parameters | `configName` (char*), `newValue` (float) |

**Description:** Sets default writhe from bullet threshold value for specific health config.

### Parameters
- **`configName`** (`char*`) — Name of health config.
- **`newValue`** (`float`) — Value

## SET_HANDLING_FLOAT

| Property | Value |
|----------|-------|
| Native Name | `SET_HANDLING_FLOAT` |
| Hash | `0x90DD01C` |
| Return Type | `void` |
| API Set | `client` |
| Parameters | `vehicle` (char*), `class_` (char*), `fieldName` (char*), `value` (float) |

**Description:** Sets a global handling override for a specific vehicle class. The name is supposed to match the `handlingName` field from handling.meta.
Example: `SetHandlingFloat('AIRTUG', 'CHandlingData', 'fSteeringLock', 360.0)`

### Parameters
- **`vehicle`** (`char*`) — The vehicle class to set data for.
- **`class_`** (`char*`) — The handling class to set. Only "CHandlingData" is supported at this time.
- **`fieldName`** (`char*`) — The field name to set. These match the keys in `handling.meta`.
- **`value`** (`float`) — The floating-point value to set.

## SET_HEALTH_CONFIG_DOG_TAKEDOWN_THRESHOLD

| Property | Value |
|----------|-------|
| Native Name | `SET_HEALTH_CONFIG_DOG_TAKEDOWN_THRESHOLD` |
| Hash | `0x9A995E96` |
| Return Type | `void` |
| API Set | `client` |
| Parameters | `configName` (char*), `newValue` (float) |

**Description:** Sets default dog takedown threshold value for specific health config.

### Parameters
- **`configName`** (`char*`) — Name of health config.
- **`newValue`** (`float`) — Value

## SET_HEALTH_CONFIG_DEFAULT_HEALTH

| Property | Value |
|----------|-------|
| Native Name | `SET_HEALTH_CONFIG_DEFAULT_HEALTH` |
| Hash | `0xC705C778` |
| Return Type | `void` |
| API Set | `client` |
| Parameters | `configName` (char*), `newValue` (float) |

**Description:** Sets default health value for specific health config.

### Parameters
- **`configName`** (`char*`) — Name of health config.
- **`newValue`** (`float`) — Value

## SET_INTERIOR_PORTAL_CORNER_POSITION

| Property | Value |
|----------|-------|
| Native Name | `SET_INTERIOR_PORTAL_CORNER_POSITION` |
| Hash | `0x87F43553` |
| Return Type | `void` |
| API Set | `client` |
| Parameters | `interiorId` (int), `portalIndex` (int), `cornerIndex` (int), `posX` (float), `posY` (float), `posZ` (float) |

### Parameters
- **`interiorId`** (`int`) — The target interior.
- **`portalIndex`** (`int`) — Interior portal index.
- **`cornerIndex`** (`int`) — Interior corner index.
- **`posX`** (`float`)
- **`posY`** (`float`)
- **`posZ`** (`float`)

### Examples
```lua
local playerPed = PlayerPedId()
local interiorId = GetInteriorFromEntity(playerPed)

if interiorId ~= 0 then
  local portalCount = GetInteriorPortalCount(interiorId)

  -- rip portals
  for portalIndex = 0, portalCount - 1 do
    for cornerIndex = 0, 3 do -- 4 corners
      SetInteriorPortalCornerPosition(interiorId, portalIndex, cornerIndex, 0.0, 0.0, 0.0)
    end
  end
  
  RefreshInterior(interiorId)
end

SET_INTERIOR_PORTAL_ENTITY_FLAG

Property Value
Native Name SET_INTERIOR_PORTAL_ENTITY_FLAG
Hash 0x8349CD76
Return Type void
API Set client
Parameters interiorId (int), portalIndex (int), entityIndex (int), flag (int)

Parameters

  • interiorId (int) — The target interior.
  • portalIndex (int) — Interior portal index.
  • entityIndex (int) — Portal entity index.
  • flag (int) — New flag value.

Examples

local playerPed = PlayerPedId()
local interiorId = GetInteriorFromEntity(playerPed)
local portalIndex = 0

if interiorId ~= 0 then
  local count = GetInteriorPortalEntityCount(interiorId, portalIndex)
  for i=0, count-1 do
    SetInteriorPortalEntityFlag(interiorId, portalIndex, i, 0)
  end
  RefreshInterior(interiorId)
end

SET_INTERIOR_PORTAL_FLAG

Property Value
Native Name SET_INTERIOR_PORTAL_FLAG
Hash 0x88B2355E
Return Type void
API Set client
Parameters interiorId (int), portalIndex (int), flag (int)

Parameters

  • interiorId (int) — The target interior.
  • portalIndex (int) — Interior portal index.
  • flag (int) — New flag value.

Examples

local playerPed = PlayerPedId()
local interiorId = GetInteriorFromEntity(playerPed)

if interiorId ~= 0 then
  local portalIndex = 0

  SetInteriorPortalFlag(interiorId, portalIndex, 1)
  RefreshInterior(interiorId)
end

SET_FUEL_CONSUMPTION_STATE

Property Value
Native Name SET_FUEL_CONSUMPTION_STATE
Hash 0x81DAD03E
Return Type void
API Set client
Parameters state (BOOL)

Description: Turns on and off fuel consumption in all vehicles operated by a player. NPC operated vehicles will not consume fuel to avoid traffic disruptions.

The default Gta5 behaviour is fuel consumption turned off.

Parameters

  • state (BOOL) — True to turn on. False to turn off.

SET_HEALTH_CONFIG_HURT_THRESHOLD

Property Value
Native Name SET_HEALTH_CONFIG_HURT_THRESHOLD
Hash 0x98DF1A83
Return Type void
API Set client
Parameters configName (char*), newValue (float)

Description: Sets default hurt health threshold value for specific health config.

Parameters

  • configName (char*) — Name of health config.
  • newValue (float) — Value

SET_HEALTH_CONFIG_FATIGUED_THRESHOLD

Property Value
Native Name SET_HEALTH_CONFIG_FATIGUED_THRESHOLD
Hash 0xC58953FD
Return Type void
API Set client
Parameters configName (char*), newValue (float)

Description: Sets default fatigued health threshold value for specific health config.

Parameters

  • configName (char*) — Name of health config.
  • newValue (float) — Value

SET_HEALTH_CONFIG_MELEE_FATAL_ATTACK

Property Value
Native Name SET_HEALTH_CONFIG_MELEE_FATAL_ATTACK
Hash 0xDD443E53
Return Type void
API Set client
Parameters configName (char*), newValue (BOOL)

Description: Sets default melee cardinal fatal attack value for specific health config.

Parameters

  • configName (char*) — Name of health config.
  • newValue (BOOL) — Value

SET_HEALTH_CONFIG_DYING_THRESHOLD

Property Value
Native Name SET_HEALTH_CONFIG_DYING_THRESHOLD
Hash 0x9B00FD77
Return Type void
API Set client
Parameters configName (char*), newValue (float)

Description: Sets default dying health threshold value for specific health config.

Parameters

  • configName (char*) — Name of health config.
  • newValue (float) — Value

SET_INTERIOR_ROOM_FLAG

Property Value
Native Name SET_INTERIOR_ROOM_FLAG
Hash 0x5518D60B
Return Type void
API Set client
Parameters interiorId (int), roomIndex (int), flag (int)

Parameters

  • interiorId (int) — The target interior.
  • roomIndex (int) — Interior room index.
  • flag (int) — New flag value.

Examples

local playerPed = PlayerPedId()
local interiorId = GetInteriorFromEntity(playerPed)
local roomHash = GetRoomKeyFromEntity(playerPed)
local roomId = GetInteriorRoomIndexByHash(interiorId, roomHash)

if roomId ~= -1 then
  SetInteriorRoomFlag(interiorId, roomId, 64)
  RefreshInterior(interiorId)
end

SET_HEALTH_CONFIG_INVINCIBLE

Property Value
Native Name SET_HEALTH_CONFIG_INVINCIBLE
Hash 0x4A9EEDE6
Return Type void
API Set client
Parameters configName (char*), newValue (BOOL)

Description: Sets default invincible value for specific health config.

Parameters

  • configName (char*) — Name of health config.
  • newValue (BOOL) — Value

SET_HTTP_HANDLER

Property Value
Native Name SET_HTTP_HANDLER
Hash 0xF5C6330C
Return Type void
API Set server
Parameters handler (func)

Description: Sets the handler for HTTP requests made to the executing resource.

Example request URL: http://localhost:30120/http-test/ping - this request will be sent to the http-test resource with the /ping path.

The handler function assumes the following signature:

function HttpHandler(
  request: {
    address: string;
    headers: Record<string, string>;
    method: string;
    path: string;
    setDataHandler(handler: (data: string) => void): void;
    setDataHandler(handler: (data: ArrayBuffer) => void, binary: 'binary'): void;
    setCancelHandler(handler: () => void): void;
  },
  response: {
    writeHead(code: number, headers?: Record<string, string | string[]>): void;
    write(data: string): void;
    send(data?: string): void;
  }
): void;
  • request: The request object.
    • address: The IP address of the request sender.
    • path: The path to where the request was sent.
    • headers: The headers sent with the request.
    • method: The request method.
    • setDataHandler: Sets the handler for when a data body is passed with the request. Additionally you can pass the 'binary' argument to receive a BufferArray in JavaScript or System.Byte[] in C# (has no effect in Lua).
    • setCancelHandler: Sets the handler for when the request is cancelled.
  • response: An object to control the response.
    • writeHead: Sets the status code & headers of the response. Can be only called once and won't work if called after running other response functions.
    • write: Writes to the response body without sending it. Can be called multiple times.
    • send: Writes to the response body and then sends it along with the status code & headers, finishing the request.

Parameters

  • handler (func) — The handler function.

Examples

SetHttpHandler(function(request, response)
  if request.method == 'GET' and request.path == '/ping' then -- if a GET request was sent to the `/ping` path
      response.writeHead(200, { ['Content-Type'] = 'text/plain' }) -- set the response status code to `200 OK` and the body content type to plain text
      response.send('pong') -- respond to the request with `pong`
  else -- otherwise
      response.writeHead(404) -- set the response status code to `404 Not Found`
      response.send() -- respond to the request with no data
  end
end)

SET_INTERIOR_ROOM_TIMECYCLE

Property Value
Native Name SET_INTERIOR_ROOM_TIMECYCLE
Hash 0x31C9A848
Return Type void
API Set client
Parameters interiorId (int), roomIndex (int), timecycleHash (int)

Parameters

  • interiorId (int) — The target interior.
  • roomIndex (int) — Interior room index.
  • timecycleHash (int) — Timecycle hash.

Examples

local playerPed = PlayerPedId()
local interiorId = GetInteriorFromEntity(playerPed)
local roomHash = GetRoomKeyFromEntity(playerPed)
local roomId = GetInteriorRoomIndexByHash(interiorId, roomHash)

if roomId ~= -1 then
  local timecycleHash = GetHashKey("scanline_cam")
  SetInteriorRoomTimecycle(interiorId, roomId, timecycleHash)
  RefreshInterior(interiorId)
end

SET_HUD_COMPONENT_ALIGN

Property Value
Native Name SET_HUD_COMPONENT_ALIGN
Hash 0xEED219F2
Return Type void
API Set client
Parameters id (int), horizontalAlign (int), verticalAlign (int)

Description: See SET_SCRIPT_GFX_ALIGN for details about how gfx align works.

Parameters

  • id (int) — The hud component id.
  • horizontalAlign (int) — The horizontal alignment.
  • verticalAlign (int) — The vertical alignment.

SET_HUD_COMPONENT_SIZE

Property Value
Native Name SET_HUD_COMPONENT_SIZE
Hash 0x7644A9FA
Return Type void
API Set client
Parameters id (int), x (float), y (float)

Parameters

  • id (int) — The hud component id.
  • x (float) — New size X.
  • y (float) — New size Y.

SET_MANUAL_SHUTDOWN_LOADING_SCREEN_NUI

Property Value
Native Name SET_MANUAL_SHUTDOWN_LOADING_SCREEN_NUI
Hash 0x1722C938
Return Type void
API Set client
Parameters manualShutdown (BOOL)

Description: Sets whether or not SHUTDOWN_LOADING_SCREEN automatically shuts down the NUI frame for the loading screen. If this is enabled, you will have to manually invoke SHUTDOWN_LOADING_SCREEN_NUI whenever you want to hide the NUI loading screen.

Parameters

  • manualShutdown (BOOL) — TRUE to manually shut down the loading screen NUI.

SET_MODEL_HEADLIGHT_CONFIGURATION

Property Value
Native Name SET_MODEL_HEADLIGHT_CONFIGURATION
Hash 0x7F6B8D75
Return Type void
API Set client
Parameters modelHash (Hash), ratePerSecond (float), headlightRotation (float), invertRotation (BOOL)

Description: This native is deprecated and does nothing!

SET_IGNORE_VEHICLE_OWNERSHIP_FOR_STOWING

Property Value
Native Name SET_IGNORE_VEHICLE_OWNERSHIP_FOR_STOWING
Hash 0x85A10FFD
Return Type void
API Set client
Parameters ignore (BOOL)

Description: Sets whether or not ownership checks should be performed while trying to stow a carriable on a hunting wagon.

Parameters

  • ignore (BOOL) — true to let the local player stow carriables on any hunting wagon, false to use the default behaviour.

SET_INTERIOR_ROOM_EXTENTS

Property Value
Native Name SET_INTERIOR_ROOM_EXTENTS
Hash 0x4FDCF51E
Return Type void
API Set client
Parameters interiorId (int), roomIndex (int), bbMinX (float), bbMinY (float), bbMinZ (float), bbMaxX (float), bbMaxY (float), bbMaxZ (float)

Parameters

  • interiorId (int) — The target interior.
  • roomIndex (int) — Interior room index.
  • bbMinX (float)
  • bbMinY (float)
  • bbMinZ (float)
  • bbMaxX (float)
  • bbMaxY (float)
  • bbMaxZ (float)

Examples

local playerPed = PlayerPedId()
local interiorId = GetInteriorFromEntity(playerPed)

if interiorId ~= 0 then
  SetInteriorRoomExtents(interiorId, 0, -999.0, -999.0, -100.0, 999.0, 999.0, 100.0) -- 0 is a limbo usually
  RefreshInterior(interiorId)
end

SET_MP_GAMER_TAGS_VISIBLE_DISTANCE

Property Value
Native Name SET_MP_GAMER_TAGS_VISIBLE_DISTANCE
Hash 0xD61676B3
Return Type void
API Set client
Parameters distance (float)

Description: Sets the maximum distance at which all tags will be visible and which beyond will not be displayed. Distance is measured from the camera position.

Parameters

  • distance (float) — The visible distance. Default is 100.0f.

SET_INTERIOR_PROBE_LENGTH

Property Value
Native Name SET_INTERIOR_PROBE_LENGTH
Hash 0x423F7E39
Return Type void
API Set client
Parameters probeLength (float)

Description: Overwrite the games default CPortalTracker interior detection range. This fixes potentially unwanted behaviour in the base game and allows you to build custom interiors with larger ceiling heights without running into graphical glitches.

By default CPortalTracker will probe 4 units downward trying to reach collisions that are part of the interior the entity is in. If no collision can be found 16 units are used in some circumstances.

There are 30+ hard coded special cases, only some of them exposed via script (for example ENABLE_STADIUM_PROBES_THIS_FRAME).

This native allows you to extend the probe range up to 150 units which is the same value the game uses for the xs_arena_interior

Parameters

  • probeLength (float) — The desired probe length (0.0 - 150.0)

Examples

RegisterCommand("setInteriorProbeLength", function(src, args, raw)
    local probeLength = (tonumber(args[1]) + 0.0)

    print("Extending interior detection probes to: ", probeLength)
    SetInteriorProbeLength(probeLength)
end)

RegisterCommand("resetInteriorProbeLength", function()
    print("Resetting interior detection probes to default settings")
    SetInteriorProbeLength(0.0)
end)

SET_MAP_NAME

Property Value
Native Name SET_MAP_NAME
Hash 0xB7BA82DC
Return Type void
API Set server
Parameters mapName (char*)

SET_INTERIOR_PORTAL_ROOM_TO

Property Value
Native Name SET_INTERIOR_PORTAL_ROOM_TO
Hash 0x58982680
Return Type void
API Set client
Parameters interiorId (int), portalIndex (int), roomTo (int)

Parameters

  • interiorId (int) — The target interior.
  • portalIndex (int) — Interior portal index.
  • roomTo (int) — New value.

Examples

local playerPed = PlayerPedId()
local interiorId = GetInteriorFromEntity(playerPed)

if interiorId ~= 0 then
  local portalIndex = 0

  SetInteriorPortalRoomTo(interiorId, portalIndex, 0)
  RefreshInterior(interiorId)
end

SET_INTERIOR_PORTAL_ROOM_FROM

Property Value
Native Name SET_INTERIOR_PORTAL_ROOM_FROM
Hash 0x298FC783
Return Type void
API Set client
Parameters interiorId (int), portalIndex (int), roomFrom (int)

Parameters

  • interiorId (int) — The target interior.
  • portalIndex (int) — Interior portal index.
  • roomFrom (int) — New value.

Examples

local playerPed = PlayerPedId()
local interiorId = GetInteriorFromEntity(playerPed)

if interiorId ~= 0 then
  local portalIndex = 0

  SetInteriorPortalRoomFrom(interiorId, portalIndex, 0)
  RefreshInterior(interiorId)
end

SET_KEY_MAPPING_HIDE_RESOURCES

Property Value
Native Name SET_KEY_MAPPING_HIDE_RESOURCES
Hash 0xCB0241B5
Return Type void
API Set client
Parameters hide (bool)

Description: Toggles the visibility of resource names in the FiveM key mapping page.

Parameters

  • hide (bool) — true will disable the display of resource names, and false will enable it.

SET_NUI_FOCUS_KEEP_INPUT

Property Value
Native Name SET_NUI_FOCUS_KEEP_INPUT
Hash 0x3FF5E5F8
Return Type void
API Set client
Parameters keepInput (BOOL)

SET_MINIMAP_OVERLAY_DISPLAY

Property Value
Native Name SET_MINIMAP_OVERLAY_DISPLAY
Hash 0x6A48B3CA
Return Type void
API Set client
Parameters miniMap (int), x (float), y (float), xScale (float), yScale (float), alpha (float)

Description: Sets the display info for a minimap overlay.

Parameters

  • miniMap (int) — The minimap overlay ID.
  • x (float) — The X position for the overlay. This is equivalent to a game coordinate X.
  • y (float) — The Y position for the overlay. This is equivalent to a game coordinate Y, except that it's inverted (gfxY = -gameY).
  • xScale (float) — The X scale for the overlay. This is equivalent to the Flash _xscale property, therefore 100 = 100%.
  • yScale (float) — The Y scale for the overlay. This is equivalent to the Flash _yscale property.
  • alpha (float) — The alpha value for the overlay. This is equivalent to the Flash _alpha property, therefore 100 = 100%.

SET_MINIMAP_CLIP_TYPE

Property Value
Native Name SET_MINIMAP_CLIP_TYPE
Hash 0xB8B4490C
Return Type void
API Set client
Parameters type (int)

Description: Sets the type for the minimap blip clipping object to be either rectangular or rounded.

Parameters

  • type (int) — 0 for rectangular, 1 for rounded.

SET_MILLISECONDS_PER_GAME_MINUTE

Property Value
Native Name SET_MILLISECONDS_PER_GAME_MINUTE
Hash 0x36CA2554
Return Type void
API Set client
Parameters value (int)

Description: Overrides how many real ms are equal to one game minute. A setter for GetMillisecondsPerGameMinute.

Parameters

  • value (int) — Milliseconds.

SET_MINIMAP_COMPONENT_POSITION

Property Value
Native Name SET_MINIMAP_COMPONENT_POSITION
Hash 0x3E882B23
Return Type void
API Set client
Parameters name (char*), alignX (char*), alignY (char*), posX (float), posY (float), sizeX (float), sizeY (float)

Description: Overrides the minimap component data (from common:/data/ui/frontend.xml) for a specified component.

Parameters

  • name (char*) — The name of the minimap component to override.
  • alignX (char*) — Equivalent to the alignX field in frontend.xml.
  • alignY (char*) — Equivalent to the alignY field in frontend.xml.
  • posX (float) — Equivalent to the posX field in frontend.xml.
  • posY (float) — Equivalent to the posY field in frontend.xml.
  • sizeX (float) — Equivalent to the sizeX field in frontend.xml.
  • sizeY (float) — Equivalent to the sizeY field in frontend.xml.

SET_PLAYER_STAMINA

Property Value
Native Name SET_PLAYER_STAMINA
Hash 0xA9EC16C7
Return Type bool
API Set client
Parameters playerId (Player), stamina (float)

Parameters

  • playerId (Player) — The player index
  • stamina (float) — The value you want to set

SET_MINIMAP_TYPE

Property Value
Native Name SET_MINIMAP_TYPE
Hash 0x5FB53015
Return Type void
API Set client
Parameters type (int)

Description: Possible Types:

0 = Off,
1 = Regular,
2 = Expanded,
3 = Simple,

Parameters

  • type (int) — Type to set the minimap to.

SET_NETWORK_WALK_MODE

Property Value
Native Name SET_NETWORK_WALK_MODE
Hash 0x55188D2D
Return Type void
API Set client
Parameters enabled (bool)

SET_PED_COLLECTION_PRELOAD_VARIATION_DATA

Property Value
Native Name SET_PED_COLLECTION_PRELOAD_VARIATION_DATA
Hash 0x3EC75558
Return Type void
API Set client
Parameters ped (Ped), componentId (int), collection (char*), drawableId (int), textureId (int)

Description: An alternative to SET_PED_PRELOAD_VARIATION_DATA that uses local collection indexing instead of the global one.

The local / collection relative indexing is useful because the global index may get shifted after Title Update. While local index will remain the same which simplifies migration to the newer game version.

Collection name and local index inside the collection can be obtained from the global index using GET_PED_COLLECTION_NAME_FROM_DRAWABLE and GET_PED_COLLECTION_LOCAL_INDEX_FROM_DRAWABLE natives.

Parameters

SET_PLAYER_ROUTING_BUCKET

Property Value
Native Name SET_PLAYER_ROUTING_BUCKET
Hash 0x6504EB38
Return Type void
API Set server
Parameters playerSrc (char*), bucket (int)

Description: Sets the routing bucket for the specified player.

Routing buckets are also known as 'dimensions' or 'virtual worlds' in past echoes, however they are population-aware.

Parameters

  • playerSrc (char*) — The player to set the routing bucket for.
  • bucket (int) — The bucket ID.

SET_MAP_ZOOM_DATA_LEVEL

Property Value
Native Name SET_MAP_ZOOM_DATA_LEVEL
Hash 0x447C718E
Return Type void
API Set client
Parameters index (int), zoomScale (float), zoomSpeed (float), scrollSpeed (float), tilesX (float), tilesY (float)

Description: Sets values to the zoom level data by index.

Parameters

  • index (int) — Zoom level index.
  • zoomScale (float) — fZoomScale value.
  • zoomSpeed (float) — fZoomSpeed value.
  • scrollSpeed (float) — fScrollSpeed value.
  • tilesX (float) — vTiles X.
  • tilesY (float) — vTiles Y.

SET_NUI_FOCUS

Property Value
Native Name SET_NUI_FOCUS
Hash 0x5B98AE30
Return Type void
API Set client
Parameters hasFocus (BOOL), hasCursor (BOOL)

SET_PED_MODEL_PERSONALITY

Property Value
Native Name SET_PED_MODEL_PERSONALITY
Hash 0x46F6B38B
Return Type void
API Set client
Parameters modelHash (Hash), personalityHash (Hash)

Description: Overrides a ped model personality type.

Parameters

  • modelHash (Hash) — Ped's model.
  • personalityHash (Hash) — Personality hash.

SET_PED_TURNING_THRESHOLDS

Property Value
Native Name SET_PED_TURNING_THRESHOLDS
Hash 0xB300F03
Return Type void
API Set client
Parameters min (float), max (float)

Description: Purpose: The game's default values for these make shooting while traveling Left quite a bit slower than shooting while traveling right (This could be a game-balance thing?)

Default Min: -45 Degrees Default Max: 135 Degrees

   \ ,- ~ ||~ - ,
, ' \    x   x    ' ,

, \ x x x , , \ x x , , \ x x , , \ x , , \ x , , \ x x , , \ x , , , ' ' - , _ _ _ , ' \

If the transition angle is within the shaded portion (x), there will be no transition(Quicker) The angle corresponds to where you are looking(North on the circle) vs. the heading of your Ped. Note: For some reason,

You can set these values to whatever you'd like with this native, but keep in mind that the transitional spin is only clockwise for some reason.

I'd personally recommend something like -135/135

Parameters

  • min (float) — Leftside angle on the above diagram
  • max (float) — Rightside angle on the above diagram

SET_PED_COLLECTION_PRELOAD_PROP_DATA

Property Value
Native Name SET_PED_COLLECTION_PRELOAD_PROP_DATA
Hash 0x14B5BBE0
Return Type void
API Set client
Parameters ped (Ped), anchorPoint (int), collection (char*), propIndex (int), textureId (int)

Description: An alternative to SET_PED_PRELOAD_PROP_DATA that uses local collection indexing instead of the global one.

The local / collection relative indexing is useful because the global index may get shifted after Title Update. While local index will remain the same which simplifies migration to the newer game version.

Collection name and local index inside the collection can be obtained from the global index using GET_PED_COLLECTION_NAME_FROM_PROP and GET_PED_COLLECTION_LOCAL_INDEX_FROM_PROP natives.

Parameters

SET_PED_MELEE_COMBAT_LIMITS

Property Value
Native Name SET_PED_MELEE_COMBAT_LIMITS
Hash 0x8E51EC29
Return Type void
API Set client
Parameters primaryCount (int), secondaryCount (int), populationPedCount (int)

Description: Override the limits on the number and types of melee combatants. The game is limited to at most ten combatants among the three types: primary, secondary, and observers.

This native infers the number of observers based on the primary and secondary counts.

Parameters

  • primaryCount (int) — The number of peds that engage in combat (default: 1)
  • secondaryCount (int) — The number of peds that engage in taunting (default: 3)
  • populationPedCount (int) — The maximum number of population peds (ambient and scenario) that can engage in combat (default: 3)

SET_PED_COLLECTION_PROP_INDEX

Property Value
Native Name SET_PED_COLLECTION_PROP_INDEX
Hash 0x75240BCB
Return Type void
API Set client
Parameters ped (Ped), anchorPoint (int), collection (char*), propIndex (int), textureId (int), attach (BOOL)

Description: An alternative to SET_PED_PROP_INDEX that uses local collection indexing instead of the global one.

The local / collection relative indexing is useful because the global index may get shifted after Title Update. While local index will remain the same which simplifies migration to the newer game version.

Collection name and local index inside the collection can be obtained from the global index using GET_PED_COLLECTION_NAME_FROM_PROP and GET_PED_COLLECTION_LOCAL_INDEX_FROM_PROP natives.

Parameters

SET_NUI_ZINDEX

Property Value
Native Name SET_NUI_ZINDEX
Hash 0x3734AAFF
Return Type void
API Set client
Parameters zIndex (int)

Description: Set the z-index of the NUI resource.

Parameters

  • zIndex (int) — New z-index value.

SET_PLAYER_CULLING_RADIUS

Property Value
Native Name SET_PLAYER_CULLING_RADIUS
Hash 0x8A2FBAD4
Return Type void
API Set server
Parameters playerSrc (char*), radius (float)

Description: Sets the culling radius for the specified player. Set to 0.0 to reset.

WARNING: Culling natives are deprecated and have known, unfixable issues

Parameters

  • playerSrc (char*) — The player to set the culling radius for.
  • radius (float) — The radius.

SET_ROPES_CREATE_NETWORK_WORLD_STATE

Property Value
Native Name SET_ROPES_CREATE_NETWORK_WORLD_STATE
Hash 0xE62FC73
Return Type void
API Set client
Parameters shouldCreate (BOOL)

Description: Toggles whether the usage of ADD_ROPE should create an underlying CNetworkRopeWorldStateData. By default this is set to false.

Parameters

  • shouldCreate (BOOL) — Whether to create an underlying network world state

SET_PED_COLLECTION_COMPONENT_VARIATION

Property Value
Native Name SET_PED_COLLECTION_COMPONENT_VARIATION
Hash 0x88711BBA
Return Type void
API Set client
Parameters ped (Ped), componentId (int), collection (char*), drawableId (int), textureId (int), paletteId (int)

Description: An alternative to SET_PED_COMPONENT_VARIATION that uses local collection indexing instead of the global one.

The local / collection relative indexing is useful because the global index may get shifted after Title Update. While local index will remain the same which simplifies migration to the newer game version.

Collection name and local index inside the collection can be obtained from the global index using GET_PED_COLLECTION_NAME_FROM_DRAWABLE and GET_PED_COLLECTION_LOCAL_INDEX_FROM_DRAWABLE natives.

Parameters

SET_RUNTIME_TEXTURE_ARGB_DATA

Property Value
Native Name SET_RUNTIME_TEXTURE_ARGB_DATA
Hash 0x3963D527
Return Type BOOL
API Set client
Parameters tex (long), buffer (char*), length (int)

SET_PLAYER_MAX_STAMINA

Property Value
Native Name SET_PLAYER_MAX_STAMINA
Hash 0x35594F67
Return Type bool
API Set client
Parameters playerId (Player), maxStamina (float)

Parameters

  • playerId (Player) — The player index
  • maxStamina (float) — The value you want to set

SET_REACTION_TO_VEHICLE_WITH_SIREN_DISABLED

Property Value
Native Name SET_REACTION_TO_VEHICLE_WITH_SIREN_DISABLED
Hash 0xB90BBC6E
Return Type void
API Set client
Parameters state (BOOL)

Description: This completely disables pedestrian vehicles from reacting to sirens. They will not try to do any maneuver to evade.

Parameters

  • state (BOOL) — Toggle on or off.

SET_SNAKEOIL_FOR_ENTRY

Property Value
Native Name SET_SNAKEOIL_FOR_ENTRY
Hash 0xA7DD3209
Return Type void
API Set client
Parameters name (char*), path (char*), data (char*)

SET_TEXT_JUSTIFICATION

Property Value
Native Name SET_TEXT_JUSTIFICATION
Hash 0x68CDFA60
Return Type void
API Set client
Parameters justifyType (int)

SET_ROPE_LENGTH_CHANGE_RATE

Property Value
Native Name SET_ROPE_LENGTH_CHANGE_RATE
Hash 0x69B680A7
Return Type void
API Set client
Parameters rope (int), lengthChangeRate (float)

Description: Set's the ropes length change rate, which is the speed that rope should wind if started.

Parameters

  • rope (int) — The rope to set the length change rate for.
  • lengthChangeRate (float) — The rope's new length change rate.

SET_PED_MODEL_HEALTH_CONFIG

Property Value
Native Name SET_PED_MODEL_HEALTH_CONFIG
Hash 0xAF12A05D
Return Type void
API Set client
Parameters modelHash (Hash), configName (char*)

Description: Sets a ped model's health config. Takes effect only after setting player model with SET_PLAYER_MODEL.

Parameters

  • modelHash (Hash) — Ped's model.
  • configName (char*) — Name of health config.

Examples

local pedModel = `mp_f_freemode_01`
SetPedModelHealthConfig(pedModel, "Strong")

SetPlayerModel(PlayerId(), pedModel)
SetPedDefaultComponentVariation(PlayerPedId())

SET_RUNTIME_TEXTURE_IMAGE

Property Value
Native Name SET_RUNTIME_TEXTURE_IMAGE
Hash 0x28FC4ECB
Return Type BOOL
API Set client
Parameters tex (long), fileName (char*)

Description: Replaces the pixel data in a runtime texture with the image data from a file in the current resource, or a data URL.

If the bitmap is a different size compared to the existing texture, it will be resampled.

This command may end up executed asynchronously, and only update the texture data at a later time.

Parameters

  • tex (long) — A runtime texture handle.
  • fileName (char*) — The file name of an image to load, or a base64 "data:" URL. This should preferably be a PNG, and has to be specified as a file in the resource manifest.

SET_TEXT_CHAT_ENABLED

Property Value
Native Name SET_TEXT_CHAT_ENABLED
Hash 0x97B2F9F8
Return Type BOOL
API Set client
Parameters enabled (BOOL)

SET_PLAYER_TALKING_OVERRIDE

Property Value
Native Name SET_PLAYER_TALKING_OVERRIDE
Hash 0xFC02CAF6
Return Type void
API Set client
Parameters player (Player), state (BOOL)

Description: the status of default voip system. It affects on NETWORK_IS_PLAYER_TALKING and mp_facial animation. This function doesn't need to be called every frame, it works like a switcher.

Parameters

  • player (Player) — The target player.
  • state (BOOL) — Overriding state.

SET_RUNTIME_TEXTURE_PIXEL

Property Value
Native Name SET_RUNTIME_TEXTURE_PIXEL
Hash 0xAB65ACEE
Return Type void
API Set client
Parameters tex (long), x (int), y (int), r (int), g (int), b (int), a (int)

Description: Sets a pixel in the specified runtime texture. This will have to be committed using COMMIT_RUNTIME_TEXTURE to have any effect.

Parameters

  • tex (long) — A handle to the runtime texture.
  • x (int) — The X position of the pixel to change.
  • y (int) — The Y position of the pixel to change.
  • r (int) — The new R value (0-255).
  • g (int) — The new G value (0-255).
  • b (int) — The new B value (0-255).
  • a (int) — The new A value (0-255).

SET_ROUTING_BUCKET_POPULATION_ENABLED

Property Value
Native Name SET_ROUTING_BUCKET_POPULATION_ENABLED
Hash 0xCE51AC2C
Return Type void
API Set server
Parameters bucketId (int), mode (BOOL)

Description: Sets whether or not the specified routing bucket has automatically-created population enabled.

Parameters

  • bucketId (int) — The routing bucket ID to adjust.
  • mode (BOOL) — true to enable population, false to disable population.

SET_TIMECYCLE_MODIFIER_VAR

Property Value
Native Name SET_TIMECYCLE_MODIFIER_VAR
Hash 0x6E0A422B
Return Type void
API Set client
Parameters modifierName (char*), varName (char*), value1 (float), value2 (float)

Parameters

  • modifierName (char*) — The name of timecycle modifier.
  • varName (char*) — The name of timecycle variable.
  • value1 (float) — The first value of variable.
  • value2 (float) — The second value of variable.

Examples

local modifierName = "superDARK"
local varName = "postfx_noise"

if DoesTimecycleModifierHasVar(modifierName, varName) then
  local success, value1, value2 = GetTimecycleModifierVar(modifierName, varName)

  if success then
    print(string.format("[%s] removed var %s with values: %f %f", modifierName, varName, value1, value2))
    RemoveTimecycleModifierVar(modifierName, varName)
  end
else
    SetTimecycleModifierVar(modifierName, varName, 1.0, 1.0)
    print(string.format("[%s] created var %s", modifierName, varName))
end

SET_RICH_PRESENCE

Property Value
Native Name SET_RICH_PRESENCE
Hash 0x7BDCBD45
Return Type void
API Set client
Parameters presenceState (char*)

Description: Sets the player's rich presence detail state for social platform providers to a specified string.

Parameters

  • presenceState (char*) — The rich presence string to set.

SET_MP_GAMER_TAGS_USE_VEHICLE_BEHAVIOR

Property Value
Native Name SET_MP_GAMER_TAGS_USE_VEHICLE_BEHAVIOR
Hash 0x7A27BC93
Return Type void
API Set client
Parameters enabled (bool)

Description: Sets whether all tags should group (normal game behavior) or should remain independent and above each ped's respective head when in a vehicle.

Parameters

  • enabled (bool) — Whether tags should use normal game behavior. Default is true.

SET_TEXT_FONT_FOR_CURRENT_COMMAND

Property Value
Native Name SET_TEXT_FONT_FOR_CURRENT_COMMAND
Hash 0xADA9255D
Return Type void
API Set client
Parameters fontId (int)

Description: Sets the text font for the current text drawing command.

Parameters

  • fontId (int) — The index of the font.

SET_TRACK_JUNCTION_ACTIVE

Property Value
Native Name SET_TRACK_JUNCTION_ACTIVE
Hash 0x537B449D
Return Type bool
API Set client
Parameters junctionIndex (int), state (bool)

Description: Sets the state of a track junction.

Parameters

  • junctionIndex (int) — The junctions index
  • state (bool) — Toggles the state of the junction

SET_TRACK_MAX_SPEED

Property Value
Native Name SET_TRACK_MAX_SPEED
Hash 0x37BFC732
Return Type void
API Set client
Parameters track (int), newSpeed (int)

Description: Sets the max speed for the train tracks. Used by ambient trains and for station calculations

Parameters

  • track (int) — The track id (between 0 - 27)
  • newSpeed (int) — The tracks new speed

SET_VEHICLE_CURRENT_RPM

Property Value
Native Name SET_VEHICLE_CURRENT_RPM
Hash 0x2A01A8FC
Return Type void
API Set client
Parameters vehicle (Vehicle), rpm (float)

SET_TRACK_BRAKING_DISTANCE

Property Value
Native Name SET_TRACK_BRAKING_DISTANCE
Hash 0x77EB78D0
Return Type void
API Set client
Parameters track (int), brakingDistance (float)

Description: Sets the braking distance of the track. Used by trains to determine the point to slow down when entering a station.

Parameters

  • track (int) — The track id (between 0 - 27)
  • brakingDistance (float) — The new braking distance

SET_VEHICLE_CLUTCH

Property Value
Native Name SET_VEHICLE_CLUTCH
Hash 0x2F70ACED
Return Type void
API Set client
Parameters vehicle (Vehicle), clutch (float)

SET_VEHICLE_AUTO_REPAIR_DISABLED

Property Value
Native Name SET_VEHICLE_AUTO_REPAIR_DISABLED
Hash 0x5F3A3574
Return Type void
API Set client
Parameters vehicle (Vehicle), value (BOOL)

Description: Disables the vehicle from being repaired when a vehicle extra is enabled.

Parameters

  • vehicle (Vehicle) — The vehicle to set disable auto vehicle repair.
  • value (BOOL) — Setting the value to true prevents the vehicle from being repaired when a extra is enabled. Setting the value to false allows the vehicle from being repaired when a extra is enabled.

SET_STATE_BAG_VALUE

Property Value
Native Name SET_STATE_BAG_VALUE
Hash 0x8D50E33A
Return Type void
API Set shared
Parameters bagName (char*), keyName (char*), valueData (char*), valueLength (int), replicated (BOOL)

Description: Internal function for setting a state bag value.

SET_TRAIN_DOOR_OPEN_RATIO

Property Value
Native Name SET_TRAIN_DOOR_OPEN_RATIO
Hash 0x2468DBE8
Return Type void
API Set client
Parameters train (Vehicle), doorIndex (int), ratio (float)

Description: Sets the ratio that a door is open for on a train.

Parameters

  • train (Vehicle) — The train to set the door ratio for.
  • doorIndex (int) — Zero-based door index.
  • ratio (float) — A value between 0.0 (fully closed) and 1.0 (fully open).

Examples

-- open all doors on a train
local doorCount = GetTrainDoorCount(train)
for doorIndex = 0, doorCount - 1 do
    SetTrainDoorOpenRatio(train, doorIndex, 1.0)
end
// open all doors on a train
int doorCount = API.GetTrainDoorCount(train);
for (int doorIndex = 0; doorIndex < doorCount; doorIndex++)
{
    API.SetTrainDoorOpenRatio(train, doorIndex, 1.0f);
}

SET_TRAINS_FORCE_DOORS_OPEN

Property Value
Native Name SET_TRAINS_FORCE_DOORS_OPEN
Hash 0xD4D1BA63
Return Type void
API Set client
Parameters forceOpen (bool)

Description: Enables or disables whether train doors should be forced open whilst a player is inside the train. This is enabled by default in multiplayer.

Parameters

  • forceOpen (bool) — Should force open.

SET_TEXT_WRAP

Property Value
Native Name SET_TEXT_WRAP
Hash 0x6F60AB54
Return Type void
API Set client
Parameters start (float), end (float)

SET_VEHICLE_FLAG

Property Value
Native Name SET_VEHICLE_FLAG
Hash 0x63AE1A34
Return Type bool
API Set client
Parameters vehicle (Vehicle), flagIndex (int), value (bool)

Description: This native is a setter for GET_VEHICLE_HAS_FLAG.

Parameters

  • vehicle (Vehicle) — The vehicle to set flag for.
  • flagIndex (int) — Flag index.
  • value (bool) — true to enable the flag, false to disable it.

SET_ROUTING_BUCKET_ENTITY_LOCKDOWN_MODE

Property Value
Native Name SET_ROUTING_BUCKET_ENTITY_LOCKDOWN_MODE
Hash 0xA0F2201F
Return Type void
API Set server
Parameters bucketId (int), mode (char*)

Description: Sets the entity lockdown mode for a specific routing bucket.

Lockdown modes are:

Mode Meaning
strict No entities can be created by clients at all.
relaxed Only script-owned entities created by clients are blocked.
inactive Clients can create any entity they want.

Parameters

  • bucketId (int) — The routing bucket ID to adjust.
  • mode (char*) — One of aforementioned modes.

SET_VEHICLE_ENGINE_TEMPERATURE

Property Value
Native Name SET_VEHICLE_ENGINE_TEMPERATURE
Hash 0x6C93C4A9
Return Type void
API Set client
Parameters vehicle (Vehicle), temperature (float)

SET_TRAIN_STOP_AT_STATIONS

Property Value
Native Name SET_TRAIN_STOP_AT_STATIONS
Hash 0xECB8B577
Return Type void
API Set client
Parameters train (Vehicle), state (BOOL)

Description: Toggles a train's ability to stop at stations

Parameters

  • train (Vehicle) — The train handle
  • state (BOOL) — True to make the train stop at stations. False to make the train not stop at stations

SET_VEHICLE_GRAVITY_AMOUNT

Property Value
Native Name SET_VEHICLE_GRAVITY_AMOUNT
Hash 0x1A963E58
Return Type void
API Set client
Parameters vehicle (Vehicle), gravity (float)

SET_VEHICLE_CURRENT_GEAR

Property Value
Native Name SET_VEHICLE_CURRENT_GEAR
Hash 0x8923DD42
Return Type void
API Set client
Parameters vehicle (Vehicle), gear (int)

Parameters

  • vehicle (Vehicle) — The vehicle handle.
  • gear (int) — The gear you want the vehicle to use.

SET_VEHICLE_FUEL_LEVEL

Property Value
Native Name SET_VEHICLE_FUEL_LEVEL
Hash 0xBA970511
Return Type void
API Set client
Parameters vehicle (Vehicle), level (float)

SET_VEHICLE_NEXT_GEAR

Property Value
Native Name SET_VEHICLE_NEXT_GEAR
Hash 0x3A4566F4
Return Type void
API Set client
Parameters vehicle (Vehicle), nextGear (int)

Parameters

  • vehicle (Vehicle) — The vehicle handle.
  • nextGear (int) — The vehicles next gear.

SET_VEHICLE_STEERING_ANGLE

Property Value
Native Name SET_VEHICLE_STEERING_ANGLE
Hash 0xFFCCC2EA
Return Type void
API Set client
Parameters vehicle (Vehicle), angle (float)

SET_TRACK_ENABLED

Property Value
Native Name SET_TRACK_ENABLED
Hash 0x4B41E84C
Return Type void
API Set client
Parameters track (int), enabled (bool)

Description: Toggles the track being active. If disabled mission trains will not be able to spawn on this track and will look for the next closest track to spawn

Parameters

  • track (int) — The track id (between 0 - 27)
  • enabled (bool) — Should this track be enabled

SET_VEHICLE_HANDLING_INT

Property Value
Native Name SET_VEHICLE_HANDLING_INT
Hash 0xC37F4CF9
Return Type void
API Set client
Parameters vehicle (Vehicle), class_ (char*), fieldName (char*), value (int)

Description: Sets a handling override for a specific vehicle. Certain handling flags can only be set globally using SET_HANDLING_INT, this might require some experimentation.

Parameters

  • vehicle (Vehicle) — The vehicle to set data for.
  • class_ (char*) — The handling class to set. Only "CHandlingData" is supported at this time.
  • fieldName (char*) — The field name to set. These match the keys in handling.meta.
  • value (int) — The integer value to set.

SET_VEHICLE_HANDLING_FLOAT

Property Value
Native Name SET_VEHICLE_HANDLING_FLOAT
Hash 0x488C86D2
Return Type void
API Set client
Parameters vehicle (Vehicle), class_ (char*), fieldName (char*), value (float)

Description: Sets a handling override for a specific vehicle. Certain handling flags can only be set globally using SET_HANDLING_FLOAT, this might require some experimentation. Example: SetVehicleHandlingFloat(vehicle, 'CHandlingData', 'fSteeringLock', 360.0)

Parameters

  • vehicle (Vehicle) — The vehicle to set data for.
  • class_ (char*) — The handling class to set. Only "CHandlingData" is supported at this time.
  • fieldName (char*) — The field name to set. These match the keys in handling.meta.
  • value (float) — The floating-point value to set.

SET_VEHICLE_HANDLING_FIELD

Property Value
Native Name SET_VEHICLE_HANDLING_FIELD
Hash 0x2BA40795
Return Type void
API Set client
Parameters vehicle (Vehicle), class_ (char*), fieldName (char*), value (Any)

Description: Sets a handling override for a specific vehicle. Certain handling flags can only be set globally using SET_HANDLING_FIELD, this might require some experimentation. Example: SetVehicleHandlingField(vehicle, 'CHandlingData', 'fSteeringLock', 360.0)

Parameters

  • vehicle (Vehicle) — The vehicle to set data for.
  • class_ (char*) — The handling class to set. Only "CHandlingData" is supported at this time.
  • fieldName (char*) — The field name to set. These match the keys in handling.meta.
  • value (Any) — The value to set.

SET_VEHICLE_TURBO_PRESSURE

Property Value
Native Name SET_VEHICLE_TURBO_PRESSURE
Hash 0x6485615E
Return Type void
API Set client
Parameters vehicle (Vehicle), pressure (float)

SET_VEHICLE_OIL_LEVEL

Property Value
Native Name SET_VEHICLE_OIL_LEVEL
Hash 0x90D1CAD1
Return Type void
API Set client
Parameters vehicle (Vehicle), level (float)

SET_VEHICLE_HIGH_GEAR

Property Value
Native Name SET_VEHICLE_HIGH_GEAR
Hash 0x20B1B3E6
Return Type void
API Set client
Parameters vehicle (Vehicle), gear (int)

SET_VEHICLE_STEERING_SCALE

Property Value
Native Name SET_VEHICLE_STEERING_SCALE
Hash 0xEB46596F
Return Type void
API Set client
Parameters vehicle (Vehicle), scale (float)

SET_VEHICLE_ALARM_TIME_LEFT

Property Value
Native Name SET_VEHICLE_ALARM_TIME_LEFT
Hash 0xC108EE6F
Return Type void
API Set client
Parameters vehicle (Vehicle), time (int)

SET_TRAIN_STATE

Property Value
Native Name SET_TRAIN_STATE
Hash 0x61CB74A0
Return Type void
API Set client
Parameters train (Vehicle), state (int)

Parameters

  • train (Vehicle) — The train handle
  • state (int) — The trains new state

SET_VEHICLE_SUSPENSION_HEIGHT

Property Value
Native Name SET_VEHICLE_SUSPENSION_HEIGHT
Hash 0xB3439A01
Return Type void
API Set client
Parameters vehicle (Vehicle), newHeight (float)

Description: Sets the height of the vehicle's suspension. This changes the same value set by Suspension in the mod shop. Negatives values raise the car. Positive values lower the car.

This is change is visual only. The collision of the vehicle will not move.

SET_VEHICLE_PITCH_BIAS

Property Value
Native Name SET_VEHICLE_PITCH_BIAS
Hash 0x2A6CC9F2
Return Type void
API Set client
Parameters vehicle (Vehicle), value (float)

Description: Set the vehicle's pitch bias. Only works on planes.

Parameters

  • vehicle (Vehicle) — Target vehicle.
  • value (float) — Pitch bias value.

SET_VEHICLE_WHEEL_HEALTH

Property Value
Native Name SET_VEHICLE_WHEEL_HEALTH
Hash 0xB22ECEFD
Return Type void
API Set client
Parameters vehicle (Vehicle), wheelIndex (int), health (float)

SET_VEHICLE_WHEEL_ROTATION_SPEED

Property Value
Native Name SET_VEHICLE_WHEEL_ROTATION_SPEED
Hash 0x35ED100D
Return Type void
API Set client
Parameters vehicle (Vehicle), wheelIndex (int), speed (float)

Description: Sets the rotation speed of a wheel. Max number of wheels can be retrieved with the native GET_VEHICLE_NUMBER_OF_WHEELS.

SET_VEHICLE_HANDLING_VECTOR

Property Value
Native Name SET_VEHICLE_HANDLING_VECTOR
Hash 0x12497890
Return Type void
API Set client
Parameters vehicle (Vehicle), class_ (char*), fieldName (char*), value (Vector3)

Description: Sets a handling override for a specific vehicle. Certain handling flags can only be set globally using SET_HANDLING_VECTOR, this might require some experimentation.

Parameters

  • vehicle (Vehicle) — The vehicle to set data for.
  • class_ (char*) — The handling class to set. Only "CHandlingData" is supported at this time.
  • fieldName (char*) — The field name to set. These match the keys in handling.meta.
  • value (Vector3) — The Vector3 value to set.

SET_VEHICLE_GEAR_RATIO

Property Value
Native Name SET_VEHICLE_GEAR_RATIO
Hash 0x496EF2F2
Return Type void
API Set client
Parameters vehicle (Vehicle), gear (int), ratio (float)

Description: Sets the vehicles gear ratio on choosen gear, reverse gear needs to be a negative float and forward moving gear needs to be a positive float. Refer to the examples if confused.

Parameters

  • vehicle (Vehicle) — The vehicle handle.
  • gear (int) — The vehicles gear you want to change.
  • ratio (float) — The gear ratio you want to use.

Examples

local function Set8SpeedVehicleGears(Vehicle)
    SetVehicleGearRatio(Vehicle, 0, -3.32)  -- reverse gear at -3.21:1
    SetVehicleGearRatio(Vehicle, 1, 4.71)   -- 1st gear at 4.71:1
    SetVehicleGearRatio(Vehicle, 2, 3.14)   -- 2nd gear at 3.14:1
    SetVehicleGearRatio(Vehicle, 3, 2.11)   -- 3rd gear at 2.11:1
    SetVehicleGearRatio(Vehicle, 4, 1.67)   -- 4th gear at 1.67:1
    SetVehicleGearRatio(Vehicle, 5, 1.29)   -- 5th gear at 1.29:1
    SetVehicleGearRatio(Vehicle, 6, 1.0)    -- 6th gear at 1.0:1
    SetVehicleGearRatio(Vehicle, 7, 0.84)   -- 7th gear at 0.84:1
    SetVehicleGearRatio(Vehicle, 8, 0.67)   -- 8th gear at 0.67:1
end
function Set8SpeedVehicleGears(Vehicle) {
    SetVehicleGearRatio(Vehicle, 0, -3.32);  // reverse gear at -3.21:1
    SetVehicleGearRatio(Vehicle, 1, 4.71);   // 1st gear at 4.71:1
    SetVehicleGearRatio(Vehicle, 2, 3.14);   // 2nd gear at 3.14:1
    SetVehicleGearRatio(Vehicle, 3, 2.11);   // 3rd gear at 2.11:1
    SetVehicleGearRatio(Vehicle, 4, 1.67);   // 4th gear at 1.67:1
    SetVehicleGearRatio(Vehicle, 5, 1.29);   // 5th gear at 1.29:1
    SetVehicleGearRatio(Vehicle, 6, 1.0);    // 6th gear at 1.0:1
    SetVehicleGearRatio(Vehicle, 7, 0.84);   // 7th gear at 0.84:1
    SetVehicleGearRatio(Vehicle, 8, 0.67);   // 8th gear at 0.67:1
}
using static CitizenFX.Core.API;

public static void Set8SpeedVehicleGears(int Vehicle)
{
    SetVehicleGearRatio(Vehicle, 0, -3.32);  // reverse gear at -3.21:1
    SetVehicleGearRatio(Vehicle, 1, 4.71);   // 1st gear at 4.71:1
    SetVehicleGearRatio(Vehicle, 2, 3.14);   // 2nd gear at 3.14:1
    SetVehicleGearRatio(Vehicle, 3, 2.11);   // 3rd gear at 2.11:1
    SetVehicleGearRatio(Vehicle, 4, 1.67);   // 4th gear at 1.67:1
    SetVehicleGearRatio(Vehicle, 5, 1.29);   // 5th gear at 1.29:1
    SetVehicleGearRatio(Vehicle, 6, 1.0);    // 6th gear at 1.0:1
    SetVehicleGearRatio(Vehicle, 7, 0.84);   // 7th gear at 0.84:1
    SetVehicleGearRatio(Vehicle, 8, 0.67);   // 8th gear at 0.67:1
}

SET_VEHICLE_XMAS_SNOW_FACTOR

Property Value
Native Name SET_VEHICLE_XMAS_SNOW_FACTOR
Hash 0x80CC4C9E
Return Type void
API Set client
Parameters gripFactor (float)

Parameters

  • gripFactor (float) — amount of grip strength vehicle wheels have when xmas weather is active, 0.0 being normal weather grip. 0.2 is the default.

SET_VEHICLE_WHEEL_X_OFFSET

Property Value
Native Name SET_VEHICLE_WHEEL_X_OFFSET
Hash 0xBD6357D
Return Type void
API Set client
Parameters vehicle (Vehicle), wheelIndex (int), offset (float)

Description: Adjusts the offset of the specified wheel relative to the wheel's axle center. Needs to be called every frame in order to function properly, as GTA will reset the offset otherwise. This function can be especially useful to set the track width of a vehicle, for example:

function SetVehicleFrontTrackWidth(vehicle, width)
SetVehicleWheelXOffset(vehicle, 0, -width/2)
SetVehicleWheelXOffset(vehicle, 1, width/2)
end

SET_VEHICLE_WHEELIE_STATE

Property Value
Native Name SET_VEHICLE_WHEELIE_STATE
Hash 0xEAB8DB65
Return Type void
API Set client
Parameters vehicle (Vehicle), state (int)

Description: Example script: https://pastebin.com/J6XGbkCW

List of known states:

1: Not wheeling.
65: Vehicle is ready to do wheelie (burnouting).
129: Vehicle is doing wheelie.

Parameters

  • vehicle (Vehicle) — Vehicle
  • state (int) — Wheelie state

Examples

Citizen.CreateThread(function()
  while true do
    Wait(1)

    local ped = PlayerPedId()
    local veh = GetVehiclePedIsUsing(ped)

    if veh ~= 0 then
      -- is vehicle a musclecar
      if GetVehicleClass(veh) == 4 then
        -- is ped a driver
        if GetPedInVehicleSeat(veh, -1) == ped then
          -- don't let vehicle to do wheelie
          SetVehicleWheelieState(veh, 1)
        end
      end
    end
  end
end)

SET_VEHICLE_WHEEL_BRAKE_PRESSURE

Property Value
Native Name SET_VEHICLE_WHEEL_BRAKE_PRESSURE
Hash 0xE80F4E31
Return Type void
API Set client
Parameters vehicle (Vehicle), wheelIndex (int), pressure (float)

Description: Sets brake pressure of a wheel. Max number of wheels can be retrieved with the native GET_VEHICLE_NUMBER_OF_WHEELS. Normal values around 1.0f

SET_VEHICLE_WHEEL_IS_POWERED

Property Value
Native Name SET_VEHICLE_WHEEL_IS_POWERED
Hash 0xBD5291A0
Return Type void
API Set client
Parameters vehicle (Vehicle), wheelIndex (int), powered (BOOL)

Description: Sets whether the wheel is powered. On all wheel drive cars this works to change which wheels receive power, but if a car's fDriveBiasFront doesn't send power to that wheel, it won't get power anyway. This can be fixed by changing the fDriveBiasFront with SET_VEHICLE_HANDLING_FLOAT. Max number of wheels can be retrieved with the native GET_VEHICLE_NUMBER_OF_WHEELS. This is a shortcut to a flag in SET_VEHICLE_WHEEL_FLAGS.

Examples

SetVehicleWheelIsPowered(vehicle, 0, true);
SetVehicleWheelIsPowered(vehicle, 0, true);
using static CitizenFX.Core.API;
// ...
// The elusive Left Wheel Drive
Vehicle veh = Game.PlayerPed.CurrentVehicle;
for(int i = 0; i < veh.Wheels.Count; i++){
    SetVehicleWheelIsPowered(veh.Handle, i, i % 2 == 0);
}

SET_VEHICLE_ROLL_BIAS

Property Value
Native Name SET_VEHICLE_ROLL_BIAS
Hash 0x264B45DE
Return Type void
API Set client
Parameters vehicle (Vehicle), value (float)

Description: Set the vehicle's roll bias. Only works on planes.

Parameters

  • vehicle (Vehicle) — Target vehicle.
  • value (float) — Roll bias value.

SET_VEHICLE_WHEEL_FLAGS

Property Value
Native Name SET_VEHICLE_WHEEL_FLAGS
Hash 0xD2B9E90D
Return Type void
API Set client
Parameters vehicle (Vehicle), wheelIndex (int), flags (int)

Description: Sets the flags of a wheel. Max number of wheels can be retrieved with the native GET_VEHICLE_NUMBER_OF_WHEELS.

Parameters

  • vehicle (Vehicle)
  • wheelIndex (int)
  • flags (int) — bit flags

SET_VEHICLE_NITRO_PTFX_RANGE

Property Value
Native Name SET_VEHICLE_NITRO_PTFX_RANGE
Hash 0xA40CB822
Return Type void
API Set client
Parameters range (float)

Description: Sets the maximum distance in which _SET_VEHICLE_NITRO_ENABLED PTFX are rendered. Distance is measured from the camera position.

Parameters

  • range (float) — The visible distance. Default is 50.0f.

SET_VEHICLE_WHEEL_RIM_COLLIDER_SIZE

Property Value
Native Name SET_VEHICLE_WHEEL_RIM_COLLIDER_SIZE
Hash 0xF380E184
Return Type void
API Set client
Parameters vehicle (Vehicle), wheelIndex (int), value (float)

Description: Not sure what this changes, probably determines physical rim size in case the tire is blown.

Parameters

  • vehicle (Vehicle) — The vehicle to obtain data for.
  • wheelIndex (int) — Index of wheel, 0-3.
  • value (float) — Size of rim collider.

SET_VEHICLE_WHEEL_TIRE_COLLIDER_WIDTH

Property Value
Native Name SET_VEHICLE_WHEEL_TIRE_COLLIDER_WIDTH
Hash 0x47BD0270
Return Type void
API Set client
Parameters vehicle (Vehicle), wheelIndex (int), value (float)

Description: Use along with SetVehicleWheelWidth to resize the wheels (this native sets the collider width affecting physics while SetVehicleWheelWidth will change visual width).

Parameters

  • vehicle (Vehicle) — The vehicle to obtain data for.
  • wheelIndex (int) — Index of wheel, 0-3.
  • value (float) — Width of tire collider.

SET_VEHICLE_WHEEL_TRACTION_VECTOR_LENGTH

Property Value
Native Name SET_VEHICLE_WHEEL_TRACTION_VECTOR_LENGTH
Hash 0x85C85A3A
Return Type void
API Set client
Parameters vehicle (Vehicle), wheelIndex (int), length (float)

Description: Sets the traction vector length of a wheel. Max number of wheels can be retrieved with the native GET_VEHICLE_NUMBER_OF_WHEELS.

SET_WATER_QUAD_BOUNDS

Property Value
Native Name SET_WATER_QUAD_BOUNDS
Hash 0x80AD144C
Return Type BOOL
API Set client
Parameters waterQuad (int), minX (int), minY (int), maxX (int), maxY (int)

Description: This native allows you to update the bounds of a specified water quad index.

Parameters

  • waterQuad (int) — The water quad index
  • minX (int) — The minX coordinate
  • minY (int) — The minY coordinate
  • maxX (int) — The maxX coordinate
  • maxY (int) — The maxY coordinate

Examples

local success = SetWaterQuadBounds(0, -5000.0, -5000.0, 5000.0, 5000.0)

SET_VEHICLE_WHEEL_Y_ROTATION

Property Value
Native Name SET_VEHICLE_WHEEL_Y_ROTATION
Hash 0xC6C2171F
Return Type void
API Set client
Parameters vehicle (Vehicle), wheelIndex (int), value (float)

SET_WATER_QUAD_HAS_LIMITED_DEPTH

Property Value
Native Name SET_WATER_QUAD_HAS_LIMITED_DEPTH
Hash 0xD1FDCFC1
Return Type BOOL
API Set client
Parameters waterQuad (int), hasLimitedDepth (BOOL)

Parameters

  • waterQuad (int) — The water quad index
  • hasLimitedDepth (BOOL) — Unknown effect

Examples

local success = SetWaterQuadHasLimitedDepth(0, true)

SET_VISUAL_SETTING_FLOAT

Property Value
Native Name SET_VISUAL_SETTING_FLOAT
Hash 0xD1D31681
Return Type void
API Set client
Parameters name (char*), value (float)

Description: Overrides a floating point value from visualsettings.dat temporarily.

Parameters

  • name (char*) — The name of the value to set, such as pedLight.color.red.
  • value (float) — The value to write.

SET_WEAPONS_NO_AIM_BLOCKING

Property Value
Native Name SET_WEAPONS_NO_AIM_BLOCKING
Hash 0xDFD8F6DE
Return Type void
API Set client
Parameters state (BOOL)

Description: Disables weapons aim blocking due to environment for local player. For non-player peds SET_PED_ENABLE_WEAPON_BLOCKING can be used.

Parameters

  • state (BOOL) — On/Off

SET_WATER_QUAD_ALPHA

Property Value
Native Name SET_WATER_QUAD_ALPHA
Hash 0xF49797EB
Return Type BOOL
API Set client
Parameters waterQuad (int), a0 (int), a1 (int), a2 (int), a3 (int)

Parameters

  • waterQuad (int) — The water quad index
  • a0 (int) — The a0 level
  • a1 (int) — The a1 level
  • a2 (int) — The a2 level
  • a3 (int) — The a3 level

Examples

local success = SetWaterQuadAlpha(0, 5, 5, 5, 5)

SET_VEHICLE_WHEEL_POWER

Property Value
Native Name SET_VEHICLE_WHEEL_POWER
Hash 0xC6146043
Return Type void
API Set client
Parameters vehicle (Vehicle), wheelIndex (int), power (float)

Description: Sets power being sent to a wheel. Max number of wheels can be retrieved with the native GET_VEHICLE_NUMBER_OF_WHEELS.

SET_WAVE_QUAD_AMPLITUDE

Property Value
Native Name SET_WAVE_QUAD_AMPLITUDE
Hash 0xE4174B7B
Return Type BOOL
API Set client
Parameters waveQuad (int), amplitude (float)

Parameters

  • waveQuad (int) — The wave quad index
  • amplitude (float) — The amplitude value

Examples

local success = SetWaveQuadAmplitude(0, 1.0)

SET_VEHICLE_XENON_LIGHTS_CUSTOM_COLOR

Property Value
Native Name SET_VEHICLE_XENON_LIGHTS_CUSTOM_COLOR
Hash 0x1683E7F0
Return Type void
API Set client
Parameters vehicle (Vehicle), red (int), green (int), blue (int)

Description: Sets custom vehicle xenon lights color, allowing to use RGB palette. The game will ignore lights color set by _SET_VEHICLE_XENON_LIGHTS_COLOR when custom color is active. This native is not synced between players. Requires xenon lights mod to be set on vehicle.

Parameters

  • vehicle (Vehicle) — The vehicle handle.
  • red (int) — Red color (0-255).
  • green (int) — Green color (0-255).
  • blue (int) — Blue color (0-255).

Examples

local vehicle = GetVehiclePedIsUsing(PlayerPedId())
if DoesEntityExist(vehicle) then
  -- Toggle xenon lights mod.
  ToggleVehicleMod(vehicle, 22, true)

  -- Set pink lights color.
  SetVehicleXenonLightsCustomColor(vehicle, 244, 5, 82)
end

SET_VEHICLE_WHEEL_SIZE

Property Value
Native Name SET_VEHICLE_WHEEL_SIZE
Hash 0x53AB5C35
Return Type BOOL
API Set client
Parameters vehicle (Vehicle), size (float)

Description: Sets vehicle's wheels' size (size is the same for all the wheels, cannot get/set specific wheel of vehicle). Only works on non-default wheels. Returns whether change was successful (can be false if trying to set size for non-default wheels).

Parameters

  • vehicle (Vehicle) — The vehicle to set data for.
  • size (float) — Size of the wheels (usually between 0.5 and 1.5 is reasonable).

START_RESOURCE

Property Value
Native Name START_RESOURCE
Hash 0x29B440DC
Return Type BOOL
API Set server
Parameters resourceName (char*)

SET_VEHICLE_WHEEL_WIDTH

Property Value
Native Name SET_VEHICLE_WHEEL_WIDTH
Hash 0x64C3F1C0
Return Type BOOL
API Set client
Parameters vehicle (Vehicle), width (float)

Description: Sets vehicle's wheels' width (width is the same for all the wheels, cannot get/set specific wheel of vehicle). Only works on non-default wheels. Returns whether change was successful (can be false if trying to set width for non-default wheels).

Parameters

  • vehicle (Vehicle) — The vehicle to set data for.
  • width (float) — Width of the wheels (usually between 0.1 and 1.5 is reasonable).

SET_WAVE_QUAD_DIRECTION

Property Value
Native Name SET_WAVE_QUAD_DIRECTION
Hash 0xFC9341A3
Return Type BOOL
API Set client
Parameters waveQuad (int), directionX (float), directionY (float)

Description: directionX/Y should be constrained between -1.0 and 1.0 A positive value will create the wave starting at min and rolling towards max A negative value will create the wave starting at max and rolling towards min Applying both values allows you to make diagonal waves

Parameters

  • waveQuad (int) — The wave quad index
  • directionX (float) — The minX coordinate
  • directionY (float) — The minY coordinate

Examples

local success = SetWaveQuadDirection(0, 0.3, 0.1)

SET_WATER_QUAD_LEVEL

Property Value
Native Name SET_WATER_QUAD_LEVEL
Hash 0x6292F7A8
Return Type BOOL
API Set client
Parameters waterQuad (int), level (float)

Parameters

  • waterQuad (int) — The water quad index
  • level (float) — The water level inside the water quad

Examples

local success = SetWaterQuadLevel(0, 55.0)

SET_WATER_QUAD_TYPE

Property Value
Native Name SET_WATER_QUAD_TYPE
Hash 0x50131EB2
Return Type BOOL
API Set client
Parameters waterQuad (int), type (int)

Description: This native allows you to update the water quad type.

Valid type definitions:

  • 0 Square
  • 1 Right triangle where the 90 degree angle is at maxX, minY
  • 2 Right triangle where the 90 degree angle is at minX, minY
  • 3 Right triangle where the 90 degree angle is at minX, maxY
  • 4 Right triangle where the 90 degree angle is at maxY, maxY

Parameters

  • waterQuad (int) — The water quad index
  • type (int) — The water quad type

Examples

local success = SetWaterQuadType(0, 0)

SET_WEAPONS_NO_AUTORELOAD

Property Value
Native Name SET_WEAPONS_NO_AUTORELOAD
Hash 0x311150E5
Return Type void
API Set client
Parameters state (BOOL)

Description: Disables the game's built-in auto-reloading.

Parameters

  • state (BOOL) — On/Off

SET_WATER_AREA_CLIP_RECT

Property Value
Native Name SET_WATER_AREA_CLIP_RECT
Hash 0x9FCD2EE6
Return Type void
API Set client
Parameters minX (int), minY (int), maxX (int), maxY (int)

Description: Sets world clip boundaries for water quads file (water.xml, water_heistisland.xml) Used internally by LOAD_GLOBAL_WATER_FILE

Examples

SetWaterAreaClipRect(-4000, -4000, 4500, 8000)

SET_WATER_QUAD_NO_STENCIL

Property Value
Native Name SET_WATER_QUAD_NO_STENCIL
Hash 0xC3FF42FF
Return Type BOOL
API Set client
Parameters waterQuad (int), noStencil (bool)

Parameters

  • waterQuad (int) — The water quad index
  • noStencil (bool) — Unknown effect

Examples

local success = SetWaterQuadNoStencil(0, true)

SET_VEHICLE_WHEEL_TIRE_COLLIDER_SIZE

Property Value
Native Name SET_VEHICLE_WHEEL_TIRE_COLLIDER_SIZE
Hash 0xB962D05C
Return Type void
API Set client
Parameters vehicle (Vehicle), wheelIndex (int), value (float)

Description: Use along with SetVehicleWheelSize to resize the wheels (this native sets the collider size affecting physics while SetVehicleWheelSize will change visual size).

Parameters

  • vehicle (Vehicle) — The vehicle to obtain data for.
  • wheelIndex (int) — Index of wheel, 0-3.
  • value (float) — Radius of tire collider.

SET_WEAPONS_NO_AUTOSWAP

Property Value
Native Name SET_WEAPONS_NO_AUTOSWAP
Hash 0x2A7B50E
Return Type void
API Set client
Parameters state (BOOL)

Description: Disables autoswapping to another weapon when the current weapon runs out of ammo.

Parameters

  • state (BOOL) — On/Off

SHUTDOWN_LOADING_SCREEN_NUI

Property Value
Native Name SHUTDOWN_LOADING_SCREEN_NUI
Hash 0xB9234AFB
Return Type void
API Set client

Description: Shuts down the loadingScreen NUI frame, similarly to SHUTDOWN_LOADING_SCREEN.

SET_WET_CLOTH_PIN_RADIUS_SCALE

Property Value
Native Name SET_WET_CLOTH_PIN_RADIUS_SCALE
Hash 0xF1BD2CEF
Return Type void
API Set client
Parameters scale (float)

Description: Modifies the radius scale used in the simulation of wet cloth physics. This affects how cloth behaves when wet, changing how it sticks or reacts to movement.

Parameters

  • scale (float) — A value that controls the wet cloth radius scale, default: 0.3, maximum: 1.0(used for dry cloth by default), lower values increase the adhesion effect of wet cloth, making it cling more tightly to the surface.

Examples

SetWetClothPinRadiusScale(1.0)

SET_WATER_QUAD_IS_INVISIBLE

Property Value
Native Name SET_WATER_QUAD_IS_INVISIBLE
Hash 0xA387D917
Return Type BOOL
API Set client
Parameters waterQuad (int), isInvisible (BOOL)

Parameters

  • waterQuad (int) — The water quad index
  • isInvisible (BOOL) — Unknown effect

Examples

local success = SetWaterQuadIsInvisible(0, true)

SET_WAVE_QUAD_BOUNDS

Property Value
Native Name SET_WAVE_QUAD_BOUNDS
Hash 0x1FCC1FAF
Return Type BOOL
API Set client
Parameters waveQuad (int), minX (int), minY (int), maxX (int), maxY (int)

Description: This native allows you to update the bounds of a specified water quad index.

Parameters

  • waveQuad (int) — The wave quad index
  • minX (int) — The minX coordinate
  • minY (int) — The minY coordinate
  • maxX (int) — The maxX coordinate
  • maxY (int) — The maxY coordinate

Examples

local success = SetWaveQuadBounds(0, -5000, -5000, 5000, 5000)

TEMP_BAN_PLAYER

Property Value
Native Name TEMP_BAN_PLAYER
Hash 0x1E35DBBA
Return Type void
API Set server
Parameters playerSrc (char*), reason (char*)

TRIGGER_EVENT_INTERNAL

Property Value
Native Name TRIGGER_EVENT_INTERNAL
Hash 0x91310870
Return Type void
API Set shared
Parameters eventName (char*), eventPayload (char*), payloadLength (int)

Description: The backing function for TriggerEvent.

SET_WEAPON_RECOIL_SHAKE_AMPLITUDE

Property Value
Native Name SET_WEAPON_RECOIL_SHAKE_AMPLITUDE
Hash 0x9864312F
Return Type void
API Set client
Parameters weaponHash (Hash), amplitude (float)

Description: A setter for the recoil shake amplitude of a weapon.

Parameters

  • weaponHash (Hash) — Weapon name hash.
  • amplitude (float) — Recoil shake amplitude

SET_WEATHER_CYCLE_ENTRY

Property Value
Native Name SET_WEATHER_CYCLE_ENTRY
Hash 0xD264D4E1
Return Type BOOL
API Set client
Parameters index (int), typeName (char*), timeMult (int)

Parameters

  • index (int) — The index of the entry to set. Must be between 0 and 255
  • typeName (char*) — The name of the weather type for this cycle
  • timeMult (int) — The relative duration of this cycle, which is multiplied by msPerCycle during 'APPLY_WEATHER_CYCLES'. Must be between 1 and 255

TRIGGER_SERVER_EVENT_INTERNAL

Property Value
Native Name TRIGGER_SERVER_EVENT_INTERNAL
Hash 0x7FDD1128
Return Type void
API Set client
Parameters eventName (char*), eventPayload (char*), payloadLength (int)

Description: The backing function for TriggerServerEvent.

STATE_BAG_HAS_KEY

Property Value
Native Name STATE_BAG_HAS_KEY
Hash 0x12A330
Return Type bool
API Set shared
Parameters bagName (char*), key (char*)

Parameters

  • bagName (char*) — The name of the bag.
  • key (char*) — The key used to check data existence.

STOP_RESOURCE

Property Value
Native Name STOP_RESOURCE
Hash 0x21783161
Return Type BOOL
API Set server
Parameters resourceName (char*)

SET_WEAPON_ACCURACY_SPREAD

Property Value
Native Name SET_WEAPON_ACCURACY_SPREAD
Hash 0x598DD6AE
Return Type void
API Set client
Parameters weaponHash (Hash), spread (float)

Description: A setter for the accuracy spread of a weapon.

Parameters

  • weaponHash (Hash) — Weapon name hash.
  • spread (float) — Accuracy spread

RESET_ENTITY_DRAW_OUTLINE_RENDER_TECHNIQUE

Property Value
Native Name RESET_ENTITY_DRAW_OUTLINE_RENDER_TECHNIQUE
Hash 0x8EB6EC38
Return Type void
API Set client

Description: This function undoes changes made by SET_ENTITY_DRAW_OUTLINE_RENDER_TECHNIQUE, restoring the original outline rendering behavior. The default render technique group is unlit.

UNREGISTER_RAW_NUI_CALLBACK

Property Value
Native Name UNREGISTER_RAW_NUI_CALLBACK
Hash 0x7FB46432
Return Type void
API Set client
Parameters callbackType (char*)

Description: Will unregister and cleanup a registered NUI callback handler.

Use along side the REGISTER_RAW_NUI_CALLBACK native.

Parameters

  • callbackType (char*) — The callback type to target

SET_WEATHER_OWNED_BY_NETWORK

Property Value
Native Name SET_WEATHER_OWNED_BY_NETWORK
Hash 0x2703D582
Return Type void
API Set client
Parameters network (BOOL)

Description: Sets whether or not the weather should be owned by the network subsystem.

To be able to use _SET_WEATHER_TYPE_TRANSITION, this has to be set to false.

Parameters

  • network (BOOL) — true to let the network control weather, false to not use network weather behavior.

DISABLE_EDITOR_RUNTIME

Property Value
Native Name DISABLE_EDITOR_RUNTIME
Hash 0xB1622B17
Return Type void
API Set client

Description: 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.

ENTER_CURSOR_MODE

Property Value
Native Name ENTER_CURSOR_MODE
Hash 0x780DA86
Return Type void
API Set client

Description: Enters cursor mode, suppressing mouse movement to the game and displaying a mouse cursor instead. This function supports SDK infrastructure and is not intended to be used directly from your code.

WAS_EVENT_CANCELED

Property Value
Native Name WAS_EVENT_CANCELED
Hash 0x58382A19
Return Type BOOL
API Set shared

Description: Returns whether or not the currently executing event was canceled.

DRAW_GIZMO

Property Value
Native Name DRAW_GIZMO
Hash 0xEB2EDCA2
Return Type BOOL
API Set client
Parameters matrixPtr (long), id (char*)

Description: 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].

Parameters

  • matrixPtr (long) — A mutable pointer to a 64-byte buffer of floating-point values, representing an XMFLOAT4X4 in layout.
  • id (char*) — A unique identifier of what the gizmo is affecting.

TRIGGER_CLIENT_EVENT_INTERNAL

Property Value
Native Name TRIGGER_CLIENT_EVENT_INTERNAL
Hash 0x2F7A49E6
Return Type void
API Set server
Parameters eventName (char*), eventTarget (char*), eventPayload (char*), payloadLength (int)

Description: The backing function for TriggerClientEvent.

GET_ENTITY_INDEX_FROM_MAPDATA

Property Value
Native Name GET_ENTITY_INDEX_FROM_MAPDATA
Hash 0xEE43540D
Return Type int
API Set client
Parameters mapdata (int), entity (int)

Description: Returns the transient entity index for a specified mapdata/entity pair. This function supports SDK infrastructure and is not intended to be used directly from your code.

Parameters

  • mapdata (int) — The input map data index from GET_MAPDATA_FROM_HASH_KEY.
  • entity (int) — The input entity handle from GET_ENTITY_MAPDATA_OWNER.

TRIGGER_LATENT_CLIENT_EVENT_INTERNAL

Property Value
Native Name TRIGGER_LATENT_CLIENT_EVENT_INTERNAL
Hash 0x70B35890
Return Type void
API Set server
Parameters eventName (char*), eventTarget (char*), eventPayload (char*), payloadLength (int), bps (int)

Description: The backing function for TriggerLatentClientEvent.

ENABLE_EDITOR_RUNTIME

Property Value
Native Name ENABLE_EDITOR_RUNTIME
Hash 0xC383871D
Return Type void
API Set client

Description: 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.

TRIGGER_LATENT_SERVER_EVENT_INTERNAL

Property Value
Native Name TRIGGER_LATENT_SERVER_EVENT_INTERNAL
Hash 0x128737EA
Return Type void
API Set client
Parameters eventName (char*), eventPayload (char*), payloadLength (int), bps (int)

Description: The backing function for TriggerLatentServerEvent.

GET_ENTITY_MAPDATA_OWNER

Property Value
Native Name GET_ENTITY_MAPDATA_OWNER
Hash 0xF6B815C5
Return Type BOOL
API Set client
Parameters entity (Entity), mapdataHandle (int*), entityHandle (int*)

Description: Retrieves the map data and entity handles from a specific entity. This function supports SDK infrastructure and is not intended to be used directly from your code.

Parameters

  • entity (Entity) — An entity owned by map data.
  • mapdataHandle (int*) — The output map data handle.
  • entityHandle (int*) — The output entity handle.

GET_MAPDATA_ENTITY_HANDLE

Property Value
Native Name GET_MAPDATA_ENTITY_HANDLE
Hash 0x30AA6911
Return Type BOOL
API Set client
Parameters mapDataHash (int), entityInternalIdx (int), entityHandle (int*)

Description: Retrieves the map data entity handle. This function supports SDK infrastructure and is not intended to be used directly from your code.

Parameters

  • mapDataHash (int) — A mapdata hash from mapDataLoaded event.
  • entityInternalIdx (int) — An internal entity's index.
  • entityHandle (int*) — The output entity handle.

SELECT_ENTITY_AT_POS

Property Value
Native Name SELECT_ENTITY_AT_POS
Hash 0xAFE8D405
Return Type Entity
API Set client
Parameters fracX (float), fracY (float), hitFlags (int), precise (BOOL)

Description: Gets the selected entity at the specified mouse cursor position, and changes the current selection depth. This function supports SDK infrastructure and is not intended to be used directly from your code.

Parameters

  • fracX (float) — Mouse cursor X fraction.
  • fracY (float) — Mouse cursor Y fraction.
  • hitFlags (int) — A bit mask of entity types to match.
  • precise (BOOL) — Whether to do a precise test, i.e. of visual coordinates, too.

SET_ENTITY_DRAW_OUTLINE

Property Value
Native Name SET_ENTITY_DRAW_OUTLINE
Hash 0x76180407
Return Type void
API Set client
Parameters entity (Entity), enabled (BOOL)

Description: Draws an outline around a given entity. This function supports SDK infrastructure and is not intended to be used directly from your code.

Parameters

  • entity (Entity) — A valid entity handle.
  • enabled (BOOL) — Whether or not to draw an outline.

SELECT_ENTITY_AT_CURSOR

Property Value
Native Name SELECT_ENTITY_AT_CURSOR
Hash 0x3DD8130F
Return Type Entity
API Set client
Parameters hitFlags (int), precise (BOOL)

Description: Gets the selected entity at the current mouse cursor position, and changes the current selection depth. This function supports SDK infrastructure and is not intended to be used directly from your code.

Parameters

  • hitFlags (int) — A bit mask of entity types to match.
  • precise (BOOL) — Whether to do a precise test, i.e. of visual coordinates, too.

SCAN_RESOURCE_ROOT

Property Value
Native Name SCAN_RESOURCE_ROOT
Hash 0x636F097F
Return Type void
API Set server
Parameters rootPath (char*), callback (func)

Description: Scans the resources in the specified resource root. This function is only available in the 'monitor mode' process and is not available for user resources.

Parameters

  • rootPath (char*) — The resource directory to scan.
  • callback (func) — A callback that will receive an object with results.

UPDATE_MAPDATA_ENTITY

Property Value
Native Name UPDATE_MAPDATA_ENTITY
Hash 0xFC52CB91
Return Type void
API Set client
Parameters mapdata (int), entity (int), entityDef (object)

Description: Transiently updates the entity with the specified mapdata index and entity index. This function supports SDK infrastructure and is not intended to be used directly from your code.

Parameters

  • mapdata (int) — A fwMapData index from GET_MAPDATA_FROM_HASH_KEY.
  • entity (int) — An entity index from GET_ENTITY_INDEX_FROM_MAPDATA.
  • entityDef (object) — The new entity definition in fwEntityDef format.

SET_ENTITY_DRAW_OUTLINE_COLOR

Property Value
Native Name SET_ENTITY_DRAW_OUTLINE_COLOR
Hash 0xB41A56C2
Return Type void
API Set client
Parameters red (int), green (int), blue (int), alpha (int)

Description: Sets color for entity outline. 255, 0, 255, 255 by default.

Parameters

  • red (int) — Red component of color.
  • green (int) — Green component of color.
  • blue (int) — Blue component of color.
  • alpha (int) — Alpha component of color, ignored for shader 0.

GET_MAPDATA_FROM_HASH_KEY

Property Value
Native Name GET_MAPDATA_FROM_HASH_KEY
Hash 0xD29D8EDD
Return Type int
API Set client
Parameters mapdataHandle (Hash)

Description: Returns the transient map data index for a specified hash. This function supports SDK infrastructure and is not intended to be used directly from your code.

Parameters

  • mapdataHandle (Hash) — The input map data handle.

VERIFY_PASSWORD_HASH

Property Value
Native Name VERIFY_PASSWORD_HASH
Hash 0x2E310ACD
Return Type BOOL
API Set server
Parameters password (char*), hash (char*)

SET_ENTITY_DRAW_OUTLINE_SHADER

Property Value
Native Name SET_ENTITY_DRAW_OUTLINE_SHADER
Hash 0x5261A01A
Return Type void
API Set client
Parameters shader (int)

Description: Sets variant of shader that will be used to draw entity outline.

Variants are:

  • 0: Default value, gauss shader.
  • 1: 2px wide solid color outline.
  • 2: Fullscreen solid color except for entity.

Parameters

  • shader (int) — An outline shader variant.

DELETE_RESOURCE_KVP_NO_SYNC

Property Value
Native Name DELETE_RESOURCE_KVP_NO_SYNC
Hash 0x4152C90
Return Type void
API Set shared
Parameters key (char*)

Description: Nonsynchronous DELETE_RESOURCE_KVP operation; see FLUSH_RESOURCE_KVP.

Parameters

  • key (char*) — The key to delete

LEAVE_CURSOR_MODE

Property Value
Native Name LEAVE_CURSOR_MODE
Hash 0xADECF19E
Return Type void
API Set client

Description: Leaves cursor mode. This function supports SDK infrastructure and is not intended to be used directly from your code.

SET_ENTITY_DRAW_OUTLINE_RENDER_TECHNIQUE

Property Value
Native Name SET_ENTITY_DRAW_OUTLINE_RENDER_TECHNIQUE
Hash 0x68DFF2DD
Return Type void
API Set client
Parameters techniqueGroup (char*)

Description: Sets the render technique for drawing an entity's outline. This function allows you to specify a technique group name to control how the entity's outline is rendered in the game.

List of known technique group's:

alt0
alt1
alt2
alt3
alt4
alt5
alt6
alt7
alt8
blit
cube
default
geometry
imposter
imposterdeferred
lightweight0
lightweight0CutOut
lightweight0CutOutTint
lightweight0WaterRefractionAlpha
lightweight4
lightweight4CutOut
lightweight4CutOutTint
lightweight4WaterRefractionAlpha
lightweight8
lightweight8CutOut
lightweight8CutOutTint
lightweight8WaterRefractionAlpha
lightweightHighQuality0
lightweightHighQuality0CutOut
lightweightHighQuality0WaterRefractionAlpha
lightweightHighQuality4
lightweightHighQuality4CutOut
lightweightHighQuality4WaterRefractionAlpha
lightweightHighQuality8
lightweightHighQuality8CutOut
lightweightHighQuality8WaterRefractionAlpha
lightweightNoCapsule4
lightweightNoCapsule8
multilight
tessellate
ui
unlit
waterreflection
waterreflectionalphaclip
waterreflectionalphacliptint
wdcascade

Parameters

  • techniqueGroup (char*) — Technique group name.

DELETE_RESOURCE_KVP

Property Value
Native Name DELETE_RESOURCE_KVP
Hash 0x7389B5DF
Return Type void
API Set shared
Parameters key (char*)

Parameters

  • key (char*) — The key to delete

Examples

DeleteResourceKvp('liberty_city')

GET_MAPDATA_ENTITY_MATRIX

Property Value
Native Name GET_MAPDATA_ENTITY_MATRIX
Hash 0x2C3CDA93
Return Type BOOL
API Set client
Parameters mapDataHash (int), entityInternalIdx (int), matrixPtr (long)

Description: Returns mapdata's entity matrix. 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].

Parameters

  • mapDataHash (int) — A mapdata hash from mapDataLoaded event.
  • entityInternalIdx (int) — An internal entity's index.
  • matrixPtr (long) — A mutable pointer to a 64-byte buffer of floating-point values, representing an XMFLOAT4X4 in layout.

FLUSH_RESOURCE_KVP

Property Value
Native Name FLUSH_RESOURCE_KVP
Hash 0xE27C97A0
Return Type void
API Set server

Description: Nonsynchronous operations will not wait for a disk/filesystem flush before returning from a write or delete call. They will be much faster than their synchronous counterparts (e.g., bulk operations), however, a system crash may lose the data to some recent operations.

This native ensures all _NO_SYNC operations are synchronized with the disk/filesystem.

Examples

-- Bulk write many <key, value> pairs to the resource KVP.
local key = "bug_%d"
local value = "unintended_feature_%d"
for i=1,10000 do
	SetResourceKvpNoSync(key:format(i), value:format(i))
end

-- Ensure all data is synchronized to the filesystem
FlushResourceKvp()

PRINT_STRUCTURED_TRACE

Property Value
Native Name PRINT_STRUCTURED_TRACE
Hash 0x90892DED
Return Type void
API Set server
Parameters jsonString (char*)

Description: Prints 'structured trace' data to the server file descriptor 3 channel. This is not generally useful outside of server monitoring utilities.

Parameters

  • jsonString (char*) — JSON data to submit as payload in the script_structured_trace event.

SET_RESOURCE_KVP_FLOAT_NO_SYNC

Property Value
Native Name SET_RESOURCE_KVP_FLOAT_NO_SYNC
Hash 0x3517BFBE
Return Type void
API Set shared
Parameters key (char*), value (float)

Description: Nonsynchronous SET_RESOURCE_KVP_FLOAT operation; see FLUSH_RESOURCE_KVP.

Parameters

  • key (char*) — The key to set
  • value (float) — The value to write

GET_EXTERNAL_KVP_INT

Property Value
Native Name GET_EXTERNAL_KVP_INT
Hash 0x12B8D689
Return Type int
API Set client
Parameters resource (char*), key (char*)

Description: A getter for SET_RESOURCE_KVP_INT, but for a specified resource.

Parameters

  • resource (char*) — The resource to fetch from.
  • key (char*) — The key to fetch

Examples

local kvpValue = GetExternalKvpInt('food', 'bananabread') 
if kvpValue then
	-- do something!
end

RESET_MAPDATA_ENTITY_MATRIX

Property Value
Native Name RESET_MAPDATA_ENTITY_MATRIX
Hash 0x8143FA4F
Return Type BOOL
API Set client
Parameters mapDataHash (int), entityInternalIdx (int)

Description: Resets mapdata entity transform matrix to its original state. This function supports SDK infrastructure and is not intended to be used directly from your code.

Parameters

  • mapDataHash (int) — A mapdata hash from mapDataLoaded event.
  • entityInternalIdx (int) — An internal entity's index.

FIND_KVP

Property Value
Native Name FIND_KVP
Hash 0xBD7BEBC5
Return Type char*
API Set shared
Parameters handle (int)

Parameters

CREATE_VEHICLE_SERVER_SETTER

Property Value
Native Name CREATE_VEHICLE_SERVER_SETTER
Hash 0x6AE51D4B
Return Type Vehicle
API Set server
Parameters modelHash (Hash), type (char*), x (float), y (float), z (float), heading (float)

Description: 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.

Parameters

  • modelHash (Hash) — The model of vehicle to spawn.
  • type (char*) — The appropriate vehicle type for the model info. Can be one of automobile, bike, boat, heli, plane, submarine, trailer, and (potentially), train. This should be the same type as the type field in vehicles.meta.
  • x (float) — Spawn coordinate X component.
  • y (float) — Spawn coordinate Y component.
  • z (float) — Spawn coordinate Z component.
  • heading (float) — Heading to face towards, in degrees.

Examples

local heli = CreateVehicleServerSetter(`seasparrow`, 'heli', GetEntityCoords(GetPlayerPed(GetPlayers()[1])) + vector3(0, 0, 15), 0.0)
print(GetEntityCoords(heli)) -- should return correct coordinates

GET_RESOURCE_KVP_INT

Property Value
Native Name GET_RESOURCE_KVP_INT
Hash 0x557B586A
Return Type int
API Set shared
Parameters key (char*)

Description: A getter for SET_RESOURCE_KVP_INT.

Parameters

  • key (char*) — The key to fetch

Examples

local kvpValue = GetResourceKvpInt('bananabread') 
if kvpValue ~= 0 then
	-- do something!
end

SET_ENTITY_MATRIX

Property Value
Native Name SET_ENTITY_MATRIX
Hash 0xFB0639B
Return Type void
API Set client
Parameters entity (Entity), forwardX (float), forwardY (float), forwardZ (float), rightX (float), rightY (float), rightZ (float), upX (float), upY (float), upZ (float), atX (float), atY (float), atZ (float)

Description: Sets an entity's matrix. Arguments are in the same order as with GET_ENTITY_MATRIX.

Parameters

  • entity (Entity) — A valid entity handle.
  • forwardX (float)
  • forwardY (float)
  • forwardZ (float)
  • rightX (float)
  • rightY (float)
  • rightZ (float)
  • upX (float)
  • upY (float)
  • upZ (float)
  • atX (float)
  • atY (float)
  • atZ (float)

END_FIND_KVP

Property Value
Native Name END_FIND_KVP
Hash 0xB3210203
Return Type void
API Set shared
Parameters handle (int)

Parameters

SET_RESOURCE_KVP_FLOAT

Property Value
Native Name SET_RESOURCE_KVP_FLOAT
Hash 0x9ADD2938
Return Type void
API Set shared
Parameters key (char*), value (float)

Description: A setter for GET_RESOURCE_KVP_FLOAT.

Parameters

  • key (char*) — The key to set
  • value (float) — The value to write

Examples

local lickMy = 42.5
SetResourceKvpFloat('bananabread', lickMy)

SET_RESOURCE_KVP_NO_SYNC

Property Value
Native Name SET_RESOURCE_KVP_NO_SYNC
Hash 0xCF9A2FF
Return Type void
API Set shared
Parameters key (char*), value (char*)

Description: Nonsynchronous SET_RESOURCE_KVP operation; see FLUSH_RESOURCE_KVP.

Parameters

  • key (char*) — The key to set
  • value (char*) — The value to write

ADD_BLIP_FOR_RADIUS

Property Value
Native Name ADD_BLIP_FOR_RADIUS
Hash 0x4626756C
Return Type Blip
API Set server
Parameters posX (float), posY (float), posZ (float), radius (float)

Description: Create a blip with a radius for the specified coordinates (it doesnt create the blip sprite, so you need to use AddBlipCoords) Example image: example

This is the server-side RPC native equivalent of the client native ADD_BLIP_FOR_RADIUS.

Parameters

  • posX (float) — The x position of the blip (you can also send a vector3 instead of the bulk coordinates)
  • posY (float) — The y position of the blip (you can also send a vector3 instead of the bulk coordinates)
  • posZ (float) — The z position of the blip (you can also send a vector3 instead of the bulk coordinates)
  • radius (float) — The number that defines the radius of the blip circle

SET_RESOURCE_KVP_INT_NO_SYNC

Property Value
Native Name SET_RESOURCE_KVP_INT_NO_SYNC
Hash 0x26AEB707
Return Type void
API Set shared
Parameters key (char*), value (int)

Description: Nonsynchronous SET_RESOURCE_KVP_INT operation; see FLUSH_RESOURCE_KVP.

Parameters

  • key (char*) — The key to set
  • value (int) — The value to write

START_FIND_KVP

Property Value
Native Name START_FIND_KVP
Hash 0xDD379006
Return Type int
API Set shared
Parameters prefix (char*)

Parameters

  • prefix (char*) — A prefix match

Examples

SetResourceKvp('mollis:2', 'should be taken with alcohol')
SetResourceKvp('mollis:1', 'vesuvius citrate')
SetResourceKvp('mollis:manufacturer', 'Betta Pharmaceuticals')

local kvpHandle = StartFindKvp('mollis:')

if kvpHandle ~= -1 then 
	local key
	
	repeat
		key = FindKvp(kvpHandle)

		if key then
			print(('%s: %s'):format(key, GetResourceKvpString(key)))
		end
	until not key

	EndFindKvp(kvpHandle)
else
	print('No KVPs found')
end

GET_RESOURCE_KVP_FLOAT

Property Value
Native Name GET_RESOURCE_KVP_FLOAT
Hash 0x35BDCEEA
Return Type float
API Set shared
Parameters key (char*)

Description: A getter for SET_RESOURCE_KVP_FLOAT.

Parameters

  • key (char*) — The key to fetch

Examples

local kvpValue = GetResourceKvpFloat('mollis')
if kvpValue ~= 0.0 then
	-- do something!
end

SET_RESOURCE_KVP_INT

Property Value
Native Name SET_RESOURCE_KVP_INT
Hash 0x6A2B1E8
Return Type void
API Set shared
Parameters key (char*), value (int)

Description: A setter for GET_RESOURCE_KVP_INT.

Parameters

  • key (char*) — The key to set
  • value (int) — The value to write

Examples

local lickMy = 42
SetResourceKvp('bananabread', lickMy)

START_FIND_EXTERNAL_KVP

Property Value
Native Name START_FIND_EXTERNAL_KVP
Hash 0x8F2EECC3
Return Type int
API Set client
Parameters resourceName (char*), prefix (char*)

Description: Equivalent of START_FIND_KVP, but for another resource than the current one.

Parameters

  • resourceName (char*) — The resource to try finding the key/values for
  • prefix (char*) — A prefix match

Examples

local kvpHandle = StartFindExternalKvp('drugs', 'mollis:')

if kvpHandle ~= -1 then 
	local key
	
	repeat
		key = FindKvp(kvpHandle)

		if key then
			print(('%s: %s'):format(key, GetResourceKvpString(key)))
		end
	until not key

	EndFindKvp(kvpHandle)
else
	print('No KVPs found')
end

ADD_BLIP_FOR_COORD

Property Value
Native Name ADD_BLIP_FOR_COORD
Hash 0xC6F43D0E
Return Type Blip
API Set server
Parameters x (float), y (float), z (float)

Description: Creates a blip for the specified coordinates. You can use SET_BLIP_ natives to change the blip.

This is the server-side RPC native equivalent of the client native ADD_BLIP_FOR_COORD.

Parameters

  • x (float) — The X coordinate to create the blip on.
  • y (float) — The Y coordinate.
  • z (float) — The Z coordinate.

GET_RESOURCE_KVP_STRING

Property Value
Native Name GET_RESOURCE_KVP_STRING
Hash 0x5240DA5A
Return Type char*
API Set shared
Parameters key (char*)

Description: A getter for SET_RESOURCE_KVP.

Parameters

  • key (char*) — The key to fetch

Examples

local kvpValue = GetResourceKvpString('codfish') 
if kvpValue then
	-- do something!
end

GET_EXTERNAL_KVP_FLOAT

Property Value
Native Name GET_EXTERNAL_KVP_FLOAT
Hash 0x3CC98B25
Return Type float
API Set client
Parameters resource (char*), key (char*)

Description: A getter for SET_RESOURCE_KVP_FLOAT, but for a specified resource.

Parameters

  • resource (char*) — The resource to fetch from.
  • key (char*) — The key to fetch

Examples

local kvpValue = GetExternalKvpFloat('drugs', 'mollis') 
if kvpValue then
	-- do something!
end

CLEAR_PED_TASKS

Property Value
Native Name CLEAR_PED_TASKS
Hash 0xDE3316AB
Return Type void
API Set server
Parameters ped (Ped)

Description: Clear a ped's tasks. Stop animations and other tasks created by scripts.

This is the server-side RPC native equivalent of the client native CLEAR_PED_TASKS.

Parameters

  • ped (Ped) — Ped id. Use PlayerPedId() for your own character.

SET_RESOURCE_KVP

Property Value
Native Name SET_RESOURCE_KVP
Hash 0x21C7A35B
Return Type void
API Set shared
Parameters key (char*), value (char*)

Description: A setter for GET_RESOURCE_KVP_STRING.

Parameters

  • key (char*) — The key to set
  • value (char*) — The value to write

Examples

SetResourceKvp('mollis', 'vesuvius citrate')

CREATE_PED_INSIDE_VEHICLE

Property Value
Native Name CREATE_PED_INSIDE_VEHICLE
Hash 0x3000F092
Return Type Entity
API Set server
Parameters vehicle (Vehicle), pedType (int), modelHash (Hash), seat (int), isNetwork (BOOL), bScriptHostPed (BOOL)

Description: CREATE_PED_INSIDE_VEHICLE

This is the server-side RPC native equivalent of the client native CREATE_PED_INSIDE_VEHICLE.

Parameters

  • vehicle (Vehicle)
  • pedType (int) — See CREATE_PED
  • modelHash (Hash)
  • seat (int)
  • isNetwork (BOOL)
  • bScriptHostPed (BOOL)

GIVE_WEAPON_COMPONENT_TO_PED

Property Value
Native Name GIVE_WEAPON_COMPONENT_TO_PED
Hash 0x3E1E286D
Return Type void
API Set server
Parameters ped (Ped), weaponHash (Hash), componentHash (Hash)

Description: GIVE_WEAPON_COMPONENT_TO_PED

This is the server-side RPC native equivalent of the client native GIVE_WEAPON_COMPONENT_TO_PED.

GET_EXTERNAL_KVP_STRING

Property Value
Native Name GET_EXTERNAL_KVP_STRING
Hash 0x9080363A
Return Type char*
API Set client
Parameters resource (char*), key (char*)

Description: A getter for SET_RESOURCE_KVP, but for a specified resource.

Parameters

  • resource (char*) — The resource to fetch from.
  • key (char*) — The key to fetch

Examples

local kvpValue = GetExternalKvpString('food', 'codfish') 
if kvpValue then
	-- do something!
end

ADD_PED_DECORATION_FROM_HASHES

Property Value
Native Name ADD_PED_DECORATION_FROM_HASHES
Hash 0x70559AC7
Return Type void
API Set server
Parameters ped (Ped), collection (Hash), overlay (Hash)

Description: ``` Applies an Item from a PedDecorationCollection to a ped. These include tattoos and shirt decals. collection - PedDecorationCollection filename hash overlay - Item name hash Example: Entry inside "mpbeach_overlays.xml" - <Item> <uvPos x="0.500000" y="0.500000" /> <scale x="0.600000" y="0.500000" /> <rotation value="0.000000" /> <nameHash>FM_Hair_Fuzz</nameHash> <txdHash>mp_hair_fuzz</txdHash> <txtHash>mp_hair_fuzz</txtHash> <zone>ZONE_HEAD</zone> <type>TYPE_TATTOO</type> <faction>FM</faction> <garment>All</garment> <gender>GENDER_DONTCARE</gender> <award /> <awardLevel /> </Item> Code: PED::_0x5F5D1665E352A839(PLAYER::PLAYER_PED_ID(), MISC::GET_HASH_KEY("mpbeach_overlays"), MISC::GET_HASH_KEY("fm_hair_fuzz"))


**This is the server-side RPC native equivalent of the client native [ADD_PED_DECORATION_FROM_HASHES](?\_0x5F5D1665E352A839).**

## CLEAR_PED_TASKS_IMMEDIATELY

| Property | Value |
|----------|-------|
| Native Name | `CLEAR_PED_TASKS_IMMEDIATELY` |
| Hash | `0xBC045625` |
| Return Type | `void` |
| API Set | `server` |
| Parameters | `ped` (Ped) |

**Description:** Immediately stops the pedestrian from whatever it's doing. The difference between this and [CLEAR_PED_TASKS](#\_0xE1EF3C1216AFF2CD) is that this one teleports the ped but does not change the position of the ped.

**This is the server-side RPC native equivalent of the client native [CLEAR_PED_TASKS_IMMEDIATELY](?\_0xAAA34F8A7CB32098).**

### Parameters
- **`ped`** (`Ped`) — Ped id.

## CLEAR_PED_SECONDARY_TASK

| Property | Value |
|----------|-------|
| Native Name | `CLEAR_PED_SECONDARY_TASK` |
| Hash | `0xA635F451` |
| Return Type | `void` |
| API Set | `server` |
| Parameters | `ped` (Ped) |

**Description:** CLEAR_PED_SECONDARY_TASK

**This is the server-side RPC native equivalent of the client native [CLEAR_PED_SECONDARY_TASK](?\_0x176CECF6F920D707).**

## CLEAR_PED_PROP

| Property | Value |
|----------|-------|
| Native Name | `CLEAR_PED_PROP` |
| Hash | `0x2D23D743` |
| Return Type | `void` |
| API Set | `server` |
| Parameters | `ped` (Ped), `propId` (int) |

**Description:** CLEAR_PED_PROP

**This is the server-side RPC native equivalent of the client native [CLEAR_PED_PROP](?\_0x0943E5B8E078E76E).**

### Parameters
- **`ped`** (`Ped`) — The ped handle.
- **`propId`** (`int`) — The prop id you want to clear from the ped. Refer to [SET_PED_PROP_INDEX](#\_0x93376B65A266EB5F).

## SET_CURRENT_PED_WEAPON

| Property | Value |
|----------|-------|
| Native Name | `SET_CURRENT_PED_WEAPON` |
| Hash | `0xB8278882` |
| Return Type | `void` |
| API Set | `server` |
| Parameters | `ped` (Ped), `weaponHash` (Hash), `bForceInHand` (BOOL) |

**Description:** SET_CURRENT_PED_WEAPON

**This is the server-side RPC native equivalent of the client native [SET_CURRENT_PED_WEAPON](?\_0xADF692B254977C0C).**

## REMOVE_WEAPON_COMPONENT_FROM_PED

| Property | Value |
|----------|-------|
| Native Name | `REMOVE_WEAPON_COMPONENT_FROM_PED` |
| Hash | `0x412AA00D` |
| Return Type | `void` |
| API Set | `server` |
| Parameters | `ped` (Ped), `weaponHash` (Hash), `componentHash` (Hash) |

**Description:** REMOVE_WEAPON_COMPONENT_FROM_PED

**This is the server-side RPC native equivalent of the client native [REMOVE_WEAPON_COMPONENT_FROM_PED](?\_0x1E8BE90C74FB4C09).**

## SET_ENTITY_ROTATION

| Property | Value |
|----------|-------|
| Native Name | `SET_ENTITY_ROTATION` |
| Hash | `0xA345EFE` |
| Return Type | `void` |
| API Set | `server` |
| Parameters | `entity` (Entity), `pitch` (float), `roll` (float), `yaw` (float), `rotationOrder` (int), `bDeadCheck` (BOOL) |

**Description:** Sets the rotation of a specified entity in the game world.

NativeDB Introduced: v323


**This is the server-side RPC native equivalent of the client native [SET_ENTITY_ROTATION](?\_0x8524A8B0171D5E07).**

### Parameters
- **`entity`** (`Entity`) — The entity to rotate.
- **`pitch`** (`float`) — The pitch (X-axis) rotation in degrees.
- **`roll`** (`float`) — The roll (Y-axis) rotation in degrees.
- **`yaw`** (`float`) — The yaw (Z-axis) rotation in degrees.
- **`rotationOrder`** (`int`) — Specifies the order in which yaw, pitch, and roll are applied, see [`GET_ENTITY_ROTATION`](#\_0xAFBD61CC738D9EB9) for the available rotation orders.
- **`bDeadCheck`** (`BOOL`) — Usually set to `true`. Determines whether to check if the entity is dead before applying the rotation.

## CREATE_PED

| Property | Value |
|----------|-------|
| Native Name | `CREATE_PED` |
| Hash | `0x389EF71` |
| Return Type | `Entity` |
| API Set | `server` |
| Parameters | `pedType` (int), `modelHash` (Hash), `x` (float), `y` (float), `z` (float), `heading` (float), `isNetwork` (BOOL), `bScriptHostPed` (BOOL) |

**Description:** Creates a ped (biped character, pedestrian, actor) with the specified model at the specified position and heading.
This ped will initially be owned by the creating script as a mission entity, and the model should be loaded already
(e.g. using REQUEST_MODEL).

**This is the server-side RPC native equivalent of the client native [CREATE_PED](?\_0xD49F9B0955C367DE).**

### Parameters
- **`pedType`** (`int`) — Unused. Peds get set to CIVMALE/CIVFEMALE/etc. no matter the value specified.
- **`modelHash`** (`Hash`) — The model of ped to spawn.
- **`x`** (`float`) — Spawn coordinate X component.
- **`y`** (`float`) — Spawn coordinate Y component.
- **`z`** (`float`) — Spawn coordinate Z component.
- **`heading`** (`float`) — Heading to face towards, in degrees.
- **`isNetwork`** (`BOOL`) — Whether to create a network object for the ped. If false, the ped exists only locally.
- **`bScriptHostPed`** (`BOOL`) — Whether to register the ped as pinned to the script host in the R\* network model.

## _ADD_BLIP_FOR_AREA

| Property | Value |
|----------|-------|
| Native Name | `_ADD_BLIP_FOR_AREA` |
| Hash | `0x6228F159` |
| Return Type | `Blip` |
| API Set | `server` |
| Parameters | `x` (float), `y` (float), `z` (float), `width` (float), `height` (float) |

**Description:** Adds a rectangular blip for the specified coordinates/area.
It is recommended to use [SET_BLIP_ROTATION](#\_0xF87683CDF73C3F6E) and [SET_BLIP_COLOUR](#\_0x03D7FB09E75D6B7E) to make the blip not rotate along with the camera.
By default, the blip will show as a *regular* blip with the specified color/sprite if it is outside of the minimap view.
Example image:
![minimap](https://i.imgur.com/qLbXWcQ.png)
![big map](https://i.imgur.com/0j7O7Rh.png)
(Native name is *likely* to actually be ADD_BLIP_FOR_AREA, but due to the usual reasons this can't be confirmed)

**This is the server-side RPC native equivalent of the client native [\_ADD_BLIP_FOR_AREA](?\_0xCE5D0E5E315DB238).**

### Parameters
- **`x`** (`float`) — The X coordinate of the center of the blip.
- **`y`** (`float`) — The Y coordinate of the center of the blip.
- **`z`** (`float`) — The Z coordinate of the center of the blip.
- **`width`** (`float`) — The width of the blip.
- **`height`** (`float`) — The height of the blip.

## CLEAR_PLAYER_WANTED_LEVEL

| Property | Value |
|----------|-------|
| Native Name | `CLEAR_PLAYER_WANTED_LEVEL` |
| Hash | `0x54EA5BCC` |
| Return Type | `void` |
| API Set | `server` |
| Parameters | `player` (Player) |

**Description:** ```
This executes at the same as speed as PLAYER::SET_PLAYER_WANTED_LEVEL(player, 0, false);
PLAYER::GET_PLAYER_WANTED_LEVEL(player); executes in less than half the time. Which means that it's worth first checking if the wanted level needs to be cleared before clearing. However, this is mostly about good code practice and can important in other situations. The difference in time in this example is negligible.

This is the server-side RPC native equivalent of the client native CLEAR_PLAYER_WANTED_LEVEL.

SET_PED_DEFAULT_COMPONENT_VARIATION

Property Value
Native Name SET_PED_DEFAULT_COMPONENT_VARIATION
Hash 0xC866A984
Return Type void
API Set server
Parameters ped (Ped)

Description: ``` Sets Ped Default Clothes


**This is the server-side RPC native equivalent of the client native [SET_PED_DEFAULT_COMPONENT_VARIATION](?\_0x45EEE61580806D63).**

## APPLY_FORCE_TO_ENTITY

| Property | Value |
|----------|-------|
| Native Name | `APPLY_FORCE_TO_ENTITY` |
| Hash | `0xC1C0855A` |
| Return Type | `void` |
| API Set | `server` |
| Parameters | `entity` (Entity), `forceType` (int), `x` (float), `y` (float), `z` (float), `offX` (float), `offY` (float), `offZ` (float), `nComponent` (int), `bLocalForce` (BOOL), `bLocalOffset` (BOOL), `bScaleByMass` (BOOL), `bPlayAudio` (BOOL), `bScaleByTimeWarp` (BOOL) |

**Description:** ```cpp
enum eApplyForceTypes {
APPLY_TYPE_FORCE = 0,
APPLY_TYPE_IMPULSE = 1,
APPLY_TYPE_EXTERNAL_FORCE = 2,
APPLY_TYPE_EXTERNAL_IMPULSE = 3,
APPLY_TYPE_TORQUE = 4,
APPLY_TYPE_ANGULAR_IMPULSE = 5
}

This is the server-side RPC native equivalent of the client native APPLY_FORCE_TO_ENTITY.

Parameters

  • entity (Entity) — The entity handle
  • forceType (int) — The force type
  • x (float) — The x component of the force to apply
  • y (float) — The y component of the force to apply
  • z (float) — The z component of the force to apply
  • offX (float) — Offset from center of entity (X)
  • offY (float) — Offset from center of entity (Y)
  • offZ (float) — Offset from center of entity (Z)
  • nComponent (int) — Component of the entity to apply the force too. Only matters for breakable or articulated (ragdoll) physics. 0 means the root or parent component
  • bLocalForce (BOOL) — Specifies whether the force vector passed in is in local or world coordinates. true means the force will get automatically transformed into world space before being applied
  • bLocalOffset (BOOL) — Specifies whether the offset passed in is in local or world coordinates
  • bScaleByMass (BOOL) — Specifies whether to scale the force by mass
  • bPlayAudio (BOOL) — Specifies whether to play audio events related to the force being applied. The audio will depend on the entity type. Currently vehicles are the only entity types supported, and will play a suspension squeal depending on the magnitude of the force
  • bScaleByTimeWarp (BOOL) — Specifies whether to scale the force by time warp. Default is true

ADD_BLIP_FOR_ENTITY

Property Value
Native Name ADD_BLIP_FOR_ENTITY
Hash 0x30822554
Return Type Blip
API Set server
Parameters entity (Entity)

Description: Create a blip that by default is red (enemy), you can use SET_BLIP_AS_FRIENDLY to make it blue (friend).
Can be used for objects, vehicles and peds. Example of enemy: enemy Example of friend: friend

This is the server-side RPC native equivalent of the client native ADD_BLIP_FOR_ENTITY.

Parameters

  • entity (Entity) — The entity handle to create the blip.

FREEZE_ENTITY_POSITION

Property Value
Native Name FREEZE_ENTITY_POSITION
Hash 0x65C16D57
Return Type void
API Set server
Parameters entity (Entity), toggle (BOOL)

Description: Freezes or unfreezes an entity preventing its coordinates to change by the player if set to true. You can still change the entity position using SET_ENTITY_COORDS.

This is the server-side RPC native equivalent of the client native FREEZE_ENTITY_POSITION.

Parameters

  • entity (Entity) — The entity to freeze/unfreeze.
  • toggle (BOOL) — Freeze or unfreeze entity.

REMOVE_BLIP

Property Value
Native Name REMOVE_BLIP
Hash 0xD8C3C1CD
Return Type void
API Set server
Parameters blip (Blip*)

Description: Removes the blip from your map. Note: This function only works on the script that created the blip, if you wish to remove blips created by other scripts, see SET_THIS_SCRIPT_CAN_REMOVE_BLIPS_CREATED_BY_ANY_SCRIPT.

This is the server-side RPC native equivalent of the client native REMOVE_BLIP.

Parameters

  • blip (Blip*) — Blip handle to remove.

CREATE_OBJECT_NO_OFFSET

Property Value
Native Name CREATE_OBJECT_NO_OFFSET
Hash 0x58040420
Return Type Entity
API Set server
Parameters modelHash (Hash), x (float), y (float), z (float), isNetwork (BOOL), netMissionEntity (BOOL), doorFlag (BOOL)

Description: Creates an object (prop) with the specified model centered at the specified position. This object will initially be owned by the creating script as a mission entity, and the model should be loaded already (e.g. using REQUEST_MODEL).

This is the server-side RPC native equivalent of the client native CREATE_OBJECT_NO_OFFSET.

Parameters

  • modelHash (Hash) — The model to spawn.
  • x (float) — Spawn coordinate X component.
  • y (float) — Spawn coordinate Y component.
  • z (float) — Spawn coordinate Z component.
  • isNetwork (BOOL) — Whether to create a network object for the object. If false, the object exists only locally.
  • netMissionEntity (BOOL) — Whether to register the object as pinned to the script host in the R* network model.
  • doorFlag (BOOL) — False to create a door archetype (archetype flag bit 26 set) as a door. Required to be set to true to create door models in network mode.

REMOVE_ALL_PED_WEAPONS

Property Value
Native Name REMOVE_ALL_PED_WEAPONS
Hash 0xA44CE817
Return Type void
API Set server
Parameters ped (Ped), p1 (BOOL)

Description: Parameter p1 does not seem to be used or referenced in game binaries.
Note: When called for networked entities, a CRemoveAllWeaponsEvent will be created per request.

This is the server-side RPC native equivalent of the client native REMOVE_ALL_PED_WEAPONS.

Parameters

  • ped (Ped) — The ped entity
  • p1 (BOOL)

SET_PED_CAN_RAGDOLL

Property Value
Native Name SET_PED_CAN_RAGDOLL
Hash 0xCF1384C4
Return Type void
API Set server
Parameters ped (Ped), toggle (BOOL)

Description: SET_PED_CAN_RAGDOLL

This is the server-side RPC native equivalent of the client native SET_PED_CAN_RAGDOLL.

SET_PED_RANDOM_COMPONENT_VARIATION

Property Value
Native Name SET_PED_RANDOM_COMPONENT_VARIATION
Hash 0x4111BA46
Return Type void
API Set server
Parameters ped (Ped), p1 (int)

Description: ``` p1 is always 0 in R* scripts; and a quick disassembly seems to indicate that p1 is unused.


**This is the server-side RPC native equivalent of the client native [SET_PED_RANDOM_COMPONENT_VARIATION](?\_0xC8A9481A01E63C28).**

## _SET_PED_EYE_COLOR

| Property | Value |
|----------|-------|
| Native Name | `_SET_PED_EYE_COLOR` |
| Hash | `0xEC09DB1B` |
| Return Type | `void` |
| API Set | `server` |
| Parameters | `ped` (Ped), `index` (int) |

**Description:** Used for freemode (online) characters.
Indices:

1.  black
2.  very light blue/green
3.  dark blue
4.  brown
5.  darker brown
6.  light brown
7.  blue
8.  light blue
9.  pink
10. yellow
11. purple
12. black
13. dark green
14. light brown
15. yellow/black pattern
16. light colored spiral pattern
17. shiny red
18. shiny half blue/half red
19. half black/half light blue
20. white/red perimter
21. green snake
22. red snake
23. dark blue snake
24. dark yellow
25. bright yellow
26. all black
27. red small pupil
28. devil blue/black
29. white small pupil
30. glossed over

**This is the server-side RPC native equivalent of the client native [\_SET_PED_EYE_COLOR](?\_0x50B56988B170AFDF).**

## CREATE_VEHICLE

| Property | Value |
|----------|-------|
| Native Name | `CREATE_VEHICLE` |
| Hash | `0xDD75460A` |
| Return Type | `Entity` |
| API Set | `server` |
| Parameters | `modelHash` (Hash), `x` (float), `y` (float), `z` (float), `heading` (float), `isNetwork` (BOOL), `netMissionEntity` (BOOL) |

**Description:** 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).**

### Parameters
- **`modelHash`** (`Hash`) — The model of vehicle to spawn.
- **`x`** (`float`) — Spawn coordinate X component.
- **`y`** (`float`) — Spawn coordinate Y component.
- **`z`** (`float`) — Spawn coordinate Z component.
- **`heading`** (`float`) — Heading to face towards, in degrees.
- **`isNetwork`** (`BOOL`) — Whether to create a network object for the vehicle. If false, the vehicle exists only locally.
- **`netMissionEntity`** (`BOOL`) — Whether to register the vehicle as pinned to the script host in the R\* network model.

## SET_PED_AMMO

| Property | Value |
|----------|-------|
| Native Name | `SET_PED_AMMO` |
| Hash | `0xBF90DF1A` |
| Return Type | `void` |
| API Set | `server` |
| Parameters | `ped` (Ped), `weaponHash` (Hash), `ammo` (int) |

**Description:** ```
NativeDB Added Parameter 4: BOOL p3

This is the server-side RPC native equivalent of the client native SET_PED_AMMO.

SET_ENTITY_HEADING

Property Value
Native Name SET_ENTITY_HEADING
Hash 0xE0FF064D
Return Type void
API Set server
Parameters entity (Entity), heading (float)

Description: Set the heading of an entity in degrees also known as "Yaw".

This is the server-side RPC native equivalent of the client native SET_ENTITY_HEADING.

Parameters

  • entity (Entity) — The entity to set the heading for.
  • heading (float) — The heading in degrees.

REMOVE_WEAPON_FROM_PED

Property Value
Native Name REMOVE_WEAPON_FROM_PED
Hash 0x9C37F220
Return Type void
API Set server
Parameters ped (Ped), weaponHash (Hash)

Description: ``` This native removes a specified weapon from your selected ped. Weapon Hashes: pastebin.com/0wwDZgkF Example: C#: Function.Call(Hash.REMOVE_WEAPON_FROM_PED, Game.Player.Character, 0x99B507EA); C++: WEAPON::REMOVE_WEAPON_FROM_PED(PLAYER::PLAYER_PED_ID(), 0x99B507EA); The code above removes the knife from the player.


**This is the server-side RPC native equivalent of the client native [REMOVE_WEAPON_FROM_PED](?\_0x4899CB088EDF59B8).**

## SET_PED_HEAD_BLEND_DATA

| Property | Value |
|----------|-------|
| Native Name | `SET_PED_HEAD_BLEND_DATA` |
| Hash | `0x60746B88` |
| Return Type | `void` |
| API Set | `server` |
| Parameters | `ped` (Ped), `shapeFirstID` (int), `shapeSecondID` (int), `shapeThirdID` (int), `skinFirstID` (int), `skinSecondID` (int), `skinThirdID` (int), `shapeMix` (float), `skinMix` (float), `thirdMix` (float), `isParent` (BOOL) |

**Description:** For more info please refer to [this](https://gtaforums.com/topic/858970-all-gtao-face-ids-pedset-ped-head-blend-data-explained) topic.
**Other information:**
IDs start at zero and go Male Non-DLC, Female Non-DLC, Male DLC, and Female DLC.</br>
This native function is often called prior to calling natives such as:

*   [`SetPedHairColor`](#\_0xA23FE32C)
*   [`SetPedHeadOverlayColor`](#\_0x78935A27)
*   [`SetPedHeadOverlay`](#\_0xD28DBA90)
*   [`SetPedFaceFeature`](#\_0x6C8D4458)

**This is the server-side RPC native equivalent of the client native [SET_PED_HEAD_BLEND_DATA](?\_0x9414E18B9434C2FE).**

### Parameters
- **`ped`** (`Ped`) — The ped entity
- **`shapeFirstID`** (`int`) — Controls the shape of the first ped's face
- **`shapeSecondID`** (`int`) — Controls the shape of the second ped's face
- **`shapeThirdID`** (`int`) — Controls the shape of the third ped's face
- **`skinFirstID`** (`int`) — Controls the first id's skin tone
- **`skinSecondID`** (`int`) — Controls the second id's skin tone
- **`skinThirdID`** (`int`) — Controls the third id's skin tone
- **`shapeMix`** (`float`) — 0.0 - 1.0 Of whose characteristics to take Mother -> Father (shapeFirstID and shapeSecondID)
- **`skinMix`** (`float`) — 0.0 - 1.0 Of whose characteristics to take Mother -> Father (skinFirstID and skinSecondID)
- **`thirdMix`** (`float`) — Overrides the others in favor of the third IDs.
- **`isParent`** (`BOOL`) — IsParent is set for "children" of the player character's grandparents during old-gen character creation. It has unknown effect otherwise.

## GIVE_WEAPON_TO_PED

| Property | Value |
|----------|-------|
| Native Name | `GIVE_WEAPON_TO_PED` |
| Hash | `0xC4D88A85` |
| Return Type | `void` |
| API Set | `server` |
| Parameters | `ped` (Ped), `weaponHash` (Hash), `ammoCount` (int), `isHidden` (BOOL), `bForceInHand` (BOOL) |

**Description:** GIVE_WEAPON_TO_PED

**This is the server-side RPC native equivalent of the client native [GIVE_WEAPON_TO_PED](?\_0xBF0FD6E56C964FCB).**

## SET_PED_TO_RAGDOLL_WITH_FALL

| Property | Value |
|----------|-------|
| Native Name | `SET_PED_TO_RAGDOLL_WITH_FALL` |
| Hash | `0xFA12E286` |
| Return Type | `void` |
| API Set | `server` |
| Parameters | `ped` (Ped), `minTime` (int), `maxTime` (int), `nFallType` (int), `dirX` (float), `dirY` (float), `dirZ` (float), `fGroundHeight` (float), `grab1X` (float), `grab1Y` (float), `grab1Z` (float), `grab2X` (float), `grab2Y` (float), `grab2Z` (float) |

**Description:** ```cpp
enum eNMFallType {
TYPE_FROM_HIGH = 0,
TYPE_OVER_WALL = 1,
TYPE_DOWN_STAIRS = 2,
TYPE_DIE_TYPES = 3,
TYPE_DIE_FROM_HIGH = 4,
TYPE_DIE_OVER_WALL = 5,
TYPE_DIE_DOWN_STAIRS = 6
}
Return variable is never used in R*'s scripts.
Not sure what p2 does. It seems like it would be a time judging by it's usage in R*'s scripts, but didn't seem to affect anything in my testings.
x, y, and z are coordinates, most likely to where the ped will fall.
p7 is probably the force of the fall, but untested, so I left the variable name the same.
p8 to p13 are always 0f in R*'s scripts.
(Simplified) Example of the usage of the function from R*'s scripts:
ped::set_ped_to_ragdoll_with_fall(ped, 1500, 2000, 1, -entity::get_entity_forward_vector(ped), 1f, 0f, 0f, 0f, 0f, 0f, 0f);

This is the server-side RPC native equivalent of the client native SET_PED_TO_RAGDOLL_WITH_FALL.

Parameters

  • ped (Ped) — The ped to ragdoll.
  • minTime (int)
  • maxTime (int)
  • nFallType (int) — The type of fall.
  • dirX (float) — The x direction of the fall.
  • dirY (float) — The y direction of the fall.
  • dirZ (float) — The z direction of the fall.
  • fGroundHeight (float) — The ground height (z).
  • grab1X (float) — unused
  • grab1Y (float) — unused
  • grab1Z (float) — unused
  • grab2X (float) — unused
  • grab2Y (float) — unused
  • grab2Z (float) — unused

SET_ENTITY_COORDS

Property Value
Native Name SET_ENTITY_COORDS
Hash 0xDF70B41B
Return Type void
API Set server
Parameters entity (Entity), xPos (float), yPos (float), zPos (float), alive (BOOL), deadFlag (BOOL), ragdollFlag (BOOL), clearArea (BOOL)

Description: Sets the coordinates (world position) for a specified entity, offset by the radius of the entity on the Z axis.

This is the server-side RPC native equivalent of the client native SET_ENTITY_COORDS.

Parameters

  • entity (Entity) — The entity to change coordinates for.
  • xPos (float) — The X coordinate.
  • yPos (float) — The Y coordinate.
  • zPos (float) — The Z coordinate, ground level.
  • alive (BOOL) — Unused by the game, potentially used by debug builds of GTA in order to assert whether or not an entity was alive.
  • deadFlag (BOOL) — Whether to disable physics for dead peds, too, and not just living peds.
  • ragdollFlag (BOOL) — A special flag used for ragdolling peds.
  • clearArea (BOOL) — Whether to clear any entities in the target area.

SET_BLIP_SPRITE

Property Value
Native Name SET_BLIP_SPRITE
Hash 0x8DBBB0B9
Return Type void
API Set server
Parameters blip (Blip), spriteId (int)

Description: Sets the displayed sprite for a specific blip. There's a list of sprites on the FiveM documentation site.

This is the server-side RPC native equivalent of the client native SET_BLIP_SPRITE.

Parameters

  • blip (Blip) — The blip to change.
  • spriteId (int) — The sprite ID to set.

SET_ENTITY_VELOCITY

Property Value
Native Name SET_ENTITY_VELOCITY
Hash 0xFF5A1988
Return Type void
API Set server
Parameters entity (Entity), x (float), y (float), z (float)

Description: ``` Note that the third parameter(denoted as z) is "up and down" with positive numbers encouraging upwards movement.


**This is the server-side RPC native equivalent of the client native [SET_ENTITY_VELOCITY](?\_0x1C99BB7B6E96D16F).**

## CREATE_OBJECT

| Property | Value |
|----------|-------|
| Native Name | `CREATE_OBJECT` |
| Hash | `0x2F7AA05C` |
| Return Type | `Entity` |
| API Set | `server` |
| Parameters | `modelHash` (Hash), `x` (float), `y` (float), `z` (float), `isNetwork` (BOOL), `netMissionEntity` (BOOL), `doorFlag` (BOOL) |

**Description:** Creates an object (prop) with the specified model at the specified position, offset on the Z axis by the radius of the object's model.
This object will initially be owned by the creating script as a mission entity, and the model should be loaded already (e.g. using REQUEST_MODEL).

**This is the server-side RPC native equivalent of the client native [CREATE_OBJECT](?\_0x509D5878EB39E842).**

### Parameters
- **`modelHash`** (`Hash`) — The model to spawn.
- **`x`** (`float`) — Spawn coordinate X component.
- **`y`** (`float`) — Spawn coordinate Y component.
- **`z`** (`float`) — Spawn coordinate Z component, 'ground level'.
- **`isNetwork`** (`BOOL`) — Whether to create a network object for the object. If false, the object exists only locally.
- **`netMissionEntity`** (`BOOL`) — Whether to register the object as pinned to the script host in the R\* network model.
- **`doorFlag`** (`BOOL`) — False to create a door archetype (archetype flag bit 26 set) as a door. Required to be set to true to create door models in network mode.

## SET_PED_TO_RAGDOLL

| Property | Value |
|----------|-------|
| Native Name | `SET_PED_TO_RAGDOLL` |
| Hash | `0x83CB5052` |
| Return Type | `void` |
| API Set | `server` |
| Parameters | `ped` (Ped), `minTime` (int), `maxTime` (int), `ragdollType` (int), `bAbortIfInjured` (BOOL), `bAbortIfDead` (BOOL), `bForceScriptControl` (BOOL) |

**Description:** p4/p5: Unusued in TU27

### Ragdoll Types

**0**: CTaskNMRelax
**1**: CTaskNMScriptControl: Hardcoded not to work in networked environments.
**Else**: CTaskNMBalance

**This is the server-side RPC native equivalent of the client native [SET_PED_TO_RAGDOLL](?\_0xAE99FB955581844A).**

### Parameters
- **`ped`** (`Ped`) — The ped to ragdoll.
- **`minTime`** (`int`) — Time(ms) Ped is in ragdoll mode; only applies to ragdoll types 0 and not 1.
- **`maxTime`** (`int`)
- **`ragdollType`** (`int`)
- **`bAbortIfInjured`** (`BOOL`) — unused
- **`bAbortIfDead`** (`BOOL`) — unused
- **`bForceScriptControl`** (`BOOL`)

## SET_PLAYER_WANTED_LEVEL

| Property | Value |
|----------|-------|
| Native Name | `SET_PLAYER_WANTED_LEVEL` |
| Hash | `0xB7A0914B` |
| Return Type | `void` |
| API Set | `server` |
| Parameters | `player` (Player), `wantedLevel` (int), `delayedResponse` (BOOL) |

**Description:** SET_PLAYER_WANTED_LEVEL

**This is the server-side RPC native equivalent of the client native [SET_PLAYER_WANTED_LEVEL](?\_0x39FF19C64EF7DA5B).**

### Parameters
- **`player`** (`Player`) — the target player
- **`wantedLevel`** (`int`) — the wanted level 1-5
- **`delayedResponse`** (`BOOL`) — false = 0-10sec police spawn response time, true = 10-20sec police spawn response time

## SET_PED_CONFIG_FLAG

| Property | Value |
|----------|-------|
| Native Name | `SET_PED_CONFIG_FLAG` |
| Hash | `0x9CFBE10D` |
| Return Type | `void` |
| API Set | `server` |
| Parameters | `ped` (Ped), `flagId` (int), `value` (BOOL) |

**Description:** ```cpp
// Potential names and hash collisions included as comments
enum ePedConfigFlags {
CPED_CONFIG_FLAG_CreatedByFactory = 0,
CPED_CONFIG_FLAG_CanBeShotInVehicle = 1,
CPED_CONFIG_FLAG_NoCriticalHits = 2,
CPED_CONFIG_FLAG_DrownsInWater = 3,
CPED_CONFIG_FLAG_DrownsInSinkingVehicle = 4,
CPED_CONFIG_FLAG_DiesInstantlyWhenSwimming = 5,
CPED_CONFIG_FLAG_HasBulletProofVest = 6,
CPED_CONFIG_FLAG_UpperBodyDamageAnimsOnly = 7,
CPED_CONFIG_FLAG_NeverFallOffSkis = 8,
CPED_CONFIG_FLAG_NeverEverTargetThisPed = 9,
CPED_CONFIG_FLAG_ThisPedIsATargetPriority = 10,
CPED_CONFIG_FLAG_TargettableWithNoLos = 11,
CPED_CONFIG_FLAG_DoesntListenToPlayerGroupCommands = 12,
CPED_CONFIG_FLAG_NeverLeavesGroup = 13,
CPED_CONFIG_FLAG_DoesntDropWeaponsWhenDead = 14,
CPED_CONFIG_FLAG_SetDelayedWeaponAsCurrent = 15,
CPED_CONFIG_FLAG_KeepTasksAfterCleanUp = 16,
CPED_CONFIG_FLAG_BlockNonTemporaryEvents = 17,
CPED_CONFIG_FLAG_HasAScriptBrain = 18,
CPED_CONFIG_FLAG_WaitingForScriptBrainToLoad = 19,
CPED_CONFIG_FLAG_AllowMedicsToReviveMe = 20,
CPED_CONFIG_FLAG_MoneyHasBeenGivenByScript = 21,
CPED_CONFIG_FLAG_NotAllowedToCrouch = 22,
CPED_CONFIG_FLAG_DeathPickupsPersist = 23,
CPED_CONFIG_FLAG_IgnoreSeenMelee = 24,
CPED_CONFIG_FLAG_ForceDieIfInjured = 25,
CPED_CONFIG_FLAG_DontDragMeOutCar = 26,
CPED_CONFIG_FLAG_StayInCarOnJack = 27,
CPED_CONFIG_FLAG_ForceDieInCar = 28,
CPED_CONFIG_FLAG_GetOutUndriveableVehicle = 29,
CPED_CONFIG_FLAG_WillRemainOnBoatAfterMissionEnds = 30,
CPED_CONFIG_FLAG_DontStoreAsPersistent = 31,
CPED_CONFIG_FLAG_WillFlyThroughWindscreen = 32,
CPED_CONFIG_FLAG_DieWhenRagdoll = 33,
CPED_CONFIG_FLAG_HasHelmet = 34,
CPED_CONFIG_FLAG_UseHelmet = 35,
CPED_CONFIG_FLAG_DontTakeOffHelmet = 36,
CPED_CONFIG_FLAG_HideInCutscene = 37,
CPED_CONFIG_FLAG_PedIsEnemyToPlayer = 38,
CPED_CONFIG_FLAG_DisableEvasiveDives = 39,
CPED_CONFIG_FLAG_PedGeneratesDeadBodyEvents = 40,
CPED_CONFIG_FLAG_DontAttackPlayerWithoutWantedLevel = 41,
CPED_CONFIG_FLAG_DontInfluenceWantedLevel = 42,
CPED_CONFIG_FLAG_DisablePlayerLockon = 43,
CPED_CONFIG_FLAG_DisableLockonToRandomPeds = 44,
CPED_CONFIG_FLAG_AllowLockonToFriendlyPlayers = 45,
_0xDB115BFA = 46,
CPED_CONFIG_FLAG_PedBeingDeleted = 47,
CPED_CONFIG_FLAG_BlockWeaponSwitching = 48,
CPED_CONFIG_FLAG_BlockGroupPedAimedAtResponse = 49,
CPED_CONFIG_FLAG_WillFollowLeaderAnyMeans = 50,
CPED_CONFIG_FLAG_BlippedByScript = 51,
CPED_CONFIG_FLAG_DrawRadarVisualField = 52,
CPED_CONFIG_FLAG_StopWeaponFiringOnImpact = 53,
CPED_CONFIG_FLAG_DissableAutoFallOffTests = 54,
CPED_CONFIG_FLAG_SteerAroundDeadBodies = 55,
CPED_CONFIG_FLAG_ConstrainToNavMesh = 56,
CPED_CONFIG_FLAG_SyncingAnimatedProps = 57,
CPED_CONFIG_FLAG_IsFiring = 58,
CPED_CONFIG_FLAG_WasFiring = 59,
CPED_CONFIG_FLAG_IsStanding = 60,
CPED_CONFIG_FLAG_WasStanding = 61,
CPED_CONFIG_FLAG_InVehicle = 62,
CPED_CONFIG_FLAG_OnMount = 63,
CPED_CONFIG_FLAG_AttachedToVehicle = 64,
CPED_CONFIG_FLAG_IsSwimming = 65,
CPED_CONFIG_FLAG_WasSwimming = 66,
CPED_CONFIG_FLAG_IsSkiing = 67,
CPED_CONFIG_FLAG_IsSitting = 68,
CPED_CONFIG_FLAG_KilledByStealth = 69,
CPED_CONFIG_FLAG_KilledByTakedown = 70,
CPED_CONFIG_FLAG_Knockedout = 71,
CPED_CONFIG_FLAG_ClearRadarBlipOnDeath = 72,
CPED_CONFIG_FLAG_JustGotOffTrain = 73,
CPED_CONFIG_FLAG_JustGotOnTrain = 74,
CPED_CONFIG_FLAG_UsingCoverPoint = 75,
CPED_CONFIG_FLAG_IsInTheAir = 76,
CPED_CONFIG_FLAG_KnockedUpIntoAir = 77,
CPED_CONFIG_FLAG_IsAimingGun = 78,
CPED_CONFIG_FLAG_HasJustLeftCar = 79,
CPED_CONFIG_FLAG_TargetWhenInjuredAllowed = 80,
CPED_CONFIG_FLAG_CurrLeftFootCollNM = 81,
CPED_CONFIG_FLAG_PrevLeftFootCollNM = 82,
CPED_CONFIG_FLAG_CurrRightFootCollNM = 83,
CPED_CONFIG_FLAG_PrevRightFootCollNM = 84,
CPED_CONFIG_FLAG_HasBeenBumpedInCar = 85,
CPED_CONFIG_FLAG_InWaterTaskQuitToClimbLadder = 86,
CPED_CONFIG_FLAG_NMTwoHandedWeaponBothHandsConstrained = 87,
CPED_CONFIG_FLAG_CreatedBloodPoolTimer = 88,
CPED_CONFIG_FLAG_DontActivateRagdollFromAnyPedImpact = 89,
CPED_CONFIG_FLAG_GroupPedFailedToEnterCover = 90,
CPED_CONFIG_FLAG_AlreadyChattedOnPhone = 91,
CPED_CONFIG_FLAG_AlreadyReactedToPedOnRoof = 92,
CPED_CONFIG_FLAG_ForcePedLoadCover = 93,
CPED_CONFIG_FLAG_BlockCoweringInCover = 94,
CPED_CONFIG_FLAG_BlockPeekingInCover = 95,
CPED_CONFIG_FLAG_JustLeftCarNotCheckedForDoors = 96,
CPED_CONFIG_FLAG_VaultFromCover = 97,
CPED_CONFIG_FLAG_AutoConversationLookAts = 98,
CPED_CONFIG_FLAG_UsingCrouchedPedCapsule = 99,
CPED_CONFIG_FLAG_HasDeadPedBeenReported = 100,
CPED_CONFIG_FLAG_ForcedAim = 101,
CPED_CONFIG_FLAG_SteersAroundPeds = 102,
CPED_CONFIG_FLAG_SteersAroundObjects = 103,
CPED_CONFIG_FLAG_OpenDoorArmIK = 104,
CPED_CONFIG_FLAG_ForceReload = 105,
CPED_CONFIG_FLAG_DontActivateRagdollFromVehicleImpact = 106,
CPED_CONFIG_FLAG_DontActivateRagdollFromBulletImpact = 107,
CPED_CONFIG_FLAG_DontActivateRagdollFromExplosions = 108,
CPED_CONFIG_FLAG_DontActivateRagdollFromFire = 109,
CPED_CONFIG_FLAG_DontActivateRagdollFromElectrocution = 110,
CPED_CONFIG_FLAG_IsBeingDraggedToSafety = 111,
CPED_CONFIG_FLAG_HasBeenDraggedToSafety = 112,
CPED_CONFIG_FLAG_KeepWeaponHolsteredUnlessFired = 113,
CPED_CONFIG_FLAG_ForceScriptControlledKnockout = 114,
CPED_CONFIG_FLAG_FallOutOfVehicleWhenKilled = 115,
CPED_CONFIG_FLAG_GetOutBurningVehicle = 116,
CPED_CONFIG_FLAG_BumpedByPlayer = 117,
CPED_CONFIG_FLAG_RunFromFiresAndExplosions = 118,
CPED_CONFIG_FLAG_TreatAsPlayerDuringTargeting = 119,
CPED_CONFIG_FLAG_IsHandCuffed = 120,
CPED_CONFIG_FLAG_IsAnkleCuffed = 121,
CPED_CONFIG_FLAG_DisableMelee = 122,
CPED_CONFIG_FLAG_DisableUnarmedDrivebys = 123,
CPED_CONFIG_FLAG_JustGetsPulledOutWhenElectrocuted = 124,
CPED_CONFIG_FLAG_UNUSED_REPLACE_ME = 125,
CPED_CONFIG_FLAG_WillNotHotwireLawEnforcementVehicle = 126,
CPED_CONFIG_FLAG_WillCommandeerRatherThanJack = 127,
CPED_CONFIG_FLAG_CanBeAgitated = 128,
CPED_CONFIG_FLAG_ForcePedToFaceLeftInCover = 129,
CPED_CONFIG_FLAG_ForcePedToFaceRightInCover = 130,
CPED_CONFIG_FLAG_BlockPedFromTurningInCover = 131,
CPED_CONFIG_FLAG_KeepRelationshipGroupAfterCleanUp = 132,
CPED_CONFIG_FLAG_ForcePedToBeDragged = 133,
CPED_CONFIG_FLAG_PreventPedFromReactingToBeingJacked = 134,
CPED_CONFIG_FLAG_IsScuba = 135,
CPED_CONFIG_FLAG_WillArrestRatherThanJack = 136,
CPED_CONFIG_FLAG_RemoveDeadExtraFarAway = 137,
CPED_CONFIG_FLAG_RidingTrain = 138,
CPED_CONFIG_FLAG_ArrestResult = 139,
CPED_CONFIG_FLAG_CanAttackFriendly = 140,
CPED_CONFIG_FLAG_WillJackAnyPlayer = 141,
CPED_CONFIG_FLAG_BumpedByPlayerVehicle = 142,
CPED_CONFIG_FLAG_DodgedPlayerVehicle = 143,
CPED_CONFIG_FLAG_WillJackWantedPlayersRatherThanStealCar = 144,
CPED_CONFIG_FLAG_NoCopWantedAggro = 145,
CPED_CONFIG_FLAG_DisableLadderClimbing = 146,
CPED_CONFIG_FLAG_StairsDetected = 147,
CPED_CONFIG_FLAG_SlopeDetected = 148,
CPED_CONFIG_FLAG_HelmetHasBeenShot = 149,
CPED_CONFIG_FLAG_CowerInsteadOfFlee = 150,
CPED_CONFIG_FLAG_CanActivateRagdollWhenVehicleUpsideDown = 151,
CPED_CONFIG_FLAG_AlwaysRespondToCriesForHelp = 152,
CPED_CONFIG_FLAG_DisableBloodPoolCreation = 153,
CPED_CONFIG_FLAG_ShouldFixIfNoCollision = 154,
CPED_CONFIG_FLAG_CanPerformArrest = 155,
CPED_CONFIG_FLAG_CanPerformUncuff = 156,
CPED_CONFIG_FLAG_CanBeArrested = 157,
CPED_CONFIG_FLAG_MoverConstrictedByOpposingCollisions = 158,
CPED_CONFIG_FLAG_PlayerPreferFrontSeatMP = 159,
CPED_CONFIG_FLAG_DontActivateRagdollFromImpactObject = 160,
CPED_CONFIG_FLAG_DontActivateRagdollFromMelee = 161,
CPED_CONFIG_FLAG_DontActivateRagdollFromWaterJet = 162,
CPED_CONFIG_FLAG_DontActivateRagdollFromDrowning = 163,
CPED_CONFIG_FLAG_DontActivateRagdollFromFalling = 164,
CPED_CONFIG_FLAG_DontActivateRagdollFromRubberBullet = 165,
CPED_CONFIG_FLAG_IsInjured = 166,
CPED_CONFIG_FLAG_DontEnterVehiclesInPlayersGroup = 167,
CPED_CONFIG_FLAG_SwimmingTasksRunning = 168,
CPED_CONFIG_FLAG_PreventAllMeleeTaunts = 169,
CPED_CONFIG_FLAG_ForceDirectEntry = 170,
CPED_CONFIG_FLAG_AlwaysSeeApproachingVehicles = 171,
CPED_CONFIG_FLAG_CanDiveAwayFromApproachingVehicles = 172,
CPED_CONFIG_FLAG_AllowPlayerToInterruptVehicleEntryExit = 173,
CPED_CONFIG_FLAG_OnlyAttackLawIfPlayerIsWanted = 174,
CPED_CONFIG_FLAG_PlayerInContactWithKinematicPed = 175,
CPED_CONFIG_FLAG_PlayerInContactWithSomethingOtherThanKinematicPed = 176,
CPED_CONFIG_FLAG_PedsJackingMeDontGetIn = 177,
CPED_CONFIG_FLAG_AdditionalRappellingPed = 178,
CPED_CONFIG_FLAG_PedIgnoresAnimInterruptEvents = 179,
CPED_CONFIG_FLAG_IsInCustody = 180,
CPED_CONFIG_FLAG_ForceStandardBumpReactionThresholds = 181,
CPED_CONFIG_FLAG_LawWillOnlyAttackIfPlayerIsWanted = 182,
CPED_CONFIG_FLAG_IsAgitated = 183,
CPED_CONFIG_FLAG_PreventAutoShuffleToDriversSeat = 184,
CPED_CONFIG_FLAG_UseKinematicModeWhenStationary = 185,
CPED_CONFIG_FLAG_EnableWeaponBlocking = 186,
CPED_CONFIG_FLAG_HasHurtStarted = 187,
CPED_CONFIG_FLAG_DisableHurt = 188,
CPED_CONFIG_FLAG_PlayerIsWeird = 189,
CPED_CONFIG_FLAG_PedHadPhoneConversation = 190,
CPED_CONFIG_FLAG_BeganCrossingRoad = 191,
CPED_CONFIG_FLAG_WarpIntoLeadersVehicle = 192,
CPED_CONFIG_FLAG_DoNothingWhenOnFootByDefault = 193,
CPED_CONFIG_FLAG_UsingScenario = 194,
CPED_CONFIG_FLAG_VisibleOnScreen = 195,
CPED_CONFIG_FLAG_DontCollideWithKinematic = 196,
CPED_CONFIG_FLAG_ActivateOnSwitchFromLowPhysicsLod = 197,
CPED_CONFIG_FLAG_DontActivateRagdollOnPedCollisionWhenDead = 198,
CPED_CONFIG_FLAG_DontActivateRagdollOnVehicleCollisionWhenDead = 199,
CPED_CONFIG_FLAG_HasBeenInArmedCombat = 200,
CPED_CONFIG_FLAG_UseDiminishingAmmoRate = 201,
CPED_CONFIG_FLAG_Avoidance_Ignore_All = 202,
CPED_CONFIG_FLAG_Avoidance_Ignored_by_All = 203,
CPED_CONFIG_FLAG_Avoidance_Ignore_Group1 = 204,
CPED_CONFIG_FLAG_Avoidance_Member_of_Group1 = 205,
CPED_CONFIG_FLAG_ForcedToUseSpecificGroupSeatIndex = 206,
CPED_CONFIG_FLAG_LowPhysicsLodMayPlaceOnNavMesh = 207,
CPED_CONFIG_FLAG_DisableExplosionReactions = 208,
CPED_CONFIG_FLAG_DodgedPlayer = 209,
CPED_CONFIG_FLAG_WaitingForPlayerControlInterrupt = 210,
CPED_CONFIG_FLAG_ForcedToStayInCover = 211,
CPED_CONFIG_FLAG_GeneratesSoundEvents = 212,
CPED_CONFIG_FLAG_ListensToSoundEvents = 213,
CPED_CONFIG_FLAG_AllowToBeTargetedInAVehicle = 214,
CPED_CONFIG_FLAG_WaitForDirectEntryPointToBeFreeWhenExiting = 215,
CPED_CONFIG_FLAG_OnlyRequireOnePressToExitVehicle = 216,
CPED_CONFIG_FLAG_ForceExitToSkyDive = 217,
CPED_CONFIG_FLAG_SteersAroundVehicles = 218,
CPED_CONFIG_FLAG_AllowPedInVehiclesOverrideTaskFlags = 219,
CPED_CONFIG_FLAG_DontEnterLeadersVehicle = 220,
CPED_CONFIG_FLAG_DisableExitToSkyDive = 221,
CPED_CONFIG_FLAG_ScriptHasDisabledCollision = 222,
CPED_CONFIG_FLAG_UseAmbientModelScaling = 223,
CPED_CONFIG_FLAG_DontWatchFirstOnNextHurryAway = 224,
CPED_CONFIG_FLAG_DisablePotentialToBeWalkedIntoResponse = 225,
CPED_CONFIG_FLAG_DisablePedAvoidance = 226,
CPED_CONFIG_FLAG_ForceRagdollUponDeath = 227,
CPED_CONFIG_FLAG_CanLosePropsOnDamage = 228,
CPED_CONFIG_FLAG_DisablePanicInVehicle = 229,
CPED_CONFIG_FLAG_AllowedToDetachTrailer = 230,
CPED_CONFIG_FLAG_HasShotBeenReactedToFromFront = 231,
CPED_CONFIG_FLAG_HasShotBeenReactedToFromBack = 232,
CPED_CONFIG_FLAG_HasShotBeenReactedToFromLeft = 233,
CPED_CONFIG_FLAG_HasShotBeenReactedToFromRight = 234,
CPED_CONFIG_FLAG_AllowBlockDeadPedRagdollActivation = 235,
CPED_CONFIG_FLAG_IsHoldingProp = 236,
CPED_CONFIG_FLAG_BlocksPathingWhenDead = 237,
CPED_CONFIG_FLAG_ForcePlayNormalScenarioExitOnNextScriptCommand = 238,
CPED_CONFIG_FLAG_ForcePlayImmediateScenarioExitOnNextScriptCommand = 239,
CPED_CONFIG_FLAG_ForceSkinCharacterCloth = 240,
CPED_CONFIG_FLAG_LeaveEngineOnWhenExitingVehicles = 241,
CPED_CONFIG_FLAG_PhoneDisableTextingAnimations = 242,
CPED_CONFIG_FLAG_PhoneDisableTalkingAnimations = 243,
CPED_CONFIG_FLAG_PhoneDisableCameraAnimations = 244,
CPED_CONFIG_FLAG_DisableBlindFiringInShotReactions = 245,
CPED_CONFIG_FLAG_AllowNearbyCoverUsage = 246,
CPED_CONFIG_FLAG_InStrafeTransition = 247,
CPED_CONFIG_FLAG_CanPlayInCarIdles = 248,
CPED_CONFIG_FLAG_CanAttackNonWantedPlayerAsLaw = 249,
CPED_CONFIG_FLAG_WillTakeDamageWhenVehicleCrashes = 250,
CPED_CONFIG_FLAG_AICanDrivePlayerAsRearPassenger = 251,
CPED_CONFIG_FLAG_PlayerCanJackFriendlyPlayers = 252,
CPED_CONFIG_FLAG_OnStairs = 253,
CPED_CONFIG_FLAG_SimulatingAiming = 254,
CPED_CONFIG_FLAG_AIDriverAllowFriendlyPassengerSeatEntry = 255,
CPED_CONFIG_FLAG_ParentCarIsBeingRemoved = 256,
CPED_CONFIG_FLAG_AllowMissionPedToUseInjuredMovement = 257,
CPED_CONFIG_FLAG_CanLoseHelmetOnDamage = 258,
CPED_CONFIG_FLAG_NeverDoScenarioExitProbeChecks = 259,
CPED_CONFIG_FLAG_SuppressLowLODRagdollSwitchWhenCorpseSettles = 260,
CPED_CONFIG_FLAG_PreventUsingLowerPrioritySeats = 261,
CPED_CONFIG_FLAG_JustLeftVehicleNeedsReset = 262,
CPED_CONFIG_FLAG_TeleportIfCantReachPlayer = 263,
CPED_CONFIG_FLAG_PedsInVehiclePositionNeedsReset = 264,
CPED_CONFIG_FLAG_PedsFullyInSeat = 265,
CPED_CONFIG_FLAG_AllowPlayerLockOnIfFriendly = 266,
CPED_CONFIG_FLAG_UseCameraHeadingForDesiredDirectionLockOnTest = 267,
CPED_CONFIG_FLAG_TeleportToLeaderVehicle = 268,
CPED_CONFIG_FLAG_Avoidance_Ignore_WeirdPedBuffer = 269,
CPED_CONFIG_FLAG_OnStairSlope = 270,
CPED_CONFIG_FLAG_HasPlayedNMGetup = 271,
CPED_CONFIG_FLAG_DontBlipCop = 272,
CPED_CONFIG_FLAG_SpawnedAtExtendedRangeScenario = 273,
CPED_CONFIG_FLAG_WalkAlongsideLeaderWhenClose = 274,
CPED_CONFIG_FLAG_KillWhenTrapped = 275,
CPED_CONFIG_FLAG_EdgeDetected = 276,
CPED_CONFIG_FLAG_AlwaysWakeUpPhysicsOfIntersectedPeds = 277,
CPED_CONFIG_FLAG_EquippedAmbientLoadOutWeapon = 278,
CPED_CONFIG_FLAG_AvoidTearGas = 279,
CPED_CONFIG_FLAG_StoppedSpeechUponFreezing = 280,
CPED_CONFIG_FLAG_DisableGoToWritheWhenInjured = 281,
CPED_CONFIG_FLAG_OnlyUseForcedSeatWhenEnteringHeliInGroup = 282,
CPED_CONFIG_FLAG_ThrownFromVehicleDueToExhaustion = 283,
CPED_CONFIG_FLAG_UpdateEnclosedSearchRegion = 284,
CPED_CONFIG_FLAG_DisableWeirdPedEvents = 285,
CPED_CONFIG_FLAG_ShouldChargeNow = 286,
CPED_CONFIG_FLAG_RagdollingOnBoat = 287,
CPED_CONFIG_FLAG_HasBrandishedWeapon = 288,
CPED_CONFIG_FLAG_AllowMinorReactionsAsMissionPed = 289,
CPED_CONFIG_FLAG_BlockDeadBodyShockingEventsWhenDead = 290,
CPED_CONFIG_FLAG_PedHasBeenSeen = 291,
CPED_CONFIG_FLAG_PedIsInReusePool = 292,
CPED_CONFIG_FLAG_PedWasReused = 293,
CPED_CONFIG_FLAG_DisableShockingEvents = 294,
CPED_CONFIG_FLAG_MovedUsingLowLodPhysicsSinceLastActive = 295,
CPED_CONFIG_FLAG_NeverReactToPedOnRoof = 296,
CPED_CONFIG_FLAG_ForcePlayFleeScenarioExitOnNextScriptCommand = 297,
CPED_CONFIG_FLAG_JustBumpedIntoVehicle = 298,
CPED_CONFIG_FLAG_DisableShockingDrivingOnPavementEvents = 299,
CPED_CONFIG_FLAG_ShouldThrowSmokeNow = 300,
CPED_CONFIG_FLAG_DisablePedConstraints = 301,
CPED_CONFIG_FLAG_ForceInitialPeekInCover = 302,
CPED_CONFIG_FLAG_CreatedByDispatch = 303,
CPED_CONFIG_FLAG_PointGunLeftHandSupporting = 304,
CPED_CONFIG_FLAG_DisableJumpingFromVehiclesAfterLeader = 305,
CPED_CONFIG_FLAG_DontActivateRagdollFromPlayerPedImpact = 306,
CPED_CONFIG_FLAG_DontActivateRagdollFromAiRagdollImpact = 307,
CPED_CONFIG_FLAG_DontActivateRagdollFromPlayerRagdollImpact = 308,
CPED_CONFIG_FLAG_DisableQuadrupedSpring = 309,
CPED_CONFIG_FLAG_IsInCluster = 310,
CPED_CONFIG_FLAG_ShoutToGroupOnPlayerMelee = 311,
CPED_CONFIG_FLAG_IgnoredByAutoOpenDoors = 312,
CPED_CONFIG_FLAG_PreferInjuredGetup = 313,
CPED_CONFIG_FLAG_ForceIgnoreMeleeActiveCombatant = 314,
CPED_CONFIG_FLAG_CheckLoSForSoundEvents = 315,
CPED_CONFIG_FLAG_JackedAbandonedCar = 316,
CPED_CONFIG_FLAG_CanSayFollowedByPlayerAudio = 317,
CPED_CONFIG_FLAG_ActivateRagdollFromMinorPlayerContact = 318,
CPED_CONFIG_FLAG_HasPortablePickupAttached = 319,
CPED_CONFIG_FLAG_ForcePoseCharacterCloth = 320,
CPED_CONFIG_FLAG_HasClothCollisionBounds = 321,
CPED_CONFIG_FLAG_HasHighHeels = 322,
CPED_CONFIG_FLAG_TreatAsAmbientPedForDriverLockOn = 323,
CPED_CONFIG_FLAG_DontBehaveLikeLaw = 324,
CPED_CONFIG_FLAG_SpawnedAtScenario = 325,
CPED_CONFIG_FLAG_DisablePoliceInvestigatingBody = 326,
CPED_CONFIG_FLAG_DisableWritheShootFromGround = 327,
CPED_CONFIG_FLAG_LowerPriorityOfWarpSeats = 328,
CPED_CONFIG_FLAG_DisableTalkTo = 329,
CPED_CONFIG_FLAG_DontBlip = 330,
CPED_CONFIG_FLAG_IsSwitchingWeapon = 331,
CPED_CONFIG_FLAG_IgnoreLegIkRestrictions = 332,
CPED_CONFIG_FLAG_ScriptForceNoTimesliceIntelligenceUpdate = 333,
CPED_CONFIG_FLAG_JackedOutOfMyVehicle = 334,
CPED_CONFIG_FLAG_WentIntoCombatAfterBeingJacked = 335,
CPED_CONFIG_FLAG_DontActivateRagdollForVehicleGrab = 336,
CPED_CONFIG_FLAG_ForcePackageCharacterCloth = 337,
CPED_CONFIG_FLAG_DontRemoveWithValidOrder = 338,
CPED_CONFIG_FLAG_AllowTaskDoNothingTimeslicing = 339,
CPED_CONFIG_FLAG_ForcedToStayInCoverDueToPlayerSwitch = 340,
CPED_CONFIG_FLAG_ForceProneCharacterCloth = 341,
CPED_CONFIG_FLAG_NotAllowedToJackAnyPlayers = 342,
CPED_CONFIG_FLAG_InToStrafeTransition = 343,
CPED_CONFIG_FLAG_KilledByStandardMelee = 344,
CPED_CONFIG_FLAG_AlwaysLeaveTrainUponArrival = 345,
CPED_CONFIG_FLAG_ForcePlayDirectedNormalScenarioExitOnNextScriptCommand = 346,
CPED_CONFIG_FLAG_OnlyWritheFromWeaponDamage = 347,
CPED_CONFIG_FLAG_UseSloMoBloodVfx = 348,
CPED_CONFIG_FLAG_EquipJetpack = 349,
CPED_CONFIG_FLAG_PreventDraggedOutOfCarThreatResponse = 350,
CPED_CONFIG_FLAG_ScriptHasCompletelyDisabledCollision = 351,
CPED_CONFIG_FLAG_NeverDoScenarioNavChecks = 352,
CPED_CONFIG_FLAG_ForceSynchronousScenarioExitChecking = 353,
CPED_CONFIG_FLAG_ThrowingGrenadeWhileAiming = 354,
CPED_CONFIG_FLAG_HeadbobToRadioEnabled = 355,
CPED_CONFIG_FLAG_ForceDeepSurfaceCheck = 356,
CPED_CONFIG_FLAG_DisableDeepSurfaceAnims = 357,
CPED_CONFIG_FLAG_DontBlipNotSynced = 358,
CPED_CONFIG_FLAG_IsDuckingInVehicle = 359,
CPED_CONFIG_FLAG_PreventAutoShuffleToTurretSeat = 360,
CPED_CONFIG_FLAG_DisableEventInteriorStatusCheck = 361,
CPED_CONFIG_FLAG_HasReserveParachute = 362,
CPED_CONFIG_FLAG_UseReserveParachute = 363,
CPED_CONFIG_FLAG_TreatDislikeAsHateWhenInCombat = 364,
CPED_CONFIG_FLAG_OnlyUpdateTargetWantedIfSeen = 365,
CPED_CONFIG_FLAG_AllowAutoShuffleToDriversSeat = 366,
CPED_CONFIG_FLAG_DontActivateRagdollFromSmokeGrenade = 367,
CPED_CONFIG_FLAG_LinkMBRToOwnerOnChain = 368,
CPED_CONFIG_FLAG_AmbientFriendBumpedByPlayer = 369,
CPED_CONFIG_FLAG_AmbientFriendBumpedByPlayerVehicle = 370,
CPED_CONFIG_FLAG_InFPSUnholsterTransition = 371,
CPED_CONFIG_FLAG_PreventReactingToSilencedCloneBullets = 372,
CPED_CONFIG_FLAG_DisableInjuredCryForHelpEvents = 373,
CPED_CONFIG_FLAG_NeverLeaveTrain = 374,
CPED_CONFIG_FLAG_DontDropJetpackOnDeath = 375,
CPED_CONFIG_FLAG_UseFPSUnholsterTransitionDuringCombatRoll = 376,
CPED_CONFIG_FLAG_ExitingFPSCombatRoll = 377,
CPED_CONFIG_FLAG_ScriptHasControlOfPlayer = 378,
CPED_CONFIG_FLAG_PlayFPSIdleFidgetsForProjectile = 379,
CPED_CONFIG_FLAG_DisableAutoEquipHelmetsInBikes = 380,
CPED_CONFIG_FLAG_DisableAutoEquipHelmetsInAircraft = 381,
CPED_CONFIG_FLAG_WasPlayingFPSGetup = 382,
CPED_CONFIG_FLAG_WasPlayingFPSMeleeActionResult = 383,
CPED_CONFIG_FLAG_PreferNoPriorityRemoval = 384,
CPED_CONFIG_FLAG_FPSFidgetsAbortedOnFire = 385,
CPED_CONFIG_FLAG_ForceFPSIKWithUpperBodyAnim = 386,
CPED_CONFIG_FLAG_SwitchingCharactersInFirstPerson = 387,
CPED_CONFIG_FLAG_IsClimbingLadder = 388,
CPED_CONFIG_FLAG_HasBareFeet = 389,
CPED_CONFIG_FLAG_UNUSED_REPLACE_ME_2 = 390,
CPED_CONFIG_FLAG_GoOnWithoutVehicleIfItIsUnableToGetBackToRoad = 391,
CPED_CONFIG_FLAG_BlockDroppingHealthSnacksOnDeath = 392,
CPED_CONFIG_FLAG_ResetLastVehicleOnVehicleExit = 393,
CPED_CONFIG_FLAG_ForceThreatResponseToNonFriendToFriendMeleeActions = 394,
CPED_CONFIG_FLAG_DontRespondToRandomPedsDamage = 395,
CPED_CONFIG_FLAG_AllowContinuousThreatResponseWantedLevelUpdates = 396,
CPED_CONFIG_FLAG_KeepTargetLossResponseOnCleanup = 397,
CPED_CONFIG_FLAG_PlayersDontDragMeOutOfCar = 398,
CPED_CONFIG_FLAG_BroadcastRepondedToThreatWhenGoingToPointShooting = 399,
CPED_CONFIG_FLAG_IgnorePedTypeForIsFriendlyWith = 400,
CPED_CONFIG_FLAG_TreatNonFriendlyAsHateWhenInCombat = 401,
CPED_CONFIG_FLAG_DontLeaveVehicleIfLeaderNotInVehicle = 402,
CPED_CONFIG_FLAG_ChangeFromPermanentToAmbientPopTypeOnMigration = 403,
CPED_CONFIG_FLAG_AllowMeleeReactionIfMeleeProofIsOn = 404,
CPED_CONFIG_FLAG_UsingLowriderLeans = 405,
CPED_CONFIG_FLAG_UsingAlternateLowriderLeans = 406,
CPED_CONFIG_FLAG_UseNormalExplosionDamageWhenBlownUpInVehicle = 407,
CPED_CONFIG_FLAG_DisableHomingMissileLockForVehiclePedInside = 408,
CPED_CONFIG_FLAG_DisableTakeOffScubaGear = 409,
CPED_CONFIG_FLAG_IgnoreMeleeFistWeaponDamageMult = 410,
CPED_CONFIG_FLAG_LawPedsCanFleeFromNonWantedPlayer = 411,
CPED_CONFIG_FLAG_ForceBlipSecurityPedsIfPlayerIsWanted = 412,
CPED_CONFIG_FLAG_IsHolsteringWeapon = 413,
CPED_CONFIG_FLAG_UseGoToPointForScenarioNavigation = 414,
CPED_CONFIG_FLAG_DontClearLocalPassengersWantedLevel = 415,
CPED_CONFIG_FLAG_BlockAutoSwapOnWeaponPickups = 416,
CPED_CONFIG_FLAG_ThisPedIsATargetPriorityForAI = 417,
CPED_CONFIG_FLAG_IsSwitchingHelmetVisor = 418,
CPED_CONFIG_FLAG_ForceHelmetVisorSwitch = 419,
CPED_CONFIG_FLAG_IsPerformingVehicleMelee = 420,
CPED_CONFIG_FLAG_UseOverrideFootstepPtFx = 421,
CPED_CONFIG_FLAG_DisableVehicleCombat = 422,
CPED_CONFIG_FLAG_TreatAsFriendlyForTargetingAndDamage = 423,
CPED_CONFIG_FLAG_AllowBikeAlternateAnimations = 424,
CPED_CONFIG_FLAG_TreatAsFriendlyForTargetingAndDamageNonSynced = 425,
CPED_CONFIG_FLAG_UseLockpickVehicleEntryAnimations = 426,
CPED_CONFIG_FLAG_IgnoreInteriorCheckForSprinting = 427,
CPED_CONFIG_FLAG_SwatHeliSpawnWithinLastSpottedLocation = 428,
CPED_CONFIG_FLAG_DisableStartEngine = 429,
CPED_CONFIG_FLAG_IgnoreBeingOnFire = 430,
CPED_CONFIG_FLAG_DisableTurretOrRearSeatPreference = 431,
CPED_CONFIG_FLAG_DisableWantedHelicopterSpawning = 432,
CPED_CONFIG_FLAG_UseTargetPerceptionForCreatingAimedAtEvents = 433,
CPED_CONFIG_FLAG_DisableHomingMissileLockon = 434,
CPED_CONFIG_FLAG_ForceIgnoreMaxMeleeActiveSupportCombatants = 435,
CPED_CONFIG_FLAG_StayInDefensiveAreaWhenInVehicle = 436,
CPED_CONFIG_FLAG_DontShoutTargetPosition = 437,
CPED_CONFIG_FLAG_DisableHelmetArmor = 438,
CPED_CONFIG_FLAG_CreatedByConcealedPlayer = 439,
CPED_CONFIG_FLAG_PermanentlyDisablePotentialToBeWalkedIntoResponse = 440,
CPED_CONFIG_FLAG_PreventVehExitDueToInvalidWeapon = 441,
CPED_CONFIG_FLAG_IgnoreNetSessionFriendlyFireCheckForAllowDamage = 442,
CPED_CONFIG_FLAG_DontLeaveCombatIfTargetPlayerIsAttackedByPolice = 443,
CPED_CONFIG_FLAG_CheckLockedBeforeWarp = 444,
CPED_CONFIG_FLAG_DontShuffleInVehicleToMakeRoom = 445,
CPED_CONFIG_FLAG_GiveWeaponOnGetup = 446,
CPED_CONFIG_FLAG_DontHitVehicleWithProjectiles = 447,
CPED_CONFIG_FLAG_DisableForcedEntryForOpenVehiclesFromTryLockedDoor = 448,
CPED_CONFIG_FLAG_FiresDummyRockets = 449,
CPED_CONFIG_FLAG_PedIsArresting = 450,
CPED_CONFIG_FLAG_IsDecoyPed = 451,
CPED_CONFIG_FLAG_HasEstablishedDecoy = 452,
CPED_CONFIG_FLAG_BlockDispatchedHelicoptersFromLanding = 453,
CPED_CONFIG_FLAG_DontCryForHelpOnStun = 454,
CPED_CONFIG_FLAG_HitByTranqWeapon = 455,
CPED_CONFIG_FLAG_CanBeIncapacitated = 456,
CPED_CONFIG_FLAG_ForcedAimFromArrest = 457,
CPED_CONFIG_FLAG_DontChangeTargetFromMelee = 458,
_0x4376ABF2 = 459,
CPED_CONFIG_FLAG_RagdollFloatsIndefinitely = 460,
CPED_CONFIG_FLAG_BlockElectricWeaponDamage = 461,
_0x262A3B8E = 462,
_0x1AA79A25 = 463,
}

This is the server-side RPC native equivalent of the client native SET_PED_CONFIG_FLAG.

SET_PED_RANDOM_PROPS

Property Value
Native Name SET_PED_RANDOM_PROPS
Hash 0xE3318E0E
Return Type void
API Set server
Parameters ped (Ped)

Description: SET_PED_RANDOM_PROPS

This is the server-side RPC native equivalent of the client native SET_PED_RANDOM_PROPS.

Parameters

  • ped (Ped) — The ped handle.

SET_PLAYER_MODEL

Property Value
Native Name SET_PLAYER_MODEL
Hash 0x774A4C54
Return Type void
API Set server
Parameters player (Player), model (Hash)

Description: Set the model for a specific Player. Note that this will destroy the current Ped for the Player and create a new one, any reference to the old ped will be invalid after calling this. As per usual, make sure to request the model first and wait until it has loaded.

This is the server-side RPC native equivalent of the client native SET_PLAYER_MODEL.

Parameters

  • player (Player) — The player to set the model for
  • model (Hash) — The model to use

SET_VEHICLE_DOOR_BROKEN

Property Value
Native Name SET_VEHICLE_DOOR_BROKEN
Hash 0x8147FEA7
Return Type void
API Set server
Parameters vehicle (Vehicle), doorIndex (int), deleteDoor (BOOL)

Description: See eDoorId declared in SET_VEHICLE_DOOR_SHUT

This is the server-side RPC native equivalent of the client native SET_VEHICLE_DOOR_BROKEN.

SET_PED_RESET_FLAG

Property Value
Native Name SET_PED_RESET_FLAG
Hash 0xCFF6FF66
Return Type void
API Set server
Parameters ped (Ped), flagId (int), doReset (BOOL)

Description: PED::SET_PED_RESET_FLAG(PLAYER::PLAYER_PED_ID(), 240, 1); Known values:

This is the server-side RPC native equivalent of the client native SET_PED_RESET_FLAG.

_SET_PED_HEAD_OVERLAY_COLOR

Property Value
Native Name _SET_PED_HEAD_OVERLAY_COLOR
Hash 0x78935A27
Return Type void
API Set server
Parameters ped (Ped), overlayID (int), colorType (int), colorID (int), secondColorID (int)

Description: ``` Used for freemode (online) characters. Called after SET_PED_HEAD_OVERLAY().


**Note:**
You may need to call [`SetPedHeadBlendData`](#\_0x9414E18B9434C2FE) prior to calling this native in order for it to work.

**This is the server-side RPC native equivalent of the client native [\_SET_PED_HEAD_OVERLAY_COLOR](?\_0x497BF74A7B9CB952).**

### Parameters
- **`ped`** (`Ped`) — The ped entity
- **`overlayID`** (`int`) — An integer representing the overlay id
- **`colorType`** (`int`) — 1 for eyebrows, beards, makeup, and chest hair; 2 for blush and lipstick; and 0 otherwise, though not called in those cases.
- **`colorID`** (`int`) — An integer representing the primary color id
- **`secondColorID`** (`int`) — An integer representing the secondary color id

## _SET_PED_FACE_FEATURE

| Property | Value |
|----------|-------|
| Native Name | `_SET_PED_FACE_FEATURE` |
| Hash | `0x6C8D4458` |
| Return Type | `void` |
| API Set | `server` |
| Parameters | `ped` (Ped), `index` (int), `scale` (float) |

**Description:** Sets the various freemode face features, e.g. nose length, chin shape.
**Indexes (From 0 to 19):**
Parentheses indicate morph scale/direction as in (-1.0 to 1.0)

*   **0**: Nose Width (Thin/Wide)
*   **1**: Nose Peak (Up/Down)
*   **2**: Nose Length (Long/Short)
*   **3**: Nose Bone Curveness (Crooked/Curved)
*   **4**: Nose Tip (Up/Down)
*   **5**: Nose Bone Twist (Left/Right)
*   **6**: Eyebrow (Up/Down)
*   **7**: Eyebrow (In/Out)
*   **8**: Cheek Bones (Up/Down)
*   **9**: Cheek Sideways Bone Size (In/Out)
*   **10**: Cheek Bones Width (Puffed/Gaunt)
*   **11**: Eye Opening (Both) (Wide/Squinted)
*   **12**: Lip Thickness (Both) (Fat/Thin)
*   **13**: Jaw Bone Width (Narrow/Wide)
*   **14**: Jaw Bone Shape (Round/Square)
*   **15**: Chin Bone (Up/Down)
*   **16**: Chin Bone Length (In/Out or Backward/Forward)
*   **17**: Chin Bone Shape (Pointed/Square)
*   **18**: Chin Hole (Chin Bum)
*   **19**: Neck Thickness (Thin/Thick)
    **Note:**
    You may need to call [`SetPedHeadBlendData`](#\_0x9414E18B9434C2FE) prior to calling this native in order for it to work.

**This is the server-side RPC native equivalent of the client native [\_SET_PED_FACE_FEATURE](?\_0x71A5C1DBA060049E).**

### Parameters
- **`ped`** (`Ped`) — The ped entity
- **`index`** (`int`) — An integer ranging from 0 to 19
- **`scale`** (`float`) — A float ranging from -1.0 to 1.0

## SET_VEHICLE_CUSTOM_PRIMARY_COLOUR

| Property | Value |
|----------|-------|
| Native Name | `SET_VEHICLE_CUSTOM_PRIMARY_COLOUR` |
| Hash | `0x8DF9F9BC` |
| Return Type | `void` |
| API Set | `server` |
| Parameters | `vehicle` (Vehicle), `r` (int), `g` (int), `b` (int) |

**Description:** ```
p1, p2, p3 are RGB values for color (255,0,0 for Red, ect)

This is the server-side RPC native equivalent of the client native SET_VEHICLE_CUSTOM_PRIMARY_COLOUR.

SET_PED_PROP_INDEX

Property Value
Native Name SET_PED_PROP_INDEX
Hash 0x829F2E2
Return Type void
API Set server
Parameters ped (Ped), componentId (int), drawableId (int), textureId (int), attach (BOOL)

Description: This native is used to set prop variation on a ped. Components, drawables and textures IDs are related to the ped model.

MP Freemode list of props

0: Hats 1: Glasses 2: Ears 6: Watches 7: Bracelets List of Prop IDs

enum eAnchorPoints
{
ANCHOR_HEAD = 0, // "p_head"
ANCHOR_EYES = 1, // "p_eyes"
ANCHOR_EARS = 2, // "p_ears"
ANCHOR_MOUTH = 3, // "p_mouth"
ANCHOR_LEFT_HAND = 4, // "p_lhand"
ANCHOR_RIGHT_HAND = 5, // "p_rhand"
ANCHOR_LEFT_WRIST = 6, // "p_lwrist"
ANCHOR_RIGHT_WRIST = 7, // "p_rwrist"
ANCHOR_HIP = 8, // "p_lhip"
ANCHOR_LEFT_FOOT = 9, // "p_lfoot"
ANCHOR_RIGHT_FOOT = 10, // "p_rfoot"
ANCHOR_PH_L_HAND = 11, // "ph_lhand"
ANCHOR_PH_R_HAND = 12, // "ph_rhand"
NUM_ANCHORS = 13,
};

This is the server-side RPC native equivalent of the client native SET_PED_PROP_INDEX.

Parameters

SET_PED_ARMOUR

Property Value
Native Name SET_PED_ARMOUR
Hash 0x4E3A0CC4
Return Type void
API Set server
Parameters ped (Ped), amount (int)

Description: ``` Sets the armor of the specified ped. ped: The Ped to set the armor of. amount: A value between 0 and 100 indicating the value to set the Ped's armor to.


**This is the server-side RPC native equivalent of the client native [SET_PED_ARMOUR](?\_0xCEA04D83135264CC).**

## SET_PED_HAIR_TINT

| Property | Value |
|----------|-------|
| Native Name | `SET_PED_HAIR_TINT` |
| Hash | `0xA23FE32C` |
| Return Type | `void` |
| API Set | `server` |
| Parameters | `ped` (Ped), `colorID` (int), `highlightColorID` (int) |

**Description:** Sets the tint index for the hair on the specified ped.

NativeDB Introduced: v323


**This is the server-side RPC native equivalent of the client native [SET_PED_HAIR_TINT](?\_0x4CFFC65454C93A49).**

### Parameters
- **`ped`** (`Ped`) — The Ped whose hair tint is to be set.
- **`colorID`** (`int`) — The tint index for the primary hair color.
- **`highlightColorID`** (`int`) — The tint index for the hair highlight color.

## SET_PED_HEAD_OVERLAY

| Property | Value |
|----------|-------|
| Native Name | `SET_PED_HEAD_OVERLAY` |
| Hash | `0xD28DBA90` |
| Return Type | `void` |
| API Set | `server` |
| Parameters | `ped` (Ped), `overlayID` (int), `index` (int), `opacity` (float) |

**Description:** ```
OverlayID ranges from 0 to 12, index from 0 to _GET_NUM_OVERLAY_VALUES(overlayID)-1, and opacity from 0.0 to 1.0.
overlayID       Part                  Index, to disable
0               Blemishes             0 - 23, 255
1               Facial Hair           0 - 28, 255
2               Eyebrows              0 - 33, 255
3               Ageing                0 - 14, 255
4               Makeup                0 - 74, 255
5               Blush                 0 - 6, 255
6               Complexion            0 - 11, 255
7               Sun Damage            0 - 10, 255
8               Lipstick              0 - 9, 255
9               Moles/Freckles        0 - 17, 255
10              Chest Hair            0 - 16, 255
11              Body Blemishes        0 - 11, 255
12              Add Body Blemishes    0 - 1, 255

Note: You may need to call SetPedHeadBlendData prior to calling this native in order for it to work.

This is the server-side RPC native equivalent of the client native SET_PED_HEAD_OVERLAY.

Parameters

  • ped (Ped) — The ped entity
  • overlayID (int) — The overlay id displayed up above.
  • index (int) — An integer representing the index (from 0 to _GET_NUM_OVERLAY_VALUES(overlayID)-1)
  • opacity (float) — A float ranging from 0.0 to 1.0

SET_PED_INTO_VEHICLE

Property Value
Native Name SET_PED_INTO_VEHICLE
Hash 0x7500C79
Return Type void
API Set server
Parameters ped (Ped), vehicle (Vehicle), seatIndex (int)

Description: SET_PED_INTO_VEHICLE

This is the server-side RPC native equivalent of the client native SET_PED_INTO_VEHICLE.

Parameters

  • ped (Ped)
  • vehicle (Vehicle)
  • seatIndex (int) — See eSeatPosition declared in IS_VEHICLE_SEAT_FREE. -2 for the first available seat.

SET_VEHICLE_CUSTOM_SECONDARY_COLOUR

Property Value
Native Name SET_VEHICLE_CUSTOM_SECONDARY_COLOUR
Hash 0x9D77259E
Return Type void
API Set server
Parameters vehicle (Vehicle), r (int), g (int), b (int)

Description: ``` p1, p2, p3 are RGB values for color (255,0,0 for Red, ect)


**This is the server-side RPC native equivalent of the client native [SET_VEHICLE_CUSTOM_SECONDARY_COLOUR](?\_0x36CED73BFED89754).**

## SET_PED_COMPONENT_VARIATION

| Property | Value |
|----------|-------|
| Native Name | `SET_PED_COMPONENT_VARIATION` |
| Hash | `0xD4F7B05C` |
| Return Type | `void` |
| API Set | `server` |
| Parameters | `ped` (Ped), `componentId` (int), `drawableId` (int), `textureId` (int), `paletteId` (int) |

**Description:** This native is used to set component variation on a ped. Components, drawables and textures IDs are related to the ped model.

### MP Freemode list of components

**0**: Face
**1**: Mask
**2**: Hair
**3**: Torso
**4**: Leg
**5**: Parachute / bag
**6**: Shoes
**7**: Accessory
**8**: Undershirt
**9**: Kevlar
**10**: Badge
**11**: Torso 2
List of Component IDs

```cpp
// Components
enum ePedVarComp
{
PV_COMP_INVALID = 0xFFFFFFFF,
PV_COMP_HEAD = 0, // "HEAD"
PV_COMP_BERD = 1, // "BEARD"
PV_COMP_HAIR = 2, // "HAIR"
PV_COMP_UPPR = 3, // "UPPER"
PV_COMP_LOWR = 4, // "LOWER"
PV_COMP_HAND = 5, // "HAND"
PV_COMP_FEET = 6, // "FEET"
PV_COMP_TEEF = 7, // "TEETH"
PV_COMP_ACCS = 8, // "ACCESSORIES"
PV_COMP_TASK = 9, // "TASK"
PV_COMP_DECL = 10, // "DECL"
PV_COMP_JBIB = 11, // "JBIB"
PV_COMP_MAX = 12,
};

This is the server-side RPC native equivalent of the client native SET_PED_COMPONENT_VARIATION.

Parameters

SET_VEHICLE_NUMBER_PLATE_TEXT

Property Value
Native Name SET_VEHICLE_NUMBER_PLATE_TEXT
Hash 0x400F9556
Return Type void
API Set server
Parameters vehicle (Vehicle), plateText (char*)

Description: SET_VEHICLE_NUMBER_PLATE_TEXT

This is the server-side RPC native equivalent of the client native SET_VEHICLE_NUMBER_PLATE_TEXT.

Parameters

  • vehicle (Vehicle) — The vehicle to set the plate for
  • plateText (char*) — The text to set the plate to, 8 chars maximum

TASK_EVERYONE_LEAVE_VEHICLE

Property Value
Native Name TASK_EVERYONE_LEAVE_VEHICLE
Hash 0xC1971F30
Return Type void
API Set server
Parameters vehicle (Vehicle)

Description: TASK_EVERYONE_LEAVE_VEHICLE

This is the server-side RPC native equivalent of the client native TASK_EVERYONE_LEAVE_VEHICLE.

SET_VEHICLE_COLOURS

Property Value
Native Name SET_VEHICLE_COLOURS
Hash 0x57F24253
Return Type void
API Set server
Parameters vehicle (Vehicle), colorPrimary (int), colorSecondary (int)

Description: colorPrimary & colorSecondary are the paint indexes for the vehicle. For a list of valid paint indexes, view: pastebin.com/pwHci0xK

This is the server-side RPC native equivalent of the client native SET_VEHICLE_COLOURS.

TASK_HANDS_UP

Property Value
Native Name TASK_HANDS_UP
Hash 0x8DCC19C5
Return Type void
API Set server
Parameters ped (Ped), duration (int), facingPed (Ped), p3 (int), p4 (BOOL)

Description: ``` In the scripts, p3 was always -1. p3 seems to be duration or timeout of turn animation. Also facingPed can be 0 or -1 so ped will just raise hands up.


**This is the server-side RPC native equivalent of the client native [TASK_HANDS_UP](?\_0xF2EAB31979A7F910).**

## TASK_ENTER_VEHICLE

| Property | Value |
|----------|-------|
| Native Name | `TASK_ENTER_VEHICLE` |
| Hash | `0xB8689B4E` |
| Return Type | `void` |
| API Set | `server` |
| Parameters | `ped` (Ped), `vehicle` (Vehicle), `timeout` (int), `seatIndex` (int), `speed` (float), `flag` (int), `p6` (Any) |

**Description:** ```
speed 1.0 = walk, 2.0 = run
p5 1 = normal, 3 = teleport to vehicle, 8 = normal/carjack ped from seat, 16 = teleport directly into vehicle
p6 is always 0

This is the server-side RPC native equivalent of the client native TASK_ENTER_VEHICLE.

Parameters

  • ped (Ped)
  • vehicle (Vehicle)
  • timeout (int)
  • seatIndex (int) — See eSeatPosition declared in IS_VEHICLE_SEAT_FREE.
  • speed (float)
  • flag (int)
  • p6 (Any)

SET_VEHICLE_BODY_HEALTH

Property Value
Native Name SET_VEHICLE_BODY_HEALTH
Hash 0x920C2517
Return Type void
API Set server
Parameters vehicle (Vehicle), value (float)

Description: ``` p2 often set to 1000.0 in the decompiled scripts.


**This is the server-side RPC native equivalent of the client native [SET_VEHICLE_BODY_HEALTH](?\_0xB77D05AC8C78AADB).**

## TASK_COMBAT_PED

| Property | Value |
|----------|-------|
| Native Name | `TASK_COMBAT_PED` |
| Hash | `0xCB0D8932` |
| Return Type | `void` |
| API Set | `server` |
| Parameters | `ped` (Ped), `targetPed` (Ped), `p2` (int), `p3` (int) |

**Description:** ```
Makes the specified ped attack the target ped.
p2 should be 0
p3 should be 16

This is the server-side RPC native equivalent of the client native TASK_COMBAT_PED.

SET_PLAYER_INVINCIBLE

Property Value
Native Name SET_PLAYER_INVINCIBLE
Hash 0xDFB9A2A2
Return Type void
API Set server
Parameters player (Player), bInvincible (BOOL)

Description: Make the player impervious to all forms of damage.

This is the server-side RPC native equivalent of the client native SET_PLAYER_INVINCIBLE.

Parameters

  • player (Player) — The player index.
  • bInvincible (BOOL)

TASK_GO_TO_ENTITY

Property Value
Native Name TASK_GO_TO_ENTITY
Hash 0x374827C2
Return Type void
API Set server
Parameters entity (Entity), target (Entity), duration (int), distance (float), speed (float), p5 (float), p6 (int)

Description: ``` The entity will move towards the target until time is over (duration) or get in target's range (distance). p5 and p6 are unknown, but you could leave p5 = 1073741824 or 100 or even 0 (didn't see any difference but on the decompiled scripts, they use 1073741824 mostly) and p6 = 0 Note: I've only tested it on entity -> ped and target -> vehicle. It could work differently on other entities, didn't try it yet. Example: TASK::TASK_GO_TO_ENTITY(pedHandle, vehicleHandle, 5000, 4.0, 100, 1073741824, 0) Ped will run towards the vehicle for 5 seconds and stop when time is over or when he gets 4 meters(?) around the vehicle (with duration = -1, the task duration will be ignored).


**This is the server-side RPC native equivalent of the client native [TASK_GO_TO_ENTITY](?\_0x6A071245EB0D1882).**

## SET_VEHICLE_COLOUR_COMBINATION

| Property | Value |
|----------|-------|
| Native Name | `SET_VEHICLE_COLOUR_COMBINATION` |
| Hash | `0xA557AEAD` |
| Return Type | `void` |
| API Set | `server` |
| Parameters | `vehicle` (Vehicle), `colorCombination` (int) |

**Description:** Sets the selected vehicle's colors to their default value (specific variant specified using the colorCombination parameter).
Range of possible values for colorCombination is currently unknown, I couldn't find where these values are stored either (Disquse's guess was vehicles.meta but I haven't seen it in there.)

**This is the server-side RPC native equivalent of the client native [SET_VEHICLE_COLOUR_COMBINATION](?\_0x33E8CD3322E2FE31).**

### Parameters
- **`vehicle`** (`Vehicle`) — The vehicle to modify.
- **`colorCombination`** (`int`) — One of the default color values of the vehicle.

## SET_VEHICLE_ALARM

| Property | Value |
|----------|-------|
| Native Name | `SET_VEHICLE_ALARM` |
| Hash | `0x24877D84` |
| Return Type | `void` |
| API Set | `server` |
| Parameters | `vehicle` (Vehicle), `state` (BOOL) |

**Description:** SET_VEHICLE_ALARM

**This is the server-side RPC native equivalent of the client native [SET_VEHICLE_ALARM](?\_0xCDE5E70C1DDB954C).**

## SET_VEHICLE_DIRT_LEVEL

| Property | Value |
|----------|-------|
| Native Name | `SET_VEHICLE_DIRT_LEVEL` |
| Hash | `0x2B39128B` |
| Return Type | `void` |
| API Set | `server` |
| Parameters | `vehicle` (Vehicle), `dirtLevel` (float) |

**Description:** Sets the dirt level of the passed vehicle.

**This is the server-side RPC native equivalent of the client native [SET_VEHICLE_DIRT_LEVEL](?\_0x79D3B596FE44EE8B).**

### Parameters
- **`vehicle`** (`Vehicle`) — The vehicle to set.
- **`dirtLevel`** (`float`) — A number between 0.0 and 15.0 representing the vehicles dirt level.

## SET_VEHICLE_DOORS_LOCKED

| Property | Value |
|----------|-------|
| Native Name | `SET_VEHICLE_DOORS_LOCKED` |
| Hash | `0x4CDD35D0` |
| Return Type | `void` |
| API Set | `server` |
| Parameters | `vehicle` (Vehicle), `doorLockStatus` (int) |

**Description:** Locks the doors of a specified vehicle to a defined lock state, affecting how players and NPCs can interact with the vehicle.

NativeDB Introduced: v323


```cpp
enum eVehicleLockState {
// No specific lock state, vehicle behaves according to the game's default settings.
VEHICLELOCK_NONE = 0,
// Vehicle is fully unlocked, allowing free entry by players and NPCs.
VEHICLELOCK_UNLOCKED = 1,
// Vehicle is locked, preventing entry by players and NPCs.
VEHICLELOCK_LOCKED = 2,
// Vehicle locks out only players, allowing NPCs to enter.
VEHICLELOCK_LOCKOUT_PLAYER_ONLY = 3,
// Vehicle is locked once a player enters, preventing others from entering.
VEHICLELOCK_LOCKED_PLAYER_INSIDE = 4,
// Vehicle starts in a locked state, but may be unlocked through game events.
VEHICLELOCK_LOCKED_INITIALLY = 5,
// Forces the vehicle's doors to shut and lock.
VEHICLELOCK_FORCE_SHUT_DOORS = 6,
// Vehicle is locked but can still be damaged.
VEHICLELOCK_LOCKED_BUT_CAN_BE_DAMAGED = 7,
// Vehicle is locked, but its trunk/boot remains unlocked.
VEHICLELOCK_LOCKED_BUT_BOOT_UNLOCKED = 8,
// Vehicle is locked and does not allow passengers, except for the driver.
VEHICLELOCK_LOCKED_NO_PASSENGERS = 9,
// Vehicle is completely locked, preventing entry entirely, even if previously inside.
VEHICLELOCK_CANNOT_ENTER = 10
};

This is the server-side RPC native equivalent of the client native SET_VEHICLE_DOORS_LOCKED.

Parameters

  • vehicle (Vehicle) — The vehicle whose doors are to be locked.
  • doorLockStatus (int) — The lock state to apply to the vehicle's doors, see eVehicleLockState.

TASK_GO_STRAIGHT_TO_COORD

Property Value
Native Name TASK_GO_STRAIGHT_TO_COORD
Hash 0x80A9E7A7
Return Type void
API Set server
Parameters ped (Ped), x (float), y (float), z (float), speed (float), timeout (int), targetHeading (float), distanceToSlide (float)

Description: TASK_GO_STRAIGHT_TO_COORD

This is the server-side RPC native equivalent of the client native TASK_GO_STRAIGHT_TO_COORD.

Parameters

  • ped (Ped) — The ped handle.
  • x (float) — The x coordinate.
  • y (float) — The y coordinate.
  • z (float) — The z coordinate.
  • speed (float) — The ped movement speed.
  • timeout (int) — -1 , other values appear to break the ped movement.
  • targetHeading (float) — The heading you want the ped to be on x,y,z coord.
  • distanceToSlide (float) — The distance from x,y,z where the ped will start sliding.

TASK_SHOOT_AT_ENTITY

Property Value
Native Name TASK_SHOOT_AT_ENTITY
Hash 0xAC0631C9
Return Type void
API Set server
Parameters entity (Entity), target (Entity), duration (int), firingPattern (Hash)

Description: ``` //this part of the code is to determine at which entity the player is aiming, for example if you want to create a mod where you give orders to peds Entity aimedentity; Player player = PLAYER::PLAYER_ID(); PLAYER::_GET_AIMED_ENTITY(player, &aimedentity); //bg is an array of peds TASK::TASK_SHOOT_AT_ENTITY(bg[i], aimedentity, 5000, MISC::GET_HASH_KEY("FIRING_PATTERN_FULL_AUTO")); in practical usage, getting the entity the player is aiming at and then task the peds to shoot at the entity, at a button press event would be better. Firing Pattern Hash Information: https://pastebin.com/Px036isB


**This is the server-side RPC native equivalent of the client native [TASK_SHOOT_AT_ENTITY](?\_0x08DA95E8298AE772).**

## TASK_PLAY_ANIM_ADVANCED

| Property | Value |
|----------|-------|
| Native Name | `TASK_PLAY_ANIM_ADVANCED` |
| Hash | `0x3DDEB0E6` |
| Return Type | `void` |
| API Set | `server` |
| Parameters | `ped` (Ped), `animDictionary` (char*), `animationName` (char*), `posX` (float), `posY` (float), `posZ` (float), `rotX` (float), `rotY` (float), `rotZ` (float), `blendInSpeed` (float), `blendOutSpeed` (float), `duration` (int), `flag` (Any), `animTime` (float), `p14` (Any), `p15` (Any) |

**Description:** Similar in functionality to [`TASK_PLAY_ANIM`](#\_0xEA47FE3719165B94), except the position and rotation parameters let you specify the initial position and rotation of the task. The ped is teleported to the position specified.
[Animations list](https://alexguirre.github.io/animations-list/)

**This is the server-side RPC native equivalent of the client native [TASK_PLAY_ANIM_ADVANCED](?\_0x83CDB10EA29B370B).**

### Parameters
- **`ped`** (`Ped`) — The ped you want to play the animation
- **`animDictionary`** (`char*`) — The animation dictionary
- **`animationName`** (`char*`) — The animation name
- **`posX`** (`float`) — Initial X position of the task
- **`posY`** (`float`) — Initial Y position of the task
- **`posZ`** (`float`) — Initial Z position of the task
- **`rotX`** (`float`) — Initial X rotation of the task
- **`rotY`** (`float`) — Initial Y rotation of the task
- **`rotZ`** (`float`) — Initial Z rotation of the task
- **`blendInSpeed`** (`float`) — The speed at which the animation blends in. Lower is slower and higher is faster, 1.0 is normal, 8.0 is basically instant
- **`blendOutSpeed`** (`float`) — The speed at which the animation blends out. Lower is slower and higher is faster, 1.0 is normal, 8.0 is basically instant
- **`duration`** (`int`) — The duration of the animation in milliseconds. -1 will play the animation until canceled
- **`flag`** (`Any`) — See [`TASK_PLAY_ANIM`](#\_0xEA47FE3719165B94)
- **`animTime`** (`float`) — Value between 0.0 and 1.0, lets you start an animation from the given point
- **`p14`** (`Any`)
- **`p15`** (`Any`)

## SET_PLAYER_CONTROL

| Property | Value |
|----------|-------|
| Native Name | `SET_PLAYER_CONTROL` |
| Hash | `0xD17AFCD8` |
| Return Type | `void` |
| API Set | `server` |
| Parameters | `player` (Player), `bHasControl` (BOOL), `flags` (int) |

**Description:** ```
Flags:
SPC_AMBIENT_SCRIPT = (1 << 1),
SPC_CLEAR_TASKS = (1 << 2),
SPC_REMOVE_FIRES = (1 << 3),
SPC_REMOVE_EXPLOSIONS = (1 << 4),
SPC_REMOVE_PROJECTILES = (1 << 5),
SPC_DEACTIVATE_GADGETS = (1 << 6),
SPC_REENABLE_CONTROL_ON_DEATH = (1 << 7),
SPC_LEAVE_CAMERA_CONTROL_ON = (1 << 8),
SPC_ALLOW_PLAYER_DAMAGE = (1 << 9),
SPC_DONT_STOP_OTHER_CARS_AROUND_PLAYER = (1 << 10),
SPC_PREVENT_EVERYBODY_BACKOFF = (1 << 11),
SPC_ALLOW_PAD_SHAKE = (1 << 12)
See: https://alloc8or.re/gta5/doc/enums/eSetPlayerControlFlag.txt

This is the server-side RPC native equivalent of the client native SET_PLAYER_CONTROL.

TASK_LEAVE_VEHICLE

Property Value
Native Name TASK_LEAVE_VEHICLE
Hash 0x7B1141C6
Return Type void
API Set server
Parameters ped (Ped), vehicle (Vehicle), flags (int)

Description: ``` Flags from decompiled scripts: 0 = normal exit and closes door. 1 = normal exit and closes door. 16 = teleports outside, door kept closed. (This flag does not seem to work for the front seats in buses, NPCs continue to exit normally) 64 = normal exit and closes door, maybe a bit slower animation than 0. 256 = normal exit but does not close the door. 4160 = ped is throwing himself out, even when the vehicle is still. 262144 = ped moves to passenger seat first, then exits normally Others to be tried out: 320, 512, 131072.


**This is the server-side RPC native equivalent of the client native [TASK_LEAVE_VEHICLE](?\_0xD3DBCE61A490BE02).**

## TASK_WARP_PED_INTO_VEHICLE

| Property | Value |
|----------|-------|
| Native Name | `TASK_WARP_PED_INTO_VEHICLE` |
| Hash | `0x65D4A35D` |
| Return Type | `void` |
| API Set | `server` |
| Parameters | `ped` (Ped), `vehicle` (Vehicle), `seatIndex` (int) |

**Description:** ```
NativeDB Introduced: v323

Warp a ped into a vehicle. Note: It's better to use TASK_ENTER_VEHICLE with the flag "warp" flag instead of this native.

This is the server-side RPC native equivalent of the client native TASK_WARP_PED_INTO_VEHICLE.

Parameters

  • ped (Ped) — The Ped to be warped into the vehicle.
  • vehicle (Vehicle) — The target vehicle into which the ped will be warped.
  • seatIndex (int) — See eSeatPosition declared in IS_VEHICLE_SEAT_FREE.

TASK_REACT_AND_FLEE_PED

Property Value
Native Name TASK_REACT_AND_FLEE_PED
Hash 0x8A632BD8
Return Type void
API Set server
Parameters ped (Ped), fleeTarget (Ped)

Description: TASK_REACT_AND_FLEE_PED

This is the server-side RPC native equivalent of the client native TASK_REACT_AND_FLEE_PED.

TASK_LEAVE_ANY_VEHICLE

Property Value
Native Name TASK_LEAVE_ANY_VEHICLE
Hash 0xDBDD79FA
Return Type void
API Set server
Parameters ped (Ped), p1 (int), flags (int)

Description: Flags are the same flags used in TASK_LEAVE_VEHICLE

This is the server-side RPC native equivalent of the client native TASK_LEAVE_ANY_VEHICLE.

TASK_SHOOT_AT_COORD

Property Value
Native Name TASK_SHOOT_AT_COORD
Hash 0x601C22E3
Return Type void
API Set server
Parameters ped (Ped), x (float), y (float), z (float), duration (int), firingPattern (Hash)

Description: ``` Firing Pattern Hash Information: https://pastebin.com/Px036isB


**This is the server-side RPC native equivalent of the client native [TASK_SHOOT_AT_COORD](?\_0x46A6CC01E0826106).**

## TASK_GO_TO_COORD_ANY_MEANS

| Property | Value |
|----------|-------|
| Native Name | `TASK_GO_TO_COORD_ANY_MEANS` |
| Hash | `0xF91DF93B` |
| Return Type | `void` |
| API Set | `server` |
| Parameters | `ped` (Ped), `x` (float), `y` (float), `z` (float), `fMoveBlendRatio` (float), `vehicle` (Vehicle), `bUseLongRangeVehiclePathing` (BOOL), `drivingFlags` (int), `fMaxRangeToShootTargets` (float) |

**Description:** Tells a ped to go to a coord by any means.

```cpp
enum eDrivingMode {
DF_StopForCars = 1,
DF_StopForPeds = 2,
DF_SwerveAroundAllCars = 4,
DF_SteerAroundStationaryCars = 8,
DF_SteerAroundPeds = 16,
DF_SteerAroundObjects = 32,
DF_DontSteerAroundPlayerPed = 64,
DF_StopAtLights = 128,
DF_GoOffRoadWhenAvoiding = 256,
DF_DriveIntoOncomingTraffic = 512,
DF_DriveInReverse = 1024,
// If pathfinding fails, cruise randomly instead of going on a straight line
DF_UseWanderFallbackInsteadOfStraightLine = 2048,
DF_AvoidRestrictedAreas = 4096,
// These only work on MISSION_CRUISE
DF_PreventBackgroundPathfinding = 8192,
DF_AdjustCruiseSpeedBasedOnRoadSpeed = 16384,
DF_UseShortCutLinks =  262144,
DF_ChangeLanesAroundObstructions = 524288,
// cruise tasks ignore this anyway--only used for goto's
DF_UseSwitchedOffNodes =  2097152,
// if you're going to be primarily driving off road
DF_PreferNavmeshRoute =  4194304,
// Only works for planes using MISSION_GOTO, will cause them to drive along the ground instead of fly
DF_PlaneTaxiMode =  8388608,
DF_ForceStraightLine = 16777216,
DF_UseStringPullingAtJunctions = 33554432,
DF_AvoidHighways = 536870912,
DF_ForceJoinInRoadDirection = 1073741824,
// Standard driving mode. stops for cars, peds, and lights, goes around stationary obstructions
DRIVINGMODE_STOPFORCARS = 786603, // DF_StopForCars|DF_StopForPeds|DF_SteerAroundObjects|DF_SteerAroundStationaryCars|DF_StopAtLights|DF_UseShortCutLinks|DF_ChangeLanesAroundObstructions,		// Obey lights too
// Like the above, but doesn't steer around anything in its way - will only wait instead.
DRIVINGMODE_STOPFORCARS_STRICT = 262275, // DF_StopForCars|DF_StopForPeds|DF_StopAtLights|DF_UseShortCutLinks, // Doesn't deviate an inch.
// Default "alerted" driving mode. drives around everything, doesn't obey lights
DRIVINGMODE_AVOIDCARS = 786469, // DF_SwerveAroundAllCars|DF_SteerAroundObjects|DF_UseShortCutLinks|DF_ChangeLanesAroundObstructions|DF_StopForCars,
// Very erratic driving. difference between this and AvoidCars is that it doesn't use the brakes at ALL to help with steering
DRIVINGMODE_AVOIDCARS_RECKLESS = 786468, // DF_SwerveAroundAllCars|DF_SteerAroundObjects|DF_UseShortCutLinks|DF_ChangeLanesAroundObstructions,
// Smashes through everything
DRIVINGMODE_PLOUGHTHROUGH = 262144, // DF_UseShortCutLinks
// Drives normally except for the fact that it ignores lights
DRIVINGMODE_STOPFORCARS_IGNORELIGHTS = 786475, // DF_StopForCars|DF_SteerAroundStationaryCars|DF_StopForPeds|DF_SteerAroundObjects|DF_UseShortCutLinks|DF_ChangeLanesAroundObstructions
// Try to swerve around everything, but stop for lights if necessary
DRIVINGMODE_AVOIDCARS_OBEYLIGHTS = 786597, // DF_SwerveAroundAllCars|DF_StopAtLights|DF_SteerAroundObjects|DF_UseShortCutLinks|DF_ChangeLanesAroundObstructions|DF_StopForCars
// Swerve around cars, be careful around peds, and stop for lights
DRIVINGMODE_AVOIDCARS_STOPFORPEDS_OBEYLIGHTS = 786599 // DF_SwerveAroundAllCars|DF_StopAtLights|DF_StopForPeds|DF_SteerAroundObjects|DF_UseShortCutLinks|DF_ChangeLanesAroundObstructions|DF_StopForCars
};

This is the server-side RPC native equivalent of the client native TASK_GO_TO_COORD_ANY_MEANS.

Parameters

  • ped (Ped) — The Ped Handle.
  • x (float) — The goto target coordinate.
  • y (float) — The goto target coordinate.
  • z (float) — The goto target coordinate.
  • fMoveBlendRatio (float) — 0.0 = still, 1.0 = walk, 2.0 = run, 3.0 = sprint.
  • vehicle (Vehicle) — If defined, the pedestrian will only move if said vehicle exists. If you don't want any sort of association, just set it to 0.
  • bUseLongRangeVehiclePathing (BOOL) — Setting to true tells the vehicle to use longrange vehicle pathing.
  • drivingFlags (int) — See eDrivingMode enum.
  • fMaxRangeToShootTargets (float) — Determines the maximum distance at which the Ped will engage in combat with threatening targets.

TASK_PLAY_ANIM

Property Value
Native Name TASK_PLAY_ANIM
Hash 0x5AB552C6
Return Type void
API Set server
Parameters ped (Ped), animDictionary (char*), animationName (char*), blendInSpeed (float), blendOutSpeed (float), duration (int), flag (int), playbackRate (float), lockX (BOOL), lockY (BOOL), lockZ (BOOL)

Description: Animations list

enum eScriptedAnimFlags
{
AF_LOOPING = 1,
AF_HOLD_LAST_FRAME = 2,
AF_REPOSITION_WHEN_FINISHED = 4,
AF_NOT_INTERRUPTABLE = 8,
AF_UPPERBODY = 16,
AF_SECONDARY = 32,
AF_REORIENT_WHEN_FINISHED = 64,
AF_ABORT_ON_PED_MOVEMENT = 128,
AF_ADDITIVE = 256,
AF_TURN_OFF_COLLISION = 512,
AF_OVERRIDE_PHYSICS = 1024,
AF_IGNORE_GRAVITY = 2048,
AF_EXTRACT_INITIAL_OFFSET = 4096,
AF_EXIT_AFTER_INTERRUPTED = 8192,
AF_TAG_SYNC_IN = 16384,
AF_TAG_SYNC_OUT = 32768,
AF_TAG_SYNC_CONTINUOUS = 65536,
AF_FORCE_START = 131072,
AF_USE_KINEMATIC_PHYSICS = 262144,
AF_USE_MOVER_EXTRACTION = 524288,
AF_HIDE_WEAPON = 1048576,
AF_ENDS_IN_DEAD_POSE = 2097152,
AF_ACTIVATE_RAGDOLL_ON_COLLISION = 4194304,
AF_DONT_EXIT_ON_DEATH = 8388608,
AF_ABORT_ON_WEAPON_DAMAGE = 16777216,
AF_DISABLE_FORCED_PHYSICS_UPDATE = 33554432,
AF_PROCESS_ATTACHMENTS_ON_START = 67108864,
AF_EXPAND_PED_CAPSULE_FROM_SKELETON = 134217728,
AF_USE_ALTERNATIVE_FP_ANIM = 268435456,
AF_BLENDOUT_WRT_LAST_FRAME = 536870912,
AF_USE_FULL_BLENDING = 1073741824
}

This is the server-side RPC native equivalent of the client native TASK_PLAY_ANIM.

Parameters

  • ped (Ped) — The ped you want to play the animation
  • animDictionary (char*) — The animation dictionary
  • animationName (char*) — The animation name
  • blendInSpeed (float) — The speed at which the animation blends in. Lower is slower and higher is faster, 1.0 is normal, 8.0 is basically instant
  • blendOutSpeed (float) — The speed at which the animation blends out. Lower is slower and higher is faster, 1.0 is normal, 8.0 is basically instant
  • duration (int) — The duration of the animation in milliseconds. -1 will play the animation until canceled
  • flag (int) — The animation flags (see enum)
  • playbackRate (float) — The playback rate (between 0.0 and 1.0)
  • lockX (BOOL)
  • lockY (BOOL)
  • lockZ (BOOL)

TASK_DRIVE_BY

Property Value
Native Name TASK_DRIVE_BY
Hash 0x2B84D1C4
Return Type void
API Set server
Parameters driverPed (Ped), targetPed (Ped), targetVehicle (Vehicle), targetX (float), targetY (float), targetZ (float), distanceToShoot (float), pedAccuracy (int), p8 (BOOL), firingPattern (Hash)

Description: ``` Example: TASK::TASK_DRIVE_BY(l_467[1/22/], PLAYER::PLAYER_PED_ID(), 0, 0.0, 0.0, 2.0, 300.0, 100, 0, ${firing_pattern_burst_fire_driveby}); Needs working example. Doesn't seem to do anything. I marked p2 as targetVehicle as all these shooting related tasks seem to have that in common. I marked p6 as distanceToShoot as if you think of GTA's Logic with the native SET_VEHICLE_SHOOT natives, it won't shoot till it gets within a certain distance of the target. I marked p7 as pedAccuracy as it seems it's mostly 100 (Completely Accurate), 75, 90, etc. Although this could be the ammo count within the gun, but I highly doubt it. I will change this comment once I find out if it's ammo count or not.


**This is the server-side RPC native equivalent of the client native [TASK_DRIVE_BY](?\_0x2F8AF0E82773A171).**
Back to documentation