From the reference libraryRedM

ENTITY Natives - Part 3 of 6

natives/ENTITY/ENTITY_natives_part3.md

ENTITY Natives - Part 3 of 6

Red Dead Redemption 3 Native Functions Reference

Namespace: ENTITY
Natives in this file: 50
Total natives in namespace: 268
Generated from: RDR3natives JSON data


PLACE_ENTITY_ON_GROUND_PROPERLY

Property Value
Native Name PLACE_ENTITY_ON_GROUND_PROPERLY
Hash 0x9587913B9E772D29
Return Type BOOL
Build 1207
Parameters entity (Entity), p1 (BOOL)

Parameters

  • entity (Entity)
  • p1 (BOOL)

Usage

Lua (Direct):

local result = PlaceEntityOnGroundProperly(entity, p1)

Lua (Hash):

local result = Citizen.InvokeNative(0x9587913B9E772D29, entity, p1)

PLAY_ENTITY_ANIM

Property Value
Native Name PLAY_ENTITY_ANIM
Hash 0xDC6D22FAB76D4874
Return Type BOOL
Build 1207
Parameters entity (Entity), animName (char*), animDict (char*), p3 (float), loop (BOOL), stayInAnim (BOOL), p6 (BOOL), delta (float), bitset (Any)

Description: https://github.com/femga/rdr3_discoveries/tree/master/animations

Usage

Lua (Direct):

local result = PlayEntityAnim(entity, animName, animDict, p3, loop, stayInAnim, p6, delta, bitset)

Lua (Hash):

local result = Citizen.InvokeNative(0xDC6D22FAB76D4874, entity, animName, animDict, p3, loop, stayInAnim, p6, delta, bitset)

REMOVE_FORCED_OBJECT

Property Value
Native Name REMOVE_FORCED_OBJECT
Hash 0x553FA683F2BCD814
Return Type void
Build 1207
Parameters p0 (Any), p1 (Any), p2 (Any), p3 (Any), p4 (Any)

Parameters

  • p0 (Any)
  • p1 (Any)
  • p2 (Any)
  • p3 (Any)
  • p4 (Any)

Usage

Lua (Direct):

RemoveForcedObject(p0, p1, p2, p3, p4)

Lua (Hash):

Citizen.InvokeNative(0x553FA683F2BCD814, p0, p1, p2, p3, p4)

REMOVE_MODEL_HIDE

Property Value
Native Name REMOVE_MODEL_HIDE
Hash 0x3F38A98576F6213A
Return Type void
Build 1207
Parameters p0 (Any), p1 (Any), p2 (Any), p3 (Any), p4 (Any), p5 (Any)

Parameters

  • p0 (Any)
  • p1 (Any)
  • p2 (Any)
  • p3 (Any)
  • p4 (Any)
  • p5 (Any)

Usage

Lua (Direct):

RemoveModelHide(p0, p1, p2, p3, p4, p5)

Lua (Hash):

Citizen.InvokeNative(0x3F38A98576F6213A, p0, p1, p2, p3, p4, p5)

REMOVE_MODEL_SWAP

Property Value
Native Name REMOVE_MODEL_SWAP
Hash 0x824E1C26A14CB817
Return Type void
Build 1207
Parameters x (float), y (float), z (float), radius (float), originalModel (Hash), newModel (Hash), p6 (BOOL)

Parameters

  • x (float)
  • y (float)
  • z (float)
  • radius (float)
  • originalModel (Hash)
  • newModel (Hash)
  • p6 (BOOL)

Usage

Lua (Direct):

RemoveModelSwap(x, y, z, radius, originalModel, newModel, p6)

Lua (Hash):

Citizen.InvokeNative(0x824E1C26A14CB817, x, y, z, radius, originalModel, newModel, p6)

RESET_ENTITY_ALPHA

Property Value
Native Name RESET_ENTITY_ALPHA
Hash 0x744B9EF44779D9AB
Return Type void
Build 1207
Parameters entity (Entity)

Parameters

  • entity (Entity)

Usage

Lua (Direct):

ResetEntityAlpha(entity)

