Static methods

@:native("AttachEntityBoneToEntityBone")staticAttachEntityBoneToEntityBone(entity1:Dynamic, entity2:Dynamic, entityBone:Int, entityBone2:Int, p4:Bool, p5:Bool):Dynamic

@:native("AttachEntityBoneToEntityBonePhysically")staticAttachEntityBoneToEntityBonePhysically(entity1:Dynamic, entity2:Dynamic, entityBone:Int, entityBone2:Int, p4:Bool, p5:Bool):Dynamic

@:native("DoesEntityHaveAnimDirector")staticDoesEntityHaveAnimDirector(entity:Dynamic):Bool

NativeDB Introduced: v2699

@:native("DoesEntityHaveSkeletonData")staticDoesEntityHaveSkeletonData(entity:Dynamic):Bool

NativeDB Introduced: v2699

@:native("EnableEntityUnk")staticEnableEntityUnk(entity:Dynamic):Dynamic

ENABLE_*

@:native("GetEntityBoneCount")staticGetEntityBoneCount(entity:Dynamic):Int

@:native("GetEntityBonePosition_2")staticGetEntityBonePosition2(entity:Dynamic, boneIndex:Int):Dynamic

Gets the world rotation of the specified bone of the specified entity.
This native is used in casinoroulette.c but I don't know yet what is the difference with _GET_ENTITY_BONE_ROTATION

@:native("GetEntityBoneRotation")staticGetEntityBoneRotation(entity:Dynamic, boneIndex:Int):Dynamic

Gets the world rotation of the specified bone of the specified entity.

@:native("GetEntityBoneRotationLocal")staticGetEntityBoneRotationLocal(entity:Dynamic, boneIndex:Int):Dynamic

Gets the local rotation of the specified bone of the specified entity.

NativeDB Introduced: v1734

@:native("GetEntityPickup")staticGetEntityPickup(entity:Dynamic, modelHash:Int):Dynamic

GET_ENTITY_*

Seems to return the handle of the entity's portable pickup.

NativeDB Introduced: v1180

@:native("GetEntityProofs")staticGetEntityProofs(entity:Dynamic, bulletProof:Dynamic, fireProof:Dynamic, explosionProof:Dynamic, collisionProof:Dynamic, meleeProof:Dynamic, steamProof:Dynamic, p7:Dynamic, drownProof:Dynamic):Bool

NativeDB Introduced: v1604

@:native("HasEntityClearLosToEntity_2")staticHasEntityClearLosToEntity2(entity1:Dynamic, entity2:Dynamic, traceType:Int):Dynamic

NativeDB Introduced: v1868

@:native("SetEntityAngularVelocity")staticSetEntityAngularVelocity(entity:Dynamic, x:Float, y:Float, z:Float):Dynamic

NativeDB Introduced: v2372

@:native("SetEntityCleanupByEngine")staticSetEntityCleanupByEngine(entity:Dynamic, toggle:Bool):Dynamic

True means it can be deleted by the engine when switching lobbies/missions/etc, false means the script is expected to clean it up.

@:native("SetEntityDecalsDisabled")staticSetEntityDecalsDisabled(entity:Dynamic, p1:Bool):Dynamic

SET_ENTITY_*

@:native("ApplyForceToEntity")staticapplyForceToEntity(entity:Dynamic, forceType:Int, x:Float, y:Float, z:Float, offX:Float, offY:Float, offZ:Float, boneIndex:Int, isDirectionRel:Bool, ignoreUpVec:Bool, isForceRel:Bool, p12:Bool, p13:Bool):Dynamic

Applies a force to the specified entity.

enum eForceType
{
    MinForce = 0,
    MaxForceRot = 1,
    MinForce2 = 2,
    MaxForceRot2 = 3,
    ForceNoRot = 4,
    ForceRotPlusForce = 5
}

Research/documentation on the gtaforums can be found here and here.

@:native("ApplyForceToEntityCenterOfMass")staticapplyForceToEntityCenterOfMass(entity:Dynamic, forceType:Int, x:Float, y:Float, z:Float, p5:Bool, isDirectionRel:Bool, isForceRel:Bool, p8:Bool):Dynamic

@:native("AttachEntityToEntity")staticattachEntityToEntity(entity1:Dynamic, entity2:Dynamic, boneIndex:Int, xPos:Float, yPos:Float, zPos:Float, xRot:Float, yRot:Float, zRot:Float, p9:Bool, useSoftPinning:Bool, collision:Bool, isPed:Bool, rotationOrder:Int, syncRot:Bool):Dynamic

Attach an entity to the specified entity.

@:native("AttachEntityToEntityPhysically")staticattachEntityToEntityPhysically(entity1:Dynamic, entity2:Dynamic, boneIndex1:Int, boneIndex2:Int, xPos1:Float, yPos1:Float, zPos1:Float, xPos2:Float, yPos2:Float, zPos2:Float, xRot:Float, yRot:Float, zRot:Float, breakForce:Float, fixedRot:Bool, p15:Bool, collision:Bool, teleport:Bool, p18:Int):Dynamic

