import type { eCarryingFlags } from '../enums/eCarryingFlags'; import type { eWeaponHash } from '../enums/eWeaponHash'; import type { Ped } from '../classes/Ped'; import type { Player } from '../classes/Player'; import type { Prop } from '../classes/Prop'; import type { Vehicle } from '../classes/Vehicle'; import { Vector3 } from '../types/Vector3'; import { Vector4 } from '../types/Vector4'; import { IHandle } from '../types/IHandle'; import { int, float, u8, u16, i8 } from '../types/NativeAliases'; export declare class Entity implements IHandle { handle: number; constructor(handle: number); static fromHandle(handle: number): Entity | null; static fromNetworkId(netId: number): Entity | null; /** * @param targetEntity * @returns */ isTouchingEntity(targetEntity: Entity): boolean; deleteCarriable(): void; /** * Returns a normalized value between 0.0f and 1.0f. You can get the actual anim time by multiplying this by GET_ANIM_DURATION * * @param animDict * @param animName * @returns */ getAnimCurrentTime(animDict: string, animName: string): float; /** * @param entity2 * @param thisFrameOnly * @returns The instance for method chaining */ setNoCollisionEntity(entity2: Entity, thisFrameOnly: boolean): this; /** * Result is in meters per second (m/s) * * @returns */ get Speed(): float; /** * @param bOnlyDamagedWhenRunningScript */ set CanOnlyBeDamagedByScriptParticipants(bOnlyDamagedWhenRunningScript: boolean); /** * @param bOnlyDamagedWhenRunningScript * @returns The instance for method chaining */ setCanOnlyBeDamagedByScriptParticipants(bOnlyDamagedWhenRunningScript: boolean): this; /** * @returns */ get IsTrackedVisible(): boolean; /** * @param p1 The entity to detach * @param collision Unknown, seems to set some flags */ detachEntity(p1: boolean, collision: boolean): void; /** * @returns */ get IsVisibleToScript(): boolean; /** * @param entity2 * @param traceType * @returns */ hasClearLosToEntity(entity2: Entity, traceType: int): boolean; /** * Used in Script Function GENERIC_ITEM_HAS_ANIM_COMPLETED * *GET_ENTITY** * * @param animDict * @param animClip * @returns */ N_0x8E46E18AA828334F(animDict: string, animClip: string): float; /** * @param playerPedToIgnore * @param flags * @returns */ getNearestPlayerToEntity(playerPedToIgnore: Ped, flags: int): Player | null; /** * Gets the Y-component of the entity's forward vector. * * @returns */ get ForwardY(): float; /** * @param pitch * @param roll * @param yaw * @param rotationOrder * @param p5 * @returns The instance for method chaining */ setRotation(pitch: float, roll: float, yaw: float, rotationOrder: int, p5: boolean): this; /** * @param p1 * @param relationshipGroup * @returns The instance for method chaining */ setOnlyDamagedByRelationshipGroup(p1: boolean, relationshipGroup: string | number): this; /** * 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 * * @param proofsBitset * @param specialFlag * @returns The instance for method chaining */ setProofs(proofsBitset: int, specialFlag: boolean): this; /** * @returns */ hasCollisionLoadedAroundEntity(): boolean; /** * @returns */ get IsCarriablePelt(): any; /** * @param p1 * @returns */ getVelocity(p1: int): Vector3; /** * @param toggle */ set CanAutoVaultOnEntity(toggle: boolean); /** * @param toggle * @returns The instance for method chaining */ setCanAutoVaultOnEntity(toggle: boolean): this; /** * 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 * * @param lootTable * @returns */ scriptOverrideLootTablePermanent(lootTable: string | number): any; /** * @returns argStruct */ get Script(): [number, number]; /** * @param actionHash * @returns */ hasAnimEventFired(actionHash: string | number): boolean; /** * @param p1 */ N_0xEF259AA1E097E0AD(p1: any): void; /** * Getter for FREEZE_ENTITY_POSITION * * @returns */ get IsFrozen(): boolean; /** * Returns the entity that is looting a ped but only while the looting is active * * @returns */ get LootingPed(): Ped | null; /** * @returns */ get IsWaitingForWorldCollision(): boolean; /** * Gets the X-component of the entity's forward vector. * * @returns */ get ForwardX(): float; /** * @returns Returns `true` if the `entity` is a ped */ get IsAPed(): boolean; /** * @returns */ get Pitch(): float; /** * @returns */ get IsStatic(): boolean; /** * @returns Returns the model hash of the entity */ get Model(): number; /** * Deletes the specified entity, then sets the handle pointed to by the pointer to NULL. */ deleteEntity(): void; /** * @param team * @param playerPedToIgnore * @param flags * @returns */ getNearestPlayerToOnTeam(team: int, playerPedToIgnore: Ped, flags: int): Player | null; /** * @param p1 */ N_0x80FDEB3A9E9AA578(p1: boolean): void; /** * Makes the specified entity (ped, vehicle or object) persistent. Persistent entities will not automatically be removed by the engine. * * @param p1 * @param p2 * @returns The instance for method chaining */ setAsMissionEntity(p1: boolean, p2: boolean): this; /** * Gets the entity's forward vector in XY(Z) eulers. * * @returns */ get ForwardVector(): Vector3; /** * @param modelHash * @returns */ isTouchingModel(modelHash: string | number): boolean; /** * * @remarks Peds cannot have their health set higher than their core attribute allow. * * * @remarks 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). * * @param healthAmount The entity to set the health of * @param entityKilledBy The amount of health the entity should have * @returns The instance for method chaining */ setHealth(healthAmount: u16, entityKilledBy?: Entity | null): this; set Health(healthAmount: u16); /** * @param toggle */ set RenderScorched(toggle: boolean); /** * @param toggle * @returns The instance for method chaining */ setRenderScorched(toggle: boolean): this; /** * @param heading */ set Heading(heading: float); /** * @param heading * @returns The instance for method chaining */ setHeading(heading: float): this; /** * @returns */ get CollisionDisabled(): boolean; /** * Displays the current ROLL axis of the entity [-180.0000/180.0000+] * (Sideways Roll) such as a vehicle tipped on its side * * @returns */ get Roll(): float; /** * @returns */ get NearestParticipantToEntity(): Player | null; /** * Returns entityType: https://github.com/Halen84/RDR3-Native-Flags-And-Enums/tree/main/eEntityType * * @returns */ get Type(): int; /** * @returns */ get IsOwnedByPersistenceSystem(): boolean; /** * @param animDict * @param animName * @param animType * @returns */ isPlayingAnim(animDict: string, animName: string, animType: int): boolean; /** * Marks the specified entity (ped, vehicle or object) as no longer needed, allowing the game engine to delete it whenever it sees fit. * * @returns The instance for method chaining */ setAsNoLongerNeeded(): this; /** * @returns */ hasBeenDamagedByAnyVehicle(): boolean; /** * @param animDict * @param animName * @param speedMultiplier * @returns The instance for method chaining */ setAnimSpeed(animDict: string, animName: string, speedMultiplier: float): this; unpinMapEntity(): void; /** * Get how much of the entity is submerged. 1.0f is whole entity. * * @returns */ get SubmergedLevel(): float; /** * @returns */ get IsAttached(): boolean; /** * SET_ENTITY_A* * * @param p1 */ N_0xC0EDEF16D90661EE(p1: float): void; /** * @param looted */ set FullyLooted(looted: boolean); /** * @param looted * @returns The instance for method chaining */ setFullyLooted(looted: boolean): this; /** * @returns */ get IsAttachedToAnyVehicle(): boolean; /** * @param p1 */ N_0xA48E4801DEBDF7E4(p1: boolean): void; /** * @param toggle * @param keepPhysics * @returns The instance for method chaining */ setCompletelyDisableCollision(toggle: boolean, keepPhysics: boolean): this; /** * @param p1 */ N_0xCDB682BB47C02F0A(p1: string | number): void; /** * @param volume * @param p2 * @param p3 * @returns */ isInVolume(volume: number, p2: boolean, p3: int): boolean; /** * @returns rightVector; forwardVector; upVector; position */ get Matrix(): [Vector3, Vector3, Vector3, Vector3]; /** * Called if entity is in water and submerged level is larger than 1f. If CARRYING_FLAG_FORCE_ALLOW_WARP_TO_SAFE_GROUND_LOCATION is true, it gets disabled as well. */ N_0x371D179701D9C082(): void; /** * @param p1 * @returns */ getMaxHealth(p1?: boolean): int; get MaxHealth(): int; /** * @param animDict * @param animName * @param time * @returns The instance for method chaining */ setAnimCurrentTime(animDict: string, animName: string, time: float): this; /** * @param alive The entity to get the coords of * @param realCoords Unused, likely a leftover debug flag. * @returns The `entity`'s position, or `vector3(0, 0, 0)` if the `entity` was invalid. */ getCoords(alive?: boolean, realCoords?: boolean): Vector3; get Coords(): Vector3; /** * @returns */ get IsAnObject(): boolean; /** * @returns */ get IsUpsidedown(): boolean; /** * @param p1 * @returns */ doesBelongToThisScript(p1: boolean): boolean; /** * Returns a hash of an entity's name. (Alternative Name: _GET_ENTITY_PROMPT_NAME_HASH) * * @returns */ get CarriableFromEntity(): number; /** * @param toggle * @param keepPhysics * @returns The instance for method chaining */ setCollision(toggle: boolean, keepPhysics: boolean): this; /** * @param p1 * @returns */ placeOnGroundProperly(p1: boolean): any; /** * @returns */ get IsInWater(): boolean; /** * @returns Returns `true` if the entity exists * @example * ```lua * local ped = PlayerPedId() * local mount = GetMount(ped) * * if DoesEntityExist(mount) then * RemovePedFromMount(ped, true, false) * TaskAnimalFlee(mount, ped, -1) * end * ``` */ doesExist(): boolean; /** * @returns */ get Alpha(): u8; /** * This native only works on `Ped` and `Object` entity types * * @param flagId * @returns */ getCarryingFlag(flagId: eCarryingFlags): i8; /** * @param p1 */ forceAiAndAnimationUpdate(p1: boolean): void; /** * Axis - Invert Axis Flags * * @param pos * @param xAxis * @param yAxis * @param zAxis * @returns The instance for method chaining */ setCoordsNoOffset(pos: Vector3, xAxis: boolean, yAxis: boolean, zAxis: boolean): this; /** * Returns (CUR_HEALTH / MAX_HEALTH) * * @returns */ get HealthFloat(): float; /** * @param entity2 * @param p2 * @param boneIndex * @param offset * @param p7 * @param p8 * @param p9 * @param p10 * @param p11 * @param p12 * @param p13 * @param p14 * @param p15 * @param p16 * @param p17 * @param p18 * @param p19 * @param p20 * @param p21 */ attachToEntityPhysically(entity2: Entity, p2: int, boneIndex: int, offset: Vector3, p7: float, p8: float, p9: float, p10: float, p11: float, p12: float, p13: float, p14: boolean, p15: boolean, p16: boolean, p17: boolean, p18: int, p19: boolean, p20: float, p21: float): void; /** * @returns */ get HeightAboveGround(): float; /** * @param pos * @param heading * @param p5 * @param p6 * @returns The instance for method chaining */ setCoordsAndHeadingNoOffset(pos: Vector3, heading: float, p5: boolean, p6: boolean): this; /** * Creates a spherical cone at origin that extends to surface with the angle specified. Then returns true if the entity is inside the spherical cone Angle is measured in degrees. * * @param originX * @param originY * @param originZ * @param edgeX * @param edgeY * @param edgeZ * @param angle * @param p8 * @param p9 * @param p10 * @returns */ isInAngledArea(originX: float, originY: float, originZ: float, edgeX: float, edgeY: float, edgeZ: float, angle: float, p8: boolean, p9: boolean, p10: any): boolean; clearLastDamageEntity(): void; /** * @param toggle */ set AlwaysPrerender(toggle: boolean); /** * @param toggle * @returns The instance for method chaining */ setAlwaysPrerender(toggle: boolean): this; /** * Note that the third parameter(denoted as z) is "up and down" with positive numbers encouraging upwards movement. * * @param pos */ set Velocity(pos: Vector3); /** * Note that the third parameter(denoted as z) is "up and down" with positive numbers encouraging upwards movement. * * @param pos * @returns The instance for method chaining */ setVelocity(pos: Vector3): this; /** * SET_ENTITY_LO* * * @param p1 * @param p2 * @param p3 */ N_0xAF7F3099B9FEB535(p1: float, p2: float, p3: float): void; /** * @returns */ N_0xAF72EC7E1B54539B(): Entity | null; /** * Simply returns whatever is passed to it (Regardless of whether the handle is valid or not). * * @returns */ get ObjectIndexFromIndex(): Prop | null; /** * Has the entity1 got a clear line of sight to the other entity2 from the direction entity1 is facing. * * @param entity2 * @param traceType * @returns */ hasClearLosToEntityInFront(entity2: Entity, traceType: int): boolean; /** * @returns */ get IsOnTrainTrack(): boolean; /** * @param angle * @returns */ isUpright(angle: float): boolean; /** * @returns */ get IsBird(): any; /** * Gets the entity's forward vector in YX(Z) eulers. Similar to GET_ENTITY_FORWARD_VECTOR * * @returns */ get ForwardVectorYx(): Vector3; /** * @param pos * @param xAxis * @param yAxis * @param zAxis * @param clearArea * @returns The instance for method chaining */ setCoords(pos: Vector3, xAxis: boolean, yAxis: boolean, zAxis: boolean, clearArea: boolean): this; /** * @param boneName * @returns */ getBoneIndexByName(boneName: string): int; /** * @param pause */ pauseTracking(pause: boolean): void; /** * @param toggle */ set LoadCollisionFlag(toggle: boolean); /** * @param toggle * @returns The instance for method chaining */ setLoadCollisionFlag(toggle: boolean): this; /** * Changes type and quality of skins * type hashes: https://pastebin.com/C1WvQjCy * * @param type */ set CarcassType(type: string | number); /** * Changes type and quality of skins * type hashes: https://pastebin.com/C1WvQjCy * * @param type * @returns The instance for method chaining */ setCarcassType(type: string | number): this; /** * @param toggle */ set HasGravity(toggle: boolean); /** * @param toggle * @returns The instance for method chaining */ setHasGravity(toggle: boolean): this; /** * @param relative * @returns */ getSpeedVector(relative: boolean): Vector3; /** * @param entity2 * @param p2 * @param p3 * @returns */ hasBeenDamagedByEntity(entity2: Entity, p2: boolean, p3: boolean): boolean; /** * @returns */ get IsFullyLooted(): boolean; /** * @returns */ get IsOccluded(): boolean; /** * @param toggle */ set CanBeDamaged(toggle: boolean); /** * @param toggle * @returns The instance for method chaining */ setCanBeDamaged(toggle: boolean): this; /** * @param forceFlags * @param pos * @param offset * @param boneIndex * @param isDirectionRel * @param ignoreUpVec * @param isForceRel * @param p12 * @param p13 */ applyForceToEntity(forceFlags: int, pos: Vector3, offset: Vector3, boneIndex: int, isDirectionRel: boolean, ignoreUpVec: boolean, isForceRel: boolean, p12: boolean, p13: boolean): void; /** * @returns */ get IsDead(): boolean; /** * * @remarks **Warning:** You should *probably* use your own AABB testing as it might be faster * * * @param boundsMin * @param boundsMax * @param addDebugMarker * @param checkZPos Looks to be leftover debug code, this will still run and do extra `z` tests in order to draw debug markers, but the marker type is hard coded to `0`, you should leave this to `false` to avoid un-neede overhead * @param mountFlag When set to `true` this will also check the `z` position of the entity, otherwise this will just check the `x` and `y` of the bounds. * @returns Returns `true` if the `entity` is in the `boundsMin` and `boundsMax`. */ isInArea(boundsMin: Vector3, boundsMax: Vector3, addDebugMarker?: boolean, checkZPos?: boolean, mountFlag?: int): boolean; /** * Returns the coordinates of an entity-bone. * https://github.com/femga/rdr3_discoveries/tree/master/boneNames * * @param boneIndex * @returns */ getWorldPositionOfBone(boneIndex: int): Vector3; /** * https://github.com/femga/rdr3_discoveries/tree/master/animations * * @param animName * @param animDict * @param p3 * @param loop * @param stayInAnim * @param p6 * @param delta * @param bitset * @returns */ playAnim(animName: string, animDict: string, p3: float, loop: boolean, stayInAnim: boolean, p6: boolean, delta: float, bitset: any): boolean; /** * Returns false if entity is not a ped or object. * * @returns lootTable */ get ScriptOverrideLootTablePermanent(): [any, number]; /** * @param animDict * @param animName * @param p3 * @returns */ hasAnimFinished(animDict: string, animName: string, p3: int): boolean; /** * @param bCanBeDamaged * @param relGroup * @returns The instance for method chaining */ setCanBeDamagedByRelationshipGroup(bCanBeDamaged: boolean, relGroup: string | number): this; /** * @returns */ get UprightValue(): float; /** * @param pos * @param heading * @param xAxis * @param yAxis * @param zAxis * @returns The instance for method chaining */ setCoordsAndHeading(pos: Vector3, heading: float, xAxis: boolean, yAxis: boolean, zAxis: boolean): this; /** * Returns zero if the entity is not a carriable * * @returns */ get CarryConfig(): number; /** * tier: https://github.com/Halen84/RDR3-Native-Flags-And-Enums/tree/main/eEntityThreatTier * * @param tier * @param p2 * @returns The instance for method chaining */ setThreatTier(tier: int, p2: boolean): this; /** * Returns the heading of the entity in degrees. Also know as the "Yaw" of an entity. * * @returns */ get Heading(): float; /** * Returns the LOD distance of an entity. * * @returns */ get LodDist(): int; /** * @returns */ doesHaveDrawable(): boolean; /** * @param xyzw */ set Quaternion(xyzw: Vector4); /** * @param xyzw * @returns The instance for method chaining */ setQuaternion(xyzw: Vector4): this; /** * @returns */ get IsAttachedToAnyObject(): boolean; /** * Sets a ped or an object totally invincible. It doesn't take any kind of damage. Peds will not ragdoll on explosions. * * @param toggle */ set Invincible(toggle: boolean); /** * Sets a ped or an object totally invincible. It doesn't take any kind of damage. Peds will not ragdoll on explosions. * * @param toggle * @returns The instance for method chaining */ setInvincible(toggle: boolean): this; /** * Attaches entity1 to bone (boneIndex) of entity2. boneIndex - this is different to boneID, use GET_PED_BONE_INDEX to get the index from the ID. use the index for attaching to specific bones. entity1 will be attached to entity2's centre if bone index given doesn't correspond to bone indexes for that entity type. * https://github.com/femga/rdr3_discoveries/tree/master/boneNames useSoftPinning - if set to false attached entity will not detach when fixed * collision - controls collision between the two entities (FALSE disables collision). * isPed - pitch doesn't work when false and roll will only work on negative numbers (only peds) * vertexIndex - position of vertex * fixedRot - if false it ignores entity vector * * @param entity2 * @param boneIndex * @param pos * @param rot * @param p9 * @param useSoftPinning * @param collision * @param isPed * @param vertexIndex * @param fixedRot * @param p15 * @param p16 */ attachToEntity(entity2: Entity, boneIndex: int, pos: Vector3, rot: Vector3, p9: boolean, useSoftPinning: boolean, collision: boolean, isPed: boolean, vertexIndex: int, fixedRot: boolean, p15: boolean, p16: boolean): void; /** * @returns */ get IsAnimal(): any; /** * p6/relative - makes the xyz force not relative to world coords, but to something else * p7/highForce - setting false will make the force really low * * @param forceType * @param pos * @param component * @param isDirectionRel * @param isForceRel * @param p8 */ applyForceToCenterOfMass(forceType: int, pos: Vector3, component: int, isDirectionRel: boolean, isForceRel: boolean, p8: boolean): void; /** * Old name: _GET_ENTITY_CAN_BE_DAMAGED * * @returns */ get CanBeDamaged(): any; /** * Seems to return true if entity is burned / scorched * *GET_ENTITY** * * @returns */ N_0x37B01666BAE8F7EF(): any; /** * @param toggle */ set RequiresMoreExpensiveRiverCheck(toggle: boolean); /** * @param toggle * @returns The instance for method chaining */ setRequiresMoreExpensiveRiverCheck(toggle: boolean): this; /** * @param boneIndex * @returns Returns the offset from the entity for the selected bone index. * @example * ```lua * CreateThread(function() * while true do * local playerPed = PlayerPedId() * local boneOffset = Citizen.InvokeNative(0x5E214112806591EA, playerPed, GetEntityBoneIndexByName(playerPed, "skel_r_hand"), Citizen.ResultAsVector()) * local coords = GetOffsetFromEntityInWorldCoords(playerPed, boneOffset) * * DrawMarker(0x50638AB9, coords, 0, 0, 0, 0, 0, 0, 0.05, 0.05, 0.05, 250, 250, 100, 250, 0, 0, 2, 0, 0, 0, 0) * * Wait(0) * end * end) * ``` */ getOffsetFromBone(boneIndex: int): Vector3; N_0x9C6906EF8CB20C5F(): void; /** * Simply returns whatever is passed to it (Regardless of whether the handle is valid or not). * * @returns */ get PedIndexFromIndex(): Ped | null; /** * Sets whether the entity can be targeted without being in line-of-sight. * * @param toggle */ set CanBeTargetedWithoutLos(toggle: boolean); /** * Sets whether the entity can be targeted without being in line-of-sight. * * @param toggle * @returns The instance for method chaining */ setCanBeTargetedWithoutLos(toggle: boolean): this; /** * @returns */ get IsOnScreen(): boolean; /** * Old name: _SET_ENTITY_DECALS_DISABLED * * @param toggle */ set Noweapondecals(toggle: boolean); /** * Old name: _SET_ENTITY_DECALS_DISABLED * * @param toggle * @returns The instance for method chaining */ setNoweapondecals(toggle: boolean): this; /** * @returns */ get Health(): int; /** * sets the fill in state for some objects like for the stew, coffee mug ,poker chips, jugs ? P1 is either 0 or 2 p2 seems to be a label/name p3 is the fill in state, max seems to be for some 3.0 (most is 1.0) - 0.0 * heres some of the labels/names found * tumbler_fill, Canvas, Stew_Fill, from Chip01_Ctrl to Chip10_Ctrl, from empty_jug01_Ctrl to empty_jug20_Ctrl, from full_jug01_Ctrl to full_jug20_Ctrl, CTRL_cupFill, Food_DOF_Fill, from WhiteChip_Ctrl_0 to WhiteChip_Ctrl_10, from BlueChip_Ctrl_0 to BlueChip_Ctrl_10, from BlackChip_Ctrl_0 to BlackChip_Ctrl_10, from RedChip_Ctrl_0 to RedChip_Ctrl_10, * * @param p1 * @param p2 * @param fill * @returns The instance for method chaining */ setFillInStateForEntity(p1: int, p2: string, fill: float): this; /** * @returns */ doesHavePhysics(): boolean; /** * Returns true if calling script owns specified entity * * @returns */ doesThreadOwnThisEntity(): boolean; /** * Attach an entity to coordinates physically better name may be perfered? seems to be used with boats `p_skiff02x` ? The last 6 params are always 0 everywhere in the base code. p7 = 500.0 some kind of time? p8 =1 * * @param pos * @param offset * @param p7 * @param p8 * @param p9 * @param p10 * @param p11 * @param p12 * @param p13 * @param p14 */ attachToCoordsPhysically(pos: Vector3, offset: Vector3, p7: float, p8: boolean, p9: int, p10: int, p11: int, p12: int, p13: int, p14: int): void; /** * *REMOVE_DECALS** - _REMOVE_FORCED* */ N_0x5826EFD6D73C4DE5(): void; /** * @param toggle */ freezePosition(toggle: boolean): void; /** * Alters entity's health by 'amount'. Can be negative (to drain health). * In the scripts entity2 and weaponHash are unused (zero). * * @param amount * @param entity2 * @param weaponHash * @returns */ changeHealth(amount: float, entity2: Entity, weaponHash: eWeaponHash): any; /** * @returns */ get AttachedTo(): Entity | null; /** * @param toggle */ set OnlyDamagedByPlayer(toggle: boolean); /** * @param toggle * @returns The instance for method chaining */ setOnlyDamagedByPlayer(toggle: boolean): this; /** * @param p1 * @param p2 * @returns The instance for method chaining */ setIsTargetPriority(p1: boolean, p2: float): this; /** * @param pos * @param flags * @returns */ hasClearLosToCoord(pos: Vector3, flags: int): any; /** * @param flagId * @param value Refer to {@link eCarryingFlags} * @returns The instance for method chaining */ setCarryingFlag(flagId: eCarryingFlags, value: boolean): this; /** * @returns */ get IsPredator(): any; /** * enum eCarriableState * { * CARRIABLE_STATE_NONE, * CARRIABLE_STATE_TRANSITIONING_TO_HOGTIED, * CARRIABLE_STATE_CARRIABLE_INTRO, * CARRIABLE_STATE_CARRIABLE, * CARRIABLE_STATE_BEING_PICKED_UP_FROM_GROUND, * CARRIABLE_STATE_CARRIED_BY_HUMAN, * CARRIABLE_STATE_BEING_PLACED_ON_GROUND, * CARRIABLE_STATE_CARRIED_BY_MOUNT, * CARRIABLE_STATE_BEING_PLACED_ON_MOUNT, * CARRIABLE_STATE_BEING_PICKED_UP_FROM_MOUNT, * CARRIABLE_STATE_BEING_CUT_FREE, * CARRIABLE_STATE_BEING_PLACED_ON_GROUND_ESCAPE, * CARRIABLE_STATE_BEING_PLACED_IN_VEHICLE * }; * * @returns */ get CarriableState(): int; /** * @param value */ set MaxHealth(value: int); /** * @param value * @returns The instance for method chaining */ setMaxHealth(value: int): this; /** * Params: p1 (probably animType) = 1, 0 * * @param p1 * @returns */ isPlayingAnyAnim(p1: int): boolean; /** * @param enabled */ set LightsEnabled(enabled: boolean); /** * @param enabled * @returns The instance for method chaining */ setLightsEnabled(enabled: boolean): this; /** * Offset values are relative to the entity. x = left/right * y = forward/backward * z = up/down * * @param offset * @returns */ getOffsetFromInWorldCoords(offset: Vector3): Vector3; /** * Checks if entity1 is within the box defined by x/y/zSize of entity2. Last three parameters are almost always p5 = 0, p6 = 1, p7 = 0 * * @param entity2 * @param xSize * @param ySize * @param zSize * @param p5 * @param p6 * @param p7 * @returns */ isAtEntity(entity2: Entity, xSize: float, ySize: float, zSize: float, p5: boolean, p6: boolean, p7: int): boolean; /** * @param toggle */ set Visible(toggle: boolean); /** * @param toggle * @returns The instance for method chaining */ setVisible(toggle: boolean): this; /** * Old name: _SET_ENTITY_CLEANUP_BY_ENGINE * * @param toggle */ set ShouldFreezeWaitingOnCollision(toggle: boolean); /** * Old name: _SET_ENTITY_CLEANUP_BY_ENGINE * * @param toggle * @returns The instance for method chaining */ setShouldFreezeWaitingOnCollision(toggle: boolean): this; /** * Note: this native was removed in 1232 but added back in 1311 * Old name: _GET_ENTITY_PROOFS * * @returns */ get Proofs(): int; /** * skin - everything alpha except skin * Set entity alpha level. Ranging from 0 to 255 but changes occur after every 20 percent (after every 51). * * @param alphaLevel * @param skin * @returns The instance for method chaining */ setAlpha(alphaLevel: int, skin: boolean): this; /** * @returns */ get ThreatTier(): int; /** * Used in Script Function DUELING_DID_PLAYER_DISARM_OPPONENT * * @param entity2 * @param p2 * @param p3 * @returns */ N_0x3EC28DA1FFAC9DDD(entity2: Entity, p2: any, p3: any): boolean; /** * * @remarks **Warning:** This native isn't useful for RedM, you should refer to [natives: DELETE_ENTITY * instead.] Must be called from a background script, otherwise it will do nothing. */ delete2(): void; /** * @param debugFlag The entity to check * @returns Returns `true` if the entity is currently airborn. */ isInAir(debugFlag?: boolean): boolean; get IsInAir(): boolean; /** * @returns */ get IsAMissionEntity(): boolean; /** * @returns */ get IsAttachedToAnyPed(): boolean; /** * @param to * @returns */ isAttachedToEntity(to: Entity): boolean; /** * @returns */ hasBeenDamagedByAnyObject(): boolean; /** * @param rotationOrder * @returns */ getRotation(rotationOrder: int): Vector3; /** * @param toggle */ set MotionBlur(toggle: boolean); /** * @param toggle * @returns The instance for method chaining */ setMotionBlur(toggle: boolean): this; resetAlpha(): void; /** * 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 * * @param pos * @param xSize * @param ySize * @param zSize * @param p7 * @param p8 * @param p9 * @returns */ isAtCoord(pos: Vector3, xSize: float, ySize: float, zSize: float, p7: boolean, p8: boolean, p9: int): boolean; /** * 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). * * @param value */ set LodDist(value: int); /** * 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). * * @param value * @returns The instance for method chaining */ setLodDist(value: int): this; /** * @param toggle */ set Dynamic(toggle: boolean); /** * @param toggle * @returns The instance for method chaining */ setDynamic(toggle: boolean): this; /** * @param radius */ set CustomPickupRadius(radius: float); /** * @param radius * @returns The instance for method chaining */ setCustomPickupRadius(radius: float): this; /** * @returns */ get PopulationType(): int; /** * @returns */ get IsAVehicle(): boolean; /** * @param pos * @param atTop * @param inWorldCoords * @returns */ getHeight(pos: Vector3, atTop: boolean, inWorldCoords: boolean): float; /** * @param pos * @returns */ getOffsetFromGivenWorldCoords(pos: Vector3): Vector3; addTrackingTrails(): void; /** * @param toggle */ set CanClimbOnEntity(toggle: boolean); /** * @param toggle * @returns The instance for method chaining */ setCanClimbOnEntity(toggle: boolean): this; /** * @returns minimum; maximum */ get WorldPositionOfDimensions(): [Vector3, Vector3]; /** * @param p1 * @returns */ isUnderwater(p1: boolean): boolean; /** * @param animation * @param animGroup * @param p3 * @returns */ stopAnim(animation: string, animGroup: string, p3: float): any; /** * @returns */ hasCollidedWithAnything(): boolean; /** * Simply returns whatever is passed to it (Regardless of whether the handle is valid or not). * * @returns */ get VehicleIndexFromIndex(): Vehicle | null; /** * @returns */ get IsVisible(): boolean; /** * SET_ENTITY_LO* * * @param toggle */ N_0xFF9965C47FA404DA(toggle: boolean): void; /** * Valid indices: 0 - 3 * Index 1 always returns a `hogtied` config, doesn't matter the entity. * It's for humans only and the ped must be resurrected first if it's dead. * * @param index * @returns */ getOptimalCarryConfig(index: int): number; /** * @returns The instance for method chaining */ setFadeIn(): this; /** * @returns */ hasBeenDamagedByAnyPed(): boolean; /** * Gets the network ID of this entity for network synchronization. */ get NetworkId(): number; } //# sourceMappingURL=Entity.d.ts.map