@armoury/fivem-framework-server 1.0.43 → 1.0.44

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.
@@ -9,18 +9,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.Blip = void 0;
10
10
  const injection_js_1 = require("injection-js");
11
11
  let Blip = class Blip {
12
- static createLocalized(x, y, z, localizationKey, options) {
13
- const newOptions = Object.assign(Object.assign({}, (options ? options : {})), { localizationKey });
12
+ static createLocalized(x, y, z, localizationKey, localizationParameters = {}, options) {
13
+ const newOptions = Object.assign(Object.assign({}, (options ? options : {})), { localizationKey,
14
+ localizationParameters });
14
15
  return this.create(x, y, z, newOptions);
15
16
  }
16
17
  static create(x, y, z, options) {
17
- var _a, _b, _c, _d, _e;
18
+ var _a, _b, _c, _d;
18
19
  options = Object.assign(Object.assign({}, options), { toPlayerId: (_a = options === null || options === void 0 ? void 0 : options.toPlayerId) !== null && _a !== void 0 ? _a : -1 });
19
20
  const lastBlipId = !this._blipIds.length ? -1 : this._blipIds[this._blipIds.length - 1];
20
21
  const blipId = lastBlipId + 1;
21
22
  this._blipIds.push(blipId);
22
- console.log('Sending, in order:', blipId, x, y, z, (_b = options.spriteId) !== null && _b !== void 0 ? _b : undefined, (_c = options.localizationKey) !== null && _c !== void 0 ? _c : undefined);
23
- Cfx.emitNet('armoury:safe:blip:create', options.toPlayerId, blipId, x, y, z, (_d = options.spriteId) !== null && _d !== void 0 ? _d : undefined, (_e = options.localizationKey) !== null && _e !== void 0 ? _e : undefined);
23
+ Cfx.emitNet('armoury:safe:blip:create', options.toPlayerId, blipId, x, y, z, (_b = options.spriteId) !== null && _b !== void 0 ? _b : undefined, (_c = options.localizationKey) !== null && _c !== void 0 ? _c : undefined, (_d = options.localizationParameters) !== null && _d !== void 0 ? _d : undefined);
24
24
  Cfx.emit('armoury:safe:blip:created', blipId, x, y, z, options);
25
25
  return blipId;
26
26
  }
@@ -6,18 +6,18 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  import { Injectable } from 'injection-js';
8
8
  let Blip = class Blip {
9
- static createLocalized(x, y, z, localizationKey, options) {
10
- const newOptions = Object.assign(Object.assign({}, (options ? options : {})), { localizationKey });
9
+ static createLocalized(x, y, z, localizationKey, localizationParameters = {}, options) {
10
+ const newOptions = Object.assign(Object.assign({}, (options ? options : {})), { localizationKey,
11
+ localizationParameters });
11
12
  return this.create(x, y, z, newOptions);
12
13
  }
13
14
  static create(x, y, z, options) {
14
- var _a, _b, _c, _d, _e;
15
+ var _a, _b, _c, _d;
15
16
  options = Object.assign(Object.assign({}, options), { toPlayerId: (_a = options === null || options === void 0 ? void 0 : options.toPlayerId) !== null && _a !== void 0 ? _a : -1 });
16
17
  const lastBlipId = !this._blipIds.length ? -1 : this._blipIds[this._blipIds.length - 1];
17
18
  const blipId = lastBlipId + 1;
18
19
  this._blipIds.push(blipId);
19
- console.log('Sending, in order:', blipId, x, y, z, (_b = options.spriteId) !== null && _b !== void 0 ? _b : undefined, (_c = options.localizationKey) !== null && _c !== void 0 ? _c : undefined);
20
- Cfx.emitNet('armoury:safe:blip:create', options.toPlayerId, blipId, x, y, z, (_d = options.spriteId) !== null && _d !== void 0 ? _d : undefined, (_e = options.localizationKey) !== null && _e !== void 0 ? _e : undefined);
20
+ Cfx.emitNet('armoury:safe:blip:create', options.toPlayerId, blipId, x, y, z, (_b = options.spriteId) !== null && _b !== void 0 ? _b : undefined, (_c = options.localizationKey) !== null && _c !== void 0 ? _c : undefined, (_d = options.localizationParameters) !== null && _d !== void 0 ? _d : undefined);
21
21
  Cfx.emit('armoury:safe:blip:created', blipId, x, y, z, options);
22
22
  return blipId;
23
23
  }
@@ -1,11 +1,12 @@
1
1
  export declare class Blip {
2
2
  private static _blipIds;
3
- static createLocalized(x: number, y: number, z: number, localizationKey: string, options?: Omit<BlipCreateOptions, 'localizationKey'>): number;
3
+ static createLocalized(x: number, y: number, z: number, localizationKey: string, localizationParameters?: {}, options?: Omit<BlipCreateOptions, 'localizationKey'>): number;
4
4
  static create(x: number, y: number, z: number, options?: BlipCreateOptions): number;
5
5
  }
6
6
  type BlipCreateOptions = {
7
7
  spriteId?: number;
8
8
  localizationKey?: string;
9
9
  toPlayerId?: number;
10
+ localizationParameters?: Record<string, any>;
10
11
  };
11
12
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@armoury/fivem-framework-server",
3
- "version": "1.0.43",
3
+ "version": "1.0.44",
4
4
  "description": "Server APIs for the Armoury FiveM framework",
5
5
  "main": "dist/cjs/server/index.js",
6
6
  "module": "dist/esm/server/index.js",
@@ -27,7 +27,7 @@
27
27
  "rxjs": "^7.8.1"
28
28
  },
29
29
  "peerDependencies": {
30
- "@armoury/fivem-framework-common": "1.0.43"
30
+ "@armoury/fivem-framework-common": "1.0.44"
31
31
  },
32
32
  "publishConfig": {
33
33
  "access": "public"