breakForce is the amount of force required to break the bond.
p14 - is always 1 in scripts
p15 - is 1 or 0 in scripts - unknown what it does
p16 - controls collision between the two entities (FALSE disables collision).
p17 - do not teleport entity to be attached to the position of the bone Index of the target entity (if 1, entity will not be teleported to target bone)
p18 - is always 2 in scripts.

@:native("ClearEntityLastDamageEntity")staticclearEntityLastDamageEntity(entity:Dynamic):Dynamic

This native could affect the arguments of the CEventNetworkEntityDamage game event, by clearing the damaging entity before the event is fired.

@:native("CreateForcedObject")staticcreateForcedObject(x:Float, y:Float, z:Float, p3:Dynamic, modelHash:Int, p5:Bool):Dynamic

@:native("CreateModelHide")staticcreateModelHide(x:Float, y:Float, z:Float, radius:Float, model:Int, p5:Bool):Dynamic

p5 = sets as true in scripts  
Same as the comment for CREATE_MODEL_SWAP unless for some reason p5 affects it this only works with objects as well.  
Network players do not see changes done with this.  

@:native("CreateModelHideExcludingScriptObjects")staticcreateModelHideExcludingScriptObjects(x:Float, y:Float, z:Float, radius:Float, model:Int, p5:Bool):Dynamic

@:native("CreateModelSwap")staticcreateModelSwap(x:Float, y:Float, z:Float, radius:Float, originalModel:Int, newModel:Int, p6:Bool):Dynamic

Only works with objects!  
Network players do not see changes done with this.  

@:native("DeleteEntity")staticdeleteEntity(entity:Dynamic):Dynamic

Delete the specified entity, and invalidate the passed handle (i.e., the in/out argument). You might want to check if the entity exists before with DOES_ENTITY_EXIST.

@:native("DetachEntity")staticdetachEntity(entity:Dynamic, dynamic_:Bool, collision:Bool):Dynamic

@:native("DoesEntityBelongToThisScript")staticdoesEntityBelongToThisScript(entity:Dynamic, p2:Bool):Bool

@:native("DoesEntityExist")staticdoesEntityExist(entity:Dynamic):Bool

Checks whether an entity exists in the game world.

@:native("DoesEntityHaveDrawable")staticdoesEntityHaveDrawable(entity:Dynamic):Bool

@:native("DoesEntityHavePhysics")staticdoesEntityHavePhysics(entity:Dynamic):Bool

@:native("FindAnimEventPhase")staticfindAnimEventPhase(animDictionary:String, animName:String, p2:String, p3:Dynamic, p4:Dynamic):Bool

In the script "player_scene_t_bbfight.c4":  
"if (ENTITY::FIND_ANIM_EVENT_PHASE(&l_16E, &l_19F[v_4/ *16* /], v_9, &v_A, &v_B))"  
-- &l_16E (p0) is requested as an anim dictionary earlier in the script.  
-- &l_19F[v_4/ *16* /] (p1) is used in other natives in the script as the "animation" param.  
-- v_9 (p2) is instantiated as "victim_fall"; I'm guessing that's another anim  
--v_A and v_B (p3 & p4) are both set as -1.0, but v_A is used immediately after this native for:   
"if (v_A < ENTITY::GET_ENTITY_ANIM_CURRENT_TIME(...))"  
Both v_A and v_B are seemingly used to contain both Vector3's and floats, so I can't say what either really is other than that they are both output parameters. p4 looks more like a *Vector3 though  
-alphazolam  

Animations list

@:native("ForceEntityAiAndAnimationUpdate")staticforceEntityAiAndAnimationUpdate(entity:Dynamic):Dynamic

Based on carmod_shop script decompile this takes a vehicle parameter. It is called when repair is done on initial enter.  

@:native("FreezeEntityPosition")staticfreezeEntityPosition(entity:Dynamic, toggle:Bool):Dynamic

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.

@:native("GetAnimDuration")staticgetAnimDuration(animDict:String, animName:String):Float

@:native("GetCollisionNormalOfLastHitForEntity")staticgetCollisionNormalOfLastHitForEntity(entity:Dynamic):Dynamic

@:native("GetEntityAlpha")staticgetEntityAlpha(entity:Dynamic):Int

@:native("GetEntityAnimCurrentTime")staticgetEntityAnimCurrentTime(entity:Dynamic, animDict:String, animName:String):Float

Returns a float value representing animation's current playtime with respect to its total playtime. This value increasing in a range from [0 to 1] and wrap back to 0 when it reach 1.  
Example:  
0.000000 - mark the starting of animation.  
0.500000 - mark the midpoint of the animation.  
1.000000 - mark the end of animation.  

Animations list

@:native("GetEntityAnimTotalTime")staticgetEntityAnimTotalTime(entity:Dynamic, animDict:String, animName:String):Float

Returns a float value representing animation's total playtime in milliseconds.  
Example:  
GET_ENTITY_ANIM_TOTAL_TIME(PLAYER_ID(),"amb@world_human_yoga@female@base","base_b")   
return 20800.000000  

Animations list

@:native("GetEntityAttachedTo")staticgetEntityAttachedTo(entity:Dynamic):Dynamic

@:native("GetEntityBoneIndexByName")staticgetEntityBoneIndexByName(entity:Dynamic, boneName:String):Int

