@nativewrappers/common 0.0.130 → 0.0.132

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.
Files changed (103) hide show
  1. package/index.d.ts +1 -52
  2. package/index.js +1 -52
  3. package/package.json +1 -1
  4. package/common-game/CommonGameConstants.d.ts +0 -7
  5. package/common-game/CommonGameConstants.js +0 -24
  6. package/common-game/CommonModel.d.ts +0 -99
  7. package/common-game/CommonModel.js +0 -172
  8. package/common-game/CommonTasks.d.ts +0 -44
  9. package/common-game/CommonTasks.js +0 -233
  10. package/common-game/cfx/StateBagChangeHandler.d.ts +0 -1
  11. package/common-game/cfx/StateBagChangeHandler.js +0 -0
  12. package/common-game/cfx/cfx.d.ts +0 -6
  13. package/common-game/cfx/cfx.js +0 -4
  14. package/common-game/common/Command.d.ts +0 -77
  15. package/common-game/common/Command.js +0 -152
  16. package/common-game/common/Convar.d.ts +0 -13
  17. package/common-game/common/Convar.js +0 -58
  18. package/common-game/common/GlobalData.d.ts +0 -12
  19. package/common-game/common/GlobalData.js +0 -20
  20. package/common-game/common/Kvp.d.ts +0 -69
  21. package/common-game/common/Kvp.js +0 -137
  22. package/common-game/common/Resource.d.ts +0 -14
  23. package/common-game/common/Resource.js +0 -54
  24. package/common-game/common/decors/ConVar.d.ts +0 -14
  25. package/common-game/common/decors/ConVar.js +0 -70
  26. package/common-game/common/decors/Events.d.ts +0 -66
  27. package/common-game/common/decors/Events.js +0 -163
  28. package/common-game/common/decors/Exports.d.ts +0 -1
  29. package/common-game/common/decors/Exports.js +0 -53
  30. package/common-game/common/decors/Permissions.d.ts +0 -3
  31. package/common-game/common/decors/Permissions.js +0 -49
  32. package/common-game/common/decors/Resources.d.ts +0 -8
  33. package/common-game/common/decors/Resources.js +0 -94
  34. package/common-game/common/decors/Ticks.d.ts +0 -9
  35. package/common-game/common/decors/Ticks.js +0 -32
  36. package/common-game/common/net/NetworkedMap.d.ts +0 -28
  37. package/common-game/common/net/NetworkedMap.js +0 -262
  38. package/common-game/common/types.d.ts +0 -5
  39. package/common-game/common/types.js +0 -0
  40. package/common-game/common/utils/ClassTypes.d.ts +0 -11
  41. package/common-game/common/utils/ClassTypes.js +0 -15
  42. package/common-game/common/utils/Color.d.ts +0 -14
  43. package/common-game/common/utils/Color.js +0 -33
  44. package/common-game/common/utils/Delay.d.ts +0 -1
  45. package/common-game/common/utils/Delay.js +0 -6
  46. package/common-game/common/utils/Maths.d.ts +0 -4
  47. package/common-game/common/utils/Maths.js +0 -18
  48. package/common-game/common/utils/Point.d.ts +0 -9
  49. package/common-game/common/utils/Point.js +0 -36
  50. package/common-game/common/utils/PointF.d.ts +0 -7
  51. package/common-game/common/utils/PointF.js +0 -18
  52. package/common-game/common/utils/Quaternion.d.ts +0 -10
  53. package/common-game/common/utils/Quaternion.js +0 -33
  54. package/common-game/common/utils/Vector.d.ts +0 -429
  55. package/common-game/common/utils/Vector.js +0 -589
  56. package/common-game/common/utils/cleanPlayerName.d.ts +0 -6
  57. package/common-game/common/utils/cleanPlayerName.js +0 -17
  58. package/common-game/common/utils/enumValues.d.ts +0 -12
  59. package/common-game/common/utils/enumValues.js +0 -20
  60. package/common-game/common/utils/getStringFromUInt8Array.d.ts +0 -8
  61. package/common-game/common/utils/getStringFromUInt8Array.js +0 -6
  62. package/common-game/common/utils/getUInt32FromUint8Array.d.ts +0 -8
  63. package/common-game/common/utils/getUInt32FromUint8Array.js +0 -6
  64. package/common-game/common/utils/randomInt.d.ts +0 -1
  65. package/common-game/common/utils/randomInt.js +0 -9
  66. package/common-game/definitions/index.d.js +0 -0
  67. package/common-game/definitions/redm.d.js +0 -0
  68. package/common-game/entities/CommonBaseEntity.d.ts +0 -116
  69. package/common-game/entities/CommonBaseEntity.js +0 -266
  70. package/common-game/entities/CommonBaseEntityBone.d.ts +0 -11
  71. package/common-game/entities/CommonBaseEntityBone.js +0 -32
  72. package/common-game/entities/CommonBaseEntityBoneCollection.d.ts +0 -9
  73. package/common-game/entities/CommonBaseEntityBoneCollection.js +0 -17
  74. package/common-game/entities/CommonEntityBone.d.ts +0 -5
  75. package/common-game/entities/CommonEntityBone.js +0 -14
  76. package/common-game/entities/CommonEntityBoneCollection.d.ts +0 -9
  77. package/common-game/entities/CommonEntityBoneCollection.js +0 -24
  78. package/common-game/entities/CommonEntityType.d.ts +0 -4
  79. package/common-game/entities/CommonEntityType.js +0 -0
  80. package/common-game/entities/CommonPed.d.ts +0 -16
  81. package/common-game/entities/CommonPed.js +0 -52
  82. package/common-game/entities/CommonPedBone.d.ts +0 -6
  83. package/common-game/entities/CommonPedBone.js +0 -17
  84. package/common-game/entities/CommonPedBoneCollection.d.ts +0 -10
  85. package/common-game/entities/CommonPedBoneCollection.js +0 -31
  86. package/common-game/entities/CommonPlayer.d.ts +0 -61
  87. package/common-game/entities/CommonPlayer.js +0 -156
  88. package/common-game/entities/CommonProp.d.ts +0 -15
  89. package/common-game/entities/CommonProp.js +0 -43
  90. package/common-game/entities/CommonVehicle.d.ts +0 -11
  91. package/common-game/entities/CommonVehicle.js +0 -36
  92. package/common-game/entities/GetEntityClassIdFromHandle.d.ts +0 -2
  93. package/common-game/entities/GetEntityClassIdFromHandle.js +0 -23
  94. package/common-game/entities/IHandle.d.ts +0 -6
  95. package/common-game/entities/IHandle.js +0 -20
  96. package/common-game/enums/VehicleSeat.d.ts +0 -13
  97. package/common-game/enums/VehicleSeat.js +0 -17
  98. package/common-game/index.d.ts +0 -50
  99. package/common-game/index.js +0 -50
  100. package/common-game/interfaces/Dimension.d.ts +0 -5
  101. package/common-game/interfaces/Dimension.js +0 -0
  102. package/common-game/utils/Animations.d.ts +0 -19
  103. package/common-game/utils/Animations.js +0 -43
