Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

  • new Ped(handle: number): Ped

Properties

Protected bones

bones: undefined | EntityBoneCollection

Protected handle

handle: number

Private pedBones

pedBones: undefined | PedBoneCollection

Private Readonly speechModifierNames

speechModifierNames: string[] = ...

Protected stateBagCookies

stateBagCookies: number[] = []

Private tasks

tasks: undefined | Tasks

Private weapons

weapons: undefined | WeaponCollection

Accessors

Accuracy

  • get Accuracy(): number
  • set Accuracy(accuracy: number): void

Armor

  • get Armor(): number
  • set Armor(amount: number): void

AttachedBlip

  • get AttachedBlip(): null | Blip

BlockPermanentEvents

  • set BlockPermanentEvents(block: boolean): void

Bones

CanRagdoll

  • get CanRagdoll(): boolean
  • set CanRagdoll(value: boolean): void

CurrentVehicle

  • get CurrentVehicle(): null | Vehicle

DrivingSpeed

  • set DrivingSpeed(value: number): void

DrivingStyle

DropsWeaponsOnDeath

  • set DropsWeaponsOnDeath(value: boolean): void

FiringPattern

Gender

Handle

  • get Handle(): number

HasCollided

  • get HasCollided(): boolean

HasGravity

  • set HasGravity(value: boolean): void

Heading

  • get Heading(): number
  • set Heading(heading: number): void

Health

  • get Health(): number
  • set Health(amount: number): void

HeightAboveGround

  • get HeightAboveGround(): number

IsAiming

  • get IsAiming(): boolean

IsAimingFromCover

  • get IsAimingFromCover(): boolean

IsAmbientSpeechEnabled

  • get IsAmbientSpeechEnabled(): boolean

IsAmbientSpeechPlaying

  • get IsAmbientSpeechPlaying(): boolean

IsAnySpeechPlaying

  • get IsAnySpeechPlaying(): boolean

IsBeingJacked

  • get IsBeingJacked(): boolean

IsBeingStealthKilled

  • get IsBeingStealthKilled(): boolean

IsBeingStunned

  • get IsBeingStunned(): boolean

IsClimbing

  • get IsClimbing(): boolean

IsCollisionEnabled

  • get IsCollisionEnabled(): boolean
  • set IsCollisionEnabled(value: boolean): void

IsCuffed

  • get IsCuffed(): boolean

IsDiving

  • get IsDiving(): boolean

IsDoingDriveby

  • get IsDoingDriveby(): boolean

IsDrunk

  • set IsDrunk(isDrunk: boolean): void

IsDucking

  • get IsDucking(): boolean
  • set IsDucking(value: boolean): void

IsEnemy

  • set IsEnemy(value: boolean): void

IsFalling

  • get IsFalling(): boolean

IsFleeing

  • get IsFleeing(): boolean

IsGettingIntoAVehicle

  • get IsGettingIntoAVehicle(): boolean

IsGettingUp

  • get IsGettingUp(): boolean

IsGoingIntoCover

  • get IsGoingIntoCover(): boolean

IsHuman

  • get IsHuman(): boolean

IsIdle

  • get IsIdle(): boolean

IsInAir

  • get IsInAir(): boolean

IsInBoat

  • get IsInBoat(): boolean

IsInCombat

  • get IsInCombat(): boolean

IsInCoverFacingLeft

  • get IsInCoverFacingLeft(): boolean

IsInFlyingVehicle

  • get IsInFlyingVehicle(): boolean

IsInGroup

  • get IsInGroup(): boolean

IsInHeli

  • get IsInHeli(): boolean

IsInMeleeCombat

  • get IsInMeleeCombat(): boolean

IsInParachuteFreeFall

  • get IsInParachuteFreeFall(): boolean

IsInPlane

  • get IsInPlane(): boolean

IsInPoliceVehicle

  • get IsInPoliceVehicle(): boolean

IsInStealthMode

  • get IsInStealthMode(): boolean

IsInSub

  • get IsInSub(): boolean

IsInTaxi

  • get IsInTaxi(): boolean

IsInTrain

  • get IsInTrain(): boolean

IsInWater

  • get IsInWater(): boolean

IsInjured

  • get IsInjured(): boolean

IsInvincible

  • set IsInvincible(value: boolean): void
  • Parameters

    • value: boolean

    Returns void

IsJacking

  • get IsJacking(): boolean

IsJumping

  • get IsJumping(): boolean

IsJumpingOutOfVehicle

  • get IsJumpingOutOfVehicle(): boolean

IsOccluded

  • get IsOccluded(): boolean