Returns the index of the bone. If the bone was not found, -1 will be returned.   
list:  
pastebin.com/D7JMnX1g  
BoneNames:  
	chassis,  
	windscreen,  
	seat_pside_r,  
	seat_dside_r,  
	bodyshell,  
	suspension_lm,  
	suspension_lr,  
	platelight,  
	attach_female,  
	attach_male,  
	bonnet,  
	boot,  
	chassis_dummy,	//Center of the dummy  
	chassis_Control,	//Not found yet  
	door_dside_f,	//Door left, front  
	door_dside_r,	//Door left, back  
	door_pside_f,	//Door right, front  
	door_pside_r,	//Door right, back  
	Gun_GripR,  
	windscreen_f,  
	platelight,	//Position where the light above the numberplate is located  
	VFX_Emitter,  
	window_lf,	//Window left, front  
	window_lr,	//Window left, back  
	window_rf,	//Window right, front  
	window_rr,	//Window right, back  
	engine,	//Position of the engine  
	gun_ammo,  
	ROPE_ATTATCH,	//Not misspelled. In script "finale_heist2b.c4".  
	wheel_lf,	//Wheel left, front  
	wheel_lr,	//Wheel left, back  
	wheel_rf,	//Wheel right, front  
	wheel_rr,	//Wheel right, back  
	exhaust,	//Exhaust. shows only the position of the stock-exhaust  
	overheat,	//A position on the engine(not exactly sure, how to name it)  
	misc_e,	//Not a car-bone.  
	seat_dside_f,	//Driver-seat  
	seat_pside_f,	//Seat next to driver  
	Gun_Nuzzle,  
	seat_r  
I doubt that the function is case-sensitive, since I found a "Chassis" and a "chassis". - Just tested: Definitely not case-sensitive.  

@:native("GetEntityCanBeDamaged")staticgetEntityCanBeDamaged(entity:Dynamic):Bool

@:native("GetEntityCollisionDisabled")staticgetEntityCollisionDisabled(entity:Dynamic):Bool

@:native("GetEntityCoords")staticgetEntityCoords(entity:Dynamic, alive:Bool):Dynamic

Gets the current coordinates (world position) for a specified entity.

@:native("GetEntityForwardVector")staticgetEntityForwardVector(entity:Dynamic):Dynamic

Gets the entity's forward vector.

@:native("GetEntityForwardX")staticgetEntityForwardX(entity:Dynamic):Float

Gets the X-component of the entity's forward vector.  

@:native("GetEntityForwardY")staticgetEntityForwardY(entity:Dynamic):Float

Gets the Y-component of the entity's forward vector.  

@:native("GetEntityHeading")staticgetEntityHeading(entity:Dynamic):Float

Returns the heading of the entity in degrees. Also know as the "Yaw" of an entity.

@:native("GetEntityHeadingFromEulers")staticgetEntityHeadingFromEulers(entity:Dynamic):Float

Gets the heading of the entity physics in degrees, which tends to be more accurate than just GET_ENTITY_HEADING. This can be clearly seen while, for example, ragdolling a ped/player.

@:native("GetEntityHealth")staticgetEntityHealth(entity:Dynamic):Int

Returns an integer value of entity's current health.
Example of range for ped:
- Player [0 to 200]
- Ped [100 to 200]
- Vehicle [0 to 1000]
- Object [0 to 1000]
Health is actually a float value but this native casts it to int.
In order to get the actual value, do:
float health = *(float *)(entityAddress + 0x280);

@:native("GetEntityHeight")staticgetEntityHeight(entity:Dynamic, X:Float, Y:Float, Z:Float, atTop:Bool, inWorldCoords:Bool):Float

@:native("GetEntityHeightAboveGround")staticgetEntityHeightAboveGround(entity:Dynamic):Float

Return height (z-dimension) above ground.   
Example: The pilot in a titan plane is 1.844176 above ground.  
How can i convert it to meters?  
Everything seems to be in meters, probably this too.  

@:native("GetEntityLodDist")staticgetEntityLodDist(entity:Dynamic):Int

Returns the LOD distance of an entity.  

@:native("GetEntityMatrix")staticgetEntityMatrix(entity:Dynamic, forwardVector:Dynamic, rightVector:Dynamic, upVector:Dynamic, position:Dynamic):Dynamic

@:native("GetEntityMaxHealth")staticgetEntityMaxHealth(entity:Dynamic):Int

Return an integer value of entity's maximum health.  
Example:  
- Player = 200  

@:native("GetEntityModel")staticgetEntityModel(entity:Dynamic):Int

Returns the model hash from an entity.

@:native("GetEntityPitch")staticgetEntityPitch(entity:Dynamic):Float

@:native("GetEntityPopulationType")staticgetEntityPopulationType(entity:Dynamic):Int

A population type, from the following enum: https://alloc8or.re/gta5/doc/enums/ePopulationType.txt

@:native("GetEntityQuaternion")staticgetEntityQuaternion(entity:Dynamic, x:Dynamic, y:Dynamic, z:Dynamic, w:Dynamic):Dynamic

w is the correct parameter name!  

