@nativewrappers/redm 0.0.170 → 0.0.172

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/Model.d.ts CHANGED
@@ -79,6 +79,7 @@ export declare class Model implements Disposable {
79
79
  * @returns Whether this model is a Vehicle.
80
80
  */
81
81
  get IsVehicle(): boolean;
82
+ get IsAnyVehicle(): boolean;
82
83
  get IsWeapon(): boolean;
83
84
  /**
84
85
  * Gets the model dimensions.
package/Model.js CHANGED
@@ -117,6 +117,9 @@ class Model {
117
117
  get IsVehicle() {
118
118
  return IsModelAVehicle(this.hash);
119
119
  }
120
+ get IsAnyVehicle() {
121
+ return this.IsTrain || this.IsVehicle || this.IsBoat;
122
+ }
120
123
  get IsWeapon() {
121
124
  return IsWeaponValid(this.hash);
122
125
  }
package/common/Command.js CHANGED
@@ -118,7 +118,7 @@ class Command {
118
118
  for (const name2 of names) {
119
119
  const commandObj = { ...this, name: `/${name2}` };
120
120
  if (GlobalData.IS_CLIENT) {
121
- emit("chat:addSuggestion", commandObj);
121
+ emit("chat:addSuggestions", commandObj);
122
122
  } else {
123
123
  commands.push(commandObj);
124
124
  emitNet("chat:addSuggestions", -1, commandObj);
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  ],
9
9
  "license": "MIT",
10
10
  "type": "module",
11
- "version": "0.0.170",
11
+ "version": "0.0.172",
12
12
  "repository": {
13
13
  "type": "git",
14
14
  "url": "https://github.com/nativewrappers/nativewrappers.git"
@@ -3,7 +3,7 @@ var __name = (target, value) => __defProp(target, "name", { value, configurable:
3
3
  import { Vehicle } from "../entities/Vehicle";
4
4
  import { _N } from "../utils/Native";
5
5
  async function createDraftVehicle(model, spawnPos, heading, isNetwork = false, bScriptHostVeh = true, bDontAutoCreateDraftAnimals = true, draftAnimalPopGroup = 0, p9 = true) {
6
- if (!model.IsPed || !model.request(1e3)) {
6
+ if (!model.IsVehicle || !model.request(1e3)) {
7
7
  return null;
8
8
  }
9
9
  const draftVehHandle = _N(
@@ -2,7 +2,7 @@ var __defProp = Object.defineProperty;
2
2
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
3
  import { Vehicle } from "../entities/Vehicle";
4
4
  async function createVehicle(model, spawnPos, heading, isNetwork = false, bScriptHostVeh = true, bDontAutoCreateDraftAnimals = true, p8 = true) {
5
- if (!model.IsPed || !model.request(1e3)) {
5
+ if (!model.IsAnyVehicle || !model.request(1e3)) {
6
6
  return null;
7
7
  }
8
8
  const pedHandle = CreateVehicle(