Lua (Hash):

Citizen.InvokeNative(0x744B9EF44779D9AB, entity)

SET_CAN_AUTO_VAULT_ON_ENTITY

Property Value
Native Name SET_CAN_AUTO_VAULT_ON_ENTITY
Hash 0x80646744FA88F9D7
Return Type void
Build 1207
Parameters entity (Entity), toggle (BOOL)

Parameters

  • entity (Entity)
  • toggle (BOOL)

Usage

Lua (Direct):

SetCanAutoVaultOnEntity(entity, toggle)

Lua (Hash):

Citizen.InvokeNative(0x80646744FA88F9D7, entity, toggle)

SET_CAN_CLIMB_ON_ENTITY

Property Value
Native Name SET_CAN_CLIMB_ON_ENTITY
Hash 0x24AED2A608F93C4C
Return Type void
Build 1207
Parameters entity (Entity), toggle (BOOL)

Parameters

  • entity (Entity)
  • toggle (BOOL)

Usage

Lua (Direct):

SetCanClimbOnEntity(entity, toggle)

Lua (Hash):

Citizen.InvokeNative(0x24AED2A608F93C4C, entity, toggle)

SET_ENTITY_AS_MISSION_ENTITY

Property Value
Native Name SET_ENTITY_AS_MISSION_ENTITY
Hash 0xDC19C288082E586E
Return Type void
Build 1207
Parameters entity (Entity), scriptHostObject (BOOL), grabFromOtherScript (BOOL)

Description: Makes the specified entity (ped, vehicle or object) persistent. Persistent entities will not automatically be removed by the engine.

Usage

Lua (Direct):

SetEntityAsMissionEntity(entity, scriptHostObject, grabFromOtherScript)

Lua (Hash):

Citizen.InvokeNative(0xDC19C288082E586E, entity, scriptHostObject, grabFromOtherScript)

SET_ENTITY_CAN_BE_DAMAGED

Property Value
Native Name SET_ENTITY_CAN_BE_DAMAGED
Hash 0x0D06D522B90E861F
Return Type void
Build 1207
Parameters entity (Entity), toggle (BOOL)

Parameters

  • entity (Entity)
  • toggle (BOOL)

Usage

Lua (Direct):

SetEntityCanBeDamaged(entity, toggle)

Lua (Hash):

Citizen.InvokeNative(0x0D06D522B90E861F, entity, toggle)

SET_ENTITY_CAN_BE_DAMAGED_BY_RELATIONSHIP_GROUP

Property Value
Native Name SET_ENTITY_CAN_BE_DAMAGED_BY_RELATIONSHIP_GROUP
Hash 0x0EF1AFB18649E015
Return Type void
Build 1207
Parameters entity (Entity), bCanBeDamaged (BOOL), relGroup (Hash)

Parameters

  • entity (Entity)
  • bCanBeDamaged (BOOL)
  • relGroup (Hash)

Usage

Lua (Direct):

SetEntityCanBeDamagedByRelationshipGroup(entity, bCanBeDamaged, relGroup)

Lua (Hash):

Citizen.InvokeNative(0x0EF1AFB18649E015, entity, bCanBeDamaged, relGroup)

SET_ENTITY_CAN_BE_TARGETED_WITHOUT_LOS

Description: Sets whether the entity can be targeted without being in line-of-sight.

Property Value
Native Name SET_ENTITY_CAN_BE_TARGETED_WITHOUT_LOS
Hash 0x6D09F32E284D0FB7
Return Type void
Build 1207
Parameters entity (Entity), toggle (BOOL)

Parameters

  • entity (Entity)
  • toggle (BOOL)

Usage

Lua (Direct):

SetEntityCanBeTargetedWithoutLos(entity, toggle)

Lua (Hash):

Citizen.InvokeNative(0x6D09F32E284D0FB7, entity, toggle)

SET_ENTITY_COLLISION

Property Value
Native Name SET_ENTITY_COLLISION
Hash 0xF66F820909453B8C
Return Type void
Build 1207
Parameters entity (Entity), toggle (BOOL), keepPhysics (BOOL)