@:native("GetEntityRoll")staticgetEntityRoll(entity:Dynamic):Float

Displays the current ROLL axis of the entity [-180.0000/180.0000+]  
(Sideways Roll) such as a vehicle tipped on its side  

@:native("GetEntityRotation")staticgetEntityRotation(entity:Dynamic, rotationOrder:Int):Dynamic

NOTE: What you use for rotationOrder when getting must be the same as rotationOrder when setting the rotation.

enum eRotationOrder {
    // Rotate around the z-axis, then the y-axis and finally the x-axis.
    ROT_ZYX = 0,
    // Rotate around the y-axis, then the z-axis and finally the x-axis.
    ROT_YZX = 1,
    // Rotate around the z-axis, then the x-axis and finally the y-axis.
    ROT_ZXY = 2,
    // Rotate around the x-axis, then the z-axis and finally the y-axis.
    ROT_XZY = 3,
    // Rotate around the y-axis, then the x-axis and finally the z-axis.
    ROT_YXZ = 4,
    // Rotate around the x-axis, then the y-axis and finally the z-axis.
    ROT_XYZ = 5,
}

@:native("GetEntityRotationVelocity")staticgetEntityRotationVelocity(entity:Dynamic):Dynamic

@:native("GetEntityScript")staticgetEntityScript(entity:Dynamic, script:Dynamic):String

All ambient entities in-world seem to have the same value for the second argument (Any *script), depending on when the scripthook was activated/re-activated. I've seen numbers from ~5 to almost 70 when the value was translated with to_string. The function return value seems to always be 0.  

@:native("GetEntitySpeed")staticgetEntitySpeed(entity:Dynamic):Float

Get the speed of a entity.

@:native("GetEntitySpeedVector")staticgetEntitySpeedVector(entity:Dynamic, relative:Bool):Dynamic

Relative can be used for getting speed relative to the frame of the vehicle, to determine for example, if you are going in reverse (-y speed) or not (+y speed).  

@:native("GetEntitySubmergedLevel")staticgetEntitySubmergedLevel(entity:Dynamic):Float

Get how much of the entity is submerged.  1.0f is whole entity.  

@:native("GetEntityType")staticgetEntityType(entity:Dynamic):Int

Returns:
0 = no entity
1 = ped
2 = vehicle
3 = object

@:native("GetEntityUprightValue")staticgetEntityUprightValue(entity:Dynamic):Float

@:native("GetEntityVelocity")staticgetEntityVelocity(entity:Dynamic):Dynamic

@:native("GetLastMaterialHitByEntity")staticgetLastMaterialHitByEntity(entity:Dynamic):Int

@:native("GetNearestPlayerToEntity")staticgetNearestPlayerToEntity(entity:Dynamic):Dynamic

@:native("GetNearestPlayerToEntityOnTeam")staticgetNearestPlayerToEntityOnTeam(entity:Dynamic, team:Int):Dynamic

@:native("GetObjectIndexFromEntityIndex")staticgetObjectIndexFromEntityIndex(entity:Dynamic):Dynamic

Simply returns whatever is passed to it (Regardless of whether the handle is valid or not).  

@:native("GetOffsetFromEntityGivenWorldCoords")staticgetOffsetFromEntityGivenWorldCoords(entity:Dynamic, posX:Float, posY:Float, posZ:Float):Dynamic

Converts world coords (posX - Z) to coords relative to the entity  
Example:  
posX = 50  
posY = 1000  
posZ = 60  
Entity's coords are: x=30, y=1000, z=60.  
All three returned coords will then be in range of [-20,20] depending on rotation of the entity.  

@:native("GetOffsetFromEntityInWorldCoords")staticgetOffsetFromEntityInWorldCoords(entity:Dynamic, offsetX:Float, offsetY:Float, offsetZ:Float):Dynamic

Offset values are relative to the entity.  
x = left/right  
y = forward/backward  
z = up/down  

@:native("GetPedIndexFromEntityIndex")staticgetPedIndexFromEntityIndex(entity:Dynamic):Dynamic

Simply returns whatever is passed to it (Regardless of whether the handle is valid or not).  

@:native("GetVehicleIndexFromEntityIndex")staticgetVehicleIndexFromEntityIndex(entity:Dynamic):Dynamic

Simply returns whatever is passed to it (Regardless of whether the handle is valid or not).  

@:native("GetWorldPositionOfEntityBone")staticgetWorldPositionOfEntityBone(entity:Dynamic, boneIndex:Int):Dynamic

Returns the coordinates of an entity-bone.  

@:native("HasAnimEventFired")statichasAnimEventFired(entity:Dynamic, actionHash:Int):Bool

if (ENTITY::HAS_ANIM_EVENT_FIRED(PLAYER::PLAYER_PED_ID(), MISC::GET_HASH_KEY("CreateObject")))

@:native("HasCollisionLoadedAroundEntity")statichasCollisionLoadedAroundEntity(entity:Dynamic):Bool

@:native("HasEntityAnimFinished")statichasEntityAnimFinished(entity:Dynamic, animDict:String, animName:String, p3:Int):Bool

P3 is always 3 as far as i cant tell  

Animations list

