@nativewrappers/fivem 0.0.65 → 0.0.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Audio.d.ts +2 -2
- package/Blip.d.ts +2 -2
- package/Camera.d.ts +1 -1
- package/Game.d.ts +1 -1
- package/GameplayCamera.d.ts +1 -1
- package/Model.d.ts +1 -1
- package/ParticleEffect.d.ts +2 -2
- package/ParticleEffectAsset.d.ts +1 -1
- package/README.md +45 -0
- package/Raycast.d.ts +2 -2
- package/RelationshipGroup.d.ts +1 -1
- package/Tasks.d.ts +3 -3
- package/World.d.ts +2 -2
- package/cfx/StateBagChangeHandler.d.ts +1 -3
- package/common/Command.d.ts +30 -0
- package/common/Convar.d.ts +13 -0
- package/common/GlobalData.d.ts +8 -0
- package/common/Kvp.d.ts +69 -0
- package/common/Resource.d.ts +14 -0
- package/common/decors/Events.d.ts +54 -0
- package/common/index.d.ts +8 -0
- package/common/net/NetworkedMap.d.ts +28 -0
- package/common/types.d.ts +5 -0
- package/common/utils/ClassTypes.d.ts +11 -0
- package/common/utils/Color.d.ts +14 -0
- package/common/utils/Maths.d.ts +4 -0
- package/common/utils/PointF.d.ts +12 -0
- package/common/utils/Quaternion.d.ts +10 -0
- package/common/utils/Vector.d.ts +429 -0
- package/common/utils/Vector2.d.ts +1 -0
- package/common/utils/Vector3.d.ts +1 -0
- package/common/utils/Vector4.d.ts +1 -0
- package/common/utils/cleanPlayerName.d.ts +6 -0
- package/common/utils/enumValues.d.ts +12 -0
- package/{utils/getStringFromUInt8Array.js → common/utils/getStringFromUInt8Array.d.ts} +1 -3
- package/{utils/getUInt32FromUint8Array.js → common/utils/getUInt32FromUint8Array.d.ts} +1 -1
- package/common/utils/index.d.ts +12 -0
- package/index.d.ts +1 -1
- package/index.js +20136 -26
- package/interfaces/Dimensions.d.ts +1 -1
- package/models/BaseEntity.d.ts +3 -3
- package/models/Ped.d.ts +2 -2
- package/models/PedBone.d.ts +1 -1
- package/models/PedBoneCollection.d.ts +1 -1
- package/models/Player.d.ts +1 -1
- package/models/Vehicle.d.ts +2 -2
- package/models/VehicleDoor.d.ts +2 -2
- package/models/VehicleDoorCollection.d.ts +1 -1
- package/models/VehicleMod.d.ts +2 -2
- package/models/VehicleModCollection.d.ts +2 -2
- package/models/VehicleToggleMod.d.ts +2 -2
- package/models/VehicleWheel.d.ts +1 -1
- package/models/VehicleWheelCollection.d.ts +1 -1
- package/models/VehicleWindow.d.ts +2 -2
- package/models/VehicleWindowCollection.d.ts +1 -1
- package/package.json +6 -4
- package/ui/Container.d.ts +2 -2
- package/ui/Effects.d.ts +1 -1
- package/ui/Hud.d.ts +2 -2
- package/ui/InstructionalButtons.d.ts +1 -1
- package/ui/Rectangle.d.ts +2 -2
- package/ui/Scaleform.d.ts +1 -1
- package/ui/Screen.d.ts +1 -1
- package/ui/Text.d.ts +1 -1
- package/ui/interfaces/IButton.d.ts +1 -1
- package/ui/interfaces/IDrawable.d.ts +1 -1
- package/ui/menu/items/UIMenuItem.d.ts +1 -1
- package/ui/menu/items/UIMenuListItem.d.ts +1 -1
- package/ui/menu/items/panels/AbstractUIMenuPanel.d.ts +2 -2
- package/ui/menu/items/panels/UIMenuStatisticsPanel.d.ts +1 -1
- package/utils/LiteEvent.d.ts +2 -6
- package/utils/index.d.ts +1 -1
- package/weapon/DlcWeaponData.d.ts +1 -1
- package/weapon/Weapon.d.ts +7 -7
- package/weapon/WeaponAsset.d.ts +1 -1
- package/weapon/WeaponCollection.d.ts +2 -2
- package/weaponComponent/DlcWeaponComponentData.d.ts +1 -1
- package/weaponComponent/InvalidWeaponComponent.d.ts +1 -1
- package/weaponComponent/WeaponComponent.d.ts +3 -3
- package/weaponComponent/WeaponComponentCollection.d.ts +3 -3
- package/Audio.js +0 -93
- package/Blip.js +0 -105
- package/Camera.js +0 -162
- package/Checkpoint.js +0 -43
- package/Events.js +0 -74
- package/Game.js +0 -474
- package/GameplayCamera.js +0 -141
- package/Model.js +0 -213
- package/NetworkedScene.js +0 -18
- package/ParticleEffect.js +0 -123
- package/ParticleEffectAsset.js +0 -105
- package/Pickup.js +0 -19
- package/Raycast.js +0 -123
- package/RelationshipGroup.js +0 -67
- package/Rope.js +0 -129
- package/TaskSequence.js +0 -48
- package/Tasks.js +0 -241
- package/World.js +0 -765
- package/cfx/StateBagChangeHandler.js +0 -1
- package/cfx/index.js +0 -1
- package/enums/Alignment.js +0 -6
- package/enums/AnimationFlags.js +0 -35
- package/enums/AudioFlag.js +0 -38
- package/enums/BadgeStyle.js +0 -183
- package/enums/Blip.js +0 -225
- package/enums/Bone.js +0 -103
- package/enums/CameraShake.js +0 -14
- package/enums/CameraTypes.js +0 -8
- package/enums/CheckboxStyle.js +0 -5
- package/enums/Checkpoint.js +0 -67
- package/enums/CloudHat.js +0 -27
- package/enums/Control.js +0 -361
- package/enums/CursorSprite.js +0 -15
- package/enums/Driving.js +0 -34
- package/enums/ExplosionType.js +0 -45
- package/enums/FiringPattern.js +0 -20
- package/enums/Font.js +0 -8
- package/enums/ForceType.js +0 -9
- package/enums/Gender.js +0 -5
- package/enums/HelmetType.js +0 -6
- package/enums/HudColor.js +0 -184
- package/enums/HudComponent.js +0 -54
- package/enums/InputMode.js +0 -5
- package/enums/InvertAxis.js +0 -7
- package/enums/Language.js +0 -15
- package/enums/LeaveVehicleFlags.js +0 -11
- package/enums/LoadingSpinnerType.js +0 -8
- package/enums/MarkerType.js +0 -50
- package/enums/MenuAlignment.js +0 -5
- package/enums/NotificationType.js +0 -11
- package/enums/Parachute.js +0 -15
- package/enums/PickupType.js +0 -74
- package/enums/RadioStation.js +0 -25
- package/enums/RagdollType.js +0 -7
- package/enums/RaycastEnums.js +0 -32
- package/enums/Relationship.js +0 -10
- package/enums/RopeType.js +0 -6
- package/enums/ScreenEffect.js +0 -84
- package/enums/SpeechModifier.js +0 -40
- package/enums/Vehicle.js +0 -376
- package/enums/Weather.js +0 -22
- package/enums/ZoneID.js +0 -95
- package/enums/index.js +0 -42
- package/hashes/MaterialHash.js +0 -217
- package/hashes/PedHash.js +0 -725
- package/hashes/VehicleHash.js +0 -523
- package/hashes/WeaponHash.js +0 -161
- package/hashes/WeatherTypeHash.js +0 -22
- package/hashes/index.js +0 -5
- package/interfaces/Dimensions.js +0 -1
- package/models/BaseEntity.js +0 -477
- package/models/Entity.js +0 -25
- package/models/EntityBone.js +0 -26
- package/models/EntityBoneCollection.js +0 -18
- package/models/Ped.js +0 -692
- package/models/PedBone.js +0 -9
- package/models/PedBoneCollection.js +0 -21
- package/models/Player.js +0 -186
- package/models/Prop.js +0 -26
- package/models/Vehicle.js +0 -576
- package/models/VehicleDoor.js +0 -44
- package/models/VehicleDoorCollection.js +0 -62
- package/models/VehicleMod.js +0 -35
- package/models/VehicleModCollection.js +0 -227
- package/models/VehicleToggleMod.js +0 -29
- package/models/VehicleWheel.js +0 -23
- package/models/VehicleWheelCollection.js +0 -57
- package/models/VehicleWindow.js +0 -35
- package/models/VehicleWindowCollection.js +0 -57
- package/models/index.js +0 -19
- package/ui/Container.js +0 -31
- package/ui/Effects.js +0 -106
- package/ui/Fading.js +0 -69
- package/ui/Hud.js +0 -39
- package/ui/InstructionalButtons.js +0 -54
- package/ui/LoadingPrompt.js +0 -45
- package/ui/Notification.js +0 -9
- package/ui/Rectangle.js +0 -40
- package/ui/Scaleform.js +0 -236
- package/ui/Screen.js +0 -72
- package/ui/Sprite.js +0 -60
- package/ui/Text.js +0 -115
- package/ui/Timerbar.js +0 -248
- package/ui/index.js +0 -15
- package/ui/interfaces/IButton.js +0 -1
- package/ui/interfaces/IDrawable.js +0 -1
- package/ui/interfaces/index.js +0 -1
- package/ui/menu/Menu.js +0 -831
- package/ui/menu/MenuControl.js +0 -12
- package/ui/menu/MenuControls.js +0 -9
- package/ui/menu/MenuSettings.js +0 -54
- package/ui/menu/index.js +0 -6
- package/ui/menu/items/UIMenuCheckboxItem.js +0 -59
- package/ui/menu/items/UIMenuItem.js +0 -1111
- package/ui/menu/items/UIMenuListItem.js +0 -119
- package/ui/menu/items/UIMenuSeparatorItem.js +0 -29
- package/ui/menu/items/UIMenuSliderItem.js +0 -191
- package/ui/menu/items/index.js +0 -6
- package/ui/menu/items/panels/AbstractUIMenuPanel.js +0 -44
- package/ui/menu/items/panels/UIMenuColorPanel.js +0 -217
- package/ui/menu/items/panels/UIMenuGridPanel.js +0 -261
- package/ui/menu/items/panels/UIMenuPercentagePanel.js +0 -124
- package/ui/menu/items/panels/UIMenuStatisticsPanel.js +0 -79
- package/ui/menu/items/panels/UIMenuStatisticsPanelItem.js +0 -35
- package/ui/menu/items/panels/index.js +0 -6
- package/ui/menu/modules/ListItem.js +0 -10
- package/ui/menu/modules/index.js +0 -1
- package/utils/Animations.js +0 -55
- package/utils/Crypto.js +0 -25
- package/utils/LiteEvent.js +0 -19
- package/utils/Maths.js +0 -10
- package/utils/Point.js +0 -30
- package/utils/PointF.js +0 -14
- package/utils/Quaternion.js +0 -27
- package/utils/Size.js +0 -8
- package/utils/String.js +0 -25
- package/utils/enumValues.js +0 -14
- package/utils/index.js +0 -9
- package/weapon/DlcWeaponData.js +0 -44
- package/weapon/Mk2WeaponHash.js +0 -25
- package/weapon/Weapon.js +0 -270
- package/weapon/WeaponAsset.js +0 -84
- package/weapon/WeaponCollection.js +0 -187
- package/weapon/WeaponDisplayNameByHash.js +0 -75
- package/weapon/WeaponGroup.js +0 -19
- package/weapon/WeaponHudStats.js +0 -38
- package/weapon/WeaponLivery.js +0 -14
- package/weapon/WeaponLiveryColor.js +0 -35
- package/weapon/WeaponTint.js +0 -43
- package/weapon/index.js +0 -8
- package/weaponComponent/ComponentAttachmentPoint.js +0 -19
- package/weaponComponent/ComponentAttachmentPointByHash.js +0 -573
- package/weaponComponent/ComponentDisplayNameByHash.js +0 -280
- package/weaponComponent/DlcWeaponComponentData.js +0 -44
- package/weaponComponent/InvalidWeaponComponent.js +0 -28
- package/weaponComponent/WeaponComponent.js +0 -123
- package/weaponComponent/WeaponComponentCollection.js +0 -174
- package/weaponComponent/WeaponComponentHash.js +0 -887
- package/weaponComponent/WeaponComponentHashesByWeaponHash.js +0 -829
- package/weaponComponent/WeaponComponentHudStats.js +0 -34
- package/weaponComponent/index.js +0 -5
package/Rope.js
DELETED
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import { Vector3 } from "./utils";
|
|
2
|
-
/**
|
|
3
|
-
* Class to manage invisible ropes between entities.
|
|
4
|
-
*/
|
|
5
|
-
export class Rope {
|
|
6
|
-
/**
|
|
7
|
-
* Id of rope entity.
|
|
8
|
-
*/
|
|
9
|
-
handle;
|
|
10
|
-
/**
|
|
11
|
-
* Create a rope object based on an existing rope in the world.
|
|
12
|
-
*
|
|
13
|
-
* @param handle entity Id of rope.
|
|
14
|
-
*/
|
|
15
|
-
constructor(handle) {
|
|
16
|
-
this.handle = handle;
|
|
17
|
-
}
|
|
18
|
-
get Handle() {
|
|
19
|
-
return this.handle;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Get the length of the rope.
|
|
23
|
-
*
|
|
24
|
-
* @returns The rope length.
|
|
25
|
-
*/
|
|
26
|
-
get Length() {
|
|
27
|
-
return GetRopeLength(this.handle);
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Sets the length of the rope.
|
|
31
|
-
*
|
|
32
|
-
* @param length Desired new length of rope.
|
|
33
|
-
*/
|
|
34
|
-
set Length(length) {
|
|
35
|
-
RopeForceLength(this.handle, length);
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Get the number of vertices on the rope.
|
|
39
|
-
*
|
|
40
|
-
* @returns Returns the number of vertices.
|
|
41
|
-
*/
|
|
42
|
-
get VertexCount() {
|
|
43
|
-
return GetRopeVertexCount(this.handle);
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Resets the length of the rope to it's length upon object creation or a length of 1.
|
|
47
|
-
*
|
|
48
|
-
* @param reset Whether to reset the length to it's original length or 1.
|
|
49
|
-
*/
|
|
50
|
-
resetLength(reset) {
|
|
51
|
-
RopeResetLength(this.handle, reset ? 1 : this.Length);
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Activates world physics on the rope object.
|
|
55
|
-
*/
|
|
56
|
-
activatePhysics() {
|
|
57
|
-
ActivatePhysics(this.handle);
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Attach the rope to an entity.
|
|
61
|
-
*
|
|
62
|
-
* @param entity Entity to attach the rope to.
|
|
63
|
-
* @param position Location where the rope is to be attached.
|
|
64
|
-
*/
|
|
65
|
-
attachEntity(entity, position) {
|
|
66
|
-
AttachRopeToEntity(this.handle, entity.Handle, position.x, position.y, position.z, false);
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Attach the rope between two entities at given locations on the entities.
|
|
70
|
-
*
|
|
71
|
-
* @param entityOne The first entity to attach to.
|
|
72
|
-
* @param positionOne Where on the first entity to attach the rope to.
|
|
73
|
-
* @param entityTwo The second entity to attach to.
|
|
74
|
-
* @param positionTwo Where on the second entity to attach the rope to.
|
|
75
|
-
* @param length The desired length of the rope between the two entities.
|
|
76
|
-
*/
|
|
77
|
-
attachEntities(entityOne, positionOne, entityTwo, positionTwo, length) {
|
|
78
|
-
AttachEntitiesToRope(this.handle, entityOne.Handle, entityTwo.Handle, positionOne.x, positionOne.y, positionOne.z, positionTwo.x, positionTwo.y, positionTwo.z, length, false, false, "", "");
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Detach the rope from an entity.
|
|
82
|
-
*
|
|
83
|
-
* @param entity Entity to detach the rope from.
|
|
84
|
-
*/
|
|
85
|
-
detachEntity(entity) {
|
|
86
|
-
DetachRopeFromEntity(this.handle, entity.Handle);
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Pin a vertex of the rope to a certain location.
|
|
90
|
-
*
|
|
91
|
-
* @param vertex Vertex to pin.
|
|
92
|
-
* @param position Location to pin the vertex to.
|
|
93
|
-
*/
|
|
94
|
-
pinVertex(vertex, position) {
|
|
95
|
-
PinRopeVertex(this.handle, vertex, position.x, position.y, position.z);
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Unpin a specified vertex from it's current pinned location (if any).
|
|
99
|
-
*
|
|
100
|
-
* @param vertex Vertex to unpin.
|
|
101
|
-
*/
|
|
102
|
-
unpinVertex(vertex) {
|
|
103
|
-
UnpinRopeVertex(this.handle, vertex);
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Return the world location of a specified vertex on the rope.
|
|
107
|
-
*
|
|
108
|
-
* @param vertex Vertex to get location from.
|
|
109
|
-
* @returns The vector location of the vertex.
|
|
110
|
-
*/
|
|
111
|
-
getVertexCoord(vertex) {
|
|
112
|
-
return Vector3.fromArray(GetRopeVertexCoord(this.handle, vertex));
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Delete the rope from the world. This does not delete the rope object.
|
|
116
|
-
*/
|
|
117
|
-
delete() {
|
|
118
|
-
DeleteRope(this.handle);
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Check if the rope still exists in the world based on it's handle.
|
|
122
|
-
*
|
|
123
|
-
* @returns Whether the rope exists or not.
|
|
124
|
-
*/
|
|
125
|
-
exists() {
|
|
126
|
-
const [exists] = DoesRopeExist(this.handle);
|
|
127
|
-
return exists;
|
|
128
|
-
}
|
|
129
|
-
}
|
package/TaskSequence.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { Tasks } from "./Tasks";
|
|
2
|
-
// TODO: Figure out why this uses 'null ped'
|
|
3
|
-
export class TaskSequence {
|
|
4
|
-
static nullTask;
|
|
5
|
-
handle = 0;
|
|
6
|
-
isClosed;
|
|
7
|
-
count;
|
|
8
|
-
constructor(handle) {
|
|
9
|
-
handle === undefined ? this.create() : (this.handle = handle);
|
|
10
|
-
if (!TaskSequence.nullTask) {
|
|
11
|
-
TaskSequence.nullTask = new Tasks(null);
|
|
12
|
-
}
|
|
13
|
-
this.isClosed = false;
|
|
14
|
-
this.count = 0;
|
|
15
|
-
}
|
|
16
|
-
create() {
|
|
17
|
-
// Docs generate this as 'void' even though it returns a number
|
|
18
|
-
// @ts-ignore ignore the fact that OpenSequenceTask expects a paramater
|
|
19
|
-
this.handle = OpenSequenceTask();
|
|
20
|
-
}
|
|
21
|
-
dispose() {
|
|
22
|
-
ClearSequenceTask(this.handle);
|
|
23
|
-
this.handle = 0;
|
|
24
|
-
}
|
|
25
|
-
close(repeat = false) {
|
|
26
|
-
if (this.isClosed)
|
|
27
|
-
return;
|
|
28
|
-
SetSequenceToRepeat(this.handle, repeat);
|
|
29
|
-
CloseSequenceTask(this.handle);
|
|
30
|
-
this.isClosed = true;
|
|
31
|
-
}
|
|
32
|
-
get Handle() {
|
|
33
|
-
return this.handle;
|
|
34
|
-
}
|
|
35
|
-
get AddTask() {
|
|
36
|
-
if (this.isClosed) {
|
|
37
|
-
throw new Error("You can't add tasks to a closed sequence!");
|
|
38
|
-
}
|
|
39
|
-
this.count += 1;
|
|
40
|
-
return TaskSequence.nullTask;
|
|
41
|
-
}
|
|
42
|
-
get IsClosed() {
|
|
43
|
-
return this.isClosed;
|
|
44
|
-
}
|
|
45
|
-
get Count() {
|
|
46
|
-
return this.count;
|
|
47
|
-
}
|
|
48
|
-
}
|
package/Tasks.js
DELETED
|
@@ -1,241 +0,0 @@
|
|
|
1
|
-
import { DrivingStyle, FiringPattern, VehicleSeat, } from "./enums";
|
|
2
|
-
import { Ped } from "./models";
|
|
3
|
-
import { BaseEntity } from "./models/BaseEntity";
|
|
4
|
-
import { Vector3 } from "./utils";
|
|
5
|
-
import { LoadAnimDict } from "./utils/Animations";
|
|
6
|
-
export class Tasks {
|
|
7
|
-
ped;
|
|
8
|
-
// we take null because sequences have a null ped, if you pass null to this
|
|
9
|
-
// you betterk now what you're doing.
|
|
10
|
-
constructor(ped) {
|
|
11
|
-
const actualPed = ped ?? { handle: null };
|
|
12
|
-
// @ts-ignore
|
|
13
|
-
this.ped = actualPed;
|
|
14
|
-
}
|
|
15
|
-
achieveHeading(heading, timeout = 0) {
|
|
16
|
-
TaskAchieveHeading(this.ped.Handle, heading, timeout);
|
|
17
|
-
}
|
|
18
|
-
blockTemporaryEvents(block = true) {
|
|
19
|
-
TaskSetBlockingOfNonTemporaryEvents(this.ped.Handle, block);
|
|
20
|
-
}
|
|
21
|
-
aimAt(target, duration) {
|
|
22
|
-
if (target instanceof BaseEntity)
|
|
23
|
-
TaskAimGunAtEntity(this.ped.Handle, target.Handle, duration, false);
|
|
24
|
-
else
|
|
25
|
-
TaskAimGunAtCoord(this.ped.Handle, target.x, target.y, target.z, duration, false, false);
|
|
26
|
-
}
|
|
27
|
-
arrest(ped) {
|
|
28
|
-
TaskArrestPed(this.ped.Handle, ped.Handle);
|
|
29
|
-
}
|
|
30
|
-
chatTo(ped) {
|
|
31
|
-
TaskChatToPed(this.ped.Handle, ped.Handle, 16, 0, 0, 0, 0, 0);
|
|
32
|
-
}
|
|
33
|
-
jump() {
|
|
34
|
-
TaskJump(this.ped.Handle, true);
|
|
35
|
-
}
|
|
36
|
-
climb() {
|
|
37
|
-
TaskClimb(this.ped.Handle, true);
|
|
38
|
-
}
|
|
39
|
-
climbLadder() {
|
|
40
|
-
TaskClimbLadder(this.ped.Handle, 1);
|
|
41
|
-
}
|
|
42
|
-
cower(duration) {
|
|
43
|
-
TaskCower(this.ped.Handle, duration);
|
|
44
|
-
}
|
|
45
|
-
chaseWithGroundVehicle(target) {
|
|
46
|
-
TaskVehicleChase(this.ped.Handle, target.Handle);
|
|
47
|
-
}
|
|
48
|
-
chaseWithHelicopter(target, offset) {
|
|
49
|
-
TaskHeliChase(this.ped.Handle, target.Handle, offset.x, offset.y, offset.z);
|
|
50
|
-
}
|
|
51
|
-
chaseWithPlane(target, offset) {
|
|
52
|
-
TaskPlaneChase(this.ped.Handle, target.Handle, offset.x, offset.y, offset.z);
|
|
53
|
-
}
|
|
54
|
-
cruiseWithVehicle(vehicle, speed, drivingstyle = DrivingStyle.None) {
|
|
55
|
-
TaskVehicleDriveWander(this.ped.Handle, vehicle.Handle, speed, drivingstyle);
|
|
56
|
-
}
|
|
57
|
-
driveTo(vehicle, target, radius, speed, drivingstyle = DrivingStyle.None) {
|
|
58
|
-
TaskVehicleDriveToCoordLongrange(this.ped.Handle, vehicle.Handle, target.x, target.y, target.z, speed, drivingstyle, radius);
|
|
59
|
-
}
|
|
60
|
-
enterAnyVehicle(seat = VehicleSeat.Any, timeout = -1, speed = 0, flag = 0) {
|
|
61
|
-
TaskEnterVehicle(this.ped.Handle, 0, timeout, seat, speed, flag, 0);
|
|
62
|
-
}
|
|
63
|
-
static everyoneLeaveVehicle(vehicle) {
|
|
64
|
-
TaskEveryoneLeaveVehicle(vehicle.Handle);
|
|
65
|
-
}
|
|
66
|
-
fightAgainst(target, duration) {
|
|
67
|
-
if (duration) {
|
|
68
|
-
TaskCombatPedTimed(this.ped.Handle, target.Handle, duration, 0);
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
TaskCombatPed(this.ped.Handle, target.Handle, 0, 16);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
fightAgainstHatedTargets(radius, duration) {
|
|
75
|
-
if (duration) {
|
|
76
|
-
TaskCombatHatedTargetsAroundPedTimed(this.ped.Handle, radius, duration, 0);
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
TaskCombatHatedTargetsAroundPed(this.ped.Handle, radius, 0);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
fleeFrom(pedOrPosition, duration = -1) {
|
|
83
|
-
if (pedOrPosition instanceof Ped) {
|
|
84
|
-
TaskSmartFleePed(this.ped.Handle, pedOrPosition.Handle, 100, duration, false, false);
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
TaskSmartFleeCoord(this.ped.Handle, pedOrPosition.x, pedOrPosition.y, pedOrPosition.z, 100, duration, false, false);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
followPointRoute(points) {
|
|
91
|
-
TaskFlushRoute();
|
|
92
|
-
points.forEach((point) => TaskExtendRoute(point.x, point.y, point.z));
|
|
93
|
-
TaskFollowPointRoute(this.ped.Handle, 1, 0);
|
|
94
|
-
}
|
|
95
|
-
followToOffsetFromEntity(target, offset, timeout, stoppingRange, movementSpeed = 1, persistFollowing = true) {
|
|
96
|
-
TaskFollowToOffsetOfEntity(this.ped.Handle, target.Handle, offset.x, offset.y, offset.z, movementSpeed, timeout, stoppingRange, persistFollowing);
|
|
97
|
-
}
|
|
98
|
-
goTo(position, ignorePaths = false, timeout = -1, speed = 1, targetHeading = 0, distanceToSlide = 0, flags = 0) {
|
|
99
|
-
if (ignorePaths) {
|
|
100
|
-
TaskGoStraightToCoord(this.ped.Handle, position.x, position.y, position.z, speed, timeout, targetHeading, distanceToSlide);
|
|
101
|
-
}
|
|
102
|
-
else {
|
|
103
|
-
TaskFollowNavMeshToCoord(this.ped.Handle, position.x, position.y, position.z, speed, timeout, 0, flags, targetHeading);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
goToEntity(target, offset = null, timeout = -1) {
|
|
107
|
-
if (offset === null) {
|
|
108
|
-
offset = new Vector3(0, 0, 0);
|
|
109
|
-
}
|
|
110
|
-
TaskGotoEntityOffsetXy(this.ped.Handle, target.Handle, timeout, offset.x, offset.y, offset.z, 1, true);
|
|
111
|
-
}
|
|
112
|
-
guardCurrentPosition() {
|
|
113
|
-
TaskGuardCurrentPosition(this.ped.Handle, 15, 10, true);
|
|
114
|
-
}
|
|
115
|
-
handsUp(duration) {
|
|
116
|
-
TaskHandsUp(this.ped.Handle, duration, 0, -1, false);
|
|
117
|
-
}
|
|
118
|
-
landPlane(startPosition, touchdownPosition, plane = null) {
|
|
119
|
-
if (plane === null) {
|
|
120
|
-
plane = this.ped.CurrentVehicle;
|
|
121
|
-
}
|
|
122
|
-
if (plane === null || !plane.exists() || plane.isDead()) {
|
|
123
|
-
TaskPlaneLand(this.ped.Handle, 0, startPosition.x, startPosition.y, startPosition.z, touchdownPosition.x, touchdownPosition.y, touchdownPosition.z);
|
|
124
|
-
}
|
|
125
|
-
else {
|
|
126
|
-
TaskPlaneLand(this.ped.Handle, plane.Handle, startPosition.x, startPosition.y, startPosition.z, touchdownPosition.x, touchdownPosition.y, touchdownPosition.z);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
lookAt(targetOrPosition, duration = -1) {
|
|
130
|
-
if (targetOrPosition instanceof BaseEntity)
|
|
131
|
-
TaskLookAtEntity(this.ped.Handle, targetOrPosition.Handle, duration, 0, 2);
|
|
132
|
-
else
|
|
133
|
-
TaskLookAtCoord(this.ped.Handle, targetOrPosition.x, targetOrPosition.y, targetOrPosition.z, duration, 0, 2);
|
|
134
|
-
}
|
|
135
|
-
parachuteTo(position) {
|
|
136
|
-
TaskParachuteToTarget(this.ped.Handle, position.x, position.y, position.z);
|
|
137
|
-
}
|
|
138
|
-
parkVehicle(vehicle, position, heading, radius = 20, keepEngineOn = false) {
|
|
139
|
-
TaskVehiclePark(this.ped.Handle, vehicle.Handle, position.x, position.y, position.z, heading, 1, radius, keepEngineOn);
|
|
140
|
-
}
|
|
141
|
-
performSequence(sequence) {
|
|
142
|
-
if (!sequence.IsClosed) {
|
|
143
|
-
sequence.close();
|
|
144
|
-
}
|
|
145
|
-
this.clearAll();
|
|
146
|
-
// this.ped.BlockPermanentEvents = true;
|
|
147
|
-
TaskPerformSequence(this.ped.Handle, sequence.Handle);
|
|
148
|
-
}
|
|
149
|
-
async playAnimation(animDict, animName, blendInSpeed, blendOutSpeed, duration, playbackRate, flags) {
|
|
150
|
-
await LoadAnimDict(animDict);
|
|
151
|
-
TaskPlayAnim(this.ped.Handle, animDict, animName, blendInSpeed, blendOutSpeed, duration, flags, playbackRate, false, false, false);
|
|
152
|
-
RemoveAnimDict(animDict);
|
|
153
|
-
}
|
|
154
|
-
reactAndFlee(ped) {
|
|
155
|
-
TaskReactAndFleePed(this.ped.Handle, ped.Handle);
|
|
156
|
-
}
|
|
157
|
-
reloadWeapon() {
|
|
158
|
-
TaskReloadWeapon(this.ped.Handle, true);
|
|
159
|
-
}
|
|
160
|
-
shootAt(targetOrPosition, duration = -1, pattern = FiringPattern.Default) {
|
|
161
|
-
if (targetOrPosition instanceof Ped)
|
|
162
|
-
TaskShootAtEntity(this.ped.Handle, targetOrPosition.Handle, duration, pattern);
|
|
163
|
-
else
|
|
164
|
-
TaskShootAtCoord(this.ped.Handle, targetOrPosition.x, targetOrPosition.y, targetOrPosition.z, duration, pattern);
|
|
165
|
-
}
|
|
166
|
-
shuffleToNextVehicleSeat(vehicle) {
|
|
167
|
-
TaskShuffleToNextVehicleSeat(this.ped.Handle, vehicle.Handle);
|
|
168
|
-
}
|
|
169
|
-
skyDive() {
|
|
170
|
-
TaskSkyDive(this.ped.Handle);
|
|
171
|
-
}
|
|
172
|
-
slideTo(position, heading, duration = 0.7) {
|
|
173
|
-
TaskPedSlideToCoord(this.ped.Handle, position.x, position.y, position.z, heading, duration);
|
|
174
|
-
}
|
|
175
|
-
standStill(duration) {
|
|
176
|
-
TaskStandStill(this.ped.Handle, duration);
|
|
177
|
-
}
|
|
178
|
-
startScenario(name, position, heading = 0, duration = 0, sittingScenario = false, teleport = true) {
|
|
179
|
-
TaskStartScenarioAtPosition(this.ped.Handle, name, position.x, position.y, position.z, heading, duration, sittingScenario, teleport);
|
|
180
|
-
}
|
|
181
|
-
swapWeapon() {
|
|
182
|
-
TaskSwapWeapon(this.ped.Handle, false);
|
|
183
|
-
}
|
|
184
|
-
turnTo(targetOrPosition, duration = -1) {
|
|
185
|
-
if (targetOrPosition instanceof BaseEntity)
|
|
186
|
-
TaskTurnPedToFaceEntity(this.ped.Handle, targetOrPosition.Handle, duration);
|
|
187
|
-
else
|
|
188
|
-
TaskTurnPedToFaceCoord(this.ped.Handle, targetOrPosition.x, targetOrPosition.y, targetOrPosition.z, duration);
|
|
189
|
-
}
|
|
190
|
-
useParachute() {
|
|
191
|
-
TaskParachute(this.ped.Handle, true);
|
|
192
|
-
}
|
|
193
|
-
useMobilePhone(duration = 1) {
|
|
194
|
-
TaskUseMobilePhone(this.ped.Handle, duration);
|
|
195
|
-
}
|
|
196
|
-
putAwayParachute() {
|
|
197
|
-
TaskParachute(this.ped.Handle, false);
|
|
198
|
-
}
|
|
199
|
-
putAwayMobilePhone() {
|
|
200
|
-
TaskUseMobilePhone(this.ped.Handle, 0);
|
|
201
|
-
}
|
|
202
|
-
vehicleChase(target) {
|
|
203
|
-
TaskVehicleChase(this.ped.Handle, target.Handle);
|
|
204
|
-
}
|
|
205
|
-
vehicleShootAtPed(target) {
|
|
206
|
-
TaskVehicleShootAtPed(this.ped.Handle, target.Handle, 20);
|
|
207
|
-
}
|
|
208
|
-
wait(duration) {
|
|
209
|
-
TaskPause(this.ped.Handle, duration);
|
|
210
|
-
}
|
|
211
|
-
wanderAround(position, radius) {
|
|
212
|
-
if (position && radius)
|
|
213
|
-
TaskWanderInArea(this.ped.Handle, position.x, position.y, position.z, radius, 0, 0);
|
|
214
|
-
else
|
|
215
|
-
TaskWanderStandard(this.ped.Handle, 0, 0);
|
|
216
|
-
}
|
|
217
|
-
warpIntoVehicle(vehicle, seat) {
|
|
218
|
-
TaskWarpPedIntoVehicle(this.ped.Handle, vehicle.Handle, seat);
|
|
219
|
-
}
|
|
220
|
-
warpOutOfVehicle(vehicle, flags) {
|
|
221
|
-
TaskLeaveVehicle(this.ped.Handle, vehicle.Handle, flags);
|
|
222
|
-
}
|
|
223
|
-
isPlayingAnim(dict, anim, taskFlag = 3) {
|
|
224
|
-
return IsEntityPlayingAnim(this.ped.Handle, dict, anim, taskFlag);
|
|
225
|
-
}
|
|
226
|
-
clearAll() {
|
|
227
|
-
ClearPedTasks(this.ped.Handle);
|
|
228
|
-
}
|
|
229
|
-
clearAllImmediately() {
|
|
230
|
-
ClearPedTasksImmediately(this.ped.Handle);
|
|
231
|
-
}
|
|
232
|
-
clearLookAt() {
|
|
233
|
-
TaskClearLookAt(this.ped.Handle);
|
|
234
|
-
}
|
|
235
|
-
clearSecondary() {
|
|
236
|
-
ClearPedSecondaryTask(this.ped.Handle);
|
|
237
|
-
}
|
|
238
|
-
clearAnimation(animDict, animName) {
|
|
239
|
-
StopAnimTask(this.ped.Handle, animDict, animName, -4);
|
|
240
|
-
}
|
|
241
|
-
}
|