@nativewrappers/server 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/README.md +45 -0
- 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/common/utils/getStringFromUInt8Array.d.ts +8 -0
- package/common/utils/getUInt32FromUint8Array.d.ts +8 -0
- package/common/utils/index.d.ts +12 -0
- package/entities/BaseEntity.d.ts +3 -3
- package/entities/Ped.d.ts +1 -1
- package/entities/Vehicle.d.ts +3 -3
- package/index.d.ts +1 -1
- package/index.js +1807 -7
- package/package.json +7 -5
- package/type/Anticheat.d.ts +1 -1
- package/utils/index.d.ts +1 -1
- package/Events.js +0 -79
- package/Game.js +0 -55
- package/cfx/StateBagChangeHandler.js +0 -1
- package/cfx/index.js +0 -1
- package/entities/BaseEntity.js +0 -135
- package/entities/Entity.js +0 -12
- package/entities/Ped.js +0 -81
- package/entities/Player.js +0 -136
- package/entities/Prop.js +0 -32
- package/entities/Vehicle.js +0 -175
- package/entities/index.js +0 -5
- package/enum/PopulationType.js +0 -14
- package/enum/VehicleLockStatus.js +0 -10
- package/enum/VehicleType.js +0 -11
- package/enum/eEntityType.js +0 -6
- package/enum/index.js +0 -4
- package/type/Anticheat.js +0 -1
- package/type/Hash.js +0 -1
- package/utils/index.js +0 -1
package/entities/Vehicle.js
DELETED
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
import { ClassTypes } from "../../common/utils/ClassTypes";
|
|
2
|
-
import { Color } from "../utils";
|
|
3
|
-
import { BaseEntity } from "./BaseEntity";
|
|
4
|
-
export class Vehicle extends BaseEntity {
|
|
5
|
-
type = ClassTypes.Vehicle;
|
|
6
|
-
constructor(handle) {
|
|
7
|
-
super(handle);
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Get an interable list of vehicles currently on the server
|
|
11
|
-
* @returns Iterable list of Vehicles.
|
|
12
|
-
*/
|
|
13
|
-
static *AllVehicles() {
|
|
14
|
-
for (const veh of GetAllVehicles()) {
|
|
15
|
-
yield new Vehicle(veh);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
static fromNetworkId(networkId) {
|
|
19
|
-
const ent = NetworkGetEntityFromNetworkId(networkId);
|
|
20
|
-
if (ent === 0)
|
|
21
|
-
return null;
|
|
22
|
-
return new Vehicle(ent);
|
|
23
|
-
}
|
|
24
|
-
static fromStateBagName(stateBageName) {
|
|
25
|
-
const ent = GetEntityFromStateBagName(stateBageName);
|
|
26
|
-
if (ent === 0)
|
|
27
|
-
return null;
|
|
28
|
-
return new Vehicle(ent);
|
|
29
|
-
}
|
|
30
|
-
get IsEngineRunning() {
|
|
31
|
-
return GetIsVehicleEngineRunning(this.handle);
|
|
32
|
-
}
|
|
33
|
-
get IsPrimaryColourCustom() {
|
|
34
|
-
return GetIsVehiclePrimaryColourCustom(this.handle);
|
|
35
|
-
}
|
|
36
|
-
get IsSecondaryColourCustom() {
|
|
37
|
-
return GetIsVehicleSecondaryColourCustom(this.handle);
|
|
38
|
-
}
|
|
39
|
-
get BodyHealth() {
|
|
40
|
-
return GetVehicleBodyHealth(this.handle);
|
|
41
|
-
}
|
|
42
|
-
get VehicleColours() {
|
|
43
|
-
return GetVehicleColours(this.handle);
|
|
44
|
-
}
|
|
45
|
-
get CustomPrimaryColour() {
|
|
46
|
-
return Color.fromArray(GetVehicleCustomPrimaryColour(this.handle));
|
|
47
|
-
}
|
|
48
|
-
get CustomSecondaryColour() {
|
|
49
|
-
return Color.fromArray(GetVehicleCustomSecondaryColour(this.handle));
|
|
50
|
-
}
|
|
51
|
-
get DashboardColour() {
|
|
52
|
-
return GetVehicleDashboardColour(this.handle);
|
|
53
|
-
}
|
|
54
|
-
get DirtLevel() {
|
|
55
|
-
return GetVehicleDirtLevel(this.handle);
|
|
56
|
-
}
|
|
57
|
-
get LockStatus() {
|
|
58
|
-
return GetVehicleDoorLockStatus(this.handle);
|
|
59
|
-
}
|
|
60
|
-
getDoorStatus(doorIndex) {
|
|
61
|
-
return GetVehicleDoorStatus(this.handle, doorIndex);
|
|
62
|
-
}
|
|
63
|
-
get DoorsLockedForPlayer() {
|
|
64
|
-
return GetVehicleDoorsLockedForPlayer(this.handle);
|
|
65
|
-
}
|
|
66
|
-
get EngineHealth() {
|
|
67
|
-
return GetVehicleEngineHealth(this.handle);
|
|
68
|
-
}
|
|
69
|
-
get ExtraColours() {
|
|
70
|
-
return GetVehicleExtraColours(this.handle);
|
|
71
|
-
}
|
|
72
|
-
get FlightNozzlePosition() {
|
|
73
|
-
return GetVehicleFlightNozzlePosition(this.handle);
|
|
74
|
-
}
|
|
75
|
-
get Handbrake() {
|
|
76
|
-
return GetVehicleHandbrake(this.handle);
|
|
77
|
-
}
|
|
78
|
-
get HeadlightsColour() {
|
|
79
|
-
return GetVehicleHeadlightsColour(this.handle);
|
|
80
|
-
}
|
|
81
|
-
get HomingLockonState() {
|
|
82
|
-
return GetVehicleHomingLockonState(this.handle);
|
|
83
|
-
}
|
|
84
|
-
get InteriorColour() {
|
|
85
|
-
return GetVehicleInteriorColour(this.handle);
|
|
86
|
-
}
|
|
87
|
-
get LightsState() {
|
|
88
|
-
const [_, lightsOn, highbeansOn] = GetVehicleLightsState(this.handle);
|
|
89
|
-
return [lightsOn, highbeansOn];
|
|
90
|
-
}
|
|
91
|
-
get Livery() {
|
|
92
|
-
return GetVehicleLivery(this.handle);
|
|
93
|
-
}
|
|
94
|
-
get LockOnTarget() {
|
|
95
|
-
return new Vehicle(GetVehicleLockOnTarget(this.handle));
|
|
96
|
-
}
|
|
97
|
-
get Plate() {
|
|
98
|
-
return GetVehicleNumberPlateText(this.handle);
|
|
99
|
-
}
|
|
100
|
-
get PlateTrimmed() {
|
|
101
|
-
return this.Plate.trim();
|
|
102
|
-
}
|
|
103
|
-
get PlateIndex() {
|
|
104
|
-
return GetVehicleNumberPlateTextIndex(this.handle);
|
|
105
|
-
}
|
|
106
|
-
get PetrolTankHealth() {
|
|
107
|
-
return GetVehiclePetrolTankHealth(this.handle);
|
|
108
|
-
}
|
|
109
|
-
get RadioStation() {
|
|
110
|
-
return GetVehicleRadioStationIndex(this.handle);
|
|
111
|
-
}
|
|
112
|
-
get RoofLivery() {
|
|
113
|
-
return GetVehicleRoofLivery(this.handle);
|
|
114
|
-
}
|
|
115
|
-
get SteeringAngle() {
|
|
116
|
-
return GetVehicleSteeringAngle(this.handle);
|
|
117
|
-
}
|
|
118
|
-
get VehicleType() {
|
|
119
|
-
return GetVehicleType(this.handle);
|
|
120
|
-
}
|
|
121
|
-
get TyreSmokeColour() {
|
|
122
|
-
return Color.fromArray(GetVehicleTyreSmokeColor(this.handle));
|
|
123
|
-
}
|
|
124
|
-
get WheelType() {
|
|
125
|
-
return GetVehicleWheelType(this.handle);
|
|
126
|
-
}
|
|
127
|
-
get WindowTint() {
|
|
128
|
-
return GetVehicleWindowTint(this.handle);
|
|
129
|
-
}
|
|
130
|
-
get HasBeenOwnedByPlayer() {
|
|
131
|
-
return HasVehicleBeenOwnedByPlayer(this.handle);
|
|
132
|
-
}
|
|
133
|
-
get IsEngineStarting() {
|
|
134
|
-
return IsVehicleEngineStarting(this.handle);
|
|
135
|
-
}
|
|
136
|
-
get IsSirenOn() {
|
|
137
|
-
return IsVehicleSirenOn(this.handle);
|
|
138
|
-
}
|
|
139
|
-
get MaxHealth() {
|
|
140
|
-
return GetEntityMaxHealth(this.handle);
|
|
141
|
-
}
|
|
142
|
-
get ScriptTaskCommand() {
|
|
143
|
-
return GetPedScriptTaskCommand(this.handle);
|
|
144
|
-
}
|
|
145
|
-
get ScriptTaskStage() {
|
|
146
|
-
return GetPedScriptTaskStage(this.handle);
|
|
147
|
-
}
|
|
148
|
-
get MainRotorHealth() {
|
|
149
|
-
return GetHeliMainRotorHealth(this.handle);
|
|
150
|
-
}
|
|
151
|
-
get TailRotorHealth() {
|
|
152
|
-
return GetHeliTailRotorHealth(this.handle);
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* This might supposed to be TrainEngineHealth?
|
|
156
|
-
*/
|
|
157
|
-
get TrainCarriageEngine() {
|
|
158
|
-
return GetTrainCarriageEngine(this.handle);
|
|
159
|
-
}
|
|
160
|
-
get TrainCarriageIndex() {
|
|
161
|
-
return GetTrainCarriageIndex(this.handle);
|
|
162
|
-
}
|
|
163
|
-
isTyreBurst(wheelId, completely) {
|
|
164
|
-
return IsVehicleTyreBurst(this.handle, wheelId, completely);
|
|
165
|
-
}
|
|
166
|
-
isExtraTurnedOn(extraId) {
|
|
167
|
-
return IsVehicleExtraTurnedOn(this.handle, extraId);
|
|
168
|
-
}
|
|
169
|
-
getPedInSeat(seatIndex) {
|
|
170
|
-
return GetPedInVehicleSeat(this.handle, seatIndex);
|
|
171
|
-
}
|
|
172
|
-
getLastPedInSeat(seatIndex) {
|
|
173
|
-
return GetLastPedInVehicleSeat(this.handle, seatIndex);
|
|
174
|
-
}
|
|
175
|
-
}
|
package/entities/index.js
DELETED
package/enum/PopulationType.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export var PopulationType;
|
|
2
|
-
(function (PopulationType) {
|
|
3
|
-
PopulationType[PopulationType["Unknown"] = 0] = "Unknown";
|
|
4
|
-
PopulationType[PopulationType["RandomPermanent"] = 1] = "RandomPermanent";
|
|
5
|
-
PopulationType[PopulationType["RandomParked"] = 2] = "RandomParked";
|
|
6
|
-
PopulationType[PopulationType["Randompatrol"] = 3] = "Randompatrol";
|
|
7
|
-
PopulationType[PopulationType["RandomScenario"] = 4] = "RandomScenario";
|
|
8
|
-
PopulationType[PopulationType["RandomAmbient"] = 5] = "RandomAmbient";
|
|
9
|
-
PopulationType[PopulationType["Permanent"] = 6] = "Permanent";
|
|
10
|
-
PopulationType[PopulationType["Mission"] = 7] = "Mission";
|
|
11
|
-
PopulationType[PopulationType["Replay"] = 8] = "Replay";
|
|
12
|
-
PopulationType[PopulationType["Cache"] = 9] = "Cache";
|
|
13
|
-
PopulationType[PopulationType["Tool"] = 10] = "Tool";
|
|
14
|
-
})(PopulationType || (PopulationType = {}));
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export var VehicleLockStatus;
|
|
2
|
-
(function (VehicleLockStatus) {
|
|
3
|
-
VehicleLockStatus[VehicleLockStatus["None"] = 0] = "None";
|
|
4
|
-
VehicleLockStatus[VehicleLockStatus["Locked"] = 2] = "Locked";
|
|
5
|
-
VehicleLockStatus[VehicleLockStatus["LockedForPlayer"] = 3] = "LockedForPlayer";
|
|
6
|
-
VehicleLockStatus[VehicleLockStatus["StickPlayerInside"] = 4] = "StickPlayerInside";
|
|
7
|
-
VehicleLockStatus[VehicleLockStatus["CanBeBrokenInto"] = 7] = "CanBeBrokenInto";
|
|
8
|
-
VehicleLockStatus[VehicleLockStatus["CanBeBrokenIntoPersist"] = 8] = "CanBeBrokenIntoPersist";
|
|
9
|
-
VehicleLockStatus[VehicleLockStatus["CannotBeTriedToEnter"] = 10] = "CannotBeTriedToEnter";
|
|
10
|
-
})(VehicleLockStatus || (VehicleLockStatus = {}));
|
package/enum/VehicleType.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export var VehicleType;
|
|
2
|
-
(function (VehicleType) {
|
|
3
|
-
VehicleType["Automobile"] = "automobile";
|
|
4
|
-
VehicleType["Bike"] = "bike";
|
|
5
|
-
VehicleType["Boat"] = "boat";
|
|
6
|
-
VehicleType["Heli"] = "heli";
|
|
7
|
-
VehicleType["Plane"] = "plane";
|
|
8
|
-
VehicleType["Submarine"] = "submarine";
|
|
9
|
-
VehicleType["Trailer"] = "trailer";
|
|
10
|
-
VehicleType["Train"] = "train";
|
|
11
|
-
})(VehicleType || (VehicleType = {}));
|
package/enum/eEntityType.js
DELETED
package/enum/index.js
DELETED
package/type/Anticheat.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/type/Hash.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/utils/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { cleanPlayerName, Vector2, Vector3, Vector4, Maths, Quaternion, Color, Delay, enumValues, getStringFromUInt8Array, getUInt32FromUint8Array, } from "../../common/utils/index";
|