rock-mod 0.11.0 → 0.12.0

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.
@@ -44,5 +44,7 @@ export declare class AltVPlayer extends AltVEntity<Player> implements IPlayer {
44
44
  setClothes(componentID: number, drawableID: number, textureID: number, paletteID: number): void;
45
45
  setHairColor(colorID: number, highlightColorID: number): void;
46
46
  kick(reason?: string): void;
47
+ playAnimation(dictionary: string, name: string, speed: number, flag: number): void;
48
+ stopAnimation(): void;
47
49
  }
48
50
  export {};
@@ -133,5 +133,20 @@ class AltVPlayer extends AltVEntity_1.AltVEntity {
133
133
  kick(reason) {
134
134
  return this.mpEntity.kick(reason);
135
135
  }
136
+ playAnimation(dictionary, name, speed, flag) {
137
+ const durationDefault = 10000;
138
+ const blendInSpeedDefault = undefined;
139
+ const blendOutSpeedDefault = undefined;
140
+ const duration = durationDefault * speed;
141
+ const flags = flag;
142
+ const playbackRate = 1;
143
+ const lockX = false;
144
+ const lockY = false;
145
+ const lockZ = false;
146
+ return this.mpEntity.playAnimation(dictionary, name, blendInSpeedDefault, blendOutSpeedDefault, duration, flags, playbackRate, lockX, lockY, lockZ);
147
+ }
148
+ stopAnimation() {
149
+ this.mpEntity.clearTasks();
150
+ }
136
151
  }
137
152
  exports.AltVPlayer = AltVPlayer;
@@ -57,4 +57,6 @@ export interface IPlayer extends IEntity {
57
57
  setClothes(componentID: number, drawableID: number, textureID: number, paletteID: number): void;
58
58
  setHairColor(colorID: number, highlightColorID: number): void;
59
59
  kick(reason?: string): void;
60
+ playAnimation(dictionary: string, name: string, speed: number, flag: number): void;
61
+ stopAnimation(): void;
60
62
  }
@@ -53,4 +53,6 @@ export declare class MockPlayer extends MockEntity implements IPlayer {
53
53
  setClothes(): void;
54
54
  setHairColor(): void;
55
55
  kick(): void;
56
+ playAnimation(): void;
57
+ stopAnimation(): void;
56
58
  }
@@ -131,5 +131,11 @@ class MockPlayer extends MockEntity_1.MockEntity {
131
131
  kick() {
132
132
  throw new Error("Not implemented: kick");
133
133
  }
134
+ playAnimation() {
135
+ throw new Error("Not implemented: playAnimation");
136
+ }
137
+ stopAnimation() {
138
+ throw new Error("Not implemented: stopAnimation");
139
+ }
134
140
  }
135
141
  exports.MockPlayer = MockPlayer;
@@ -42,5 +42,7 @@ export declare class RagePlayer extends RageEntity<PlayerMp> implements IPlayer
42
42
  setClothes(componentID: number, drawableID: number, textureID: number, paletteID: number): void;
43
43
  setHairColor(colorID: number, highlightColorID: number): void;
44
44
  kick(reason?: string): void;
45
+ playAnimation(dictionary: string, name: string, speed: number, flag: number): void;
46
+ stopAnimation(): void;
45
47
  }
46
48
  export {};
@@ -125,5 +125,11 @@ class RagePlayer extends RageEntity_1.RageEntity {
125
125
  kick(reason) {
126
126
  return this.mpEntity.kick(reason ?? "");
127
127
  }
128
+ playAnimation(dictionary, name, speed, flag) {
129
+ return this.mpEntity.playAnimation(dictionary, name, speed, flag);
130
+ }
131
+ stopAnimation() {
132
+ return this.mpEntity.stopAnimation();
133
+ }
128
134
  }
129
135
  exports.RagePlayer = RagePlayer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rock-mod",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
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",