Methods
achieveHeading
- achieveHeading(heading: number, timeout?: number): void
Parameters
heading: number
timeout: number = 0
Returns void
blockTemporaryEvents
- blockTemporaryEvents(block?: boolean): void
chaseWithGroundVehicle
- chaseWithGroundVehicle(target: Entity): void
clearAllImmediately
- clearAllImmediately(): void
clearAnimation
- clearAnimation(animDict: string, animName: string): void
Parameters
animDict: string
animName: string
Returns void
cower
- cower(duration: number): void
driveTo
Parameters
radius: number
speed: number
drivingstyle: DrivingStyle = DrivingStyle.None
Returns void
enterAnyVehicle
- enterAnyVehicle(seat?: VehicleSeat, timeout?: number, speed?: number, flag?: number): void
Parameters
seat: VehicleSeat = VehicleSeat.Any
timeout: number = -1
speed: number = 0
flag: number = 0
Returns void
fightAgainst
- fightAgainst(target: Ped, duration?: number): void
Parameters
target: Ped
Optional duration: number
Returns void
fightAgainstHatedTargets
- fightAgainstHatedTargets(radius: number, duration?: number): void
Parameters
radius: number
Optional duration: number
Returns void
fleeFrom
- fleeFrom(pedOrPosition: Ped | Vector3, duration?: number): void
followPointRoute
- followPointRoute(points: Vector3[]): void
followToOffsetFromEntity
- followToOffsetFromEntity(target: Entity, offset: Vector3, timeout: number, stoppingRange: number, movementSpeed?: number, persistFollowing?: boolean): void
Parameters
timeout: number
stoppingRange: number
movementSpeed: number = 1
persistFollowing: boolean = true
Returns void
goTo
- goTo(position: Vector3, ignorePaths?: boolean, timeout?: number, speed?: number): void
Parameters
ignorePaths: boolean = false
timeout: number = -1
speed: number = 1
Returns void
goToEntity
- goToEntity(target: Entity, offset?: null | Vector3, timeout?: number): void
Parameters
offset: null | Vector3 = null
timeout: number = -1
Returns void
guardCurrentPosition
- guardCurrentPosition(): void
handsUp
- handsUp(duration: number): void
lookAt
- lookAt(targetOrPosition: Vector3 | Entity, duration?: number): void
parachuteTo
- parachuteTo(position: Vector3): void
parkVehicle
- parkVehicle(vehicle: Vehicle, position: Vector3, heading: number, radius?: number, keepEngineOn?: boolean): void
Parameters
heading: number
radius: number = 20
keepEngineOn: boolean = false
Returns void
playAnimation
- playAnimation(animDict: string, animName: string, blendInSpeed: number, blendOutSpeed: number, duration: number, playbackRate: number, flags: AnimationFlags): Promise<void>
Parameters
animDict: string
animName: string
blendInSpeed: number
blendOutSpeed: number
duration: number
playbackRate: number
Returns Promise<void>
putAwayMobilePhone
- putAwayMobilePhone(): void
reactAndFlee
- reactAndFlee(ped: Ped): void
shuffleToNextVehicleSeat
- shuffleToNextVehicleSeat(vehicle: Vehicle): void
slideTo
- slideTo(position: Vector3, heading: number, duration?: number): void
Parameters
heading: number
duration: number = 0.7
Returns void
standStill
- standStill(duration: number): void
startScenario
- startScenario(name: string, position: Vector3, heading?: number, duration?: number, sittingScenario?: boolean, teleport?: boolean): void
Parameters
name: string
heading: number = 0
duration: number = 0
sittingScenario: boolean = false
teleport: boolean = true
Returns void
turnTo
- turnTo(targetOrPosition: Vector3 | Entity, duration?: number): void
useMobilePhone
- useMobilePhone(duration?: number): void
vehicleChase
- vehicleChase(target: Ped): void
vehicleShootAtPed
- vehicleShootAtPed(target: Ped): void
wait
- wait(duration: number): void
wanderAround
- wanderAround(position?: Vector3, radius?: number): void
Parameters
Optional position: Vector3
Optional radius: number
Returns void
Static everyoneLeaveVehicle
- everyoneLeaveVehicle(vehicle: Vehicle): void