@nativewrappers/server 0.0.105 → 0.0.107

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.
@@ -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
+ };
@@ -1,6 +1,6 @@
1
1
  import { ClassTypes } from "../common/utils/ClassTypes";
2
- import { Ped } from "./Ped";
3
2
  import { Vector3 } from "../common/utils/Vector";
3
+ import { Ped } from "./Ped";
4
4
  export declare class Player {
5
5
  private readonly source;
6
6
  protected type: ClassTypes;
@@ -1,10 +1,10 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- import cfx from "../cfx";
4
3
  import { ClassTypes } from "../common/utils/ClassTypes";
5
- import { Ped } from "./Ped";
6
- import { cleanPlayerName } from "../common/utils/cleanPlayerName";
7
4
  import { Vector3 } from "../common/utils/Vector";
5
+ import { cleanPlayerName } from "../common/utils/cleanPlayerName";
6
+ import cfx from "../cfx";
7
+ import { Ped } from "./Ped";
8
8
  class Player {
9
9
  constructor(source) {
10
10
  this.source = source;
@@ -24,7 +24,7 @@ class Player {
24
24
  }
25
25
  }
26
26
  get Exists() {
27
- return this.source !== 0;
27
+ return this.source !== 0 && DoesPlayerExist(this.source);
28
28
  }
29
29
  get Source() {
30
30
  return this.source;
package/index.d.ts CHANGED
@@ -30,6 +30,7 @@ export * from "./common/utils/cleanPlayerName";
30
30
  export * from "./common/utils/enumValues";
31
31
  export * from "./common/utils/getStringFromUInt8Array";
32
32
  export * from "./common/utils/getUInt32FromUint8Array";
33
+ export * from "./common/utils/randomInt";
33
34
  export * from "./common/net/NetworkedMap";
34
35
  export * from "./common/decors/Events";
35
36
  export * from "./cfx/StateBagChangeHandler";
package/index.js CHANGED
@@ -30,6 +30,7 @@ export * from "./common/utils/cleanPlayerName";
30
30
  export * from "./common/utils/enumValues";
31
31
  export * from "./common/utils/getStringFromUInt8Array";
32
32
  export * from "./common/utils/getUInt32FromUint8Array";
33
+ export * from "./common/utils/randomInt";
33
34
  export * from "./common/net/NetworkedMap";
34
35
  export * from "./common/decors/Events";
35
36
  export * from "./cfx/StateBagChangeHandler";
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  ],
9
9
  "license": "MIT",
10
10
  "type": "module",
11
- "version": "0.0.105",
11
+ "version": "0.0.107",
12
12
  "repository": {
13
13
  "type": "git",
14
14
  "url": "https://github.com/nativewrappers/nativewrappers.git"