@:native("HasEntityBeenDamagedByAnyObject")statichasEntityBeenDamagedByAnyObject(entity:Dynamic):Bool

@:native("HasEntityBeenDamagedByAnyPed")statichasEntityBeenDamagedByAnyPed(entity:Dynamic):Bool

@:native("HasEntityBeenDamagedByAnyVehicle")statichasEntityBeenDamagedByAnyVehicle(entity:Dynamic):Bool

@:native("HasEntityBeenDamagedByEntity")statichasEntityBeenDamagedByEntity(entity:Dynamic, damager:Dynamic, bCheckDamagerVehicle:Bool):Bool

@:native("HasEntityClearLosToEntity")statichasEntityClearLosToEntity(entity1:Dynamic, entity2:Dynamic, flags:Int):Bool

Checks if entity1 has a clear line of sight to entity2. So a simple raycast which if it collides with any of the given colliderTypes returns false.

The direction of the check matters with for example bushes, so checking from inside to outside a bush with traceType 256 returns true, but the other way around returns false.

@:native("HasEntityClearLosToEntityInFront")statichasEntityClearLosToEntityInFront(entity1:Dynamic, entity2:Dynamic):Bool

Has the entity1 got a clear line of sight to the other entity2 from the direction entity1 is facing.  
This is one of the most CPU demanding BOOL natives in the game; avoid calling this in things like nested for-loops  

@:native("HasEntityCollidedWithAnything")statichasEntityCollidedWithAnything(entity:Dynamic):Bool

Called on tick.  
Tested with vehicles, returns true whenever the vehicle is touching any entity.  
Note: for vehicles, the wheels can touch the ground and it will still return false, but if the body of the vehicle touches the ground, it will return true.  

@:native("IsAnEntity")staticisAnEntity(handle:Int):Bool

@:native("IsEntityAMissionEntity")staticisEntityAMissionEntity(entity:Dynamic):Bool

@:native("IsEntityAPed")staticisEntityAPed(entity:Dynamic):Bool

@:native("IsEntityAVehicle")staticisEntityAVehicle(entity:Dynamic):Bool

@:native("IsEntityAnObject")staticisEntityAnObject(entity:Dynamic):Bool

@:native("IsEntityAtCoord")staticisEntityAtCoord(entity:Dynamic, xPos:Float, yPos:Float, zPos:Float, xSize:Float, ySize:Float, zSize:Float, p7:Bool, p8:Bool, p9:Int):Bool

Checks if entity is within x/y/zSize distance of x/y/z.   
Last three are unknown ints, almost always p7 = 0, p8 = 1, p9 = 0  

@:native("IsEntityAtEntity")staticisEntityAtEntity(entity1:Dynamic, entity2:Dynamic, xSize:Float, ySize:Float, zSize:Float, p5:Bool, p6:Bool, p7:Int):Bool

Checks if entity1 is within the box defined by x/y/zSize of entity2.  
Last three parameters are almost alwasy p5 = 0, p6 = 1, p7 = 0  

@:native("IsEntityAttached")staticisEntityAttached(entity:Dynamic):Bool

@:native("IsEntityAttachedToAnyObject")staticisEntityAttachedToAnyObject(entity:Dynamic):Bool

@:native("IsEntityAttachedToAnyPed")staticisEntityAttachedToAnyPed(entity:Dynamic):Bool

@:native("IsEntityAttachedToAnyVehicle")staticisEntityAttachedToAnyVehicle(entity:Dynamic):Bool

@:native("IsEntityAttachedToEntity")staticisEntityAttachedToEntity(from:Dynamic, to:Dynamic):Bool

@:native("IsEntityDead")staticisEntityDead(entity:Dynamic):Bool

NativeDB Added Parameter 2: BOOL p1

@:native("IsEntityInAir")staticisEntityInAir(entity:Dynamic):Bool

@:native("IsEntityInAngledArea")staticisEntityInAngledArea(entity:Dynamic, x1:Float, y1:Float, z1:Float, x2:Float, y2:Float, z2:Float, width:Float, debug:Bool, includez:Bool, p10:Dynamic):Bool

p10 is some entity flag check, also used in IS_ENTITY_AT_ENTITY, IS_ENTITY_IN_AREA and IS_ENTITY_AT_COORD.

See IS_POINT_IN_ANGLED_AREA for the definition of an angled area.

@:native("IsEntityInArea")staticisEntityInArea(entity:Dynamic, x1:Float, y1:Float, z1:Float, x2:Float, y2:Float, z2:Float, p7:Bool, p8:Bool, p9:Dynamic):Bool

@:native("IsEntityInWater")staticisEntityInWater(entity:Dynamic):Bool

@:native("IsEntityInZone")staticisEntityInZone(entity:Dynamic, zone:String):Bool

@:native("IsEntityOccluded")staticisEntityOccluded(entity:Dynamic):Bool

@:native("IsEntityOnScreen")staticisEntityOnScreen(entity:Dynamic):Bool

Determines whether the screen position of the specified entity is within the 2D bounds of the screen.

This native will not check if the entity is not visible due to being occluded (for example, behind a wall). To check if a entity is on screen and is not occluded, use IS_ENTITY_OCCLUDED.