Parameters

  • entity (Entity)
  • toggle (BOOL)
  • keepPhysics (BOOL)

Usage

Lua (Direct):

SetEntityCollision(entity, toggle, keepPhysics)

Lua (Hash):

Citizen.InvokeNative(0xF66F820909453B8C, entity, toggle, keepPhysics)

SET_ENTITY_COMPLETELY_DISABLE_COLLISION

Property Value
Native Name SET_ENTITY_COMPLETELY_DISABLE_COLLISION
Hash 0xE0580EC84813875A
Return Type void
Build 1207
Parameters entity (Entity), toggle (BOOL), keepPhysics (BOOL)

Parameters

  • entity (Entity)
  • toggle (BOOL)
  • keepPhysics (BOOL)

Usage

Lua (Direct):

SetEntityCompletelyDisableCollision(entity, toggle, keepPhysics)

Lua (Hash):

Citizen.InvokeNative(0xE0580EC84813875A, entity, toggle, keepPhysics)

SET_ENTITY_DYNAMIC

Property Value
Native Name SET_ENTITY_DYNAMIC
Hash 0xFBFC4473F66CE344
Return Type void
Build 1207
Parameters entity (Entity), toggle (BOOL)

Parameters

  • entity (Entity)
  • toggle (BOOL)

Usage

Lua (Direct):

SetEntityDynamic(entity, toggle)

Lua (Hash):

Citizen.InvokeNative(0xFBFC4473F66CE344, entity, toggle)

SET_ENTITY_HAS_GRAVITY

Property Value
Native Name SET_ENTITY_HAS_GRAVITY
Hash 0x0CEDB728A1083FA7
Return Type void
Build 1207
Parameters entity (Entity), toggle (BOOL)

Parameters

  • entity (Entity)
  • toggle (BOOL)

Usage

Lua (Direct):

SetEntityHasGravity(entity, toggle)

Lua (Hash):

Citizen.InvokeNative(0x0CEDB728A1083FA7, entity, toggle)

SET_ENTITY_HEADING

Property Value
Native Name SET_ENTITY_HEADING
Hash 0xCF2B9C0645C4651B
Return Type void
Build 1207
Parameters entity (Entity), heading (float)

Parameters

  • entity (Entity)
  • heading (float)

Usage

Lua (Direct):

SetEntityHeading(entity, heading)

Lua (Hash):

Citizen.InvokeNative(0xCF2B9C0645C4651B, entity, heading)

SET_ENTITY_INVINCIBLE

Description: Sets a ped or an object totally invincible. It doesn't take any kind of damage. Peds will not ragdoll on explosions.

Property Value
Native Name SET_ENTITY_INVINCIBLE
Hash 0xA5C38736C426FCB8
Return Type void
Build 1207
Parameters entity (Entity), toggle (BOOL)

Parameters

  • entity (Entity)
  • toggle (BOOL)

Usage

Lua (Direct):

SetEntityInvincible(entity, toggle)

Lua (Hash):

Citizen.InvokeNative(0xA5C38736C426FCB8, entity, toggle)

SET_ENTITY_IS_TARGET_PRIORITY

Property Value
Native Name SET_ENTITY_IS_TARGET_PRIORITY
Hash 0x0A5D170C44CB2189
Return Type void
Build 1207
Parameters entity (Entity), p1 (BOOL), p2 (float)

Parameters

  • entity (Entity)
  • p1 (BOOL)
  • p2 (float)

Usage

Lua (Direct):

SetEntityIsTargetPriority(entity, p1, p2)

Lua (Hash):

Citizen.InvokeNative(0x0A5D170C44CB2189, entity, p1, p2)

SET_ENTITY_LOAD_COLLISION_FLAG

Property Value
Native Name SET_ENTITY_LOAD_COLLISION_FLAG
Hash 0x9B9EE31AED48072E
Return Type void
Build 1207
Parameters entity (Entity), toggle (BOOL)

Parameters

  • entity (Entity)
  • toggle (BOOL)

Usage

Lua (Direct):

SetEntityLoadCollisionFlag(entity, toggle)

