@nativewrappers/fivem 0.0.64 → 0.0.72
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/Audio.d.ts +2 -2
- package/Blip.d.ts +2 -2
- package/Camera.d.ts +1 -1
- package/Game.d.ts +1 -1
- package/GameplayCamera.d.ts +1 -1
- package/Model.d.ts +1 -1
- package/ParticleEffect.d.ts +2 -2
- package/ParticleEffectAsset.d.ts +1 -1
- package/README.md +45 -0
- package/Raycast.d.ts +2 -2
- package/RelationshipGroup.d.ts +1 -1
- package/Tasks.d.ts +3 -3
- package/World.d.ts +2 -2
- package/cfx/StateBagChangeHandler.d.ts +1 -3
- package/common/Command.d.ts +30 -0
- package/common/Convar.d.ts +13 -0
- package/common/GlobalData.d.ts +8 -0
- package/common/Kvp.d.ts +69 -0
- package/common/Resource.d.ts +14 -0
- package/common/decors/Events.d.ts +54 -0
- package/common/index.d.ts +8 -0
- package/common/net/NetworkedMap.d.ts +28 -0
- package/common/types.d.ts +5 -0
- package/common/utils/ClassTypes.d.ts +11 -0
- package/common/utils/Color.d.ts +14 -0
- package/common/utils/Maths.d.ts +4 -0
- package/common/utils/PointF.d.ts +12 -0
- package/common/utils/Quaternion.d.ts +10 -0
- package/common/utils/Vector.d.ts +429 -0
- package/common/utils/Vector2.d.ts +1 -0
- package/common/utils/Vector3.d.ts +1 -0
- package/common/utils/Vector4.d.ts +1 -0
- package/common/utils/cleanPlayerName.d.ts +6 -0
- package/common/utils/enumValues.d.ts +12 -0
- package/{utils/getStringFromUInt8Array.js → common/utils/getStringFromUInt8Array.d.ts} +1 -3
- package/{utils/getUInt32FromUint8Array.js → common/utils/getUInt32FromUint8Array.d.ts} +1 -1
- package/common/utils/index.d.ts +12 -0
- package/index.d.ts +1 -1
- package/index.js +20136 -26
- package/interfaces/Dimensions.d.ts +1 -1
- package/models/BaseEntity.d.ts +3 -3
- package/models/Ped.d.ts +2 -2
- package/models/PedBone.d.ts +1 -1
- package/models/PedBoneCollection.d.ts +1 -1
- package/models/Player.d.ts +1 -1
- package/models/Vehicle.d.ts +2 -2
- package/models/VehicleDoor.d.ts +2 -2
- package/models/VehicleDoorCollection.d.ts +1 -1
- package/models/VehicleMod.d.ts +2 -2
- package/models/VehicleModCollection.d.ts +2 -2
- package/models/VehicleToggleMod.d.ts +2 -2
- package/models/VehicleWheel.d.ts +1 -1
- package/models/VehicleWheelCollection.d.ts +1 -1
- package/models/VehicleWindow.d.ts +2 -2
- package/models/VehicleWindowCollection.d.ts +1 -1
- package/package.json +6 -4
- package/ui/Container.d.ts +2 -2
- package/ui/Effects.d.ts +1 -1
- package/ui/Hud.d.ts +2 -2
- package/ui/InstructionalButtons.d.ts +1 -1
- package/ui/Rectangle.d.ts +2 -2
- package/ui/Scaleform.d.ts +1 -1
- package/ui/Screen.d.ts +1 -1
- package/ui/Text.d.ts +1 -1
- package/ui/interfaces/IButton.d.ts +1 -1
- package/ui/interfaces/IDrawable.d.ts +1 -1
- package/ui/menu/items/UIMenuItem.d.ts +1 -1
- package/ui/menu/items/UIMenuListItem.d.ts +1 -1
- package/ui/menu/items/panels/AbstractUIMenuPanel.d.ts +2 -2
- package/ui/menu/items/panels/UIMenuStatisticsPanel.d.ts +1 -1
- package/utils/LiteEvent.d.ts +2 -6
- package/utils/index.d.ts +1 -1
- package/weapon/DlcWeaponData.d.ts +1 -1
- package/weapon/Weapon.d.ts +7 -7
- package/weapon/WeaponAsset.d.ts +1 -1
- package/weapon/WeaponCollection.d.ts +2 -2
- package/weaponComponent/DlcWeaponComponentData.d.ts +1 -1
- package/weaponComponent/InvalidWeaponComponent.d.ts +1 -1
- package/weaponComponent/WeaponComponent.d.ts +3 -3
- package/weaponComponent/WeaponComponentCollection.d.ts +3 -3
- package/Audio.js +0 -93
- package/Blip.js +0 -105
- package/Camera.js +0 -162
- package/Checkpoint.js +0 -43
- package/Events.js +0 -74
- package/Game.js +0 -474
- package/GameplayCamera.js +0 -141
- package/Model.js +0 -213
- package/NetworkedScene.js +0 -18
- package/ParticleEffect.js +0 -123
- package/ParticleEffectAsset.js +0 -105
- package/Pickup.js +0 -19
- package/Raycast.js +0 -123
- package/RelationshipGroup.js +0 -67
- package/Rope.js +0 -129
- package/TaskSequence.js +0 -48
- package/Tasks.js +0 -241
- package/World.js +0 -765
- package/cfx/StateBagChangeHandler.js +0 -1
- package/cfx/index.js +0 -1
- package/enums/Alignment.js +0 -6
- package/enums/AnimationFlags.js +0 -35
- package/enums/AudioFlag.js +0 -38
- package/enums/BadgeStyle.js +0 -183
- package/enums/Blip.js +0 -225
- package/enums/Bone.js +0 -103
- package/enums/CameraShake.js +0 -14
- package/enums/CameraTypes.js +0 -8
- package/enums/CheckboxStyle.js +0 -5
- package/enums/Checkpoint.js +0 -67
- package/enums/CloudHat.js +0 -27
- package/enums/Control.js +0 -361
- package/enums/CursorSprite.js +0 -15
- package/enums/Driving.js +0 -34
- package/enums/ExplosionType.js +0 -45
- package/enums/FiringPattern.js +0 -20
- package/enums/Font.js +0 -8
- package/enums/ForceType.js +0 -9
- package/enums/Gender.js +0 -5
- package/enums/HelmetType.js +0 -6
- package/enums/HudColor.js +0 -184
- package/enums/HudComponent.js +0 -54
- package/enums/InputMode.js +0 -5
- package/enums/InvertAxis.js +0 -7
- package/enums/Language.js +0 -15
- package/enums/LeaveVehicleFlags.js +0 -11
- package/enums/LoadingSpinnerType.js +0 -8
- package/enums/MarkerType.js +0 -50
- package/enums/MenuAlignment.js +0 -5
- package/enums/NotificationType.js +0 -11
- package/enums/Parachute.js +0 -15
- package/enums/PickupType.js +0 -74
- package/enums/RadioStation.js +0 -25
- package/enums/RagdollType.js +0 -7
- package/enums/RaycastEnums.js +0 -32
- package/enums/Relationship.js +0 -10
- package/enums/RopeType.js +0 -6
- package/enums/ScreenEffect.js +0 -84
- package/enums/SpeechModifier.js +0 -40
- package/enums/Vehicle.js +0 -376
- package/enums/Weather.js +0 -22
- package/enums/ZoneID.js +0 -95
- package/enums/index.js +0 -42
- package/hashes/MaterialHash.js +0 -217
- package/hashes/PedHash.js +0 -725
- package/hashes/VehicleHash.js +0 -523
- package/hashes/WeaponHash.js +0 -161
- package/hashes/WeatherTypeHash.js +0 -22
- package/hashes/index.js +0 -5
- package/interfaces/Dimensions.js +0 -1
- package/models/BaseEntity.js +0 -477
- package/models/Entity.js +0 -25
- package/models/EntityBone.js +0 -26
- package/models/EntityBoneCollection.js +0 -18
- package/models/Ped.js +0 -692
- package/models/PedBone.js +0 -9
- package/models/PedBoneCollection.js +0 -21
- package/models/Player.js +0 -186
- package/models/Prop.js +0 -26
- package/models/Vehicle.js +0 -576
- package/models/VehicleDoor.js +0 -44
- package/models/VehicleDoorCollection.js +0 -62
- package/models/VehicleMod.js +0 -35
- package/models/VehicleModCollection.js +0 -227
- package/models/VehicleToggleMod.js +0 -29
- package/models/VehicleWheel.js +0 -23
- package/models/VehicleWheelCollection.js +0 -57
- package/models/VehicleWindow.js +0 -35
- package/models/VehicleWindowCollection.js +0 -57
- package/models/index.js +0 -19
- package/ui/Container.js +0 -31
- package/ui/Effects.js +0 -106
- package/ui/Fading.js +0 -69
- package/ui/Hud.js +0 -39
- package/ui/InstructionalButtons.js +0 -54
- package/ui/LoadingPrompt.js +0 -45
- package/ui/Notification.js +0 -9
- package/ui/Rectangle.js +0 -40
- package/ui/Scaleform.js +0 -236
- package/ui/Screen.js +0 -72
- package/ui/Sprite.js +0 -60
- package/ui/Text.js +0 -115
- package/ui/Timerbar.js +0 -248
- package/ui/index.js +0 -15
- package/ui/interfaces/IButton.js +0 -1
- package/ui/interfaces/IDrawable.js +0 -1
- package/ui/interfaces/index.js +0 -1
- package/ui/menu/Menu.js +0 -831
- package/ui/menu/MenuControl.js +0 -12
- package/ui/menu/MenuControls.js +0 -9
- package/ui/menu/MenuSettings.js +0 -54
- package/ui/menu/index.js +0 -6
- package/ui/menu/items/UIMenuCheckboxItem.js +0 -59
- package/ui/menu/items/UIMenuItem.js +0 -1111
- package/ui/menu/items/UIMenuListItem.js +0 -119
- package/ui/menu/items/UIMenuSeparatorItem.js +0 -29
- package/ui/menu/items/UIMenuSliderItem.js +0 -191
- package/ui/menu/items/index.js +0 -6
- package/ui/menu/items/panels/AbstractUIMenuPanel.js +0 -44
- package/ui/menu/items/panels/UIMenuColorPanel.js +0 -217
- package/ui/menu/items/panels/UIMenuGridPanel.js +0 -261
- package/ui/menu/items/panels/UIMenuPercentagePanel.js +0 -124
- package/ui/menu/items/panels/UIMenuStatisticsPanel.js +0 -79
- package/ui/menu/items/panels/UIMenuStatisticsPanelItem.js +0 -35
- package/ui/menu/items/panels/index.js +0 -6
- package/ui/menu/modules/ListItem.js +0 -10
- package/ui/menu/modules/index.js +0 -1
- package/utils/Animations.js +0 -55
- package/utils/Crypto.js +0 -25
- package/utils/LiteEvent.js +0 -19
- package/utils/Maths.js +0 -10
- package/utils/Point.js +0 -30
- package/utils/PointF.js +0 -14
- package/utils/Quaternion.js +0 -27
- package/utils/Size.js +0 -8
- package/utils/String.js +0 -25
- package/utils/enumValues.js +0 -14
- package/utils/index.js +0 -9
- package/weapon/DlcWeaponData.js +0 -44
- package/weapon/Mk2WeaponHash.js +0 -25
- package/weapon/Weapon.js +0 -270
- package/weapon/WeaponAsset.js +0 -84
- package/weapon/WeaponCollection.js +0 -187
- package/weapon/WeaponDisplayNameByHash.js +0 -75
- package/weapon/WeaponGroup.js +0 -19
- package/weapon/WeaponHudStats.js +0 -38
- package/weapon/WeaponLivery.js +0 -14
- package/weapon/WeaponLiveryColor.js +0 -35
- package/weapon/WeaponTint.js +0 -43
- package/weapon/index.js +0 -8
- package/weaponComponent/ComponentAttachmentPoint.js +0 -19
- package/weaponComponent/ComponentAttachmentPointByHash.js +0 -573
- package/weaponComponent/ComponentDisplayNameByHash.js +0 -280
- package/weaponComponent/DlcWeaponComponentData.js +0 -44
- package/weaponComponent/InvalidWeaponComponent.js +0 -28
- package/weaponComponent/WeaponComponent.js +0 -123
- package/weaponComponent/WeaponComponentCollection.js +0 -174
- package/weaponComponent/WeaponComponentHash.js +0 -887
- package/weaponComponent/WeaponComponentHashesByWeaponHash.js +0 -829
- package/weaponComponent/WeaponComponentHudStats.js +0 -34
- package/weaponComponent/index.js +0 -5
package/models/BaseEntity.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Blip } from "../Blip";
|
|
2
2
|
import { ForceType } from "../enums";
|
|
3
|
-
import { MaterialHash, WeaponHash } from "../hashes";
|
|
3
|
+
import type { MaterialHash, WeaponHash } from "../hashes";
|
|
4
4
|
import { Model } from "../Model";
|
|
5
5
|
import { Quaternion, Vector3 } from "../utils";
|
|
6
6
|
import { EntityBoneCollection } from "./";
|
|
7
|
-
import { EntityBone } from "./EntityBone";
|
|
8
|
-
import { StateBagChangeHandler } from "../cfx";
|
|
7
|
+
import type { EntityBone } from "./EntityBone";
|
|
8
|
+
import { type StateBagChangeHandler } from "../cfx";
|
|
9
9
|
import { ClassTypes } from "../../common/utils/ClassTypes";
|
|
10
10
|
export declare class BaseEntity {
|
|
11
11
|
static fromNetworkId(networkId: number): BaseEntity | null;
|
package/models/Ped.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Player, Vector3 } from "../";
|
|
2
|
-
import { DrivingStyle, FiringPattern, Gender, HelmetType, RagdollType, SpeechModifier, VehicleSeat } from "../enums";
|
|
3
|
-
import { WeaponHash } from "../hashes";
|
|
2
|
+
import { type DrivingStyle, type FiringPattern, Gender, type HelmetType, RagdollType, SpeechModifier, VehicleSeat } from "../enums";
|
|
3
|
+
import type { WeaponHash } from "../hashes";
|
|
4
4
|
import { Tasks } from "../Tasks";
|
|
5
5
|
import { PedBoneCollection, Vehicle } from "./";
|
|
6
6
|
import { WeaponCollection } from "../weapon/WeaponCollection";
|
package/models/PedBone.d.ts
CHANGED
package/models/Player.d.ts
CHANGED
package/models/Vehicle.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Ped, VehicleDoorCollection, VehicleModCollection, VehicleWheelCollection, VehicleWindowCollection } from "./";
|
|
2
|
-
import { RadioStation, VehicleClass, VehicleLandingGearState, VehicleLockStatus, VehicleRoofState, VehicleSeat } from "../enums";
|
|
3
|
-
import { Model } from "../Model";
|
|
2
|
+
import { type RadioStation, type VehicleClass, type VehicleLandingGearState, type VehicleLockStatus, VehicleRoofState, VehicleSeat } from "../enums";
|
|
3
|
+
import type { Model } from "../Model";
|
|
4
4
|
import { Vector3 } from "../utils";
|
|
5
5
|
import { ClassTypes } from "../../common/utils/ClassTypes";
|
|
6
6
|
import { BaseEntity } from "./BaseEntity";
|
package/models/VehicleDoor.d.ts
CHANGED
package/models/VehicleMod.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Vehicle } from "./Vehicle";
|
|
2
|
-
import { VehicleColor, VehicleModType, VehicleNeonLight, VehiclePaintType, VehicleToggleModType, VehicleWheelType, VehicleWindowTint, LicensePlateStyle, LicensePlateType } from "../enums";
|
|
1
|
+
import type { Vehicle } from "./Vehicle";
|
|
2
|
+
import { type VehicleColor, VehicleModType, VehicleNeonLight, type VehiclePaintType, type VehicleToggleModType, type VehicleWheelType, type VehicleWindowTint, type LicensePlateStyle, type LicensePlateType } from "../enums";
|
|
3
3
|
import { VehicleMod } from "./VehicleMod";
|
|
4
4
|
import { Color } from "../utils";
|
|
5
5
|
import { VehicleToggleMod } from "./VehicleToggleMod";
|
package/models/VehicleWheel.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nativewrappers/fivem",
|
|
3
3
|
"description": "Native wrappers and utilities for use with FiveM.",
|
|
4
|
+
"contributors": [
|
|
5
|
+
"Remco Troost <d0p3t>",
|
|
6
|
+
"Dillon Skaggs <AvarianKnight>",
|
|
7
|
+
"Linden <thelindat>"
|
|
8
|
+
],
|
|
4
9
|
"license": "MIT",
|
|
5
10
|
"type": "module",
|
|
6
|
-
"version": "0.0.
|
|
11
|
+
"version": "0.0.72",
|
|
7
12
|
"repository": {
|
|
8
13
|
"type": "git",
|
|
9
14
|
"url": "https://github.com/nativewrappers/nativewrappers.git"
|
|
@@ -25,8 +30,5 @@
|
|
|
25
30
|
],
|
|
26
31
|
"exports": {
|
|
27
32
|
".": "./index.js"
|
|
28
|
-
},
|
|
29
|
-
"dependencies": {
|
|
30
|
-
"@nativewrappers/common": "0.0.64"
|
|
31
33
|
}
|
|
32
34
|
}
|
package/ui/Container.d.ts
CHANGED
package/ui/Effects.d.ts
CHANGED
package/ui/Hud.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CursorSprite, HudComponent } from "../enums";
|
|
2
|
-
import { Point } from "../utils";
|
|
1
|
+
import { CursorSprite, type HudComponent } from "../enums";
|
|
2
|
+
import type { Point } from "../utils";
|
|
3
3
|
export declare abstract class Hud {
|
|
4
4
|
static isComponentActive(component: HudComponent): boolean;
|
|
5
5
|
static showComponentThisFrame(component: HudComponent): void;
|
package/ui/Rectangle.d.ts
CHANGED
package/ui/Scaleform.d.ts
CHANGED
package/ui/Screen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HudColor, NotificationType } from "../enums";
|
|
2
|
-
import { Color, Size, Vector3 } from "../utils";
|
|
2
|
+
import { Color, Size, type Vector3 } from "../utils";
|
|
3
3
|
import { Notification } from "./";
|
|
4
4
|
export declare abstract class Screen {
|
|
5
5
|
static get Resolution(): Size;
|
package/ui/Text.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Alignment, Font } from "../enums";
|
|
2
2
|
import { Color, Point, Size } from "../utils";
|
|
3
|
-
import { IDrawable } from "./";
|
|
3
|
+
import { type IDrawable } from "./";
|
|
4
4
|
export declare class Text implements IDrawable {
|
|
5
5
|
static draw(caption: string, pos: Point, scale?: number, color?: Color, font?: Font, alignment?: Alignment, dropShadow?: boolean, outline?: boolean, wordWrap?: Size, resolution?: Size): void;
|
|
6
6
|
static addLongString(str: string): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { UIMenuItem } from "../";
|
|
2
|
-
import { Rectangle, Sprite } from "../../../";
|
|
1
|
+
import type { UIMenuItem } from "../";
|
|
2
|
+
import { type Rectangle, Sprite } from "../../../";
|
|
3
3
|
import { Menu } from "../../";
|
|
4
4
|
export declare abstract class AbstractUIMenuPanel {
|
|
5
5
|
readonly id: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AbstractUIMenuPanel, UIMenuStatisticsPanelItem } from "./";
|
|
1
|
+
import { AbstractUIMenuPanel, type UIMenuStatisticsPanelItem } from "./";
|
|
2
2
|
import { Rectangle } from "../../../";
|
|
3
3
|
export declare class UIMenuStatisticsPanel extends AbstractUIMenuPanel {
|
|
4
4
|
protected readonly background: Rectangle;
|
package/utils/LiteEvent.d.ts
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
export interface LiteEvent {
|
|
2
|
-
on(handler:
|
|
3
|
-
|
|
4
|
-
}): void;
|
|
5
|
-
off(handler: {
|
|
6
|
-
(...args: unknown[]): any;
|
|
7
|
-
}): void;
|
|
2
|
+
on(handler: (...args: unknown[]) => any): void;
|
|
3
|
+
off(handler: (...args: unknown[]) => any): void;
|
|
8
4
|
}
|
|
9
5
|
export declare class LiteEvent implements LiteEvent {
|
|
10
6
|
private handlers;
|
package/utils/index.d.ts
CHANGED
|
@@ -4,6 +4,6 @@ export { PointF } from "./PointF";
|
|
|
4
4
|
export { Crypto } from "./Crypto";
|
|
5
5
|
export { Point } from "./Point";
|
|
6
6
|
export { Size } from "./Size";
|
|
7
|
-
export { Vector2, Vector3, Vector4, Maths, Color, Quaternion, Delay, enumValues, getStringFromUInt8Array, getUInt32FromUint8Array, } from "
|
|
7
|
+
export { Vector2, Vector3, Vector4, Maths, Color, Quaternion, Delay, enumValues, getStringFromUInt8Array, getUInt32FromUint8Array, } from "../common/utils/index";
|
|
8
8
|
export declare const Wait: (milliseconds: number) => Promise<void>;
|
|
9
9
|
export * from "./Animations";
|
package/weapon/Weapon.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { WeaponComponentCollection } from "../weaponComponent/WeaponComponentCollection";
|
|
2
|
-
import { Ped } from "../models";
|
|
3
|
-
import { AmmoType, WeaponHash } from "../hashes";
|
|
2
|
+
import type { Ped } from "../models";
|
|
3
|
+
import { type AmmoType, WeaponHash } from "../hashes";
|
|
4
4
|
import { Model } from "../Model";
|
|
5
|
-
import { WeaponTint } from "./WeaponTint";
|
|
6
|
-
import { WeaponGroup } from "./WeaponGroup";
|
|
7
|
-
import { WeaponLivery } from "./WeaponLivery";
|
|
8
|
-
import { WeaponLiveryColor } from "./WeaponLiveryColor";
|
|
5
|
+
import type { WeaponTint } from "./WeaponTint";
|
|
6
|
+
import type { WeaponGroup } from "./WeaponGroup";
|
|
7
|
+
import type { WeaponLivery } from "./WeaponLivery";
|
|
8
|
+
import type { WeaponLiveryColor } from "./WeaponLiveryColor";
|
|
9
9
|
import { WeaponHudStats } from "./WeaponHudStats";
|
|
10
|
-
import { WeaponComponentHash } from "../weaponComponent";
|
|
10
|
+
import type { WeaponComponentHash } from "../weaponComponent";
|
|
11
11
|
/**
|
|
12
12
|
* ped weapon
|
|
13
13
|
*
|
package/weapon/WeaponAsset.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WeaponComponentHash } from "./WeaponComponentHash";
|
|
1
|
+
import type { WeaponComponentHash } from "./WeaponComponentHash";
|
|
2
2
|
/**
|
|
3
3
|
* DlcWeaponComponentData
|
|
4
4
|
* refer1: https://github.com/citizenfx/fivem/blob/master/code/client/clrcore/External/DlcWeaponStructs.cs#L130
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WeaponComponent } from "./WeaponComponent";
|
|
2
2
|
import { WeaponComponentHash } from "./WeaponComponentHash";
|
|
3
|
-
import { WeaponHash } from "../hashes";
|
|
3
|
+
import type { WeaponHash } from "../hashes";
|
|
4
4
|
import { ComponentAttachmentPoint } from "./ComponentAttachmentPoint";
|
|
5
5
|
export declare class InvalidWeaponComponent extends WeaponComponent {
|
|
6
6
|
constructor();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Ped } from "../models";
|
|
2
|
-
import { Weapon } from "../weapon";
|
|
1
|
+
import type { Ped } from "../models";
|
|
2
|
+
import type { Weapon } from "../weapon";
|
|
3
3
|
import { WeaponComponentHash } from "./WeaponComponentHash";
|
|
4
|
-
import { WeaponHash } from "../hashes";
|
|
4
|
+
import type { WeaponHash } from "../hashes";
|
|
5
5
|
import { ComponentAttachmentPoint } from "./ComponentAttachmentPoint";
|
|
6
6
|
import { WeaponComponentHudStats } from "./WeaponComponentHudStats";
|
|
7
7
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Ped } from "../models";
|
|
2
|
-
import { Weapon } from "../weapon";
|
|
3
|
-
import { WeaponComponentHash } from "./WeaponComponentHash";
|
|
1
|
+
import type { Ped } from "../models";
|
|
2
|
+
import type { Weapon } from "../weapon";
|
|
3
|
+
import type { WeaponComponentHash } from "./WeaponComponentHash";
|
|
4
4
|
import { WeaponComponent } from "./WeaponComponent";
|
|
5
5
|
/**
|
|
6
6
|
* ped weapon components on weapon
|
package/Audio.js
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
export class Audio {
|
|
2
|
-
static playSoundAt(position, sound, set, generateSoundId = true) {
|
|
3
|
-
const SOUND_ID = generateSoundId ? GetSoundId() : -1;
|
|
4
|
-
PlaySoundFromCoord(SOUND_ID, sound, position.x, position.y, position.z, set ?? "", false, 0, false);
|
|
5
|
-
return SOUND_ID;
|
|
6
|
-
}
|
|
7
|
-
static playSoundFromEntity(entity, sound, set, generateSoundId = true) {
|
|
8
|
-
const SOUND_ID = generateSoundId ? GetSoundId() : -1;
|
|
9
|
-
PlaySoundFromEntity(SOUND_ID, sound, entity.Handle, set ?? "", false, 0);
|
|
10
|
-
return SOUND_ID;
|
|
11
|
-
}
|
|
12
|
-
static playSoundFrontEnd(sound, set, generateSoundId = true) {
|
|
13
|
-
const SOUND_ID = generateSoundId ? GetSoundId() : -1;
|
|
14
|
-
PlaySoundFrontend(SOUND_ID, sound, set ?? "", false);
|
|
15
|
-
return SOUND_ID;
|
|
16
|
-
}
|
|
17
|
-
static stopSound(soundId) {
|
|
18
|
-
StopSound(soundId);
|
|
19
|
-
}
|
|
20
|
-
static releaseSound(soundId) {
|
|
21
|
-
ReleaseSoundId(soundId);
|
|
22
|
-
}
|
|
23
|
-
static hasSoundFinished(soundId) {
|
|
24
|
-
return HasSoundFinished(soundId);
|
|
25
|
-
}
|
|
26
|
-
static setAudioFlag(flag, toggle) {
|
|
27
|
-
if (typeof flag === "string") {
|
|
28
|
-
SetAudioFlag(flag, toggle);
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
SetAudioFlag(this.audioFlags[Number(flag)], toggle);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
static playSound(soundFile, soundSet) {
|
|
35
|
-
this.releaseSound(this.playSoundFrontEnd(soundFile, soundSet));
|
|
36
|
-
}
|
|
37
|
-
static playMusic(musicFile) {
|
|
38
|
-
if (!this.cachedMusicFile) {
|
|
39
|
-
CancelMusicEvent(musicFile);
|
|
40
|
-
}
|
|
41
|
-
this.cachedMusicFile = musicFile;
|
|
42
|
-
TriggerMusicEvent(musicFile);
|
|
43
|
-
}
|
|
44
|
-
static stopMusic(musicFile) {
|
|
45
|
-
if (!musicFile) {
|
|
46
|
-
if (!this.cachedMusicFile) {
|
|
47
|
-
CancelMusicEvent(this.cachedMusicFile);
|
|
48
|
-
this.cachedMusicFile = "";
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
CancelMusicEvent(musicFile ?? "");
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
static cachedMusicFile;
|
|
56
|
-
static audioFlags = [
|
|
57
|
-
"ActivateSwitchWheelAudio",
|
|
58
|
-
"AllowCutsceneOverScreenFade",
|
|
59
|
-
"AllowForceRadioAfterRetune",
|
|
60
|
-
"AllowPainAndAmbientSpeechToPlayDuringCutscene",
|
|
61
|
-
"AllowPlayerAIOnMission",
|
|
62
|
-
"AllowPoliceScannerWhenPlayerHasNoControl",
|
|
63
|
-
"AllowRadioDuringSwitch",
|
|
64
|
-
"AllowRadioOverScreenFade",
|
|
65
|
-
"AllowScoreAndRadio",
|
|
66
|
-
"AllowScriptedSpeechInSlowMo",
|
|
67
|
-
"AvoidMissionCompleteDelay",
|
|
68
|
-
"DisableAbortConversationForDeathAndInjury",
|
|
69
|
-
"DisableAbortConversationForRagdoll",
|
|
70
|
-
"DisableBarks",
|
|
71
|
-
"DisableFlightMusic",
|
|
72
|
-
"DisableReplayScriptStreamRecording",
|
|
73
|
-
"EnableHeadsetBeep",
|
|
74
|
-
"ForceConversationInterrupt",
|
|
75
|
-
"ForceSeamlessRadioSwitch",
|
|
76
|
-
"ForceSniperAudio",
|
|
77
|
-
"FrontendRadioDisabled",
|
|
78
|
-
"HoldMissionCompleteWhenPrepared",
|
|
79
|
-
"IsDirectorModeActive",
|
|
80
|
-
"IsPlayerOnMissionForSpeech",
|
|
81
|
-
"ListenerReverbDisabled",
|
|
82
|
-
"LoadMPData",
|
|
83
|
-
"MobileRadioInGame",
|
|
84
|
-
"OnlyAllowScriptTriggerPoliceScanner",
|
|
85
|
-
"PlayMenuMusic",
|
|
86
|
-
"PoliceScannerDisabled",
|
|
87
|
-
"ScriptedConvListenerMaySpeak",
|
|
88
|
-
"SpeechDucksScore",
|
|
89
|
-
"SuppressPlayerScubaBreathing",
|
|
90
|
-
"WantedMusicDisabled",
|
|
91
|
-
"WantedMusicOnMission",
|
|
92
|
-
];
|
|
93
|
-
}
|
package/Blip.js
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { Vector3 } from "./utils";
|
|
2
|
-
import { BaseEntity } from "./models";
|
|
3
|
-
export class Blip {
|
|
4
|
-
handle;
|
|
5
|
-
constructor(handle) {
|
|
6
|
-
this.handle = handle;
|
|
7
|
-
}
|
|
8
|
-
get Handle() {
|
|
9
|
-
return this.handle;
|
|
10
|
-
}
|
|
11
|
-
get Position() {
|
|
12
|
-
return Vector3.fromArray(GetBlipInfoIdCoord(this.handle));
|
|
13
|
-
}
|
|
14
|
-
set Position(location) {
|
|
15
|
-
SetBlipCoords(this.handle, location.x, location.y, location.z);
|
|
16
|
-
}
|
|
17
|
-
set Rotation(rotation) {
|
|
18
|
-
SetBlipRotation(this.handle, rotation);
|
|
19
|
-
}
|
|
20
|
-
set Scale(scale) {
|
|
21
|
-
SetBlipScale(this.handle, scale);
|
|
22
|
-
}
|
|
23
|
-
get Type() {
|
|
24
|
-
return GetBlipInfoIdType(this.handle);
|
|
25
|
-
}
|
|
26
|
-
get Alpha() {
|
|
27
|
-
return GetBlipAlpha(this.handle);
|
|
28
|
-
}
|
|
29
|
-
set Alpha(alpha) {
|
|
30
|
-
SetBlipAlpha(this.handle, alpha);
|
|
31
|
-
}
|
|
32
|
-
set Priority(priority) {
|
|
33
|
-
SetBlipPriority(this.handle, priority);
|
|
34
|
-
}
|
|
35
|
-
set NumberLabel(number) {
|
|
36
|
-
ShowNumberOnBlip(this.handle, number);
|
|
37
|
-
}
|
|
38
|
-
get Color() {
|
|
39
|
-
return GetBlipColour(this.handle);
|
|
40
|
-
}
|
|
41
|
-
set Color(color) {
|
|
42
|
-
SetBlipColour(this.handle, color);
|
|
43
|
-
}
|
|
44
|
-
get Sprite() {
|
|
45
|
-
return GetBlipSprite(this.handle);
|
|
46
|
-
}
|
|
47
|
-
set Sprite(sprite) {
|
|
48
|
-
SetBlipSprite(this.handle, sprite);
|
|
49
|
-
}
|
|
50
|
-
set Display(display) {
|
|
51
|
-
SetBlipDisplay(this.handle, display);
|
|
52
|
-
}
|
|
53
|
-
set Name(name) {
|
|
54
|
-
BeginTextCommandSetBlipName("STRING");
|
|
55
|
-
AddTextComponentSubstringPlayerName(name);
|
|
56
|
-
EndTextCommandSetBlipName(this.handle);
|
|
57
|
-
}
|
|
58
|
-
setNameToPlayerName(player) {
|
|
59
|
-
SetBlipNameToPlayerName(this.handle, player.Handle);
|
|
60
|
-
}
|
|
61
|
-
get Entity() {
|
|
62
|
-
return new BaseEntity(GetBlipInfoIdEntityIndex(this.handle));
|
|
63
|
-
}
|
|
64
|
-
set ShowHeadingIndicator(show) {
|
|
65
|
-
ShowHeadingIndicatorOnBlip(this.handle, show);
|
|
66
|
-
}
|
|
67
|
-
set ShowRoute(show) {
|
|
68
|
-
SetBlipRoute(this.handle, show);
|
|
69
|
-
}
|
|
70
|
-
set IsFriendly(friendly) {
|
|
71
|
-
SetBlipAsFriendly(this.handle, friendly);
|
|
72
|
-
}
|
|
73
|
-
set IsFriend(friend) {
|
|
74
|
-
SetBlipFriend(this.handle, friend);
|
|
75
|
-
}
|
|
76
|
-
set IsCrew(crew) {
|
|
77
|
-
SetBlipCrew(this.handle, crew);
|
|
78
|
-
}
|
|
79
|
-
get IsFlashing() {
|
|
80
|
-
return IsBlipFlashing(this.handle);
|
|
81
|
-
}
|
|
82
|
-
set IsFlashing(flashing) {
|
|
83
|
-
SetBlipFlashes(this.handle, flashing);
|
|
84
|
-
}
|
|
85
|
-
get IsOnMinimap() {
|
|
86
|
-
return IsBlipOnMinimap(this.handle);
|
|
87
|
-
}
|
|
88
|
-
get IsShortRange() {
|
|
89
|
-
return IsBlipShortRange(this.handle);
|
|
90
|
-
}
|
|
91
|
-
set IsShortRange(shortRange) {
|
|
92
|
-
SetBlipAsShortRange(this.handle, shortRange);
|
|
93
|
-
}
|
|
94
|
-
removeNumberLabel() {
|
|
95
|
-
HideNumberOnBlip(this.handle);
|
|
96
|
-
}
|
|
97
|
-
delete() {
|
|
98
|
-
if (this.exists()) {
|
|
99
|
-
RemoveBlip(this.handle);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
exists() {
|
|
103
|
-
return DoesBlipExist(this.handle);
|
|
104
|
-
}
|
|
105
|
-
}
|