@:native("IsEntityPlayingAnim")staticisEntityPlayingAnim(entity:Dynamic, animDict:String, animName:String, taskFlag:Int):Bool

See also IS_SCRIPTED_SCENARIO_PED_USING_CONDITIONAL_ANIM

Taken from ENTITY::IS_ENTITY_PLAYING_ANIM(PLAYER::PLAYER_PED_ID(), "creatures@shark@move", "attack_player", 3)  
p4 is always 3 in the scripts.  
taskFlag:  
2 - Check synchronized scene  

Animations list

@:native("IsEntityStatic")staticisEntityStatic(entity:Dynamic):Bool

A static ped will not react to natives like "APPLY_FORCE_TO_ENTITY" or "SET_ENTITY_VELOCITY" and oftentimes will not react to task-natives like "AI::TASK_COMBAT_PED". The only way I know of to make one of these peds react is to ragdoll them (or sometimes to use CLEAR_PED_TASKS_IMMEDIATELY(). Static peds include almost all far-away peds, beach-combers, peds in certain scenarios, peds crossing a crosswalk, peds walking to get back into their cars, and others. If anyone knows how to make a ped non-static without ragdolling them, please edit this with the solution.  
^ Attach a phCollider to the ped.  

@:native("IsEntityTouchingEntity")staticisEntityTouchingEntity(entity:Dynamic, targetEntity:Dynamic):Bool

@:native("IsEntityTouchingModel")staticisEntityTouchingModel(entity:Dynamic, modelHash:Int):Bool

@:native("IsEntityUpright")staticisEntityUpright(entity:Dynamic, angle:Float):Bool

@:native("IsEntityUpsidedown")staticisEntityUpsidedown(entity:Dynamic):Bool

@:native("IsEntityVisible")staticisEntityVisible(entity:Dynamic):Bool

@:native("IsEntityVisibleToScript")staticisEntityVisibleToScript(entity:Dynamic):Bool

@:native("IsEntityWaitingForWorldCollision")staticisEntityWaitingForWorldCollision(entity:Dynamic):Bool

@:native("PlayEntityAnim")staticplayEntityAnim(entity:Dynamic, animName:String, animDict:String, p3:Float, loop:Bool, stayInAnim:Bool, p6:Bool, delta:Float, bitset:Dynamic):Bool

delta and bitset are guessed fields. They are based on the fact that most of the calls have 0 or nil field types passed in.  
The only time bitset has a value is 0x4000 and the only time delta has a value is during stealth with usually <1.0f values.  

Animations list

@:native("PlaySynchronizedEntityAnim")staticplaySynchronizedEntityAnim(entity:Dynamic, syncedScene:Int, animation:String, propName:String, p4:Float, p5:Float, p6:Dynamic, p7:Float):Bool

p4 and p7 are usually 1000.0f.  

Animations list

@:native("PlaySynchronizedMapEntityAnim")staticplaySynchronizedMapEntityAnim(p0:Float, p1:Float, p2:Float, p3:Float, p4:Dynamic, p5:Dynamic, p6:Dynamic, p7:Dynamic, p8:Float, p9:Float, p10:Dynamic, p11:Float):Bool

@:native("ProcessEntityAttachments")staticprocessEntityAttachments(entity:Dynamic):Dynamic

Called to update entity attachments.

@:native("RemoveForcedObject")staticremoveForcedObject(p0:Dynamic, p1:Dynamic, p2:Dynamic, p3:Dynamic, p4:Dynamic):Dynamic

@:native("RemoveModelHide")staticremoveModelHide(x:Float, y:Float, z:Float, radius:Float, model:Int, p5:Bool):Dynamic

p5 requires more research. See also CREATE_MODEL_HIDE and CREATE_MODEL_SWAP.

Network players do not see changes done with this.

@:native("RemoveModelSwap")staticremoveModelSwap(x:Float, y:Float, z:Float, radius:Float, originalModel:Int, newModel:Int, p6:Bool):Dynamic

@:native("ResetEntityAlpha")staticresetEntityAlpha(entity:Dynamic):Dynamic

@:native("SetCanAutoVaultOnEntity")staticsetCanAutoVaultOnEntity(entity:Dynamic, toggle:Bool):Dynamic

@:native("SetCanClimbOnEntity")staticsetCanClimbOnEntity(entity:Dynamic, toggle:Bool):Dynamic

@:native("SetEntityAlpha")staticsetEntityAlpha(entity:Dynamic, alphaLevel:Int, skin:Bool):Dynamic

This native sets the entity's alpha level.

@:native("SetEntityAlwaysPrerender")staticsetEntityAlwaysPrerender(entity:Dynamic, toggle:Bool):Dynamic

@:native("SetEntityAnimCurrentTime")staticsetEntityAnimCurrentTime(entity:Dynamic, animDictionary:String, animName:String, time:Float):Dynamic

@:native("SetEntityAnimSpeed")staticsetEntityAnimSpeed(entity:Dynamic, animDictionary:String, animName:String, speedMultiplier:Float):Dynamic

@:native("SetEntityAsMissionEntity")staticsetEntityAsMissionEntity(entity:Dynamic, scriptHostObject:Bool, bGrabFromOtherScript:Bool):Dynamic

Assigns an existing entity to be owned by the current script. If the entity was not owned by a script yet, this also means the entity will remain persistent until released.

Note that this is not needed right after creating an entity as a script-created entity will automatically be assigned.

@:native("SetEntityAsNoLongerNeeded")staticsetEntityAsNoLongerNeeded(entity:Dynamic):Dynamic

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.  

@:native("SetEntityCanBeDamaged")staticsetEntityCanBeDamaged(entity:Dynamic, toggle:Bool):Dynamic

@:native("SetEntityCanBeDamagedByRelationshipGroup")staticsetEntityCanBeDamagedByRelationshipGroup(entity:Dynamic, bCanBeDamaged:Bool, relGroup:Int):Dynamic

@:native("SetEntityCanBeTargetedWithoutLos")staticsetEntityCanBeTargetedWithoutLos(entity:Dynamic, toggle:Bool):Dynamic

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

@:native("SetEntityCollision")staticsetEntityCollision(entity:Dynamic, toggle:Bool, keepPhysics:Bool):Dynamic

@:native("SetEntityCompletelyDisableCollision")staticsetEntityCompletelyDisableCollision(entity:Dynamic, toggle:Bool, keepPhysics:Bool):Dynamic

@:native("SetEntityCoords")staticsetEntityCoords(entity:Dynamic, xPos:Float, yPos:Float, zPos:Float, alive:Bool, deadFlag:Bool, ragdollFlag:Bool, clearArea:Bool):Dynamic

Sets the coordinates (world position) for a specified entity, offset by the radius of the entity on the Z axis.

@:native("SetEntityCoordsNoOffset")staticsetEntityCoordsNoOffset(entity:Dynamic, x:Float, y:Float, z:Float, keepTasks:Bool, keepIK:Bool, doWarp:Bool):Dynamic

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.

@:native("SetEntityCoordsWithoutPlantsReset")staticsetEntityCoordsWithoutPlantsReset(entity:Dynamic, xPos:Float, yPos:Float, zPos:Float, alive:Bool, deadFlag:Bool, ragdollFlag:Bool, clearArea:Bool):Dynamic

@:native("SetEntityDynamic")staticsetEntityDynamic(entity:Dynamic, toggle:Bool):Dynamic

@:native("SetEntityHasGravity")staticsetEntityHasGravity(entity:Dynamic, toggle:Bool):Dynamic

@:native("SetEntityHeading")staticsetEntityHeading(entity:Dynamic, heading:Float):Dynamic

Set the heading of an entity in degrees also known as "Yaw".

@:native("SetEntityHealth")staticsetEntityHealth(entity:Dynamic, health:Int):Dynamic

When setting health for a player ped, the game will clamp the health value to ensure it does not exceed the maximum health. This maximum health can be retrieved by calling GET_PED_MAX_HEALTH. It can also be modified by calling SET_PED_MAX_HEALTH.

When setting the health for non-player peds or entities, the maximum health will be increased if the new health value exceeds the current maximum.

Default health for male peds is 200, for female peds it is 175.

Added parameters

  • inflictor: The handle for the entity that caused the damage.

@:native("SetEntityInvincible")staticsetEntityInvincible(entity:Dynamic, toggle:Bool):Dynamic

Sets a ped or an object totally invincible. It doesn't take any kind of damage. Peds will not ragdoll on explosions and the tazer animation won't apply either.  
If you use this for a ped and you want Ragdoll to stay enabled, then do:  
*(DWORD *)(pedAddress + 0x188) |= (1 << 9);  
Use this if you want to get the invincibility status:  
	bool IsPedInvincible(Ped ped)  
	{  
auto addr = getScriptHandleBaseAddress(ped);	  
if (addr)  
{  
	DWORD flag = *(DWORD *)(addr + 0x188);  
	return ((flag & (1 << 8)) != 0) || ((flag & (1 << 9)) != 0);  
}  
return false;  
	}  

@:native("SetEntityIsTargetPriority")staticsetEntityIsTargetPriority(entity:Dynamic, p1:Bool, p2:Float):Dynamic

@:native("SetEntityLights")staticsetEntityLights(entity:Dynamic, toggle:Bool):Dynamic

@:native("SetEntityLoadCollisionFlag")staticsetEntityLoadCollisionFlag(entity:Dynamic, toggle:Bool):Dynamic

Loads collision grid for an entity spawned outside of a player's loaded area. This allows peds to execute tasks rather than sit dormant because of a lack of a physics grid.

Certainly not the main usage of this native but when set to true for a Vehicle, it will prevent the vehicle to explode if it is spawned far away from the player.

NativeDB Added Parameter 3: Any p2

@:native("SetEntityLodDist")staticsetEntityLodDist(entity:Dynamic, value:Int):Dynamic

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).  