Lua (Hash):

Citizen.InvokeNative(0x9B9EE31AED48072E, entity, toggle)

SET_ENTITY_LOD_DIST

Description: LOD distance can be 0 to 0xFFFF (higher values will result in 0xFFFF) as it is actually stored as a 16-bit value (aka uint16_t).

Property Value
Native Name SET_ENTITY_LOD_DIST
Hash 0x5FB407F0A7C877BF
Return Type void
Build 1207
Parameters entity (Entity), value (int)

Parameters

  • entity (Entity)
  • value (int)

Usage

Lua (Direct):

SetEntityLodDist(entity, value)

Lua (Hash):

Citizen.InvokeNative(0x5FB407F0A7C877BF, entity, value)

SET_ENTITY_MOTION_BLUR

Property Value
Native Name SET_ENTITY_MOTION_BLUR
Hash 0x516C6ABD18322B63
Return Type void
Build 1207
Parameters entity (Entity), toggle (BOOL)

Parameters

  • entity (Entity)
  • toggle (BOOL)

Usage

Lua (Direct):

SetEntityMotionBlur(entity, toggle)

Lua (Hash):

Citizen.InvokeNative(0x516C6ABD18322B63, entity, toggle)

SET_ENTITY_NOWEAPONDECALS

Description: Old name: _SET_ENTITY_DECALS_DISABLED

Property Value
Native Name SET_ENTITY_NOWEAPONDECALS
Hash 0xC64E597783BE9A1D
Return Type void
Build 1207
Parameters entity (Entity), toggle (BOOL)

Parameters

  • entity (Entity)
  • toggle (BOOL)

Usage

Lua (Direct):

SetEntityNoweapondecals(entity, toggle)

Lua (Hash):

Citizen.InvokeNative(0xC64E597783BE9A1D, entity, toggle)

SET_ENTITY_NO_COLLISION_ENTITY

Property Value
Native Name SET_ENTITY_NO_COLLISION_ENTITY
Hash 0xE037BF068223C38D
Return Type void
Build 1207
Parameters entity1 (Entity), entity2 (Entity), thisFrameOnly (BOOL)

Parameters

  • entity1 (Entity)
  • entity2 (Entity)
  • thisFrameOnly (BOOL)

Usage

Lua (Direct):

SetEntityNoCollisionEntity(entity1, entity2, thisFrameOnly)

Lua (Hash):

Citizen.InvokeNative(0xE037BF068223C38D, entity1, entity2, thisFrameOnly)

SET_ENTITY_ONLY_DAMAGED_BY_PLAYER

Property Value
Native Name SET_ENTITY_ONLY_DAMAGED_BY_PLAYER
Hash 0x473598683095D430
Return Type void
Build 1207
Parameters entity (Entity), toggle (BOOL)

Parameters

  • entity (Entity)
  • toggle (BOOL)

Usage

Lua (Direct):

SetEntityOnlyDamagedByPlayer(entity, toggle)

Lua (Hash):

Citizen.InvokeNative(0x473598683095D430, entity, toggle)

SET_ENTITY_ONLY_DAMAGED_BY_RELATIONSHIP_GROUP

Property Value
Native Name SET_ENTITY_ONLY_DAMAGED_BY_RELATIONSHIP_GROUP
Hash 0x6C1F6AA2F0ADD104
Return Type void
Build 1207
Parameters entity (Entity), p1 (BOOL), relationshipGroup (Hash)

Parameters

  • entity (Entity)
  • p1 (BOOL)
  • relationshipGroup (Hash)

Usage

Lua (Direct):

SetEntityOnlyDamagedByRelationshipGroup(entity, p1, relationshipGroup)

Lua (Hash):

Citizen.InvokeNative(0x6C1F6AA2F0ADD104, entity, p1, relationshipGroup)

SET_ENTITY_QUATERNION

Property Value
Native Name SET_ENTITY_QUATERNION
Hash 0x100E7007D13E3687
Return Type void
Build 1207
Parameters entity (Entity), x (float), y (float), z (float), w (float)