IsOnBike

  • get IsOnBike(): boolean

IsOnFire

  • get IsOnFire(): boolean

IsOnFoot

  • get IsOnFoot(): boolean

IsOnScreen

  • get IsOnScreen(): boolean

IsOnlyDamagedByPlayer

  • set IsOnlyDamagedByPlayer(value: boolean): void
  • Parameters

    • value: boolean

    Returns void

IsPainAudioEnabled

  • set IsPainAudioEnabled(value: boolean): void

IsPerformingStealthKill

  • get IsPerformingStealthKill(): boolean

IsPersistent

  • get IsPersistent(): boolean
  • set IsPersistent(value: boolean): void

IsPlantingBomb

  • get IsPlantingBomb(): boolean

IsPlayer

  • get IsPlayer(): boolean

IsPositionFrozen

  • set IsPositionFrozen(value: boolean): void
  • Parameters

    • value: boolean

    Returns void

IsPriorityTargetForEnemies

  • set IsPriorityTargetForEnemies(value: boolean): void

IsProne

  • get IsProne(): boolean

IsRagdoll

  • get IsRagdoll(): boolean

IsRecordingCollisions

  • set IsRecordingCollisions(value: boolean): void
  • Parameters

    • value: boolean

    Returns void

IsReloading

  • get IsReloading(): boolean

IsRunning

  • get IsRunning(): boolean

IsScriptedSpeechPlaying

  • get IsScriptedSpeechPlaying(): boolean

IsShooting

  • get IsShooting(): boolean

IsSprinting

  • get IsSprinting(): boolean

IsStopped

  • get IsStopped(): boolean

IsSwimming

  • get IsSwimming(): boolean

IsSwimmingUnderWater

  • get IsSwimmingUnderWater(): boolean

IsTryingToEnterALockedVehicle

  • get IsTryingToEnterALockedVehicle(): boolean

IsUpright

  • get IsUpright(): boolean

IsUpsideDown

  • get IsUpsideDown(): boolean

IsVaulting

  • get IsVaulting(): boolean

IsVisible

  • get IsVisible(): boolean
  • set IsVisible(value: boolean): void

IsWalking

  • get IsWalking(): boolean

IsWearingHelmet

  • get IsWearingHelmet(): boolean

LastVehicle

LodDistance

  • get LodDistance(): number
  • set LodDistance(value: number): void

MaterialCollidingWith

MaxDrivingSpeed

  • set MaxDrivingSpeed(value: number): void

MaxHealth

  • get MaxHealth(): number
  • set MaxHealth(amount: number): void

MaxSpeed

  • set MaxSpeed(value: number): void

Model

Money

  • get Money(): number
  • set Money(amount: number): void

MotionBlur

  • set MotionBlur(value: boolean): void

NetworkId

  • get NetworkId(): number

NeverLeavesGroup

  • set NeverLeavesGroup(value: boolean): void

Opacity

  • get Opacity(): number
  • set Opacity(value: number): void

Player

Position

PositionNoOffset

  • set PositionNoOffset(position: Vector3): void

Quaternion

Rotation

RotationVelocity

SeatIndex

ShootRate

  • set ShootRate(value: number): void

State

  • get State(): StateBagInterface

StaysInVehicleWhenJacked

  • set StaysInVehicleWhenJacked(value: boolean): void

SubmersionLevel

  • get SubmersionLevel(): number

Sweat

  • set Sweat(value: number): void

Task

  • get Task(): undefined | Tasks

TaskSequenceProgress

  • get TaskSequenceProgress(): number

VehicleTryingToEnter

  • get VehicleTryingToEnter(): null | Vehicle

Velocity

Voice

  • set Voice(value: string): void

WasKilledByStealth

  • get WasKilledByStealth(): boolean

WasKilledByTakedown

  • get WasKilledByTakedown(): boolean

Weapons

  • get Weapons(): WeaponCollection

WetnessHeight

  • set WetnessHeight(value: number): void

Methods

AddStateBagChangeHandler

  • AddStateBagChangeHandler(keyFilter: null | string, handler: StateBagChangeHandler): number

applyDamage

  • applyDamage(damageAmount: number, armorFirst?: boolean): void
  • Parameters

    • damageAmount: number
    • armorFirst: boolean = true

    Returns void

applyForce

applyForceRelative

attachBlip

attachTo

  • attachTo(entity: Entity, position: Vector3, rotation: Vector3, collisions?: boolean, unk9?: boolean, useSoftPinning?: boolean, rotationOrder?: number): void

