@nativewrappers/fivem 0.0.104 → 0.0.106
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/utils/randomInt.d.ts +1 -0
- package/common/utils/randomInt.js +9 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/models/BaseEntity.d.ts +10 -0
- package/models/BaseEntity.js +18 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function randomInt(min: number, max: number): number;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
function randomInt(min, max) {
|
|
4
|
+
return Math.random() * (max - min) + min;
|
|
5
|
+
}
|
|
6
|
+
__name(randomInt, "randomInt");
|
|
7
|
+
export {
|
|
8
|
+
randomInt
|
|
9
|
+
};
|
package/index.d.ts
CHANGED
|
@@ -164,6 +164,7 @@ export * from "./common/utils/cleanPlayerName";
|
|
|
164
164
|
export * from "./common/utils/enumValues";
|
|
165
165
|
export * from "./common/utils/getStringFromUInt8Array";
|
|
166
166
|
export * from "./common/utils/getUInt32FromUint8Array";
|
|
167
|
+
export * from "./common/utils/randomInt";
|
|
167
168
|
export * from "./common/net/NetworkedMap";
|
|
168
169
|
export * from "./common/decors/Events";
|
|
169
170
|
export * from "./cfx/StateBagChangeHandler";
|
package/index.js
CHANGED
|
@@ -164,6 +164,7 @@ export * from "./common/utils/cleanPlayerName";
|
|
|
164
164
|
export * from "./common/utils/enumValues";
|
|
165
165
|
export * from "./common/utils/getStringFromUInt8Array";
|
|
166
166
|
export * from "./common/utils/getUInt32FromUint8Array";
|
|
167
|
+
export * from "./common/utils/randomInt";
|
|
167
168
|
export * from "./common/net/NetworkedMap";
|
|
168
169
|
export * from "./common/decors/Events";
|
|
169
170
|
export * from "./cfx/StateBagChangeHandler";
|
package/models/BaseEntity.d.ts
CHANGED
|
@@ -184,4 +184,14 @@ export declare abstract class BaseEntity {
|
|
|
184
184
|
* @deprecated use [[IsMissionEntity]] setter as false instead.
|
|
185
185
|
*/
|
|
186
186
|
markAsNoLongerNeeded(): void;
|
|
187
|
+
/**
|
|
188
|
+
* @returns the current interior id that the entity is in, or 0 if they're outside
|
|
189
|
+
*/
|
|
190
|
+
get Interior(): number;
|
|
191
|
+
/**
|
|
192
|
+
* @returns the room key hash that the entity is in, or 0 if they're outside
|
|
193
|
+
*/
|
|
194
|
+
get RoomKey(): number;
|
|
195
|
+
clearInterior(): void;
|
|
196
|
+
forceRoom(interiorId: number, roomKey: number): void;
|
|
187
197
|
}
|
package/models/BaseEntity.js
CHANGED
|
@@ -549,6 +549,24 @@ class BaseEntity {
|
|
|
549
549
|
markAsNoLongerNeeded() {
|
|
550
550
|
SetEntityAsNoLongerNeeded(this.Handle);
|
|
551
551
|
}
|
|
552
|
+
/**
|
|
553
|
+
* @returns the current interior id that the entity is in, or 0 if they're outside
|
|
554
|
+
*/
|
|
555
|
+
get Interior() {
|
|
556
|
+
return GetInteriorFromEntity(this.handle);
|
|
557
|
+
}
|
|
558
|
+
/**
|
|
559
|
+
* @returns the room key hash that the entity is in, or 0 if they're outside
|
|
560
|
+
*/
|
|
561
|
+
get RoomKey() {
|
|
562
|
+
return GetRoomKeyFromEntity(this.handle);
|
|
563
|
+
}
|
|
564
|
+
clearInterior() {
|
|
565
|
+
ClearInteriorForEntity(this.handle);
|
|
566
|
+
}
|
|
567
|
+
forceRoom(interiorId, roomKey) {
|
|
568
|
+
ForceRoomForEntity(this.handle, interiorId, roomKey);
|
|
569
|
+
}
|
|
552
570
|
}
|
|
553
571
|
export {
|
|
554
572
|
BaseEntity
|