@@ -1,61 +0,0 @@
1
- import type { StateBagChangeHandler } from "../cfx/StateBagChangeHandler";
2
- import { CommonPed } from "./CommonPed";
3
- import type { CommonEntity } from "./CommonEntityType";
4
- export declare class CommonPlayer {
5
- private handle;
6
- private ped?;
7
- private pvp;
8
- private stateBagCookies;
9
- private source;
10
- private type;
11
- static AllPlayers(excludeLocalPlayer?: boolean): IterableIterator<CommonPlayer>;
12
- /**
13
- * @param handle the handoe of the ped to get the player of
14
- * @returns the player, or null if the player doesn't exist
15
- */
16
- static fromPedHandle(handle: number): CommonPlayer | null;
17
- /**
18
- * @param serverId the server id to get the player of
19
- * @returns the player, or null if the player doesn't exist
20
- */
21
- static fromServerId(serverId: number): CommonPlayer | null;
22
- /**
23
- * @param [minimumDistance=Number.MAX_VALUE] the minimum distance this should check
24
- * @param [fromPlayer=GameConstants.Player] the player to get the distance from
25
- * @returns the closest player from {@param fromPlayer} and the distance the player was
26
- */
27
- static getClosestPlayerPedWithDistance(minimumDistance?: number, fromPlayer?: CommonPlayer): [CommonPed | null, number];
28
- /**
29
- * @param [minimumDistance=Number.MAX_VALUE] the minimum distance this should check
30
- * @param [fromPlayer=GameConstants.Player] the player to get the distance from
31
- * @returns the closest player from {@param fromPlayer} and the distance the player was
32
- */
33
- static getClosestPlayerPed(minimumDistance?: number, fromPlayer?: CommonPlayer): CommonPed | null;
34
- /**
35
- * @param handle the player handle, or if on the server, their source.
36
- */
37
- constructor(handle?: number);
38
- get Handle(): number;
39
- /**
40
- * This is here for compatibility with older versions.
41
- */
42
- get Character(): CommonPed;
43
- get Ped(): CommonPed;
44
- get ServerId(): number;
45
- get State(): StateBagInterface;
46
- AddStateBagChangeHandler(keyFilter: string | null, handler: StateBagChangeHandler<unknown>): number;
47
- /**
48
- * A short hand function for AddStateBagChangeHandler, this gets automatically cleaned up on entity deletion.
49
- * @param keyFilter the key to filter for or null
50
- * @param handler the function to handle the change
51
- * @returns a cookie to be used in RemoveStateBagChangeHandler
52
- */
53
- listenForStateChange(keyFilter: string | null, handler: StateBagChangeHandler<unknown>): number;
54
- removeStateListener(tgtCookie: number): void;
55
- removeAllStateListeners(): void;
56
- get Name(): string;
57
- get IsDead(): boolean;
58
- set DisableFiring(value: boolean);
59
- get EntityPlayerIsAimingAt(): CommonEntity | null;
60
- get StealthNoise(): number;
61
- }
@@ -1,156 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- import { CommonPed } from "./CommonPed";
4
- import { ClassTypes } from "../common/utils/ClassTypes";
5
- import { GetEntityClassFromHandle } from "./GetEntityClassIdFromHandle";
6
- import cfx from "../cfx/cfx";
7
- import { CommonGameConstants } from "../CommonGameConstants";
8
- class CommonPlayer {
9
- static {
10
- __name(this, "CommonPlayer");
11
- }
12
- handle;
13
- ped;
14
- pvp = false;
15
- stateBagCookies = [];
16
- source;
17
- type = ClassTypes.Player;
18
- static *AllPlayers(excludeLocalPlayer = true) {
19
- for (const ply of GetActivePlayers()) {
20
- if (excludeLocalPlayer && ply === CommonGameConstants.PlayerId) {
21
- continue;
22
- }
23
- yield new CommonPlayer(ply);
24
- }
25
- }
26
- /**
27
- * @param handle the handoe of the ped to get the player of
28
- * @returns the player, or null if the player doesn't exist
29
- */
30
- static fromPedHandle(handle) {
31
- const playerHandle = NetworkGetPlayerIndexFromPed(handle);
32
- if (!handle) {
33
- return null;
34
- }
35
- return new CommonPlayer(playerHandle);
36
- }
37
- /**
38
- * @param serverId the server id to get the player of
39
- * @returns the player, or null if the player doesn't exist
40
- */
41
- static fromServerId(serverId) {
42
- const player = GetPlayerFromServerId(serverId);
43
- if (player === -1) {
44
- return null;
45
- }
46
- return new CommonPlayer(player);
47
- }
48
- /**
49
- * @param [minimumDistance=Number.MAX_VALUE] the minimum distance this should check
50
- * @param [fromPlayer=GameConstants.Player] the player to get the distance from
51
- * @returns the closest player from {@param fromPlayer} and the distance the player was
52
- */
53
- static getClosestPlayerPedWithDistance(minimumDistance = Number.MAX_VALUE, fromPlayer = CommonGameConstants.Player) {
54
- const ped = fromPlayer.Ped;
55
- const pos = ped.Position;
56
- const data = [null, Number.MAX_VALUE];
57
- for (const ply of CommonPlayer.AllPlayers(true)) {
58
- const tgtPed = ply.Ped;
59
- const dist = pos.distance(tgtPed.Position);
60
- if (dist < data[1] && dist < minimumDistance) {
61
- data[0] = tgtPed;
62
- data[1] = dist;
63
- }
64
- }
65
- return data;
66
- }
67
- /**
68
- * @param [minimumDistance=Number.MAX_VALUE] the minimum distance this should check
69
- * @param [fromPlayer=GameConstants.Player] the player to get the distance from
70
- * @returns the closest player from {@param fromPlayer} and the distance the player was
71
- */
72
- static getClosestPlayerPed(minimumDistance = Number.MAX_VALUE, fromPlayer = CommonGameConstants.Player) {
73
- const data = this.getClosestPlayerPedWithDistance(minimumDistance, fromPlayer);
74
- return data[0];
75
- }
76
- /**
77
- * @param handle the player handle, or if on the server, their source.
78
- */
79
- constructor(handle = -1) {
80
- this.handle = handle;
81
- this.source = this.ServerId;
82
- }
83
- get Handle() {
84
- return this.handle;
85
- }
86
- /**
87
- * This is here for compatibility with older versions.
88
- */
89
- get Character() {
90
- return this.Ped;
91
- }
92
- get Ped() {
93
- const handle = GetPlayerPed(this.handle);
94
- if (typeof this.ped === "undefined" || handle !== this.ped.Handle) {
95
- this.ped = new CommonPed(handle);
96
- }
97
- return this.ped;
98
- }
99
- get ServerId() {
100
- if (this.source) {
101
- return this.source;
102
- }
103
- return GetPlayerServerId(this.handle);
104
- }
105
- get State() {
106
- return cfx.Player(this.ServerId).state;
107
- }
108
- AddStateBagChangeHandler(keyFilter, handler) {
109
- const cookie = AddStateBagChangeHandler(keyFilter, `player:${this.ServerId}`, handler);
110
- this.stateBagCookies.push(cookie);
111
- return cookie;
112
- }
113
- /**
114
- * A short hand function for AddStateBagChangeHandler, this gets automatically cleaned up on entity deletion.
115
- * @param keyFilter the key to filter for or null
116
- * @param handler the function to handle the change
117
- * @returns a cookie to be used in RemoveStateBagChangeHandler
118
- */
119
- listenForStateChange(keyFilter, handler) {
120
- return this.AddStateBagChangeHandler(keyFilter, handler);
121
- }
122
- removeStateListener(tgtCookie) {
123
- this.stateBagCookies = this.stateBagCookies.filter((cookie) => {
124
- const isCookie = cookie === tgtCookie;
125
- if (isCookie) RemoveStateBagChangeHandler(cookie);
126
- return isCookie;
127
- });
128
- }
129
- removeAllStateListeners() {
130
- for (const cookie of this.stateBagCookies) {
131
- RemoveStateBagChangeHandler(cookie);
132
- }
133
- }
134
- get Name() {
135
- return GetPlayerName(this.handle);
136
- }
137
- get IsDead() {
138
- return IsPlayerDead(this.handle);
139
- }
140
- set DisableFiring(value) {
141
- DisablePlayerFiring(this.handle, value);
142
- }
143
- get EntityPlayerIsAimingAt() {
144
- const [entityHit, entity] = GetEntityPlayerIsFreeAimingAt(this.handle);
145
- if (entityHit) {
146
- return GetEntityClassFromHandle(entity);
147
- }
148
- return null;
149
- }
150
- get StealthNoise() {
151
- return GetPlayerCurrentStealthNoise(this.handle);
152
- }
153
- }
154
- export {
155
- CommonPlayer
156
- };
@@ -1,15 +0,0 @@
1
- import { ClassTypes } from "../common/utils/ClassTypes";
2
- import { CommonBaseEntity } from "./CommonBaseEntity";
3
- import { CommonEntityBoneCollection } from "./CommonEntityBoneCollection";
4
- import type { CommonEntity } from "./CommonEntityType";
5
- export declare class CommonProp extends CommonBaseEntity {
6
- static fromHandle(handle: number): CommonProp | null;
7
- static fromNetworkId(networkId: number): CommonProp | null;
8
- protected type: ClassTypes;
9
- protected bones?: CommonEntityBoneCollection | undefined;
10
- constructor(handle: number);
11
- exists(): boolean;
12
- placeOnGround(): void;
13
- getEntityAttachedTo(): CommonEntity;
14
- get Bones(): CommonEntityBoneCollection;
15
- }
@@ -1,43 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- import { ClassTypes } from "../common/utils/ClassTypes";
4
- import { CommonBaseEntity } from "./CommonBaseEntity";
5
- import { CommonEntityBoneCollection } from "./CommonEntityBoneCollection";
6
- import { GetEntityClassFromHandle } from "./GetEntityClassIdFromHandle";
7
- class CommonProp extends CommonBaseEntity {
8
- static {
9
- __name(this, "CommonProp");
10
- }
11
- static fromHandle(handle) {
12
- return new this(handle);
13
- }
14
- static fromNetworkId(networkId) {
15
- if (!NetworkDoesEntityExistWithNetworkId(networkId)) {
16
- return null;
17
- }
18
- return new this(NetworkGetEntityFromNetworkId(networkId));
19
- }
20
- type = ClassTypes.Prop;
21
- bones;
22
- constructor(handle) {
23
- super(handle);
24
- }
25
- exists() {
26
- return super.exists() && GetEntityType(this.handle) === 3;
27
- }
28
- placeOnGround() {
29
- PlaceObjectOnGroundProperly(this.handle);
30
- }
31
- getEntityAttachedTo() {
32
- return GetEntityClassFromHandle(this.handle);
33
- }
34
- get Bones() {
35
- if (!this.bones) {
36
- this.bones = new CommonEntityBoneCollection(this);
37
- }
38
- return this.bones;
39
- }
40
- }
41
- export {
42
- CommonProp
43
- };
@@ -1,11 +0,0 @@
1
- import { ClassTypes } from "../common/utils/ClassTypes";
2
- import { CommonBaseEntity } from "./CommonBaseEntity";
3
- import { CommonEntityBoneCollection } from "./CommonEntityBoneCollection";
4
- export declare class CommonVehicle extends CommonBaseEntity {
5
- static fromHandle(handle: number): CommonVehicle | null;
6
- static fromNetworkId(networkId: number): CommonVehicle | null;
7
- protected type: ClassTypes;
8
- protected bones?: CommonEntityBoneCollection;
9
- constructor(handle: number);
10
- get Bones(): CommonEntityBoneCollection;
11
- }
@@ -1,36 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- import { ClassTypes } from "../common/utils/ClassTypes";
4
- import { CommonBaseEntity } from "./CommonBaseEntity";
5
- import { CommonEntityBoneCollection } from "./CommonEntityBoneCollection";
6
- class CommonVehicle extends CommonBaseEntity {
7
- static {
8
- __name(this, "CommonVehicle");
9
- }
10
- static fromHandle(handle) {
11
- if (handle === 0 || !DoesEntityExist(handle)) {
12
- return null;
13
- }
14
- return new this(handle);
15
- }
16
- static fromNetworkId(networkId) {
17
- if (!NetworkDoesEntityExistWithNetworkId(networkId)) {
18
- return null;
19
- }
20
- return new this(NetworkGetEntityFromNetworkId(networkId));
21
- }
22
- type = ClassTypes.Vehicle;
23
- bones;
24
- constructor(handle) {
25
- super(handle);
26
- }
27
- get Bones() {
28
- if (!this.bones) {
29
- this.bones = new CommonEntityBoneCollection(this);
30
- }
31
- return this.bones;
32
- }
33
- }
34
- export {
35
- CommonVehicle
36
- };
@@ -1,2 +0,0 @@
1
- import type { CommonEntity } from "./CommonEntityType";
2
- export declare function GetEntityClassFromHandle(entityId: number): CommonEntity;
@@ -1,23 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- import { CommonPed } from "./CommonPed";
4
- import { CommonProp } from "./CommonProp";
5
- import { CommonVehicle } from "./CommonVehicle";
6
- function GetEntityClassFromHandle(entityId) {
7
- switch (GetEntityType(entityId)) {
8
- case 1: {
9
- return CommonPed.fromHandle(entityId);
10
- }
11
- case 2: {
12
- return CommonVehicle.fromHandle(entityId);
13
- }
14
- case 3: {
15
- return CommonProp.fromHandle(entityId);
16
- }
17
- }
18
- return null;
19
- }
20
- __name(GetEntityClassFromHandle, "GetEntityClassFromHandle");
21
- export {
22
- GetEntityClassFromHandle
23
- };
@@ -1,6 +0,0 @@
1
- export declare class IHandle {
2
- protected handle: number;
3
- constructor(handle: number);
4
- exists(): boolean;
5
- get Handle(): number;
6
- }
@@ -1,20 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- class IHandle {
4
- static {
5
- __name(this, "IHandle");
6
- }
7
- handle;
8
- constructor(handle) {
9
- this.handle = handle;
10
- }
11
- exists() {
12
- return DoesEntityExist(this.handle);
13
- }
14
- get Handle() {
15
- return this.handle;
16
- }
17
- }
18
- export {
19
- IHandle
20
- };
@@ -1,13 +0,0 @@
1
- export declare enum VehicleSeat {
2
- AnyPassenger = -2,
3
- Driver = -1,
4
- FrontRight = 0,
5
- BackLeft = 1,
6
- BackRight = 2,
7
- ExtraLeft1 = 3,
8
- ExtraRight1 = 4,
9
- ExtraLeft2 = 5,
10
- ExtraRight2 = 6,
11
- ExtraLeft3 = 7,
12
- ExtraRight3 = 8
13
- }
@@ -1,17 +0,0 @@
1
- var VehicleSeat = /* @__PURE__ */ ((VehicleSeat2) => {
2
- VehicleSeat2[VehicleSeat2["AnyPassenger"] = -2] = "AnyPassenger";
3
- VehicleSeat2[VehicleSeat2["Driver"] = -1] = "Driver";
4
- VehicleSeat2[VehicleSeat2["FrontRight"] = 0] = "FrontRight";
5
- VehicleSeat2[VehicleSeat2["BackLeft"] = 1] = "BackLeft";
6
- VehicleSeat2[VehicleSeat2["BackRight"] = 2] = "BackRight";
7
- VehicleSeat2[VehicleSeat2["ExtraLeft1"] = 3] = "ExtraLeft1";
8
- VehicleSeat2[VehicleSeat2["ExtraRight1"] = 4] = "ExtraRight1";
9
- VehicleSeat2[VehicleSeat2["ExtraLeft2"] = 5] = "ExtraLeft2";
10
- VehicleSeat2[VehicleSeat2["ExtraRight2"] = 6] = "ExtraRight2";
11
- VehicleSeat2[VehicleSeat2["ExtraLeft3"] = 7] = "ExtraLeft3";
12
- VehicleSeat2[VehicleSeat2["ExtraRight3"] = 8] = "ExtraRight3";
13
- return VehicleSeat2;
14
- })(VehicleSeat || {});
15
- export {
16
- VehicleSeat
17
- };
@@ -1,50 +0,0 @@
1
- export * from "./CommonGameConstants";
2
- export * from "./CommonModel";
3
- export * from "./CommonTasks";
4
- export * from "./utils/Animations";
5
- export * from "./interfaces/Dimension";
6
- export * from "./enums/VehicleSeat";
7
- export * from "./entities/CommonBaseEntity";
8
- export * from "./entities/CommonBaseEntityBone";
9
- export * from "./entities/CommonBaseEntityBoneCollection";
10
- export * from "./entities/CommonEntityBone";
11
- export * from "./entities/CommonEntityBoneCollection";
12
- export * from "./entities/CommonEntityType";
13
- export * from "./entities/CommonPed";
14
- export * from "./entities/CommonPedBone";
15
- export * from "./entities/CommonPedBoneCollection";
16
- export * from "./entities/CommonPlayer";
17
- export * from "./entities/CommonProp";
18
- export * from "./entities/CommonVehicle";
19
- export * from "./entities/GetEntityClassIdFromHandle";
20
- export * from "./entities/IHandle";
21
- export * from "./definitions/index.d";
22
- export * from "./definitions/redm.d";
23
- export * from "./common/Command";
24
- export * from "./common/Convar";
25
- export * from "./common/GlobalData";
26
- export * from "./common/Kvp";
27
- export * from "./common/Resource";
28
- export * from "./common/types";
29
- export * from "./common/utils/ClassTypes";
30
- export * from "./common/utils/Color";
31
- export * from "./common/utils/Delay";
32
- export * from "./common/utils/Maths";
33
- export * from "./common/utils/Point";
34
- export * from "./common/utils/PointF";
35
- export * from "./common/utils/Quaternion";
36
- export * from "./common/utils/Vector";
37
- export * from "./common/utils/cleanPlayerName";
38
- export * from "./common/utils/enumValues";
39
- export * from "./common/utils/getStringFromUInt8Array";
40
- export * from "./common/utils/getUInt32FromUint8Array";
41
- export * from "./common/utils/randomInt";
42
- export * from "./common/net/NetworkedMap";
43
- export * from "./common/decors/ConVar";
44
- export * from "./common/decors/Events";
45
- export * from "./common/decors/Exports";
46
- export * from "./common/decors/Permissions";
47
- export * from "./common/decors/Resources";
48
- export * from "./common/decors/Ticks";
49
- export * from "./cfx/StateBagChangeHandler";
50
- export * from "./cfx/cfx";
@@ -1,50 +0,0 @@
1
- export * from "./CommonGameConstants";
2
- export * from "./CommonModel";
3
- export * from "./CommonTasks";
4
- export * from "./utils/Animations";
5
- export * from "./interfaces/Dimension";
6
- export * from "./enums/VehicleSeat";
7
- export * from "./entities/CommonBaseEntity";
8
- export * from "./entities/CommonBaseEntityBone";
9
- export * from "./entities/CommonBaseEntityBoneCollection";
10
- export * from "./entities/CommonEntityBone";
11
- export * from "./entities/CommonEntityBoneCollection";
12
- export * from "./entities/CommonEntityType";
13
- export * from "./entities/CommonPed";
14
- export * from "./entities/CommonPedBone";
15
- export * from "./entities/CommonPedBoneCollection";
16
- export * from "./entities/CommonPlayer";
17
- export * from "./entities/CommonProp";
18
- export * from "./entities/CommonVehicle";
19
- export * from "./entities/GetEntityClassIdFromHandle";
20
- export * from "./entities/IHandle";
21
- export * from "./definitions/index.d";
22
- export * from "./definitions/redm.d";
23
- export * from "./common/Command";
24
- export * from "./common/Convar";
25
- export * from "./common/GlobalData";
26
- export * from "./common/Kvp";
27
- export * from "./common/Resource";
28
- export * from "./common/types";
29
- export * from "./common/utils/ClassTypes";
30
- export * from "./common/utils/Color";
31
- export * from "./common/utils/Delay";
32
- export * from "./common/utils/Maths";
33
- export * from "./common/utils/Point";
34
- export * from "./common/utils/PointF";
35
- export * from "./common/utils/Quaternion";
36
- export * from "./common/utils/Vector";
37
- export * from "./common/utils/cleanPlayerName";
38
- export * from "./common/utils/enumValues";
39
- export * from "./common/utils/getStringFromUInt8Array";
40
- export * from "./common/utils/getUInt32FromUint8Array";
41
- export * from "./common/utils/randomInt";
42
- export * from "./common/net/NetworkedMap";
43
- export * from "./common/decors/ConVar";
44
- export * from "./common/decors/Events";
45
- export * from "./common/decors/Exports";
46
- export * from "./common/decors/Permissions";
47
- export * from "./common/decors/Resources";
48
- export * from "./common/decors/Ticks";
49
- export * from "./cfx/StateBagChangeHandler";
50
- export * from "./cfx/cfx";
@@ -1,5 +0,0 @@
1
- import type { Vector3 } from "../common/utils/Vector";
2
- export interface Dimensions {
3
- min: Vector3;
4
- max: Vector3;
5
- }
File without changes
@@ -1,19 +0,0 @@
1
- /**
2
- * A utility to load an animation dictionary, anything that loads an animation should RemoveAnimDict after its finish being used.
3
- * @param animDict the animation dictionary to load
4
- * @param waitTime how long to wait for the dictionary to load
5
- * @returns {boolean} if the animation successfully loaded
6
- */
7
- export declare const LoadAnimDict: (animDict: string, waitTime?: number) => Promise<boolean>;
8
- /**
9
- * A utility to load multiple animation dictionary, anything that loads an animation should RemoveAnimDict after its finish being used.
10
- * @param animDict the animation dictionary to load
11
- * @param waitTime how long to wait for the dictionary to load
12
- * @returns if the animation successfully loaded, if the animation failed to load it will return an array of animations that failed to load
13
- */
14
- export declare const LoadAnimDictArray: (animDict: string[], waitTime?: number) => Promise<[boolean, string[] | null]>;
15
- /**
16
- * A utility to unload multiple animation dictionary
17
- * @param animDict the animation dictionaries to unload
18
- */
19
- export declare const RemoveAnimDictArray: (animDict: string[]) => void;
@@ -1,43 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- import { Delay } from "../common/utils/Delay";
4
- const LoadAnimDict = /* @__PURE__ */ __name(async (animDict, waitTime = 1e3) => {
5
- const start = GetGameTimer();
6
- if (!HasAnimDictLoaded(animDict)) {
7
- RequestAnimDict(animDict);
8
- }
9
- while (!HasAnimDictLoaded(animDict)) {
10
- if (GetGameTimer() - start >= waitTime) return false;
11
- await Delay(0);
12
- }
13
- return true;
14
- }, "LoadAnimDict");
15
- const LoadAnimDictArray = /* @__PURE__ */ __name(async (animDict, waitTime = 1e3) => {
16
- const start = GetGameTimer();
17
- for (const dict of animDict) {
18
- if (!HasAnimDictLoaded(dict)) {
19
- RequestAnimDict(dict);
20
- }
21
- }
22
- const animsLoaded = /* @__PURE__ */ new Set();
23
- while (animsLoaded.size !== animDict.length) {
24
- for (const dict of animDict) {
25
- if (!animsLoaded.has(dict) && HasAnimDictLoaded(dict)) {
26
- animsLoaded.add(dict);
27
- }
28
- }
29
- if (GetGameTimer() - start >= waitTime) return [false, animDict.filter((dict) => !animsLoaded.has(dict))];
30
- await Delay(0);
31
- }
32
- return [true, null];
33
- }, "LoadAnimDictArray");
34
- const RemoveAnimDictArray = /* @__PURE__ */ __name((animDict) => {
35
- for (const dict of animDict) {
36
- RemoveAnimDict(dict);
37
- }
38
- }, "RemoveAnimDictArray");
39
- export {
40
- LoadAnimDict,
41
- LoadAnimDictArray,
42
- RemoveAnimDictArray
43
- };