@nativewrappers/fivem 0.0.88 → 0.0.89

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.js CHANGED
@@ -1,5 +1,6 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+ import { Delay } from "./common/utils/Delay";
3
4
  import { Vector3 } from "./common/utils/Vector";
4
5
  import { VehicleHash } from "./hashes/VehicleHash";
5
6
  class Model {
@@ -192,7 +193,7 @@ class Model {
192
193
  RequestModel(this.hash);
193
194
  const timeout = GetGameTimer() + timeoutMs;
194
195
  while (!this.IsLoaded && GetGameTimer() < timeout) {
195
- await Wait(0);
196
+ await Delay(0);
196
197
  }
197
198
  this.requestedModel = true;
198
199
  return this.IsLoaded;
package/World.js CHANGED
@@ -1,5 +1,6 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+ import { Delay } from "./common/utils/Delay";
3
4
  import { Vector3 } from "./common/utils/Vector";
4
5
  import { Blip } from "./Blip";
5
6
  import { Camera } from "./Camera";
@@ -422,7 +423,7 @@ class World {
422
423
  RopeLoadTextures();
423
424
  }
424
425
  while (!RopeAreTexturesLoaded()) {
425
- await Wait(0);
426
+ await Delay(0);
426
427
  }
427
428
  }
428
429
  const [ropeHandle] = AddRope(
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  ],
9
9
  "license": "MIT",
10
10
  "type": "module",
11
- "version": "0.0.88",
11
+ "version": "0.0.89",
12
12
  "repository": {
13
13
  "type": "git",
14
14
  "url": "https://github.com/nativewrappers/nativewrappers.git"
package/ui/menu/Menu.d.ts CHANGED
@@ -4,9 +4,9 @@ import { MenuAlignment } from "../../enums/MenuAlignment";
4
4
  import { LiteEvent } from "../../utils/LiteEvent";
5
5
  import { Point } from "../../utils/Point";
6
6
  import { Size } from "../../utils/Size";
7
- import { UIMenuItem } from "./items/UIMenuItem";
8
7
  import { MenuControls } from "./MenuControls";
9
8
  import { MenuSettings } from "./MenuSettings";
9
+ import { UIMenuItem } from "./items/UIMenuItem";
10
10
  export declare class Menu {
11
11
  static screenAspectRatio: number;
12
12
  static screenHeight: number;
package/ui/menu/Menu.js CHANGED
@@ -1,15 +1,16 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
3
  import { Color } from "../../common/utils/Color";
4
+ import { Delay } from "../../common/utils/Delay";
4
5
  import { Audio } from "../../Audio";
6
+ import { Game } from "../../Game";
7
+ import { GameplayCamera } from "../../GameplayCamera";
5
8
  import { Alignment } from "../../enums/Alignment";
6
9
  import { Control } from "../../enums/Control";
7
10
  import { CursorSprite } from "../../enums/CursorSprite";
8
11
  import { Font } from "../../enums/Font";
9
12
  import { InputMode } from "../../enums/InputMode";
10
13
  import { MenuAlignment } from "../../enums/MenuAlignment";
11
- import { Game } from "../../Game";
12
- import { GameplayCamera } from "../../GameplayCamera";
13
14
  import { Crypto } from "../../utils/Crypto";
14
15
  import { LiteEvent } from "../../utils/LiteEvent";
15
16
  import { Point } from "../../utils/Point";
@@ -20,13 +21,13 @@ import { Rectangle } from "../Rectangle";
20
21
  import { Screen } from "../Screen";
21
22
  import { Sprite } from "../Sprite";
22
23
  import { Text } from "../Text";
24
+ import { MenuControls } from "./MenuControls";
25
+ import { MenuSettings } from "./MenuSettings";
23
26
  import { UIMenuCheckboxItem } from "./items/UIMenuCheckboxItem";
24
27
  import { UIMenuItem } from "./items/UIMenuItem";
25
28
  import { UIMenuListItem } from "./items/UIMenuListItem";
26
29
  import { UIMenuSeparatorItem } from "./items/UIMenuSeparatorItem";
27
30
  import { UIMenuSliderItem } from "./items/UIMenuSliderItem";
28
- import { MenuControls } from "./MenuControls";
29
- import { MenuSettings } from "./MenuSettings";
30
31
  class Menu {
31
32
  static {
32
33
  __name(this, "Menu");
@@ -573,7 +574,7 @@ class Menu {
573
574
  this.CurrentSelection = hoveredItemIndex;
574
575
  this.indexChange.emit(this.CurrentSelection);
575
576
  }
576
- await Wait(this._navigationDelay);
577
+ await Delay(this._navigationDelay);
577
578
  while (Game.isDisabledControlPressed(0, Control.Attack) && hoveredItem.IsMouseInBounds) {
578
579
  if (hoveredItem.selected) {
579
580
  if (hoveredItem.enabled) {
@@ -592,7 +593,7 @@ class Menu {
592
593
  this.CurrentSelection = hoveredItemIndex;
593
594
  this.indexChange.emit(this.CurrentSelection);
594
595
  }
595
- await Wait(125);
596
+ await Delay(125);
596
597
  }
597
598
  this._mousePressed = false;
598
599
  })();
@@ -606,10 +607,10 @@ class Menu {
606
607
  (async () => {
607
608
  this._mousePressed = true;
608
609
  this.goUp();
609
- await Wait(this._navigationDelay);
610
+ await Delay(this._navigationDelay);
610
611
  while (Game.isDisabledControlPressed(0, Control.Attack)) {
611
612
  this.goUp();
612
- await Wait(125);
613
+ await Delay(125);
613
614
  }
614
615
  this._mousePressed = false;
615
616
  })();
@@ -626,10 +627,10 @@ class Menu {
626
627
  (async () => {
627
628
  this._mousePressed = true;
628
629
  this.goDown();
629
- await Wait(this._navigationDelay);
630
+ await Delay(this._navigationDelay);
630
631
  while (Game.isDisabledControlPressed(0, Control.Attack)) {
631
632
  this.goDown();
632
- await Wait(125);
633
+ await Delay(125);
633
634
  }
634
635
  this._mousePressed = false;
635
636
  })();
@@ -1,5 +1,6 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+ import { Delay } from "../common/utils/Delay";
3
4
  import { Game } from "../Game";
4
5
  import { Weapon } from "./Weapon";
5
6
  class WeaponAsset {
@@ -50,7 +51,7 @@ class WeaponAsset {
50
51
  this.request();
51
52
  const start = GetGameTimer();
52
53
  while (!this.IsLoaded) {
53
- await Wait(100);
54
+ await Delay(100);
54
55
  const now = GetGameTimer();
55
56
  if (now - start >= timeout) {
56
57
  return false;