Parameters

  • entity (Entity)
  • x (float)
  • y (float)
  • z (float)
  • w (float)

Usage

Lua (Direct):

SetEntityQuaternion(entity, x, y, z, w)

Lua (Hash):

Citizen.InvokeNative(0x100E7007D13E3687, entity, x, y, z, w)

SET_ENTITY_RENDER_SCORCHED

Property Value
Native Name SET_ENTITY_RENDER_SCORCHED
Hash 0x85B8A7534E44BC23
Return Type void
Build 1207
Parameters entity (Entity), toggle (BOOL)

Parameters

  • entity (Entity)
  • toggle (BOOL)

Usage

Lua (Direct):

SetEntityRenderScorched(entity, toggle)

Lua (Hash):

Citizen.InvokeNative(0x85B8A7534E44BC23, entity, toggle)

SET_ENTITY_REQUIRES_MORE_EXPENSIVE_RIVER_CHECK

Property Value
Native Name SET_ENTITY_REQUIRES_MORE_EXPENSIVE_RIVER_CHECK
Hash 0x850C940EE3E7B8B5
Return Type void
Build 1207
Parameters entity (Entity), toggle (BOOL)

Parameters

  • entity (Entity)
  • toggle (BOOL)

Usage

Lua (Direct):

SetEntityRequiresMoreExpensiveRiverCheck(entity, toggle)

Lua (Hash):

Citizen.InvokeNative(0x850C940EE3E7B8B5, entity, toggle)

SET_ENTITY_ROTATION

Property Value
Native Name SET_ENTITY_ROTATION
Hash 0x9CC8314DFEDE441E
Return Type void
Build 1207
Parameters entity (Entity), pitch (float), roll (float), yaw (float), rotationOrder (int), p5 (BOOL)

Parameters

  • entity (Entity)
  • pitch (float)
  • roll (float)
  • yaw (float)
  • rotationOrder (int)
  • p5 (BOOL)

Usage

Lua (Direct):

SetEntityRotation(entity, pitch, roll, yaw, rotationOrder, p5)

Lua (Hash):

Citizen.InvokeNative(0x9CC8314DFEDE441E, entity, pitch, roll, yaw, rotationOrder, p5)

SET_ENTITY_SHOULD_FREEZE_WAITING_ON_COLLISION

Description: Old name: _SET_ENTITY_CLEANUP_BY_ENGINE

Property Value
Native Name SET_ENTITY_SHOULD_FREEZE_WAITING_ON_COLLISION
Hash 0x740CB4F3F602C9F4
Return Type void
Build 1207
Parameters entity (Entity), toggle (BOOL)

Parameters

  • entity (Entity)
  • toggle (BOOL)

Usage

Lua (Direct):

SetEntityShouldFreezeWaitingOnCollision(entity, toggle)

Lua (Hash):

Citizen.InvokeNative(0x740CB4F3F602C9F4, entity, toggle)

SET_ENTITY_VISIBLE

Property Value
Native Name SET_ENTITY_VISIBLE
Hash 0x1794B4FCC84D812F
Return Type void
Build 1207
Parameters entity (Entity), toggle (BOOL)

Parameters

  • entity (Entity)
  • toggle (BOOL)

Usage

Lua (Direct):

SetEntityVisible(entity, toggle)

Lua (Hash):

Citizen.InvokeNative(0x1794B4FCC84D812F, entity, toggle)

WOULD_ENTITY_BE_OCCLUDED

Property Value
Native Name WOULD_ENTITY_BE_OCCLUDED
Hash 0x3546FAB293FF2981
Return Type BOOL
Build 1207
Parameters entityModelHash (Hash), x (float), y (float), z (float), p4 (BOOL)

Parameters

  • entityModelHash (Hash)
  • x (float)
  • y (float)
  • z (float)
  • p4 (BOOL)

Usage

Lua (Direct):

local result = WouldEntityBeOccluded(entityModelHash, x, y, z, p4)

Lua (Hash):

local result = Citizen.InvokeNative(0x3546FAB293FF2981, entityModelHash, x, y, z, p4)