attachToBone

  • attachToBone(entityBone: EntityBone, position: Vector3, rotation: Vector3, collisions?: boolean, unk9?: boolean, useSoftPinning?: boolean, rotationOrder?: number): void

cancelRagdoll

  • cancelRagdoll(): void

clearAllProps

  • clearAllProps(): void

clearBloodDamage

  • clearBloodDamage(): void

clearLastWeaponDamage

  • clearLastWeaponDamage(): void

clearProp

  • clearProp(propId: number): void

clone

delete

  • delete(): void

detach

  • detach(): void

exists

  • exists(ped?: Ped): boolean

finalizeHeadBlend

  • finalizeHeadBlend(): void

getConfigFlag

  • getConfigFlag(flagId: number): boolean

getDrawableVariation

  • getDrawableVariation(componentId: number): number

getEntityAttachedTo

getEyeColor

  • getEyeColor(): number

getHairColor

  • getHairColor(): number

getHairHighlightColor

  • getHairHighlightColor(): number

getHeadBlend

  • getHeadBlend(): void | [number, number, number, number, number, number, number, number, number, boolean]
  • Returns void | [number, number, number, number, number, number, number, number, number, boolean]

getHeadOverlay

  • getHeadOverlay(overlayId: number): void | [number, number, number, number, number]
  • Parameters

    • overlayId: number

    Returns void | [number, number, number, number, number]

getHeadOverlayNum

  • getHeadOverlayNum(overlayId: number): number

getHeadOverlayOpacity

  • getHeadOverlayOpacity(overlayId: number): number

getHeadOverlayValue

  • getHeadOverlayValue(overlayId: number): number

getJackTarget

  • getJackTarget(): Ped

getJacker

  • getJacker(): Ped

getKiller

getLastWeaponImpactPosition

  • getLastWeaponImpactPosition(): Vector3

getMeleeTarget

  • getMeleeTarget(): Ped

getNumberOfDrawableVariations

  • getNumberOfDrawableVariations(componentId: number): number

getNumberOfPropDrawableVariations

  • getNumberOfPropDrawableVariations(propId: number): number

getNumberOfPropTextureVariations

  • getNumberOfPropTextureVariations(propId: number, drawableId?: number): number
  • Parameters

    • propId: number
    • drawableId: number = ...

    Returns number

getNumberTextureVariations

  • getNumberTextureVariations(componentId: number, drawableId?: number): number
  • Parameters

    • componentId: number
    • drawableId: number = ...

    Returns number

getOffsetPosition

getPositionOffset

getPropIndex

  • getPropIndex(propId: number): number

getPropTextureIndex

  • getPropTextureIndex(propId: number): number

getTextureVariation

  • getTextureVariation(componentId: number): number

giveHelmet

  • giveHelmet(canBeRemovedByPed: boolean, helmetType: HelmetType, textureIndex: number): void

giveWeapon

  • giveWeapon(weapon: WeaponHash, ammoCount?: number, isHidden?: boolean, equipNow?: boolean): void
  • Parameters

    • weapon: WeaponHash
    • ammoCount: number = 999
    • isHidden: boolean = false
    • equipNow: boolean = true

    Returns void

hasBeenDamagedBy

  • hasBeenDamagedBy(entity: Entity): boolean

hasBeenDamagedByAnyMeleeWeapon

  • hasBeenDamagedByAnyMeleeWeapon(): boolean

hasBeenDamagedByAnyWeapon

  • hasBeenDamagedByAnyWeapon(): boolean

hasBeenDamagedByWeapon

  • hasBeenDamagedByWeapon(weapon: WeaponHash): boolean

hasClearLosToEntity

  • hasClearLosToEntity(entity: Entity, traceType?: number): boolean

hasClearLosToEntityInFront

  • hasClearLosToEntityInFront(entity: Entity): boolean

hasHeadBlendFinished

  • hasHeadBlendFinished(): boolean

isAlive

  • isAlive(): boolean

isAttached

  • isAttached(): boolean

isAttachedTo

  • isAttachedTo(entity: Entity): boolean

isDead

  • isDead(): boolean

isHeadtracking

  • isHeadtracking(entity: Entity): boolean

isInAngledArea

  • isInAngledArea(origin: Vector3, edge: Vector3, angle: number): boolean

isInAnyVehicle

  • isInAnyVehicle(): boolean

isInArea

isInCombatAgainst

  • isInCombatAgainst(target: Ped): boolean

isInCover

  • isInCover(expectUseWeapon?: boolean): boolean
  • Parameters

    • expectUseWeapon: boolean = false

    Returns boolean