@:native("SetEntityMaxHealth")staticsetEntityMaxHealth(entity:Dynamic, value:Int):Dynamic

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

@:native("SetEntityMaxSpeed")staticsetEntityMaxSpeed(entity:Dynamic, speed:Float):Dynamic

@:native("SetEntityMotionBlur")staticsetEntityMotionBlur(entity:Dynamic, toggle:Bool):Dynamic

@:native("SetEntityNoCollisionEntity")staticsetEntityNoCollisionEntity(entity1:Dynamic, entity2:Dynamic, thisFrameOnly:Bool):Dynamic

Calling this function disables collision between two entities.
The importance of the order for entity1 and entity2 is unclear.
The third parameter, `thisFrame`, decides whether the collision is to be disabled until it is turned back on, or if it's just this frame.

@:native("SetEntityOnlyDamagedByPlayer")staticsetEntityOnlyDamagedByPlayer(entity:Dynamic, toggle:Bool):Dynamic

@:native("SetEntityOnlyDamagedByRelationshipGroup")staticsetEntityOnlyDamagedByRelationshipGroup(entity:Dynamic, p1:Bool, relationshipHash:Int):Dynamic

@:native("SetEntityProofs")staticsetEntityProofs(entity:Dynamic, bulletProof:Bool, fireProof:Bool, explosionProof:Bool, collisionProof:Bool, meleeProof:Bool, steamProof:Bool, p7:Bool, drownProof:Bool):Dynamic