_0x002AAC783ED323ED

Property Value
Native Name _0x002AAC783ED323ED
Hash 0x002AAC783ED323ED
Return Type void
Build 1207
Parameters p0 (Any), p1 (Any)

Parameters

  • p0 (Any)
  • p1 (Any)

Usage

Lua (Direct):

_0x002AAC783ED323ED(p0, p1)

Lua (Hash):

Citizen.InvokeNative(0x002AAC783ED323ED, p0, p1)

_0x007AAC783ED323ED

Property Value
Native Name _0x007AAC783ED323ED
Hash 0x007AAC783ED323ED
Return Type void
Build 1207
Parameters p0 (Any), p1 (Any), p2 (Any)

Parameters

  • p0 (Any)
  • p1 (Any)
  • p2 (Any)

Usage

Lua (Direct):

_0x007AAC783ED323ED(p0, p1, p2)

Lua (Hash):

Citizen.InvokeNative(0x007AAC783ED323ED, p0, p1, p2)

_0x0939E773925C4719

Property Value
Native Name _0x0939E773925C4719
Hash 0x0939E773925C4719
Return Type void
Build 1207
Parameters None

Usage

Lua (Direct):

_0x0939E773925C4719()

Lua (Hash):

Citizen.InvokeNative(0x0939E773925C4719, )

End of ENTITY natives part 3

SCRIPT_OVERRIDE_ENTITY_LOOT_TABLE_PERMANENT

Property Value
Native Name SCRIPT_OVERRIDE_ENTITY_LOOT_TABLE_PERMANENT
Hash 0x8C03CD6B5E0E85E8
Return Type BOOL
Build 1207
API Set client
Parameters entity (Entity), lootTable (Hash)

Description: Sets the loot table an entity will carry. Returns true if loot table has been successfully set. Returns false if entity is not a ped or object. https://github.com/femga/rdr3_discoveries/blob/master/AI/EVENTS/loot_rewards.lua

Usage

Lua (Direct):

local result = ScriptOverrideEntityLootTablePermanent(entity, lootTable)

Lua (Hash):

local result = Citizen.InvokeNative(0x8C03CD6B5E0E85E8, entity, lootTable)

SET_ENTITY_ALPHA

Property Value
Native Name SET_ENTITY_ALPHA
Hash 0x0DF7692B1D9E7BA7
Return Type void
Build 1207
API Set client
Parameters entity (Entity), alphaLevel (int), skin (BOOL)

Description: skin - everything alpha except skin Set entity alpha level. Ranging from 0 to 255 but changes occur after every 20 percent (after every 51).

Usage

Lua (Direct):

SetEntityAlpha(entity, alphaLevel, skin)

Lua (Hash):

Citizen.InvokeNative(0x0DF7692B1D9E7BA7, entity, alphaLevel, skin)

SET_ENTITY_ALWAYS_PRERENDER

Property Value
Native Name SET_ENTITY_ALWAYS_PRERENDER
Hash 0xACAD101E1FB66689
Return Type void
Build 1207
Parameters entity (Entity), toggle (BOOL)

Usage

Lua (Direct):

SetEntityAlwaysPrerender(entity, toggle)

Lua (Hash):

Citizen.InvokeNative(0xACAD101E1FB66689, entity, toggle)

SET_ENTITY_AS_NO_LONGER_NEEDED

Property Value
Native Name SET_ENTITY_AS_NO_LONGER_NEEDED
Hash 0x4971D2F8162B9674
Return Type void
Build 1207
API Set client
Parameters entity (Entity*)

Description: Marks the specified entity (ped, vehicle or object) as no longer needed. Entities marked as no longer needed, will be deleted as the engine sees fit.

Usage

Lua (Direct):

SetEntityAsNoLongerNeeded(entity)

Lua (Hash):

Citizen.InvokeNative(0x4971D2F8162B9674, entity)

SET_ENTITY_COORDS

Property Value
Native Name SET_ENTITY_COORDS
Hash 0x06843DA7060A026B
Return Type void
Build 1207
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.

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.

Usage

Lua (Direct):