isInRangeOf

  • isInRangeOf(position: Vector3, range: number): boolean

isInVehicle

  • isInVehicle(vehicle: Vehicle): boolean

isNearEntity

isPropValid

  • isPropValid(propId: number, drawableId: number, textureId: number): boolean
  • Parameters

    • propId: number
    • drawableId: number
    • textureId: number

    Returns boolean

isSittingInAnyVehicle

  • isSittingInAnyVehicle(): boolean

isSittingInVehicle

  • isSittingInVehicle(vehicle: Vehicle): boolean

isTouching

  • isTouching(entity: Entity): boolean

isTouchingModel

  • isTouchingModel(model: Model): boolean

kill

  • kill(): void

knockPropOff

  • knockPropOff(p1: boolean, p2: boolean, p3: boolean, p4: boolean): void
  • Parameters

    • p1: boolean
    • p2: boolean
    • p3: boolean
    • p4: boolean

    Returns void

leaveGroup

  • leaveGroup(): void

listenForStateChange

  • listenForStateChange(keyFilter: null | string, handler: StateBagChangeHandler): number
  • A short hand function for AddStateBagChangeHandler, this gets automatically cleaned up on entity deletion.

    Parameters

    • keyFilter: null | string

      the key to filter for or null

    • handler: StateBagChangeHandler

      the function to handle the change

    Returns number

    a cookie to be used in RemoveStateBagChangeHandler

markAsNoLongerNeeded

  • markAsNoLongerNeeded(): void

openParachute

  • openParachute(): void

playAmbientSpeed

  • playAmbientSpeed(speechName: string, voiceName?: string, modifier?: SpeechModifier): void

ragdoll

  • ragdoll(duration?: number, ragdollType?: RagdollType): void

removeAllParticleEffects

  • removeAllParticleEffects(): void

removeAllWeapons

  • removeAllWeapons(): void

removeHelmet

  • removeHelmet(instantly: boolean): void

removeStateListener

  • removeStateListener(tgtCookie: number): void

removeWeapon

resetConfigFlag

  • resetConfigFlag(flagId: number): void

resetOpacity

  • resetOpacity(): void

resetVisibleDamage

  • resetVisibleDamage(): void

resurrect

  • resurrect(): void

setComponentVariation

  • setComponentVariation(componentId: number, drawableId: number, textureId: number, paletteId?: number): void
  • Parameters

    • componentId: number
    • drawableId: number
    • textureId: number
    • paletteId: number = 0

    Returns void

setConfigFlag

  • setConfigFlag(flagId: number, value: boolean): void

setDefaultComponentVariation

  • setDefaultComponentVariation(): void

setEyeColor

  • setEyeColor(color: number): void

setHairColor

  • setHairColor(color: number): void

setHairColors

  • setHairColors(primary: number, highlight: number): void

setHairHighlightColor

  • setHairHighlightColor(color: number): void

setHeadBlend

  • setHeadBlend(shapeFirstID: number, shapeSecondID: number, shapeThirdID: number, skinFirstID: number, skinSecondID: number, skinThirdID: number, shapeMix: number, skinMix: number, thirdMix: number, isParent?: boolean): void
  • Parameters

    • shapeFirstID: number
    • shapeSecondID: number
    • shapeThirdID: number
    • skinFirstID: number
    • skinSecondID: number
    • skinThirdID: number
    • shapeMix: number
    • skinMix: number
    • thirdMix: number
    • isParent: boolean = false

    Returns void

setHeadOverlay

  • setHeadOverlay(overlayId: number, index: number, opacity: number): void
  • Parameters

    • overlayId: number
    • index: number
    • opacity: number

    Returns void

setHeadOverlayColor

  • setHeadOverlayColor(overlayId: number, color: number): void

setHeadOverlayOpacity

  • setHeadOverlayOpacity(overlayId: number, opacity: number): void

setHeadOverlayValue

  • setHeadOverlayValue(overlayId: number, value: number): void

setHelmetPropIndex

  • setHelmetPropIndex(propIndex: number): void

setIntoVehicle

setNoCollision

  • setNoCollision(entity: Entity, toggle: boolean): void

setPropIndex

  • setPropIndex(propId: number, drawableId: number, textureId: number, attach?: boolean): void
  • Parameters

    • propId: number
    • drawableId: number
    • textureId: number
    • attach: boolean = true

    Returns void

setRandomComponentVariation

  • setRandomComponentVariation(): void

setRandomProps

  • setRandomProps(): void

Static exists

  • exists(ped: Ped): boolean

Static fromHandle

Static fromNetworkId

Generated using TypeDoc