@nativewrappers/fivem 0.0.115 → 0.0.116
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/common/GlobalData.d.ts +2 -0
- package/common/GlobalData.js +2 -0
- package/common/decors/Events.d.ts +11 -0
- package/common/decors/Events.js +2 -0
- package/models/BaseEntityBoneCollection.js +0 -2
- package/models/Ped.js +1 -1
- package/models/Player.d.ts +1 -1
- package/models/Player.js +6 -12
- package/package.json +1 -1
- package/weapon/DlcWeaponData.js +1 -1
- package/weapon/WeaponHudStats.js +1 -1
- package/weaponComponent/DlcWeaponComponentData.js +1 -1
- package/weaponComponent/WeaponComponentHashesByWeaponHash.js +1 -1
- package/weaponComponent/WeaponComponentHudStats.js +1 -1
package/common/GlobalData.d.ts
CHANGED
package/common/GlobalData.js
CHANGED
|
@@ -5,6 +5,8 @@ class GlobalData {
|
|
|
5
5
|
__name(this, "GlobalData");
|
|
6
6
|
}
|
|
7
7
|
static CurrentResource = GetCurrentResourceName();
|
|
8
|
+
static GameName = GetGameName();
|
|
9
|
+
static GameBuild = GetGameBuildNumber();
|
|
8
10
|
static IS_SERVER = IsDuplicityVersion();
|
|
9
11
|
static IS_CLIENT = !GlobalData.IS_SERVER;
|
|
10
12
|
static NetworkTick = null;
|
|
@@ -19,6 +19,17 @@ export declare function Exports(exportName: string): (originalMethod: any, conte
|
|
|
19
19
|
* @param eventName the event to bind to
|
|
20
20
|
*/
|
|
21
21
|
export declare function Event(eventName: string): (originalMethod: any, context: ClassMethodDecoratorContext) => void;
|
|
22
|
+
/**
|
|
23
|
+
* Registers the Event call for {@link eventName} to this method.
|
|
24
|
+
*
|
|
25
|
+
* This has internal pretty-printing to make errors easier to track, if
|
|
26
|
+
* you want to disable this you will need to call {@link DisablePrettyPrint}, or if you're
|
|
27
|
+
* using esbuild you can add `REMOVE_EVENT_LOG` to your drop label {@link https://esbuild.github.io/api/#drop-labels}
|
|
28
|
+
*
|
|
29
|
+
* This is the same thing as just using `Event` but this disambiguates the call from DOM
|
|
30
|
+
* @param eventName the event to bind to
|
|
31
|
+
*/
|
|
32
|
+
export declare const CfxEvent: typeof Event;
|
|
22
33
|
/**
|
|
23
34
|
* Registers the Net Event call for {@link eventName} to this method
|
|
24
35
|
*
|
package/common/decors/Events.js
CHANGED
|
@@ -80,6 +80,7 @@ function Event(eventName) {
|
|
|
80
80
|
}, "actualDecorator");
|
|
81
81
|
}
|
|
82
82
|
__name(Event, "Event");
|
|
83
|
+
const CfxEvent = Event;
|
|
83
84
|
function NetEvent(eventName, remoteOnly = true) {
|
|
84
85
|
return /* @__PURE__ */ __name(function actualDecorator(originalMethod, context) {
|
|
85
86
|
if (context.private) {
|
|
@@ -195,6 +196,7 @@ function SetTick() {
|
|
|
195
196
|
}
|
|
196
197
|
__name(SetTick, "SetTick");
|
|
197
198
|
export {
|
|
199
|
+
CfxEvent,
|
|
198
200
|
ConVar,
|
|
199
201
|
ConVarType,
|
|
200
202
|
DisablePrettyPrint,
|
package/models/Ped.js
CHANGED
package/models/Player.d.ts
CHANGED
|
@@ -58,9 +58,9 @@ export declare class Player {
|
|
|
58
58
|
get Name(): string;
|
|
59
59
|
get PvPEnabled(): boolean;
|
|
60
60
|
set PvPEnabled(value: boolean);
|
|
61
|
+
set Ghosted(isGhosted: boolean);
|
|
61
62
|
get IsDead(): boolean;
|
|
62
63
|
set DisableFiring(value: boolean);
|
|
63
|
-
set Ghosted(isGhosted: boolean);
|
|
64
64
|
get EntityPlayerIsAimingAt(): Entity | null;
|
|
65
65
|
get StealthNoise(): number;
|
|
66
66
|
get FakeWantedLevel(): number;
|
package/models/Player.js
CHANGED
|
@@ -81,9 +81,6 @@ class Player {
|
|
|
81
81
|
constructor(handle = -1) {
|
|
82
82
|
this.handle = handle;
|
|
83
83
|
this.source = this.ServerId;
|
|
84
|
-
if (!IsDuplicityVersion()) {
|
|
85
|
-
this.PvPEnabled = true;
|
|
86
|
-
}
|
|
87
84
|
}
|
|
88
85
|
get Handle() {
|
|
89
86
|
return this.handle;
|
|
@@ -147,12 +144,6 @@ class Player {
|
|
|
147
144
|
SetCanAttackFriendly(this.Character.Handle, value, value);
|
|
148
145
|
this.pvp = value;
|
|
149
146
|
}
|
|
150
|
-
get IsDead() {
|
|
151
|
-
return IsPlayerDead(this.handle);
|
|
152
|
-
}
|
|
153
|
-
set DisableFiring(value) {
|
|
154
|
-
DisablePlayerFiring(this.handle, value);
|
|
155
|
-
}
|
|
156
147
|
set Ghosted(isGhosted) {
|
|
157
148
|
if (this.Handle === 128) {
|
|
158
149
|
SetLocalPlayerAsGhost(isGhosted);
|
|
@@ -160,6 +151,12 @@ class Player {
|
|
|
160
151
|
SetRelationshipToPlayer(this.handle, isGhosted);
|
|
161
152
|
}
|
|
162
153
|
}
|
|
154
|
+
get IsDead() {
|
|
155
|
+
return IsPlayerDead(this.handle);
|
|
156
|
+
}
|
|
157
|
+
set DisableFiring(value) {
|
|
158
|
+
DisablePlayerFiring(this.handle, value);
|
|
159
|
+
}
|
|
163
160
|
get EntityPlayerIsAimingAt() {
|
|
164
161
|
const [entityHit, entity] = GetEntityPlayerIsFreeAimingAt(this.handle);
|
|
165
162
|
if (entityHit) {
|
|
@@ -183,9 +180,6 @@ class Player {
|
|
|
183
180
|
return GetPlayerHealthRechargeLimit(this.handle);
|
|
184
181
|
}
|
|
185
182
|
get IsInvincible() {
|
|
186
|
-
if (IsDuplicityVersion()) {
|
|
187
|
-
return GetPlayerInvincible(this.handle);
|
|
188
|
-
}
|
|
189
183
|
return GetPlayerInvincible_2(this.handle);
|
|
190
184
|
}
|
|
191
185
|
get MaxArmor() {
|
package/package.json
CHANGED
package/weapon/DlcWeaponData.js
CHANGED
package/weapon/WeaponHudStats.js
CHANGED
|
@@ -7,7 +7,7 @@ const WeaponHudStats = /* @__PURE__ */ new Map();
|
|
|
7
7
|
function initializeOnce() {
|
|
8
8
|
let isInitialized = false;
|
|
9
9
|
return () => {
|
|
10
|
-
if (isInitialized ||
|
|
10
|
+
if (isInitialized || GetGameName() !== "fivem") {
|
|
11
11
|
return;
|
|
12
12
|
}
|
|
13
13
|
const intLength = 4;
|
|
@@ -6,7 +6,7 @@ const DlcWeaponComponentData = /* @__PURE__ */ new Map();
|
|
|
6
6
|
function initializeOnce() {
|
|
7
7
|
let isInitialized = false;
|
|
8
8
|
return () => {
|
|
9
|
-
if (isInitialized ||
|
|
9
|
+
if (isInitialized || GetGameName() !== "fivem") {
|
|
10
10
|
return;
|
|
11
11
|
}
|
|
12
12
|
const intLength = 4;
|
|
@@ -834,7 +834,7 @@ const WeaponComponentHashesByWeaponHash = /* @__PURE__ */ new Map([
|
|
|
834
834
|
function initializeOnce() {
|
|
835
835
|
let isInitialized = false;
|
|
836
836
|
return () => {
|
|
837
|
-
if (isInitialized ||
|
|
837
|
+
if (isInitialized || GetGameName() !== "fivem") {
|
|
838
838
|
return;
|
|
839
839
|
}
|
|
840
840
|
const intLength = 4;
|
|
@@ -7,7 +7,7 @@ const WeaponComponentHudStats = /* @__PURE__ */ new Map();
|
|
|
7
7
|
function initializeOnce() {
|
|
8
8
|
let isInitialized = false;
|
|
9
9
|
return () => {
|
|
10
|
-
if (isInitialized ||
|
|
10
|
+
if (isInitialized || GetGameName() !== "fivem") {
|
|
11
11
|
return;
|
|
12
12
|
}
|
|
13
13
|
const intLength = 4;
|