SetEntityCoords(entity, xPos, yPos, zPos, alive, deadFlag, ragdollFlag, clearArea)

Lua (Hash):

Citizen.InvokeNative(0x06843DA7060A026B, entity, xPos, yPos, zPos, alive, deadFlag, ragdollFlag, clearArea)

Examples

local ped = PlayerPedId()
local currentPos = GetEntityCoords(ped)
print(currentPos)

SetEntityCoords(ped, 674.883, 548.269, 133.94, false, false, false, true)

currentPos = GetEntityCoords(ped)
print(currentPos) -- changed!
const ped = PlayerPedId();
let currentPos = GetEntityCoords(ped, false);
console.log(`${currentPos[0]} ${currentPos[1]} ${currentPos[2]}`);

SetEntityCoords(ped, 674.883, 548.269, 133.94, false, false, false, true);

currentPos = GetEntityCoords(ped, false);
console.log(`${currentPos[0]} ${currentPos[1]} ${currentPos[2]}`); // changed!
using static CitizenFX.Core.Native.API;
// ...

int ped = PlayerPedId();
Vector3 currentPos = GetEntityCoords(ped, false);
Debug.WriteLine($"{currentPos}");

SetEntityCoords(ped, 674.883f, 548.269f, 133.94f, false, false, false, true);

currentPos = GetEntityCoords(ped, false);
Debug.WriteLine($"{currentPos}"); // changed!

// or the preferred use of C# wrapper
Debug.WriteLine($"{Game.PlayerPed.Position}");

Game.PlayerPed.Position = new Vector3(674.883f, 548.269f, 133.94f);

Debug.WriteLine($"{Game.PlayerPed.Position}"); // changed!

SET_ENTITY_COORDS_NO_OFFSET

Property Value
Native Name SET_ENTITY_COORDS_NO_OFFSET
Hash 0x239A3351AC1DA385
Return Type void
Build 1207
Parameters entity (Entity), x (float), y (float), z (float), keepTasks (BOOL), keepIK (BOOL), doWarp (BOOL)

Description: Teleports an entity to specified coordinates directly, with options to maintain certain behaviors post-teleportation.

Note:

  • This native allows precise placement of entities without the usual adjustments for collision or interaction with the environment that may occur with other teleportation natives.
  • The keepTasks and keepIK parameters are specifically useful for maintaining the current state of a ped, ensuring actions or animations are not abruptly stopped due to the teleportation.
  • Setting doWarp to false is useful when simulating continuous movement or when the entity should interact with its immediate surroundings upon arrival.

Parameters

  • entity (Entity) — The entity to reposition.
  • x (float) — X coordinate for the new position.
  • y (float) — Y coordinate for the new position.
  • z (float) — Z coordinate for the new position.
  • keepTasks (BOOL) — If true, the tasks currently assigned to the ped are not removed upon teleportation. Applies only to peds.
  • keepIK (BOOL) — If true, the Inverse Kinematics (IK) on the ped are not reset upon teleportation. Applies only to peds.
  • doWarp (BOOL) — If false, the entity will maintain continuous motion and will not clear contacts nor create space for itself upon teleportation.

Usage

Lua (Direct):

SetEntityCoordsNoOffset(entity, x, y, z, keepTasks, keepIK, doWarp)

Lua (Hash):

Citizen.InvokeNative(0x239A3351AC1DA385, entity, x, y, z, keepTasks, keepIK, doWarp)

SET_ENTITY_HEALTH

Property Value
Native Name SET_ENTITY_HEALTH
Hash 0xAC2767ED8BDFAB15
Return Type void
Build 1207
API Set client

Description: [note: Peds cannot have their health set higher than their core attribute allow.] [note: If entityKilledBy is a vehicle, internally it will automatically attribute the kill to the driver]

Sets the entity's health to the specified healthAmount, setting this to 0 will kill the entity (if it's killable).

Usage

Lua (Direct):

SetEntityHealth()

Lua (Hash):

Citizen.InvokeNative(0xAC2767ED8BDFAB15)

SET_ENTITY_MAX_HEALTH

