rock-mod 0.7.1 → 0.7.3

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.
@@ -1,6 +1,7 @@
1
1
  import { IEntitiesManager, IEntityCreateOptions } from "../entity";
2
2
  import { IPed } from "./IPed";
3
3
  export interface IPedCreateOptions extends IEntityCreateOptions {
4
+ frozen: boolean;
4
5
  }
5
6
  export interface IPedsManager extends IEntitiesManager<IPed> {
6
7
  create(options: IPedCreateOptions): IPed;
@@ -10,10 +10,11 @@ class RagePedsManager extends RageEntitiesManager_1.RageEntitiesManager {
10
10
  });
11
11
  }
12
12
  create(options) {
13
- const { model, position, dimension, rotation } = options;
13
+ const { model, frozen, position, dimension, rotation } = options;
14
14
  const mpEntity = mp.peds.new(mp.joaat(model), new mp.Vector3(position), {
15
15
  dimension,
16
16
  heading: rotation.z,
17
+ frozen,
17
18
  });
18
19
  mpEntity.isExists = () => mp.peds.exists(mpEntity);
19
20
  const ped = new RagePed_1.RagePed({ mpEntity });
@@ -27,11 +27,11 @@ class RageVehicle extends RageEntity_1.RageEntity {
27
27
  return this.mpEntity.getColor(1);
28
28
  }
29
29
  get customPrimaryColor() {
30
- const [r, g, b] = this.mpEntity.getColorRGB(0);
30
+ const [r, g, b] = this.mpEntity.getColorRGB(0) ?? [0, 0, 0];
31
31
  return new utils_1.RGBA(r, g, b);
32
32
  }
33
33
  get customSecondaryColor() {
34
- const [r, g, b] = this.mpEntity.getColorRGB(1);
34
+ const [r, g, b] = this.mpEntity.getColorRGB(1) ?? [0, 0, 0];
35
35
  return new utils_1.RGBA(r, g, b);
36
36
  }
37
37
  get driver() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rock-mod",
3
- "version": "0.7.1",
3
+ "version": "0.7.3",
4
4
  "description": "Rock-Mod is a powerful framework designed for creating and managing mods for Grand Theft Auto (GTA) games.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",