@nativewrappers/fivem 0.0.41 → 0.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.
- package/{client/Audio.d.ts → Audio.d.ts} +3 -3
- package/{client/Audio.js → Audio.js} +44 -43
- package/{client/Blip.d.ts → Blip.d.ts} +3 -3
- package/{client/Blip.js → Blip.js} +4 -3
- package/{client/Camera.d.ts → Camera.d.ts} +4 -4
- package/{client/Camera.js → Camera.js} +18 -17
- package/{client/Checkpoint.d.ts → Checkpoint.d.ts} +2 -2
- package/{client/Checkpoint.js → Checkpoint.js} +7 -6
- package/{client/Events.js → Events.js} +23 -23
- package/{client/Game.d.ts → Game.d.ts} +4 -3
- package/{client/Game.js → Game.js} +16 -10
- package/{client/GameplayCamera.d.ts → GameplayCamera.d.ts} +2 -2
- package/{client/GameplayCamera.js → GameplayCamera.js} +2 -2
- package/{client/Model.d.ts → Model.d.ts} +5 -3
- package/{client/Model.js → Model.js} +21 -7
- package/{client/NetworkedScene.d.ts → NetworkedScene.d.ts} +2 -2
- package/{client/NetworkedScene.js → NetworkedScene.js} +1 -0
- package/{client/ParticleEffect.d.ts → ParticleEffect.d.ts} +3 -3
- package/{client/ParticleEffect.js → ParticleEffect.js} +11 -8
- package/{client/ParticleEffectAsset.d.ts → ParticleEffectAsset.d.ts} +3 -3
- package/{client/ParticleEffectAsset.js → ParticleEffectAsset.js} +4 -3
- package/{client/Pickup.d.ts → Pickup.d.ts} +1 -1
- package/{client/Pickup.js → Pickup.js} +2 -1
- package/{client/Raycast.d.ts → Raycast.d.ts} +3 -3
- package/{client/Raycast.js → Raycast.js} +10 -3
- package/{client/RelationshipGroup.d.ts → RelationshipGroup.d.ts} +1 -1
- package/{client/RelationshipGroup.js → RelationshipGroup.js} +4 -0
- package/{client/Rope.d.ts → Rope.d.ts} +2 -2
- package/{client/Rope.js → Rope.js} +6 -2
- package/{client/TaskSequence.d.ts → TaskSequence.d.ts} +1 -1
- package/{client/TaskSequence.js → TaskSequence.js} +5 -2
- package/{client/Tasks.d.ts → Tasks.d.ts} +5 -5
- package/{client/Tasks.js → Tasks.js} +7 -6
- package/{client/World.d.ts → World.d.ts} +20 -12
- package/{client/World.js → World.js} +66 -62
- package/{client/cfx → cfx}/index.d.ts +1 -1
- package/{client/enums → enums}/RaycastEnums.js +3 -1
- package/enums/index.d.ts +42 -0
- package/enums/index.js +42 -0
- package/hashes/index.d.ts +5 -0
- package/hashes/index.js +5 -0
- package/index.d.ts +24 -0
- package/index.js +25 -0
- package/{client/interfaces → interfaces}/Dimensions.d.ts +1 -1
- package/{client/models → models}/BaseEntity.d.ts +26 -26
- package/{client/models → models}/BaseEntity.js +32 -30
- package/{client/models → models}/EntityBone.d.ts +2 -2
- package/{client/models → models}/EntityBone.js +4 -2
- package/{client/models → models}/EntityBoneCollection.d.ts +2 -2
- package/{client/models → models}/EntityBoneCollection.js +5 -2
- package/{client/models → models}/Ped.d.ts +20 -9
- package/{client/models → models}/Ped.js +66 -56
- package/{client/models → models}/PedBone.d.ts +2 -2
- package/{client/models → models}/PedBone.js +1 -1
- package/{client/models → models}/PedBoneCollection.d.ts +1 -1
- package/{client/models → models}/PedBoneCollection.js +4 -2
- package/{client/models → models}/Player.d.ts +3 -3
- package/{client/models → models}/Player.js +12 -9
- package/{client/models → models}/Prop.d.ts +2 -2
- package/{client/models → models}/Prop.js +4 -4
- package/{client/models → models}/Vehicle.d.ts +6 -6
- package/{client/models → models}/Vehicle.js +22 -16
- package/{client/models → models}/VehicleDoor.d.ts +2 -2
- package/{client/models → models}/VehicleDoor.js +2 -0
- package/{client/models → models}/VehicleDoorCollection.d.ts +3 -3
- package/{client/models → models}/VehicleDoorCollection.js +16 -15
- package/{client/models → models}/VehicleMod.d.ts +2 -2
- package/{client/models → models}/VehicleMod.js +2 -0
- package/{client/models → models}/VehicleModCollection.d.ts +5 -5
- package/{client/models → models}/VehicleModCollection.js +20 -19
- package/{client/models → models}/VehicleToggleMod.d.ts +2 -2
- package/{client/models → models}/VehicleToggleMod.js +2 -0
- package/{client/models → models}/VehicleWheel.d.ts +1 -1
- package/{client/models → models}/VehicleWheel.js +2 -0
- package/{client/models → models}/VehicleWheelCollection.d.ts +3 -3
- package/{client/models → models}/VehicleWheelCollection.js +15 -14
- package/{client/models → models}/VehicleWindow.d.ts +2 -2
- package/{client/models → models}/VehicleWindow.js +2 -0
- package/{client/models → models}/VehicleWindowCollection.d.ts +3 -3
- package/{client/models → models}/VehicleWindowCollection.js +13 -12
- package/models/index.d.ts +18 -0
- package/models/index.js +19 -0
- package/package.json +6 -30
- package/{client/ui → ui}/Container.d.ts +2 -2
- package/{client/ui → ui}/Container.js +6 -3
- package/{client/ui → ui}/Effects.d.ts +1 -1
- package/ui/Effects.js +106 -0
- package/{client/ui → ui}/Fading.js +2 -2
- package/{client/ui → ui}/Hud.d.ts +2 -2
- package/{client/ui → ui}/Hud.js +1 -1
- package/{client/ui → ui}/InstructionalButtons.d.ts +1 -1
- package/{client/ui → ui}/InstructionalButtons.js +8 -7
- package/{client/ui → ui}/LoadingPrompt.d.ts +1 -1
- package/{client/ui → ui}/LoadingPrompt.js +5 -5
- package/{client/ui → ui}/Notification.js +1 -0
- package/{client/ui → ui}/Rectangle.d.ts +2 -2
- package/{client/ui → ui}/Rectangle.js +5 -2
- package/{client/ui → ui}/Scaleform.d.ts +1 -1
- package/{client/ui → ui}/Scaleform.js +10 -8
- package/{client/ui → ui}/Screen.d.ts +3 -3
- package/{client/ui → ui}/Screen.js +13 -13
- package/{client/ui → ui}/Sprite.d.ts +1 -1
- package/{client/ui → ui}/Sprite.js +10 -3
- package/{client/ui → ui}/Text.d.ts +3 -3
- package/{client/ui → ui}/Text.js +19 -7
- package/{client/ui → ui}/Timerbar.d.ts +1 -1
- package/{client/ui → ui}/Timerbar.js +37 -30
- package/ui/index.d.ts +15 -0
- package/ui/index.js +15 -0
- package/{client/ui → ui}/interfaces/IButton.d.ts +1 -1
- package/{client/ui → ui}/interfaces/IDrawable.d.ts +1 -1
- package/ui/interfaces/index.d.ts +2 -0
- package/{client/ui → ui}/menu/Menu.d.ts +4 -4
- package/{client/ui → ui}/menu/Menu.js +96 -67
- package/{client/ui → ui}/menu/MenuControl.js +1 -0
- package/{client/ui → ui}/menu/MenuControls.d.ts +1 -1
- package/ui/menu/MenuControls.js +9 -0
- package/{client/ui → ui}/menu/MenuSettings.d.ts +1 -1
- package/ui/menu/MenuSettings.js +54 -0
- package/ui/menu/index.d.ts +6 -0
- package/ui/menu/index.js +6 -0
- package/{client/ui → ui}/menu/items/UIMenuCheckboxItem.d.ts +3 -3
- package/{client/ui → ui}/menu/items/UIMenuCheckboxItem.js +17 -15
- package/{client/ui → ui}/menu/items/UIMenuItem.d.ts +4 -4
- package/{client/ui → ui}/menu/items/UIMenuItem.js +276 -255
- package/{client/ui → ui}/menu/items/UIMenuListItem.d.ts +3 -3
- package/{client/ui → ui}/menu/items/UIMenuListItem.js +28 -19
- package/{client/ui → ui}/menu/items/UIMenuSeparatorItem.d.ts +1 -1
- package/{client/ui → ui}/menu/items/UIMenuSeparatorItem.js +10 -10
- package/{client/ui → ui}/menu/items/UIMenuSliderItem.d.ts +3 -3
- package/{client/ui → ui}/menu/items/UIMenuSliderItem.js +45 -27
- package/ui/menu/items/index.d.ts +6 -0
- package/ui/menu/items/index.js +6 -0
- package/{client/ui → ui}/menu/items/panels/AbstractUIMenuPanel.d.ts +3 -3
- package/{client/ui → ui}/menu/items/panels/AbstractUIMenuPanel.js +9 -8
- package/{client/ui → ui}/menu/items/panels/UIMenuColorPanel.d.ts +3 -3
- package/{client/ui → ui}/menu/items/panels/UIMenuColorPanel.js +29 -23
- package/{client/ui → ui}/menu/items/panels/UIMenuGridPanel.d.ts +3 -3
- package/{client/ui → ui}/menu/items/panels/UIMenuGridPanel.js +86 -40
- package/{client/ui → ui}/menu/items/panels/UIMenuPercentagePanel.d.ts +2 -2
- package/{client/ui → ui}/menu/items/panels/UIMenuPercentagePanel.js +27 -18
- package/{client/ui → ui}/menu/items/panels/UIMenuStatisticsPanel.d.ts +2 -2
- package/{client/ui → ui}/menu/items/panels/UIMenuStatisticsPanel.js +10 -8
- package/{client/ui → ui}/menu/items/panels/UIMenuStatisticsPanelItem.d.ts +1 -1
- package/{client/ui → ui}/menu/items/panels/UIMenuStatisticsPanelItem.js +10 -7
- package/ui/menu/items/panels/index.d.ts +6 -0
- package/ui/menu/items/panels/index.js +6 -0
- package/{client/ui → ui}/menu/modules/ListItem.js +4 -2
- package/ui/menu/modules/index.d.ts +1 -0
- package/ui/menu/modules/index.js +1 -0
- package/{client/utils → utils}/Animations.js +2 -2
- package/{client/utils → utils}/Crypto.js +5 -5
- package/{client/utils → utils}/LiteEvent.js +3 -5
- package/{client/utils → utils}/Point.js +5 -3
- package/{common/utils → utils}/PointF.js +3 -0
- package/{client/utils → utils}/Quaternion.d.ts +1 -1
- package/{client/utils → utils}/Quaternion.js +5 -1
- package/{client/utils → utils}/Size.js +2 -0
- package/{client/utils → utils}/String.d.ts +1 -1
- package/{client/utils → utils}/String.js +3 -3
- package/{client/utils → utils}/enumValues.js +2 -2
- package/{client/utils → utils}/getStringFromUInt8Array.js +1 -1
- package/utils/index.d.ts +9 -0
- package/utils/index.js +9 -0
- package/{client/weapon → weapon}/DlcWeaponData.d.ts +1 -1
- package/{client/weapon → weapon}/DlcWeaponData.js +3 -3
- package/{client/weapon → weapon}/Weapon.d.ts +10 -10
- package/{client/weapon → weapon}/Weapon.js +17 -14
- package/{client/weapon → weapon}/WeaponAsset.d.ts +1 -1
- package/{client/weapon → weapon}/WeaponAsset.js +4 -3
- package/{client/weapon → weapon}/WeaponCollection.d.ts +3 -3
- package/{client/weapon → weapon}/WeaponCollection.js +4 -3
- package/{client/weapon → weapon}/WeaponDisplayNameByHash.d.ts +1 -1
- package/weapon/WeaponDisplayNameByHash.js +75 -0
- package/{client/weapon → weapon}/WeaponHudStats.d.ts +1 -1
- package/{client/weapon → weapon}/WeaponHudStats.js +4 -4
- package/weapon/index.d.ts +8 -0
- package/weapon/index.js +8 -0
- package/{client/weaponComponent → weaponComponent}/ComponentAttachmentPointByHash.d.ts +2 -2
- package/{client/weaponComponent → weaponComponent}/ComponentAttachmentPointByHash.js +355 -91
- package/{client/weaponComponent → weaponComponent}/ComponentDisplayNameByHash.d.ts +1 -1
- package/weaponComponent/ComponentDisplayNameByHash.js +280 -0
- package/{client/weaponComponent → weaponComponent}/DlcWeaponComponentData.d.ts +1 -1
- package/{client/weaponComponent → weaponComponent}/DlcWeaponComponentData.js +2 -2
- package/{client/weaponComponent → weaponComponent}/InvalidWeaponComponent.d.ts +4 -4
- package/{client/weaponComponent → weaponComponent}/InvalidWeaponComponent.js +5 -5
- package/{client/weaponComponent → weaponComponent}/WeaponComponent.d.ts +6 -6
- package/{client/weaponComponent → weaponComponent}/WeaponComponent.js +15 -11
- package/{client/weaponComponent → weaponComponent}/WeaponComponentCollection.d.ts +4 -4
- package/{client/weaponComponent → weaponComponent}/WeaponComponentCollection.js +13 -11
- package/{client/weaponComponent → weaponComponent}/WeaponComponentHashesByWeaponHash.d.ts +2 -2
- package/{client/weaponComponent → weaponComponent}/WeaponComponentHashesByWeaponHash.js +13 -7
- package/{client/weaponComponent → weaponComponent}/WeaponComponentHudStats.d.ts +1 -1
- package/{client/weaponComponent → weaponComponent}/WeaponComponentHudStats.js +4 -4
- package/weaponComponent/index.d.ts +5 -0
- package/weaponComponent/index.js +5 -0
- package/README.md +0 -41
- package/client/enums/index.d.ts +0 -42
- package/client/enums/index.js +0 -42
- package/client/hashes/index.d.ts +0 -5
- package/client/hashes/index.js +0 -5
- package/client/index.d.ts +0 -24
- package/client/index.js +0 -25
- package/client/models/index.d.ts +0 -18
- package/client/models/index.js +0 -19
- package/client/ui/Effects.js +0 -106
- package/client/ui/index.d.ts +0 -15
- package/client/ui/index.js +0 -15
- package/client/ui/interfaces/index.d.ts +0 -2
- package/client/ui/menu/MenuControls.js +0 -11
- package/client/ui/menu/MenuSettings.js +0 -51
- package/client/ui/menu/index.d.ts +0 -6
- package/client/ui/menu/index.js +0 -6
- package/client/ui/menu/items/index.d.ts +0 -6
- package/client/ui/menu/items/index.js +0 -6
- package/client/ui/menu/items/panels/index.d.ts +0 -6
- package/client/ui/menu/items/panels/index.js +0 -6
- package/client/ui/menu/modules/index.d.ts +0 -1
- package/client/ui/menu/modules/index.js +0 -1
- package/client/utils/PointF.js +0 -11
- package/client/utils/index.d.ts +0 -9
- package/client/utils/index.js +0 -9
- package/client/weapon/WeaponDisplayNameByHash.js +0 -75
- package/client/weapon/index.d.ts +0 -8
- package/client/weapon/index.js +0 -8
- package/client/weaponComponent/ComponentDisplayNameByHash.js +0 -280
- package/client/weaponComponent/index.d.ts +0 -5
- package/client/weaponComponent/index.js +0 -5
- package/common/Convar.d.ts +0 -8
- package/common/Convar.js +0 -20
- package/common/Kvp.d.ts +0 -91
- package/common/Kvp.js +0 -161
- package/common/Resource.d.ts +0 -14
- package/common/Resource.js +0 -35
- package/common/index.d.ts +0 -5
- package/common/index.js +0 -5
- package/common/types.d.ts +0 -5
- package/common/types.js +0 -1
- package/common/utils/ClassTypes.d.ts +0 -11
- package/common/utils/ClassTypes.js +0 -12
- package/common/utils/Color.d.ts +0 -14
- package/common/utils/Color.js +0 -21
- package/common/utils/Maths.d.ts +0 -4
- package/common/utils/Maths.js +0 -10
- package/common/utils/PointF.d.ts +0 -12
- package/common/utils/Quaternion.d.ts +0 -10
- package/common/utils/Quaternion.js +0 -23
- package/common/utils/Vector.d.ts +0 -390
- package/common/utils/Vector.js +0 -546
- package/common/utils/Vector2.d.ts +0 -1
- package/common/utils/Vector2.js +0 -1
- package/common/utils/Vector3.d.ts +0 -1
- package/common/utils/Vector3.js +0 -1
- package/common/utils/Vector4.d.ts +0 -1
- package/common/utils/Vector4.js +0 -1
- package/common/utils/cleanPlayerName.d.ts +0 -6
- package/common/utils/cleanPlayerName.js +0 -27
- package/common/utils/enumValues.d.ts +0 -12
- package/common/utils/enumValues.js +0 -14
- package/common/utils/getStringFromUInt8Array.d.ts +0 -8
- package/common/utils/getStringFromUInt8Array.js +0 -10
- package/common/utils/getUInt32FromUint8Array.d.ts +0 -8
- package/common/utils/getUInt32FromUint8Array.js +0 -8
- package/common/utils/index.d.ts +0 -12
- package/common/utils/index.js +0 -12
- package/server/Events.d.ts +0 -16
- package/server/Events.js +0 -79
- package/server/Game.d.ts +0 -25
- package/server/Game.js +0 -55
- package/server/cfx/StateBagChangeHandler.d.ts +0 -3
- package/server/cfx/StateBagChangeHandler.js +0 -1
- package/server/cfx/index.d.ts +0 -6
- package/server/cfx/index.js +0 -1
- package/server/entities/BaseEntity.d.ts +0 -47
- package/server/entities/BaseEntity.js +0 -109
- package/server/entities/Entity.d.ts +0 -6
- package/server/entities/Entity.js +0 -12
- package/server/entities/Ped.d.ts +0 -32
- package/server/entities/Ped.js +0 -81
- package/server/entities/Player.d.ts +0 -63
- package/server/entities/Player.js +0 -135
- package/server/entities/Prop.d.ts +0 -14
- package/server/entities/Prop.js +0 -32
- package/server/entities/Vehicle.d.ts +0 -67
- package/server/entities/Vehicle.js +0 -175
- package/server/entities/index.d.ts +0 -5
- package/server/entities/index.js +0 -5
- package/server/enum/PopulationType.d.ts +0 -13
- package/server/enum/PopulationType.js +0 -14
- package/server/enum/VehicleLockStatus.d.ts +0 -9
- package/server/enum/VehicleLockStatus.js +0 -10
- package/server/enum/VehicleType.d.ts +0 -10
- package/server/enum/VehicleType.js +0 -11
- package/server/enum/eEntityType.d.ts +0 -5
- package/server/enum/eEntityType.js +0 -6
- package/server/enum/index.d.ts +0 -4
- package/server/enum/index.js +0 -4
- package/server/index.d.ts +0 -7
- package/server/index.js +0 -7
- package/server/type/Anticheat.d.ts +0 -153
- package/server/type/Anticheat.js +0 -1
- package/server/type/Hash.d.ts +0 -1
- package/server/type/Hash.js +0 -1
- package/server/utils/index.d.ts +0 -1
- package/server/utils/index.js +0 -1
- /package/{client/Events.d.ts → Events.d.ts} +0 -0
- /package/{client/cfx → cfx}/StateBagChangeHandler.d.ts +0 -0
- /package/{client/cfx → cfx}/StateBagChangeHandler.js +0 -0
- /package/{client/cfx → cfx}/index.js +0 -0
- /package/{client/enums → enums}/Alignment.d.ts +0 -0
- /package/{client/enums → enums}/Alignment.js +0 -0
- /package/{client/enums → enums}/AnimationFlags.d.ts +0 -0
- /package/{client/enums → enums}/AnimationFlags.js +0 -0
- /package/{client/enums → enums}/AudioFlag.d.ts +0 -0
- /package/{client/enums → enums}/AudioFlag.js +0 -0
- /package/{client/enums → enums}/BadgeStyle.d.ts +0 -0
- /package/{client/enums → enums}/BadgeStyle.js +0 -0
- /package/{client/enums → enums}/Blip.d.ts +0 -0
- /package/{client/enums → enums}/Blip.js +0 -0
- /package/{client/enums → enums}/Bone.d.ts +0 -0
- /package/{client/enums → enums}/Bone.js +0 -0
- /package/{client/enums → enums}/CameraShake.d.ts +0 -0
- /package/{client/enums → enums}/CameraShake.js +0 -0
- /package/{client/enums → enums}/CameraTypes.d.ts +0 -0
- /package/{client/enums → enums}/CameraTypes.js +0 -0
- /package/{client/enums → enums}/CheckboxStyle.d.ts +0 -0
- /package/{client/enums → enums}/CheckboxStyle.js +0 -0
- /package/{client/enums → enums}/Checkpoint.d.ts +0 -0
- /package/{client/enums → enums}/Checkpoint.js +0 -0
- /package/{client/enums → enums}/CloudHat.d.ts +0 -0
- /package/{client/enums → enums}/CloudHat.js +0 -0
- /package/{client/enums → enums}/Control.d.ts +0 -0
- /package/{client/enums → enums}/Control.js +0 -0
- /package/{client/enums → enums}/CursorSprite.d.ts +0 -0
- /package/{client/enums → enums}/CursorSprite.js +0 -0
- /package/{client/enums → enums}/Driving.d.ts +0 -0
- /package/{client/enums → enums}/Driving.js +0 -0
- /package/{client/enums → enums}/ExplosionType.d.ts +0 -0
- /package/{client/enums → enums}/ExplosionType.js +0 -0
- /package/{client/enums → enums}/FiringPattern.d.ts +0 -0
- /package/{client/enums → enums}/FiringPattern.js +0 -0
- /package/{client/enums → enums}/Font.d.ts +0 -0
- /package/{client/enums → enums}/Font.js +0 -0
- /package/{client/enums → enums}/ForceType.d.ts +0 -0
- /package/{client/enums → enums}/ForceType.js +0 -0
- /package/{client/enums → enums}/Gender.d.ts +0 -0
- /package/{client/enums → enums}/Gender.js +0 -0
- /package/{client/enums → enums}/HelmetType.d.ts +0 -0
- /package/{client/enums → enums}/HelmetType.js +0 -0
- /package/{client/enums → enums}/HudColor.d.ts +0 -0
- /package/{client/enums → enums}/HudColor.js +0 -0
- /package/{client/enums → enums}/HudComponent.d.ts +0 -0
- /package/{client/enums → enums}/HudComponent.js +0 -0
- /package/{client/enums → enums}/InputMode.d.ts +0 -0
- /package/{client/enums → enums}/InputMode.js +0 -0
- /package/{client/enums → enums}/InvertAxis.d.ts +0 -0
- /package/{client/enums → enums}/InvertAxis.js +0 -0
- /package/{client/enums → enums}/Language.d.ts +0 -0
- /package/{client/enums → enums}/Language.js +0 -0
- /package/{client/enums → enums}/LeaveVehicleFlags.d.ts +0 -0
- /package/{client/enums → enums}/LeaveVehicleFlags.js +0 -0
- /package/{client/enums → enums}/LoadingSpinnerType.d.ts +0 -0
- /package/{client/enums → enums}/LoadingSpinnerType.js +0 -0
- /package/{client/enums → enums}/MarkerType.d.ts +0 -0
- /package/{client/enums → enums}/MarkerType.js +0 -0
- /package/{client/enums → enums}/MenuAlignment.d.ts +0 -0
- /package/{client/enums → enums}/MenuAlignment.js +0 -0
- /package/{client/enums → enums}/NotificationType.d.ts +0 -0
- /package/{client/enums → enums}/NotificationType.js +0 -0
- /package/{client/enums → enums}/Parachute.d.ts +0 -0
- /package/{client/enums → enums}/Parachute.js +0 -0
- /package/{client/enums → enums}/PickupType.d.ts +0 -0
- /package/{client/enums → enums}/PickupType.js +0 -0
- /package/{client/enums → enums}/RadioStation.d.ts +0 -0
- /package/{client/enums → enums}/RadioStation.js +0 -0
- /package/{client/enums → enums}/RagdollType.d.ts +0 -0
- /package/{client/enums → enums}/RagdollType.js +0 -0
- /package/{client/enums → enums}/RaycastEnums.d.ts +0 -0
- /package/{client/enums → enums}/Relationship.d.ts +0 -0
- /package/{client/enums → enums}/Relationship.js +0 -0
- /package/{client/enums → enums}/RopeType.d.ts +0 -0
- /package/{client/enums → enums}/RopeType.js +0 -0
- /package/{client/enums → enums}/ScreenEffect.d.ts +0 -0
- /package/{client/enums → enums}/ScreenEffect.js +0 -0
- /package/{client/enums → enums}/SpeechModifier.d.ts +0 -0
- /package/{client/enums → enums}/SpeechModifier.js +0 -0
- /package/{client/enums → enums}/Vehicle.d.ts +0 -0
- /package/{client/enums → enums}/Vehicle.js +0 -0
- /package/{client/enums → enums}/Weather.d.ts +0 -0
- /package/{client/enums → enums}/Weather.js +0 -0
- /package/{client/enums → enums}/ZoneID.d.ts +0 -0
- /package/{client/enums → enums}/ZoneID.js +0 -0
- /package/{client/hashes → hashes}/MaterialHash.d.ts +0 -0
- /package/{client/hashes → hashes}/MaterialHash.js +0 -0
- /package/{client/hashes → hashes}/PedHash.d.ts +0 -0
- /package/{client/hashes → hashes}/PedHash.js +0 -0
- /package/{client/hashes → hashes}/VehicleHash.d.ts +0 -0
- /package/{client/hashes → hashes}/VehicleHash.js +0 -0
- /package/{client/hashes → hashes}/WeaponHash.d.ts +0 -0
- /package/{client/hashes → hashes}/WeaponHash.js +0 -0
- /package/{client/hashes → hashes}/WeatherTypeHash.d.ts +0 -0
- /package/{client/hashes → hashes}/WeatherTypeHash.js +0 -0
- /package/{client/interfaces → interfaces}/Dimensions.js +0 -0
- /package/{client/models → models}/Entity.d.ts +0 -0
- /package/{client/models → models}/Entity.js +0 -0
- /package/{client/ui → ui}/Fading.d.ts +0 -0
- /package/{client/ui → ui}/Notification.d.ts +0 -0
- /package/{client/ui → ui}/interfaces/IButton.js +0 -0
- /package/{client/ui → ui}/interfaces/IDrawable.js +0 -0
- /package/{client/ui → ui}/interfaces/index.js +0 -0
- /package/{client/ui → ui}/menu/MenuControl.d.ts +0 -0
- /package/{client/ui → ui}/menu/modules/ListItem.d.ts +0 -0
- /package/{client/utils → utils}/Animations.d.ts +0 -0
- /package/{client/utils → utils}/Crypto.d.ts +0 -0
- /package/{client/utils → utils}/LiteEvent.d.ts +0 -0
- /package/{client/utils → utils}/Maths.d.ts +0 -0
- /package/{client/utils → utils}/Maths.js +0 -0
- /package/{client/utils → utils}/Point.d.ts +0 -0
- /package/{client/utils → utils}/PointF.d.ts +0 -0
- /package/{client/utils → utils}/Size.d.ts +0 -0
- /package/{client/utils → utils}/enumValues.d.ts +0 -0
- /package/{client/utils → utils}/getStringFromUInt8Array.d.ts +0 -0
- /package/{client/utils → utils}/getUInt32FromUint8Array.d.ts +0 -0
- /package/{client/utils → utils}/getUInt32FromUint8Array.js +0 -0
- /package/{client/weapon → weapon}/Mk2WeaponHash.d.ts +0 -0
- /package/{client/weapon → weapon}/Mk2WeaponHash.js +0 -0
- /package/{client/weapon → weapon}/WeaponGroup.d.ts +0 -0
- /package/{client/weapon → weapon}/WeaponGroup.js +0 -0
- /package/{client/weapon → weapon}/WeaponLivery.d.ts +0 -0
- /package/{client/weapon → weapon}/WeaponLivery.js +0 -0
- /package/{client/weapon → weapon}/WeaponLiveryColor.d.ts +0 -0
- /package/{client/weapon → weapon}/WeaponLiveryColor.js +0 -0
- /package/{client/weapon → weapon}/WeaponTint.d.ts +0 -0
- /package/{client/weapon → weapon}/WeaponTint.js +0 -0
- /package/{client/weaponComponent → weaponComponent}/ComponentAttachmentPoint.d.ts +0 -0
- /package/{client/weaponComponent → weaponComponent}/ComponentAttachmentPoint.js +0 -0
- /package/{client/weaponComponent → weaponComponent}/WeaponComponentHash.d.ts +0 -0
- /package/{client/weaponComponent → weaponComponent}/WeaponComponentHash.js +0 -0
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
import { WeaponComponentHash } from "./WeaponComponentHash";
|
|
2
|
+
import { DlcWeaponComponentData } from "./DlcWeaponComponentData";
|
|
3
|
+
/**
|
|
4
|
+
* Mapping of WeaponComponentHash -> ComponentDisplayName(Label)
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
export const ComponentDisplayNameByHash = new Map([
|
|
8
|
+
[WeaponComponentHash.Invalid, "WCT_INVALID"],
|
|
9
|
+
// [WeaponComponentHash.COMPONENT_KNUCKLE_VARMOD_BASE, 'WT_KNUCKLE'],
|
|
10
|
+
// [WeaponComponentHash.COMPONENT_KNUCKLE_VARMOD_PIMP, 'WCT_KNUCK_02'],
|
|
11
|
+
// [WeaponComponentHash.COMPONENT_KNUCKLE_VARMOD_BALLAS, 'WCT_KNUCK_BG'],
|
|
12
|
+
// [WeaponComponentHash.COMPONENT_KNUCKLE_VARMOD_DOLLAR, 'WCT_KNUCK_DLR'],
|
|
13
|
+
// [WeaponComponentHash.COMPONENT_KNUCKLE_VARMOD_DIAMOND, 'WCT_KNUCK_DMD'],
|
|
14
|
+
// [WeaponComponentHash.COMPONENT_KNUCKLE_VARMOD_HATE, 'WCT_KNUCK_HT'],
|
|
15
|
+
// [WeaponComponentHash.COMPONENT_KNUCKLE_VARMOD_LOVE, 'WCT_KNUCK_LV'],
|
|
16
|
+
// [WeaponComponentHash.COMPONENT_KNUCKLE_VARMOD_PLAYER, 'WCT_KNUCK_PC'],
|
|
17
|
+
// [WeaponComponentHash.COMPONENT_KNUCKLE_VARMOD_KING, 'WCT_KNUCK_SLG'],
|
|
18
|
+
// [WeaponComponentHash.COMPONENT_KNUCKLE_VARMOD_VAGOS, 'WCT_KNUCK_VG'],
|
|
19
|
+
[WeaponComponentHash.KnuckleVarmodBase, "WT_KNUCKLE"],
|
|
20
|
+
[WeaponComponentHash.KnuckleVarmodPimp, "WCT_KNUCK_02"],
|
|
21
|
+
[WeaponComponentHash.KnuckleVarmodBallas, "WCT_KNUCK_BG"],
|
|
22
|
+
[WeaponComponentHash.KnuckleVarmodDollar, "WCT_KNUCK_DLR"],
|
|
23
|
+
[WeaponComponentHash.KnuckleVarmodDiamond, "WCT_KNUCK_DMD"],
|
|
24
|
+
[WeaponComponentHash.KnuckleVarmodHate, "WCT_KNUCK_HT"],
|
|
25
|
+
[WeaponComponentHash.KnuckleVarmodLove, "WCT_KNUCK_LV"],
|
|
26
|
+
[WeaponComponentHash.KnuckleVarmodPlayer, "WCT_KNUCK_PC"],
|
|
27
|
+
[WeaponComponentHash.KnuckleVarmodKing, "WCT_KNUCK_SLG"],
|
|
28
|
+
[WeaponComponentHash.KnuckleVarmodVagos, "WCT_KNUCK_VG"],
|
|
29
|
+
[WeaponComponentHash.Invalid, "WCT_INVALID"],
|
|
30
|
+
[WeaponComponentHash.AtRailCover01, "WCT_RAIL"],
|
|
31
|
+
[WeaponComponentHash.AtArAfGrip, "WCT_GRIP"],
|
|
32
|
+
[WeaponComponentHash.AtArAfGrip2, "WCT_GRIP"],
|
|
33
|
+
[WeaponComponentHash.AtPiFlsh, "WCT_FLASH"],
|
|
34
|
+
[WeaponComponentHash.AtArFlsh, "WCT_FLASH"],
|
|
35
|
+
[WeaponComponentHash.PistolMk2Flash, "WCT_FLASH"],
|
|
36
|
+
[WeaponComponentHash.AtScopeMacro, "WCT_SCOPE_MAC"],
|
|
37
|
+
[WeaponComponentHash.AtScopeMacro02, "WCT_SCOPE_MAC"],
|
|
38
|
+
[WeaponComponentHash.AtScopeSmall, "WCT_SCOPE_SML"],
|
|
39
|
+
[WeaponComponentHash.AtScopeSmall02, "WCT_SCOPE_SML"],
|
|
40
|
+
[WeaponComponentHash.AtScopeMedium, "WCT_SCOPE_MED"],
|
|
41
|
+
[WeaponComponentHash.AtScopeLarge, "WCT_SCOPE_LRG"],
|
|
42
|
+
[WeaponComponentHash.AtScopeMax, "WCT_SCOPE_MAX"],
|
|
43
|
+
[WeaponComponentHash.AtPiSupp, "WCT_SUPP"],
|
|
44
|
+
[WeaponComponentHash.AtArSupp, "WCT_SUPP"],
|
|
45
|
+
[WeaponComponentHash.AtArSupp02, "WCT_SUPP"],
|
|
46
|
+
[WeaponComponentHash.AtSrSupp, "WCT_SUPP"],
|
|
47
|
+
[WeaponComponentHash.HeavySniperMk2Suppressor, "WCT_SUPP"],
|
|
48
|
+
[WeaponComponentHash.AtPiSupp02, "WCT_SUPP"],
|
|
49
|
+
[WeaponComponentHash.CombatPistolClip01, "WCT_CLIP1"],
|
|
50
|
+
[WeaponComponentHash.APPistolClip01, "WCT_CLIP1"],
|
|
51
|
+
[WeaponComponentHash.MicroSMGClip01, "WCT_CLIP1"],
|
|
52
|
+
[WeaponComponentHash.AssaultRifleClip01, "WCT_CLIP1"],
|
|
53
|
+
[WeaponComponentHash.CarbineRifleClip01, "WCT_CLIP1"],
|
|
54
|
+
[WeaponComponentHash.AdvancedRifleClip01, "WCT_CLIP1"],
|
|
55
|
+
[WeaponComponentHash.MGClip01, "WCT_CLIP1"],
|
|
56
|
+
[WeaponComponentHash.CombatMGClip01, "WCT_CLIP1"],
|
|
57
|
+
[WeaponComponentHash.AssaultShotgunClip01, "WCT_CLIP1"],
|
|
58
|
+
[WeaponComponentHash.SniperRifleClip01, "WCT_CLIP1"],
|
|
59
|
+
[WeaponComponentHash.HeavySniperClip01, "WCT_CLIP1"],
|
|
60
|
+
[WeaponComponentHash.AssaultSMGClip01, "WCT_CLIP1"],
|
|
61
|
+
[WeaponComponentHash.Pistol50Clip01, "WCT_CLIP1"],
|
|
62
|
+
[0x0baab157, "WCT_CLIP1"],
|
|
63
|
+
[0x5af49386, "WCT_CLIP1"],
|
|
64
|
+
[0xcaebd246, "WCT_CLIP1"],
|
|
65
|
+
[0xf8955d89, "WCT_CLIP1"],
|
|
66
|
+
[WeaponComponentHash.SNSPistolClip01, "WCT_CLIP1"],
|
|
67
|
+
[WeaponComponentHash.VintagePistolClip01, "WCT_CLIP1"],
|
|
68
|
+
[WeaponComponentHash.HeavyShotgunClip01, "WCT_CLIP1"],
|
|
69
|
+
[WeaponComponentHash.MarksmanRifleClip01, "WCT_CLIP1"],
|
|
70
|
+
[WeaponComponentHash.CombatPDWClip01, "WCT_CLIP1"],
|
|
71
|
+
[WeaponComponentHash.MarksmanPistolClip01, "WCT_CLIP1"],
|
|
72
|
+
[WeaponComponentHash.MachinePistolClip01, "WCT_CLIP1"],
|
|
73
|
+
[WeaponComponentHash.PistolMk2ClipNormal, "WCT_CLIP1"],
|
|
74
|
+
[WeaponComponentHash.AssaultRifleMk2ClipNormal, "WCT_CLIP1"],
|
|
75
|
+
[WeaponComponentHash.CarbineRifleMk2ClipNormal, "WCT_CLIP1"],
|
|
76
|
+
[WeaponComponentHash.CombatMGMk2ClipNormal, "WCT_CLIP1"],
|
|
77
|
+
[WeaponComponentHash.HeavySniperMk2ClipNormal, "WCT_CLIP1"],
|
|
78
|
+
[WeaponComponentHash.SMGMk2ClipNormal, "WCT_CLIP1"],
|
|
79
|
+
[WeaponComponentHash.PistolClip02, "WCT_CLIP2"],
|
|
80
|
+
[WeaponComponentHash.CombatPistolClip02, "WCT_CLIP2"],
|
|
81
|
+
[WeaponComponentHash.APPistolClip02, "WCT_CLIP2"],
|
|
82
|
+
[WeaponComponentHash.MicroSMGClip02, "WCT_CLIP2"],
|
|
83
|
+
[WeaponComponentHash.SMGClip02, "WCT_CLIP2"],
|
|
84
|
+
[WeaponComponentHash.AssaultRifleClip02, "WCT_CLIP2"],
|
|
85
|
+
[WeaponComponentHash.CarbineRifleClip02, "WCT_CLIP2"],
|
|
86
|
+
[WeaponComponentHash.AdvancedRifleClip02, "WCT_CLIP2"],
|
|
87
|
+
[WeaponComponentHash.MGClip02, "WCT_CLIP2"],
|
|
88
|
+
[WeaponComponentHash.CombatMGClip02, "WCT_CLIP2"],
|
|
89
|
+
[WeaponComponentHash.AssaultShotgunClip02, "WCT_CLIP2"],
|
|
90
|
+
[WeaponComponentHash.MinigunClip01, "WCT_CLIP2"],
|
|
91
|
+
[WeaponComponentHash.AssaultSMGClip02, "WCT_CLIP2"],
|
|
92
|
+
[WeaponComponentHash.Pistol50Clip02, "WCT_CLIP2"],
|
|
93
|
+
[0x6cbf371b, "WCT_CLIP2"],
|
|
94
|
+
[0xe1c5fffa, "WCT_CLIP2"],
|
|
95
|
+
[0x3e7e6956, "WCT_CLIP2"],
|
|
96
|
+
[WeaponComponentHash.SNSPistolClip02, "WCT_CLIP2"],
|
|
97
|
+
[WeaponComponentHash.VintagePistolClip02, "WCT_CLIP2"],
|
|
98
|
+
[WeaponComponentHash.HeavyShotgunClip02, "WCT_CLIP2"],
|
|
99
|
+
[WeaponComponentHash.MarksmanRifleClip02, "WCT_CLIP2"],
|
|
100
|
+
[WeaponComponentHash.CombatPDWClip02, "WCT_CLIP2"],
|
|
101
|
+
[WeaponComponentHash.MachinePistolClip02, "WCT_CLIP2"],
|
|
102
|
+
[WeaponComponentHash.PistolMk2ClipExtended, "WCT_CLIP2"],
|
|
103
|
+
[WeaponComponentHash.AssaultRifleMk2ClipExtended, "WCT_CLIP2"],
|
|
104
|
+
[WeaponComponentHash.CarbineRifleMk2ClipExtended, "WCT_CLIP2"],
|
|
105
|
+
[WeaponComponentHash.CombatMGMk2ClipExtended, "WCT_CLIP2"],
|
|
106
|
+
[WeaponComponentHash.HeavySniperMk2ClipExtended, "WCT_CLIP2"],
|
|
107
|
+
[WeaponComponentHash.SMGMk2ClipExtended, "WCT_CLIP2"],
|
|
108
|
+
[WeaponComponentHash.AtScopeLargeFixedZoom, "WCT_SCOPE_LRG"],
|
|
109
|
+
[WeaponComponentHash.AssaultRifleVarmodLuxe, "WCT_VAR_GOLD"],
|
|
110
|
+
[WeaponComponentHash.CarbineRifleVarmodLuxe, "WCT_VAR_GOLD"],
|
|
111
|
+
[WeaponComponentHash.PistolVarmodLuxe, "WCT_VAR_GOLD"],
|
|
112
|
+
[WeaponComponentHash.SMGVarmodLuxe, "WCT_VAR_GOLD"],
|
|
113
|
+
[WeaponComponentHash.MicroSMGVarmodLuxe, "WCT_VAR_GOLD"],
|
|
114
|
+
[0x161e9241, "WCT_VAR_GOLD"],
|
|
115
|
+
[WeaponComponentHash.AssaultSMGVarmodLowrider, "WCT_VAR_GOLD"],
|
|
116
|
+
[WeaponComponentHash.CombatPistolVarmodLowrider, "WCT_VAR_GOLD"],
|
|
117
|
+
[WeaponComponentHash.MGVarmodLowrider, "WCT_VAR_GOLD"],
|
|
118
|
+
[WeaponComponentHash.PumpShotgunVarmodLowrider, "WCT_VAR_GOLD"],
|
|
119
|
+
[WeaponComponentHash.AdvancedRifleVarmodLuxe, "WCT_VAR_METAL"],
|
|
120
|
+
[WeaponComponentHash.APPistolVarmodLuxe, "WCT_VAR_METAL"],
|
|
121
|
+
[WeaponComponentHash.SawnoffShotgunVarmodLuxe, "WCT_VAR_METAL"],
|
|
122
|
+
[WeaponComponentHash.BullpupRifleVarmodLow, "WCT_VAR_METAL"],
|
|
123
|
+
[WeaponComponentHash.Pistol50VarmodLuxe, "WCT_VAR_SIL"],
|
|
124
|
+
[WeaponComponentHash.HeavyPistolVarmodLuxe, "WCT_VAR_WOOD"],
|
|
125
|
+
[WeaponComponentHash.SniperRifleVarmodLuxe, "WCT_VAR_WOOD"],
|
|
126
|
+
[WeaponComponentHash.SNSPistolVarmodLowrider, "WCT_VAR_WOOD"],
|
|
127
|
+
[WeaponComponentHash.CombatMGVarmodLowrider, "WCT_VAR_ETCHM"],
|
|
128
|
+
[WeaponComponentHash.SpecialCarbineVarmodLowrider, "WCT_VAR_ETCHM"],
|
|
129
|
+
[WeaponComponentHash.SwitchbladeVarmodBase, "WCT_SB_BASE"],
|
|
130
|
+
[WeaponComponentHash.SwitchbladeVarmodVar1, "WCT_SB_VAR1"],
|
|
131
|
+
[WeaponComponentHash.SwitchbladeVarmodVar2, "WCT_SB_VAR2"],
|
|
132
|
+
[WeaponComponentHash.RevolverClip01, "WCT_CLIP1"],
|
|
133
|
+
[WeaponComponentHash.RevolverVarmodBoss, "WCT_REV_VARB"],
|
|
134
|
+
[WeaponComponentHash.RevolverVarmodGoon, "WCT_REV_VARG"],
|
|
135
|
+
[WeaponComponentHash.SMGClip03, "WCT_CLIP_DRM"],
|
|
136
|
+
[WeaponComponentHash.AssaultRifleClip03, "WCT_CLIP_DRM"],
|
|
137
|
+
[WeaponComponentHash.HeavyShotgunClip03, "WCT_CLIP_DRM"],
|
|
138
|
+
[WeaponComponentHash.CarbineRifleClip03, "WCT_CLIP_BOX"],
|
|
139
|
+
[WeaponComponentHash.AssaultRifleMk2ClipArmorPiercing, "WCT_CLIP_AP"],
|
|
140
|
+
[WeaponComponentHash.CarbineRifleMk2ClipArmorPiercing, "WCT_CLIP_AP"],
|
|
141
|
+
[WeaponComponentHash.CombatMGMk2ClipArmorPiercing, "WCT_CLIP_AP"],
|
|
142
|
+
[WeaponComponentHash.HeavySniperMk2ClipArmorPiercing, "WCT_CLIP_AP"],
|
|
143
|
+
[WeaponComponentHash.PistolMk2ClipFMJ, "WCT_CLIP_FMJ"],
|
|
144
|
+
[WeaponComponentHash.AssaultRifleMk2ClipFMJ, "WCT_CLIP_FMJ"],
|
|
145
|
+
[WeaponComponentHash.CarbineRifleMk2ClipFMJ, "WCT_CLIP_FMJ"],
|
|
146
|
+
[WeaponComponentHash.CombatMGMk2ClipFMJ, "WCT_CLIP_FMJ"],
|
|
147
|
+
[WeaponComponentHash.HeavySniperMk2ClipFMJ, "WCT_CLIP_FMJ"],
|
|
148
|
+
[WeaponComponentHash.SMGMk2ClipFMJ, "WCT_CLIP_FMJ"],
|
|
149
|
+
[WeaponComponentHash.PistolMk2ClipIncendiary, "WCT_CLIP_INC"],
|
|
150
|
+
[WeaponComponentHash.AssaultRifleMk2ClipIncendiary, "WCT_CLIP_INC"],
|
|
151
|
+
[WeaponComponentHash.CarbineRifleMk2ClipIncendiary, "WCT_CLIP_INC"],
|
|
152
|
+
[WeaponComponentHash.CombatMGMk2ClipIncendiary, "WCT_CLIP_INC"],
|
|
153
|
+
[WeaponComponentHash.HeavySniperMk2ClipIncendiary, "WCT_CLIP_INC"],
|
|
154
|
+
[WeaponComponentHash.SMGMk2ClipIncendiary, "WCT_CLIP_INC"],
|
|
155
|
+
[WeaponComponentHash.PistolMk2ClipTracer, "WCT_CLIP_TR"],
|
|
156
|
+
[WeaponComponentHash.AssaultRifleMk2ClipTracer, "WCT_CLIP_TR"],
|
|
157
|
+
[WeaponComponentHash.CarbineRifleMk2ClipTracer, "WCT_CLIP_TR"],
|
|
158
|
+
[WeaponComponentHash.CombatMGMk2ClipTracer, "WCT_CLIP_TR"],
|
|
159
|
+
[WeaponComponentHash.SMGMk2ClipTracer, "WCT_CLIP_TR"],
|
|
160
|
+
[WeaponComponentHash.HeavySniperMk2ClipExplosive, "WCT_CLIP_EX"],
|
|
161
|
+
[WeaponComponentHash.PistolMk2ClipHollowpoint, "WCT_CLIP_HP"],
|
|
162
|
+
[WeaponComponentHash.SMGMk2ClipHollowpoint, "WCT_CLIP_HP"],
|
|
163
|
+
[WeaponComponentHash.AssaultRifleMk2BarrelNormal, "WCT_BARR"],
|
|
164
|
+
[WeaponComponentHash.CarbineRifleMk2BarrelNormal, "WCT_BARR"],
|
|
165
|
+
[WeaponComponentHash.CombatMGMk2BarrelNormal, "WCT_BARR"],
|
|
166
|
+
[WeaponComponentHash.SMGMk2BarrelNormal, "WCT_BARR"],
|
|
167
|
+
[WeaponComponentHash.AssaultRifleMk2BarrelHeavy, "WCT_BARR2"],
|
|
168
|
+
[WeaponComponentHash.CarbineRifleMk2BarrelHeavy, "WCT_BARR2"],
|
|
169
|
+
[WeaponComponentHash.CombatMGMk2BarrelHeavy, "WCT_BARR2"],
|
|
170
|
+
[WeaponComponentHash.SMGMk2BarrelHeavy, "WCT_BARR2"],
|
|
171
|
+
[WeaponComponentHash.PistolMk2CamoDigital, "WCT_CAMO_1"],
|
|
172
|
+
[WeaponComponentHash.AssaultRifleMk2CamoDigital, "WCT_CAMO_1"],
|
|
173
|
+
[WeaponComponentHash.CarbineRifleMk2CamoDigital, "WCT_CAMO_1"],
|
|
174
|
+
[WeaponComponentHash.CombatMGMk2CamoDigital, "WCT_CAMO_1"],
|
|
175
|
+
[WeaponComponentHash.HeavySniperMk2CamoDigital, "WCT_CAMO_1"],
|
|
176
|
+
[WeaponComponentHash.SMGMk2CamoDigital, "WCT_CAMO_1"],
|
|
177
|
+
[WeaponComponentHash.PistolMk2CamoSlideDigital, "WCT_CAMO_1"],
|
|
178
|
+
[WeaponComponentHash.PistolMk2CamoBrushstroke, "WCT_CAMO_2"],
|
|
179
|
+
[WeaponComponentHash.AssaultRifleMk2CamoBrushstroke, "WCT_CAMO_2"],
|
|
180
|
+
[WeaponComponentHash.CarbineRifleMk2CamoBrushstroke, "WCT_CAMO_2"],
|
|
181
|
+
[WeaponComponentHash.CombatMGMk2CamoBrushstroke, "WCT_CAMO_2"],
|
|
182
|
+
[WeaponComponentHash.HeavySniperMk2CamoBrushstroke, "WCT_CAMO_2"],
|
|
183
|
+
[WeaponComponentHash.SMGMk2CamoBrushstroke, "WCT_CAMO_2"],
|
|
184
|
+
[WeaponComponentHash.PistolMk2CamoSlideBrushstroke, "WCT_CAMO_2"],
|
|
185
|
+
[WeaponComponentHash.PistolMk2CamoWoodland, "WCT_CAMO_3"],
|
|
186
|
+
[WeaponComponentHash.AssaultRifleMk2CamoWoodland, "WCT_CAMO_3"],
|
|
187
|
+
[WeaponComponentHash.CarbineRifleMk2CamoWoodland, "WCT_CAMO_3"],
|
|
188
|
+
[WeaponComponentHash.CombatMGMk2CamoWoodland, "WCT_CAMO_3"],
|
|
189
|
+
[WeaponComponentHash.HeavySniperMk2CamoWoodland, "WCT_CAMO_3"],
|
|
190
|
+
[WeaponComponentHash.SMGMk2CamoWoodland, "WCT_CAMO_3"],
|
|
191
|
+
[WeaponComponentHash.PistolMk2CamoSlideWoodland, "WCT_CAMO_3"],
|
|
192
|
+
[WeaponComponentHash.PistolMk2CamoSkull, "WCT_CAMO_4"],
|
|
193
|
+
[WeaponComponentHash.AssaultRifleMk2CamoSkull, "WCT_CAMO_4"],
|
|
194
|
+
[WeaponComponentHash.CarbineRifleMk2CamoSkull, "WCT_CAMO_4"],
|
|
195
|
+
[WeaponComponentHash.CombatMGMk2CamoSkull, "WCT_CAMO_4"],
|
|
196
|
+
[WeaponComponentHash.HeavySniperMk2CamoSkull, "WCT_CAMO_4"],
|
|
197
|
+
[WeaponComponentHash.SMGMk2CamoSkull, "WCT_CAMO_4"],
|
|
198
|
+
[WeaponComponentHash.PistolMk2CamoSlideSkull, "WCT_CAMO_4"],
|
|
199
|
+
[WeaponComponentHash.PistolMk2CamoSessanta, "WCT_CAMO_5"],
|
|
200
|
+
[WeaponComponentHash.AssaultRifleMk2CamoSessanta, "WCT_CAMO_5"],
|
|
201
|
+
[WeaponComponentHash.CarbineRifleMk2CamoSessanta, "WCT_CAMO_5"],
|
|
202
|
+
[WeaponComponentHash.CombatMGMk2CamoSessanta, "WCT_CAMO_5"],
|
|
203
|
+
[WeaponComponentHash.HeavySniperMk2CamoSessanta, "WCT_CAMO_5"],
|
|
204
|
+
[WeaponComponentHash.SMGMk2CamoSessanta, "WCT_CAMO_5"],
|
|
205
|
+
[WeaponComponentHash.PistolMk2CamoSlideSessanta, "WCT_CAMO_5"],
|
|
206
|
+
[WeaponComponentHash.PistolMk2CamoPerseus, "WCT_CAMO_6"],
|
|
207
|
+
[WeaponComponentHash.AssaultRifleMk2CamoPerseus, "WCT_CAMO_6"],
|
|
208
|
+
[WeaponComponentHash.CarbineRifleMk2CamoPerseus, "WCT_CAMO_6"],
|
|
209
|
+
[WeaponComponentHash.CombatMGMk2CamoPerseus, "WCT_CAMO_6"],
|
|
210
|
+
[WeaponComponentHash.HeavySniperMk2CamoPerseus, "WCT_CAMO_6"],
|
|
211
|
+
[WeaponComponentHash.SMGMk2CamoPerseus, "WCT_CAMO_6"],
|
|
212
|
+
[WeaponComponentHash.PistolMk2CamoSlidePerseus, "WCT_CAMO_6"],
|
|
213
|
+
[WeaponComponentHash.PistolMk2CamoLeopard, "WCT_CAMO_7"],
|
|
214
|
+
[WeaponComponentHash.AssaultRifleMk2CamoLeopard, "WCT_CAMO_7"],
|
|
215
|
+
[WeaponComponentHash.CarbineRifleMk2CamoLeopard, "WCT_CAMO_7"],
|
|
216
|
+
[WeaponComponentHash.CombatMGMk2CamoLeopard, "WCT_CAMO_7"],
|
|
217
|
+
[WeaponComponentHash.HeavySniperMk2CamoLeopard, "WCT_CAMO_7"],
|
|
218
|
+
[WeaponComponentHash.SMGMk2CamoLeopard, "WCT_CAMO_7"],
|
|
219
|
+
[WeaponComponentHash.PistolMk2CamoSlideLeopard, "WCT_CAMO_7"],
|
|
220
|
+
[WeaponComponentHash.PistolMk2CamoZebra, "WCT_CAMO_8"],
|
|
221
|
+
[WeaponComponentHash.AssaultRifleMk2CamoZebra, "WCT_CAMO_8"],
|
|
222
|
+
[WeaponComponentHash.CarbineRifleMk2CamoZebra, "WCT_CAMO_8"],
|
|
223
|
+
[WeaponComponentHash.CombatMGMk2CamoZebra, "WCT_CAMO_8"],
|
|
224
|
+
[WeaponComponentHash.HeavySniperMk2CamoZebra, "WCT_CAMO_8"],
|
|
225
|
+
[WeaponComponentHash.SMGMk2CamoZebra, "WCT_CAMO_8"],
|
|
226
|
+
[WeaponComponentHash.PistolMk2CamoSlideZebra, "WCT_CAMO_8"],
|
|
227
|
+
[WeaponComponentHash.PistolMk2CamoGeometric, "WCT_CAMO_9"],
|
|
228
|
+
[WeaponComponentHash.AssaultRifleMk2CamoGeometric, "WCT_CAMO_9"],
|
|
229
|
+
[WeaponComponentHash.CarbineRifleMk2CamoGeometric, "WCT_CAMO_9"],
|
|
230
|
+
[WeaponComponentHash.CombatMGMk2CamoGeometric, "WCT_CAMO_9"],
|
|
231
|
+
[WeaponComponentHash.HeavySniperMk2CamoGeometric, "WCT_CAMO_9"],
|
|
232
|
+
[WeaponComponentHash.SMGMk2CamoGeometric, "WCT_CAMO_9"],
|
|
233
|
+
[WeaponComponentHash.PistolMk2CamoSlideGeometric, "WCT_CAMO_9"],
|
|
234
|
+
[WeaponComponentHash.PistolMk2CamoBoom, "WCT_CAMO_10"],
|
|
235
|
+
[WeaponComponentHash.AssaultRifleMk2CamoBoom, "WCT_CAMO_10"],
|
|
236
|
+
[WeaponComponentHash.CarbineRifleMk2CamoBoom, "WCT_CAMO_10"],
|
|
237
|
+
[WeaponComponentHash.CombatMGMk2CamoBoom, "WCT_CAMO_10"],
|
|
238
|
+
[WeaponComponentHash.HeavySniperMk2CamoBoom, "WCT_CAMO_10"],
|
|
239
|
+
[WeaponComponentHash.SMGMk2CamoBoom, "WCT_CAMO_10"],
|
|
240
|
+
[WeaponComponentHash.PistolMk2CamoSlideBoom, "WCT_CAMO_10"],
|
|
241
|
+
[WeaponComponentHash.PistolMk2CamoPatriotic, "WCT_CAMO_IND"],
|
|
242
|
+
[WeaponComponentHash.AssaultRifleMk2CamoPatriotic, "WCT_CAMO_IND"],
|
|
243
|
+
[WeaponComponentHash.CarbineRifleMk2CamoPatriotic, "WCT_CAMO_IND"],
|
|
244
|
+
[WeaponComponentHash.CombatMGMk2CamoPatriotic, "WCT_CAMO_IND"],
|
|
245
|
+
[WeaponComponentHash.HeavySniperMk2CamoPatriotic, "WCT_CAMO_IND"],
|
|
246
|
+
[WeaponComponentHash.SMGMk2CamoPatriotic, "WCT_CAMO_IND"],
|
|
247
|
+
[WeaponComponentHash.PistolMk2CamoSlidePatriotic, "WCT_CAMO_IND"],
|
|
248
|
+
[WeaponComponentHash.AtSights, "WCT_HOLO"],
|
|
249
|
+
[WeaponComponentHash.AtScopeSmallMk2, "WCT_SCOPE_SML2"],
|
|
250
|
+
[WeaponComponentHash.AtScopeMacroMk2, "WCT_SCOPE_MAC2"],
|
|
251
|
+
[WeaponComponentHash.AtScopeMediumMk2, "WCT_SCOPE_MED2"],
|
|
252
|
+
[WeaponComponentHash.AtMuzzle1, "WCT_MUZZ"],
|
|
253
|
+
[WeaponComponentHash.AtMuzzle2, "WCT_MUZZ"],
|
|
254
|
+
[WeaponComponentHash.AtMuzzle3, "WCT_MUZZ"],
|
|
255
|
+
[WeaponComponentHash.AtMuzzle4, "WCT_MUZZ"],
|
|
256
|
+
[WeaponComponentHash.AtMuzzle5, "WCT_MUZZ"],
|
|
257
|
+
[WeaponComponentHash.AtMuzzle7, "WCT_MUZZ"],
|
|
258
|
+
[WeaponComponentHash.HeavySniperMk2Muzzle8, "WCT_MUZZ"],
|
|
259
|
+
[WeaponComponentHash.HeavySniperMk2Muzzle9, "WCT_MUZZ"],
|
|
260
|
+
[WeaponComponentHash.PistolMk2Scope, "WCT_SCOPE_PI"],
|
|
261
|
+
[WeaponComponentHash.PistolMk2Compensator, "WCT_COMP"],
|
|
262
|
+
[WeaponComponentHash.HeavySniperMk2ScopeLarge, "WCT_SCOPE_LRG2"],
|
|
263
|
+
]);
|
|
264
|
+
/**
|
|
265
|
+
* Initialize with DlcWeaponComponentData, in case of any missing dlc data
|
|
266
|
+
*
|
|
267
|
+
*/
|
|
268
|
+
function initializeOnce() {
|
|
269
|
+
let isInitialized = false;
|
|
270
|
+
return function () {
|
|
271
|
+
if (isInitialized) {
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
for (const [hash, data] of DlcWeaponComponentData) {
|
|
275
|
+
ComponentDisplayNameByHash.set(hash, data.name);
|
|
276
|
+
}
|
|
277
|
+
isInitialized = true;
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
initializeOnce()();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getStringFromUInt8Array, getUInt32FromUint8Array } from
|
|
1
|
+
import { getStringFromUInt8Array, getUInt32FromUint8Array } from "../utils";
|
|
2
2
|
/**
|
|
3
3
|
* DlcWeaponComponentData
|
|
4
4
|
*
|
|
@@ -23,7 +23,7 @@ function initializeOnce() {
|
|
|
23
23
|
for (let j = 0; j < componentCount; j++) {
|
|
24
24
|
const buffer = new Uint8Array(14 * intLength + 4 * strLength);
|
|
25
25
|
// https://docs.fivem.net/natives/?_0x6CF598A2957C2BF8
|
|
26
|
-
Citizen.invokeNative(
|
|
26
|
+
Citizen.invokeNative("0x6CF598A2957C2BF8", i, j, buffer, Citizen.returnResultAnyway());
|
|
27
27
|
// noinspection PointlessArithmeticExpressionJS
|
|
28
28
|
const dlcWeaponComponentData = {
|
|
29
29
|
attachBone: getUInt32FromUint8Array(buffer, 0 * intLength, 1 * intLength),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { WeaponComponent } from
|
|
2
|
-
import { WeaponComponentHash } from
|
|
3
|
-
import { WeaponHash } from
|
|
4
|
-
import { ComponentAttachmentPoint } from
|
|
1
|
+
import { WeaponComponent } from "./WeaponComponent";
|
|
2
|
+
import { WeaponComponentHash } from "./WeaponComponentHash";
|
|
3
|
+
import { WeaponHash } from "../hashes";
|
|
4
|
+
import { ComponentAttachmentPoint } from "./ComponentAttachmentPoint";
|
|
5
5
|
export declare class InvalidWeaponComponent extends WeaponComponent {
|
|
6
6
|
constructor();
|
|
7
7
|
get Active(): boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { WeaponComponent } from
|
|
2
|
-
import { WeaponComponentHash } from
|
|
3
|
-
import { ComponentAttachmentPoint } from
|
|
4
|
-
import { Game } from
|
|
1
|
+
import { WeaponComponent } from "./WeaponComponent";
|
|
2
|
+
import { WeaponComponentHash } from "./WeaponComponentHash";
|
|
3
|
+
import { ComponentAttachmentPoint } from "./ComponentAttachmentPoint";
|
|
4
|
+
import { Game } from "../Game";
|
|
5
5
|
export class InvalidWeaponComponent extends WeaponComponent {
|
|
6
6
|
constructor() {
|
|
7
7
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
@@ -13,7 +13,7 @@ export class InvalidWeaponComponent extends WeaponComponent {
|
|
|
13
13
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
14
14
|
set Active(value) { }
|
|
15
15
|
get DisplayName() {
|
|
16
|
-
return
|
|
16
|
+
return "WCT_INVALID";
|
|
17
17
|
}
|
|
18
18
|
get LocalizedName() {
|
|
19
19
|
return Game.getGXTEntry(this.DisplayName);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Ped } from
|
|
2
|
-
import { Weapon } from
|
|
3
|
-
import { WeaponComponentHash } from
|
|
4
|
-
import { WeaponHash } from
|
|
5
|
-
import { ComponentAttachmentPoint } from
|
|
6
|
-
import { WeaponComponentHudStats } from
|
|
1
|
+
import { Ped } from "../models";
|
|
2
|
+
import { Weapon } from "../weapon";
|
|
3
|
+
import { WeaponComponentHash } from "./WeaponComponentHash";
|
|
4
|
+
import { WeaponHash } from "../hashes";
|
|
5
|
+
import { ComponentAttachmentPoint } from "./ComponentAttachmentPoint";
|
|
6
|
+
import { WeaponComponentHudStats } from "./WeaponComponentHudStats";
|
|
7
7
|
/**
|
|
8
8
|
* ped weapon component on weapon
|
|
9
9
|
*
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import { WeaponComponentHash } from
|
|
2
|
-
import { ComponentAttachmentPoint } from
|
|
3
|
-
import { Game } from
|
|
4
|
-
import { ComponentDisplayNameByHash } from
|
|
5
|
-
import { WeaponComponentHashesByWeaponHash } from
|
|
6
|
-
import { ComponentAttachmentPointByHash } from
|
|
7
|
-
import { WeaponComponentHudStats } from
|
|
1
|
+
import { WeaponComponentHash } from "./WeaponComponentHash";
|
|
2
|
+
import { ComponentAttachmentPoint } from "./ComponentAttachmentPoint";
|
|
3
|
+
import { Game } from "../Game";
|
|
4
|
+
import { ComponentDisplayNameByHash } from "./ComponentDisplayNameByHash";
|
|
5
|
+
import { WeaponComponentHashesByWeaponHash } from "./WeaponComponentHashesByWeaponHash";
|
|
6
|
+
import { ComponentAttachmentPointByHash } from "./ComponentAttachmentPointByHash";
|
|
7
|
+
import { WeaponComponentHudStats } from "./WeaponComponentHudStats";
|
|
8
8
|
/**
|
|
9
9
|
* ped weapon component on weapon
|
|
10
10
|
*
|
|
11
11
|
*/
|
|
12
12
|
export class WeaponComponent {
|
|
13
|
+
owner;
|
|
14
|
+
weapon;
|
|
15
|
+
componentHash;
|
|
13
16
|
constructor(owner, weapon, componentHash) {
|
|
14
17
|
this.owner = owner;
|
|
15
18
|
this.weapon = weapon;
|
|
@@ -95,9 +98,9 @@ export class WeaponComponent {
|
|
|
95
98
|
*/
|
|
96
99
|
static getComponentDisplayNameFromHash(hash, componentHash) {
|
|
97
100
|
if (!hash) {
|
|
98
|
-
return
|
|
101
|
+
return "WCT_INVALID";
|
|
99
102
|
}
|
|
100
|
-
return ComponentDisplayNameByHash.get(componentHash) ??
|
|
103
|
+
return ComponentDisplayNameByHash.get(componentHash) ?? "WCT_INVALID";
|
|
101
104
|
}
|
|
102
105
|
/**
|
|
103
106
|
* get component attachment point by WeaponHash and WeaponComponentHash
|
|
@@ -111,9 +114,10 @@ export class WeaponComponent {
|
|
|
111
114
|
if (!componentHashes) {
|
|
112
115
|
return ComponentAttachmentPoint.Invalid;
|
|
113
116
|
}
|
|
114
|
-
if (componentHashes.every(x => x !== componentHash)) {
|
|
117
|
+
if (componentHashes.every((x) => x !== componentHash)) {
|
|
115
118
|
return ComponentAttachmentPoint.Invalid;
|
|
116
119
|
}
|
|
117
|
-
return ComponentAttachmentPointByHash.get(componentHash) ??
|
|
120
|
+
return (ComponentAttachmentPointByHash.get(componentHash) ??
|
|
121
|
+
ComponentAttachmentPoint.Invalid);
|
|
118
122
|
}
|
|
119
123
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Ped } from
|
|
2
|
-
import { Weapon } from
|
|
3
|
-
import { WeaponComponentHash } from
|
|
4
|
-
import { WeaponComponent } from
|
|
1
|
+
import { Ped } from "../models";
|
|
2
|
+
import { Weapon } from "../weapon";
|
|
3
|
+
import { WeaponComponentHash } from "./WeaponComponentHash";
|
|
4
|
+
import { WeaponComponent } from "./WeaponComponent";
|
|
5
5
|
/**
|
|
6
6
|
* ped weapon components on weapon
|
|
7
7
|
*
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { WeaponComponent } from
|
|
2
|
-
import { InvalidWeaponComponent } from
|
|
3
|
-
import { WeaponComponentHashesByWeaponHash } from
|
|
4
|
-
import { ComponentAttachmentPoint } from
|
|
5
|
-
import { ComponentAttachmentPointByHash } from
|
|
1
|
+
import { WeaponComponent } from "./WeaponComponent";
|
|
2
|
+
import { InvalidWeaponComponent } from "./InvalidWeaponComponent";
|
|
3
|
+
import { WeaponComponentHashesByWeaponHash } from "./WeaponComponentHashesByWeaponHash";
|
|
4
|
+
import { ComponentAttachmentPoint } from "./ComponentAttachmentPoint";
|
|
5
|
+
import { ComponentAttachmentPointByHash } from "./ComponentAttachmentPointByHash";
|
|
6
6
|
/**
|
|
7
7
|
* ped weapon components on weapon
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
10
|
export class WeaponComponentCollection {
|
|
11
|
+
owner;
|
|
12
|
+
weapon;
|
|
13
|
+
components = new Map();
|
|
14
|
+
invalidComponent = new InvalidWeaponComponent();
|
|
11
15
|
constructor(owner, weapon) {
|
|
12
|
-
this.components = new Map();
|
|
13
|
-
this.invalidComponent = new InvalidWeaponComponent();
|
|
14
16
|
this.owner = owner;
|
|
15
17
|
this.weapon = weapon;
|
|
16
18
|
}
|
|
@@ -34,7 +36,7 @@ export class WeaponComponentCollection {
|
|
|
34
36
|
* @param componentHash
|
|
35
37
|
*/
|
|
36
38
|
get(componentHash) {
|
|
37
|
-
if (this.AllWeaponComponentHashes.some(x => x === componentHash)) {
|
|
39
|
+
if (this.AllWeaponComponentHashes.some((x) => x === componentHash)) {
|
|
38
40
|
let component = this.components.get(componentHash);
|
|
39
41
|
if (!component) {
|
|
40
42
|
component = this.createAndAddComponent(componentHash);
|
|
@@ -128,8 +130,8 @@ export class WeaponComponentCollection {
|
|
|
128
130
|
*/
|
|
129
131
|
createAndAddComponent(hash) {
|
|
130
132
|
const uintHash = hash >>> 0;
|
|
131
|
-
console.log(
|
|
132
|
-
console.log(
|
|
133
|
+
console.log("createAndAdd", hash, uintHash);
|
|
134
|
+
console.log("about to create", this.owner, this.weapon, uintHash);
|
|
133
135
|
const component = new WeaponComponent(this.owner, this.weapon, uintHash);
|
|
134
136
|
this.components.set(uintHash, component);
|
|
135
137
|
return component;
|
|
@@ -151,7 +153,7 @@ export class WeaponComponentCollection {
|
|
|
151
153
|
* @private
|
|
152
154
|
*/
|
|
153
155
|
getComponentHashesByAttachmentPoints(...attachmentPoints) {
|
|
154
|
-
return this.AllWeaponComponentHashes.filter(hash => attachmentPoints.some(attachmentPoint => ComponentAttachmentPointByHash.get(hash) === attachmentPoint));
|
|
156
|
+
return this.AllWeaponComponentHashes.filter((hash) => attachmentPoints.some((attachmentPoint) => ComponentAttachmentPointByHash.get(hash) === attachmentPoint));
|
|
155
157
|
}
|
|
156
158
|
/**
|
|
157
159
|
* get component by index and attachmentPoints
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { WeaponHash } from
|
|
2
|
-
import { WeaponComponentHash } from
|
|
1
|
+
import { WeaponHash } from "../hashes";
|
|
2
|
+
import { WeaponComponentHash } from "./WeaponComponentHash";
|
|
3
3
|
/**
|
|
4
4
|
* Mapping of WeaponHash -> WeaponComponentHashes
|
|
5
5
|
* refer: https://wiki.rage.mp/index.php?title=Weapons_Components
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { WeaponHash } from
|
|
2
|
-
import { WeaponComponentHash } from
|
|
3
|
-
import { getUInt32FromUint8Array } from
|
|
1
|
+
import { WeaponHash } from "../hashes";
|
|
2
|
+
import { WeaponComponentHash } from "./WeaponComponentHash";
|
|
3
|
+
import { getUInt32FromUint8Array } from "../utils";
|
|
4
4
|
/**
|
|
5
5
|
* Mapping of WeaponHash -> WeaponComponentHashes
|
|
6
6
|
* refer: https://wiki.rage.mp/index.php?title=Weapons_Components
|
|
@@ -254,7 +254,10 @@ export const WeaponComponentHashesByWeaponHash = new Map([
|
|
|
254
254
|
],
|
|
255
255
|
[
|
|
256
256
|
WeaponHash.MiniSMG, // Mini SMG
|
|
257
|
-
[
|
|
257
|
+
[
|
|
258
|
+
WeaponComponentHash.COMPONENT_MINISMG_CLIP_01,
|
|
259
|
+
WeaponComponentHash.COMPONENT_MINISMG_CLIP_02,
|
|
260
|
+
],
|
|
258
261
|
],
|
|
259
262
|
[
|
|
260
263
|
WeaponHash.SMGMk2, // SMG Mk II
|
|
@@ -383,7 +386,10 @@ export const WeaponComponentHashesByWeaponHash = new Map([
|
|
|
383
386
|
],
|
|
384
387
|
[
|
|
385
388
|
WeaponHash.CombatShotgun, // Combat Shotgun
|
|
386
|
-
[
|
|
389
|
+
[
|
|
390
|
+
WeaponComponentHash.COMPONENT_AT_AR_FLSH,
|
|
391
|
+
WeaponComponentHash.COMPONENT_AT_AR_SUPP,
|
|
392
|
+
],
|
|
387
393
|
],
|
|
388
394
|
// Rifles
|
|
389
395
|
[
|
|
@@ -804,14 +810,14 @@ function initializeOnce() {
|
|
|
804
810
|
for (let i = 0; i < weaponCount; i++) {
|
|
805
811
|
const weaponBuffer = new Uint8Array(14 * intLength + 4 * strLength);
|
|
806
812
|
// https://docs.fivem.net/natives/?_0x79923CD21BECE14E
|
|
807
|
-
Citizen.invokeNative(
|
|
813
|
+
Citizen.invokeNative("0x79923CD21BECE14E", i, weaponBuffer, Citizen.returnResultAnyway());
|
|
808
814
|
const weaponHash = getUInt32FromUint8Array(weaponBuffer, 2 * intLength, 3 * intLength);
|
|
809
815
|
const componentCount = GetNumDlcWeaponComponents(i);
|
|
810
816
|
const componentHashes = [];
|
|
811
817
|
for (let j = 0; j < componentCount; j++) {
|
|
812
818
|
const componentBuffer = new Uint8Array(14 * intLength + 4 * strLength);
|
|
813
819
|
// https://docs.fivem.net/natives/?_0x6CF598A2957C2BF8
|
|
814
|
-
Citizen.invokeNative(
|
|
820
|
+
Citizen.invokeNative("0x6CF598A2957C2BF8", i, j, componentBuffer, Citizen.returnResultAnyway());
|
|
815
821
|
const componentHash = getUInt32FromUint8Array(componentBuffer, 6 * intLength, 7 * intLength);
|
|
816
822
|
componentHashes.push(componentHash);
|
|
817
823
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { WeaponComponentHash } from
|
|
2
|
-
import { enumValues } from
|
|
3
|
-
import { getUInt32FromUint8Array } from
|
|
1
|
+
import { WeaponComponentHash } from "./WeaponComponentHash";
|
|
2
|
+
import { enumValues } from "../utils";
|
|
3
|
+
import { getUInt32FromUint8Array } from "../utils";
|
|
4
4
|
/**
|
|
5
5
|
* Mapping of WeaponComponentHash -> WeaponComponentHudStats
|
|
6
6
|
*
|
|
@@ -17,7 +17,7 @@ function initializeOnce() {
|
|
|
17
17
|
for (const hash of enumValues(WeaponComponentHash)) {
|
|
18
18
|
const buffer = new Uint8Array(0x28);
|
|
19
19
|
// https://docs.fivem.net/natives/?_0xB3CAF387AE12E9F8
|
|
20
|
-
Citizen.invokeNative(
|
|
20
|
+
Citizen.invokeNative("0xB3CAF387AE12E9F8", hash, buffer, Citizen.returnResultAnyway());
|
|
21
21
|
// noinspection PointlessArithmeticExpressionJS
|
|
22
22
|
const weaponComponentHudStat = {
|
|
23
23
|
hudDamage: getUInt32FromUint8Array(buffer, 0 * intLength, 1 * intLength),
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { DlcWeaponComponentData } from "./DlcWeaponComponentData";
|
|
2
|
+
export { WeaponComponentHudStats } from "./WeaponComponentHudStats";
|
|
3
|
+
export { ComponentAttachmentPoint } from "./ComponentAttachmentPoint";
|
|
4
|
+
export { WeaponComponentHash } from "./WeaponComponentHash";
|
|
5
|
+
export { InvalidWeaponComponent } from "./InvalidWeaponComponent";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { DlcWeaponComponentData } from "./DlcWeaponComponentData";
|
|
2
|
+
export { WeaponComponentHudStats } from "./WeaponComponentHudStats";
|
|
3
|
+
export { ComponentAttachmentPoint } from "./ComponentAttachmentPoint";
|
|
4
|
+
export { WeaponComponentHash } from "./WeaponComponentHash";
|
|
5
|
+
export { InvalidWeaponComponent } from "./InvalidWeaponComponent";
|
package/README.md
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
<h1 align="center">Monorepo for a FiveM server/client wrapper</h1>
|
|
2
|
-
|
|
3
|
-
<p align="center">
|
|
4
|
-
<i>🔥 A Javascript/Typescript package for FiveM resource development 🎮</i>
|
|
5
|
-
<br>
|
|
6
|
-
<small>This project is in no way affiliated with FiveM or the Cfx.re Collective.</small>
|
|
7
|
-
</br></br>
|
|
8
|
-
<a href="https://github.com/nativewrappers/fivem/blob/master/LICENSE">
|
|
9
|
-
<img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat" alt="License: MIT">
|
|
10
|
-
</a>
|
|
11
|
-
<a href="https://www.npmjs.com/package/@nativewrappers/fivem">
|
|
12
|
-
<img src="https://img.shields.io/npm/v/@nativewrappers/fivem?style=flat" alt="npm version">
|
|
13
|
-
</a>
|
|
14
|
-
<a href="https://www.npmjs.com/package/@nativewrappers/fivem">
|
|
15
|
-
<img src="https://img.shields.io/npm/dm/@nativewrappers/fivem?style=flat">
|
|
16
|
-
</a>
|
|
17
|
-
<a href="https://github.com/nativewrappers/fivem/actions/workflows/config.yml">
|
|
18
|
-
<img src="https://github.com/nativewrappers/fivem/actions/workflows/config.yml/badge.svg" alt="Workflow Status">
|
|
19
|
-
</a>
|
|
20
|
-
<a href="https://github.com/nativewrappers/fivem/commits/master">
|
|
21
|
-
<img src="https://img.shields.io/github/last-commit/nativewrappers/fivem.svg?style=flat" alt="Last commit">
|
|
22
|
-
</a>
|
|
23
|
-
</p>
|
|
24
|
-
|
|
25
|
-
<h3 align="center">This project is currently interating rapidly, there will be breaking changes.</h3>
|
|
26
|
-
|
|
27
|
-
<p align="center">
|
|
28
|
-
<h2 align="center"><a href="https://github.com/nativewrappers/fivem/tree/main/docs">Documentation</a></h2>
|
|
29
|
-
<!-- <a href="https://forum.fivem.net/t/fivem-js-v1-3-2-javascript-typescript-wrapper-now-with-menu-class-nativeui/268640">Forum</a> -->
|
|
30
|
-
</p>
|
|
31
|
-
|
|
32
|
-
## Features
|
|
33
|
-
|
|
34
|
-
- No runtime dependencies
|
|
35
|
-
- Abstracts common used FiveM practices
|
|
36
|
-
- Entity management through class objects (i.e. `Vehicle` and `Ped` entities)
|
|
37
|
-
- Server and Client side variants on wrapper
|
|
38
|
-
|
|
39
|
-
## Download & Install
|
|
40
|
-
|
|
41
|
-
`pnpm add @nativewrappers/fivem`
|