Property Value
Native Name SET_ENTITY_MAX_HEALTH
Hash 0x166E7CF68597D8B5
Return Type void
Build 1207
Parameters entity (Entity), value (int)

Description: ``` For instance: ENTITY::SET_ENTITY_MAX_HEALTH(PLAYER::PLAYER_PED_ID(), 200); // director_mode.c4: 67849


### Usage

**Lua (Direct):**
```lua
SetEntityMaxHealth(entity, value)

Lua (Hash):

Citizen.InvokeNative(0x166E7CF68597D8B5, entity, value)

SET_ENTITY_PROOFS

Property Value
Native Name SET_ENTITY_PROOFS
Hash 0xFAEE099C6F890BB8
Return Type void
Build 1207
Parameters entity (Entity), bulletProof (BOOL), fireProof (BOOL), explosionProof (BOOL), collisionProof (BOOL), meleeProof (BOOL), steamProof (BOOL), p7 (BOOL), drownProof (BOOL)

Description: https://github.com/femga/rdr3_discoveries/tree/master/AI/ENTITY_PROOFS BOOL p2: handles an additional special proofs flag, so it simply indicates whether it should be enabled or disabled, not sure what exactly it proofs the entity from though

Usage

Lua (Direct):

SetEntityProofs(entity, bulletProof, fireProof, explosionProof, collisionProof, meleeProof, steamProof, p7, drownProof)

Lua (Hash):

Citizen.InvokeNative(0xFAEE099C6F890BB8, entity, bulletProof, fireProof, explosionProof, collisionProof, meleeProof, steamProof, p7, drownProof)

SET_ENTITY_VELOCITY

Property Value
Native Name SET_ENTITY_VELOCITY
Hash 0x1C99BB7B6E96D16F
Return Type void
Build 1207
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.


### Usage

**Lua (Direct):**
```lua
SetEntityVelocity(entity, x, y, z)

Lua (Hash):

Citizen.InvokeNative(0x1C99BB7B6E96D16F, entity, x, y, z)

SET_OBJECT_AS_NO_LONGER_NEEDED

Property Value
Native Name SET_OBJECT_AS_NO_LONGER_NEEDED
Hash 0x3AE22DEB5BA5A3E6
Return Type void
Build 1207
Parameters object (Object*)

Description: ``` This is an alias of SET_ENTITY_AS_NO_LONGER_NEEDED.


### Usage

**Lua (Direct):**
```lua
SetObjectAsNoLongerNeeded(object)

Lua (Hash):

Citizen.InvokeNative(0x3AE22DEB5BA5A3E6, object)

SET_PED_AS_NO_LONGER_NEEDED

Property Value
Native Name SET_PED_AS_NO_LONGER_NEEDED
Hash 0x2595DD4236549CE3
Return Type void
Build 1207
Parameters ped (Ped*)

Description: ``` This is an alias of SET_ENTITY_AS_NO_LONGER_NEEDED.


### Usage

**Lua (Direct):**
```lua
SetPedAsNoLongerNeeded(ped)

Lua (Hash):

Citizen.InvokeNative(0x2595DD4236549CE3, ped)

SET_VEHICLE_AS_NO_LONGER_NEEDED

Property Value
Native Name SET_VEHICLE_AS_NO_LONGER_NEEDED
Hash 0x629BFA74418D6239
Return Type void
Build 1207
Parameters vehicle (Vehicle*)

Description: ``` This is an alias of SET_ENTITY_AS_NO_LONGER_NEEDED.


### Usage

**Lua (Direct):**
```lua
SetVehicleAsNoLongerNeeded(vehicle)

Lua (Hash):

Citizen.InvokeNative(0x629BFA74418D6239, vehicle)

STOP_ENTITY_ANIM

Property Value
Native Name STOP_ENTITY_ANIM
Hash 0x786591D986DE9159
Return Type Any
Build 1207
API Set client

Description: Doesn't actually return anything.

Usage

Lua (Direct):

local result = StopEntityAnim()

Lua (Hash):

local result = Citizen.InvokeNative(0x786591D986DE9159)
Back to documentation