Enable / disable each type of damage.  
--------------  
p7 is to to '1' in am_mp_property_ext/int: entity::set_entity_proofs(uParam0->f_19, true, true, true, true, true, true, 1, true);  

@:native("SetEntityQuaternion")staticsetEntityQuaternion(entity:Dynamic, x:Float, y:Float, z:Float, w:Float):Dynamic

w is the correct parameter name!  

@:native("SetEntityRecordsCollisions")staticsetEntityRecordsCollisions(entity:Dynamic, toggle:Bool):Dynamic

@:native("SetEntityRenderScorched")staticsetEntityRenderScorched(entity:Dynamic, toggle:Bool):Dynamic

@:native("SetEntityRequiresMoreExpensiveRiverCheck")staticsetEntityRequiresMoreExpensiveRiverCheck(entity:Dynamic, toggle:Bool):Dynamic

@:native("SetEntityRotation")staticsetEntityRotation(entity:Dynamic, pitch:Float, roll:Float, yaw:Float, rotationOrder:Int, bDeadCheck:Bool):Dynamic

Sets the rotation of a specified entity in the game world.

NativeDB Introduced: v323

@:native("SetEntityTrafficlightOverride")staticsetEntityTrafficlightOverride(entity:Dynamic, state:Int):Dynamic

Changing traffic-lights will not change the behavior of NPCs.

Example: here

enum eTrafficlightOverrideMode
{
    TLO_RED = 0,
    TLO_AMBER = 1,
    TLO_GREEN = 2,
    TLO_NONE = 3
}

@:native("SetEntityVelocity")staticsetEntityVelocity(entity:Dynamic, x:Float, y:Float, z:Float):Dynamic

Note that the third parameter(denoted as z) is "up and down" with positive numbers encouraging upwards movement.

@:native("SetEntityVisible")staticsetEntityVisible(entity:Dynamic, toggle:Bool, unk:Bool):Dynamic

Toggle the visibility of a given entity.

@:native("SetObjectAsNoLongerNeeded")staticsetObjectAsNoLongerNeeded(object:Dynamic):Dynamic

This is an alias of SET_ENTITY_AS_NO_LONGER_NEEDED.  

@:native("SetPedAsNoLongerNeeded")staticsetPedAsNoLongerNeeded(ped:Dynamic):Dynamic

This is an alias of SET_ENTITY_AS_NO_LONGER_NEEDED.  

@:native("SetPickUpByCargobobDisabled")staticsetPickUpByCargobobDisabled(entity:Dynamic, toggle:Bool):Dynamic

Configures an entity to either allow or prevent it from being picked up by Cargobobs.

NativeDB Introduced: v1180

@:native("SetVehicleAsNoLongerNeeded")staticsetVehicleAsNoLongerNeeded(vehicle:Dynamic):Dynamic

This is an alias of SET_ENTITY_AS_NO_LONGER_NEEDED.  

@:native("SetWaitForCollisionsBeforeProbe")staticsetWaitForCollisionsBeforeProbe(entity:Dynamic, toggle:Bool):Dynamic

SET_*
Only called within 1 script for x360. 'fm_mission_controller' and it used on an object.
Ran after these 2 natives,
set_object_targettable(uParam0, 0);
set_entity_invincible(uParam0, 1);

@:native("StopEntityAnim")staticstopEntityAnim(entity:Dynamic, animation:String, animGroup:String, p3:Float):Dynamic

RAGEPluginHook list: docs.ragepluginhook.net/html/62951c37-a440-478c-b389-c471230ddfc5.htm

@:native("StopSynchronizedEntityAnim")staticstopSynchronizedEntityAnim(entity:Dynamic, p1:Float, p2:Bool):Bool

p1 sync task id?  

@:native("StopSynchronizedMapEntityAnim")staticstopSynchronizedMapEntityAnim(p0:Float, p1:Float, p2:Float, p3:Float, p4:Dynamic, p5:Float):Bool

@:native("WouldEntityBeOccluded")staticwouldEntityBeOccluded(entityModelHash:Int, x:Float, y:Float, z:Float, p4:Bool):Bool