@nativewrappers/fivem 0.0.42 → 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} +4 -2
- package/{client/Model.js → Model.js} +19 -5
- 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
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AudioFlag } from
|
|
2
|
-
import type { BaseEntity } from
|
|
3
|
-
import { Vector3 } from
|
|
1
|
+
import { AudioFlag } from "./enums";
|
|
2
|
+
import type { BaseEntity } from "./models/BaseEntity";
|
|
3
|
+
import { Vector3 } from "./utils";
|
|
4
4
|
export declare abstract class Audio {
|
|
5
5
|
static playSoundAt(position: Vector3, sound: string, set?: string, generateSoundId?: boolean): number;
|
|
6
6
|
static playSoundFromEntity(entity: BaseEntity, sound: string, set?: string, generateSoundId?: boolean): number;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export class Audio {
|
|
2
2
|
static playSoundAt(position, sound, set, generateSoundId = true) {
|
|
3
3
|
const SOUND_ID = generateSoundId ? GetSoundId() : -1;
|
|
4
|
-
PlaySoundFromCoord(SOUND_ID, sound, position.x, position.y, position.z, set ??
|
|
4
|
+
PlaySoundFromCoord(SOUND_ID, sound, position.x, position.y, position.z, set ?? "", false, 0, false);
|
|
5
5
|
return SOUND_ID;
|
|
6
6
|
}
|
|
7
7
|
static playSoundFromEntity(entity, sound, set, generateSoundId = true) {
|
|
8
8
|
const SOUND_ID = generateSoundId ? GetSoundId() : -1;
|
|
9
|
-
PlaySoundFromEntity(SOUND_ID, sound, entity.Handle, set ??
|
|
9
|
+
PlaySoundFromEntity(SOUND_ID, sound, entity.Handle, set ?? "", false, 0);
|
|
10
10
|
return SOUND_ID;
|
|
11
11
|
}
|
|
12
12
|
static playSoundFrontEnd(sound, set, generateSoundId = true) {
|
|
13
13
|
const SOUND_ID = generateSoundId ? GetSoundId() : -1;
|
|
14
|
-
PlaySoundFrontend(SOUND_ID, sound, set ??
|
|
14
|
+
PlaySoundFrontend(SOUND_ID, sound, set ?? "", false);
|
|
15
15
|
return SOUND_ID;
|
|
16
16
|
}
|
|
17
17
|
static stopSound(soundId) {
|
|
@@ -24,7 +24,7 @@ export class Audio {
|
|
|
24
24
|
return HasSoundFinished(soundId);
|
|
25
25
|
}
|
|
26
26
|
static setAudioFlag(flag, toggle) {
|
|
27
|
-
if (typeof flag ===
|
|
27
|
+
if (typeof flag === "string") {
|
|
28
28
|
SetAudioFlag(flag, toggle);
|
|
29
29
|
}
|
|
30
30
|
else {
|
|
@@ -45,48 +45,49 @@ export class Audio {
|
|
|
45
45
|
if (!musicFile) {
|
|
46
46
|
if (!this.cachedMusicFile) {
|
|
47
47
|
CancelMusicEvent(this.cachedMusicFile);
|
|
48
|
-
this.cachedMusicFile =
|
|
48
|
+
this.cachedMusicFile = "";
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
else {
|
|
52
|
-
CancelMusicEvent(musicFile ??
|
|
52
|
+
CancelMusicEvent(musicFile ?? "");
|
|
53
53
|
}
|
|
54
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
|
+
];
|
|
55
93
|
}
|
|
56
|
-
Audio.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
|
-
];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Vector3 } from
|
|
2
|
-
import { BlipColor, BlipSprite } from
|
|
3
|
-
import { BaseEntity, Player } from
|
|
1
|
+
import { Vector3 } from "./utils";
|
|
2
|
+
import { BlipColor, BlipSprite } from "./enums";
|
|
3
|
+
import { BaseEntity, Player } from "./models";
|
|
4
4
|
export declare class Blip {
|
|
5
5
|
protected handle: number;
|
|
6
6
|
constructor(handle: number);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Vector3 } from
|
|
2
|
-
import { BaseEntity } from
|
|
1
|
+
import { Vector3 } from "./utils";
|
|
2
|
+
import { BaseEntity } from "./models";
|
|
3
3
|
export class Blip {
|
|
4
|
+
handle;
|
|
4
5
|
constructor(handle) {
|
|
5
6
|
this.handle = handle;
|
|
6
7
|
}
|
|
@@ -50,7 +51,7 @@ export class Blip {
|
|
|
50
51
|
SetBlipDisplay(this.handle, display);
|
|
51
52
|
}
|
|
52
53
|
set Name(name) {
|
|
53
|
-
BeginTextCommandSetBlipName(
|
|
54
|
+
BeginTextCommandSetBlipName("STRING");
|
|
54
55
|
AddTextComponentSubstringPlayerName(name);
|
|
55
56
|
EndTextCommandSetBlipName(this.handle);
|
|
56
57
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CameraShake } from
|
|
2
|
-
import { PedBone } from
|
|
3
|
-
import { BaseEntity } from
|
|
4
|
-
import { Vector3 } from
|
|
1
|
+
import { CameraShake } from "./enums";
|
|
2
|
+
import { PedBone } from "./models";
|
|
3
|
+
import { BaseEntity } from "./models/BaseEntity";
|
|
4
|
+
import { Vector3 } from "./utils";
|
|
5
5
|
export declare class Camera {
|
|
6
6
|
static readonly shakeNames: string[];
|
|
7
7
|
private handle;
|
|
@@ -1,8 +1,22 @@
|
|
|
1
|
-
import { PedBone } from
|
|
2
|
-
import { BaseEntity } from
|
|
3
|
-
import { Vector3 } from
|
|
4
|
-
import { LoadAnimDict } from
|
|
1
|
+
import { PedBone } from "./models";
|
|
2
|
+
import { BaseEntity } from "./models/BaseEntity";
|
|
3
|
+
import { Vector3 } from "./utils";
|
|
4
|
+
import { LoadAnimDict } from "./utils/Animations";
|
|
5
5
|
export class Camera {
|
|
6
|
+
static shakeNames = [
|
|
7
|
+
"HAND_SHAKE",
|
|
8
|
+
"SMALL_EXPLOSION_SHAKE",
|
|
9
|
+
"MEDIUM_EXPLOSION_SHAKE",
|
|
10
|
+
"LARGE_EXPLOSION_SHAKE",
|
|
11
|
+
"JOLT_SHAKE",
|
|
12
|
+
"VIBRATE_SHAKE",
|
|
13
|
+
"ROAD_VIBRATION_SHAKE",
|
|
14
|
+
"DRUNK_SHAKE",
|
|
15
|
+
"SKY_DIVING_SHAKE",
|
|
16
|
+
"FAMILY5_DRUG_TRIP_SHAKE",
|
|
17
|
+
"DEATH_FAIL_IN_EFFECT_SHAKE",
|
|
18
|
+
];
|
|
19
|
+
handle;
|
|
6
20
|
constructor(handle) {
|
|
7
21
|
this.handle = handle;
|
|
8
22
|
}
|
|
@@ -146,16 +160,3 @@ export class Camera {
|
|
|
146
160
|
return DoesCamExist(this.handle);
|
|
147
161
|
}
|
|
148
162
|
}
|
|
149
|
-
Camera.shakeNames = [
|
|
150
|
-
'HAND_SHAKE',
|
|
151
|
-
'SMALL_EXPLOSION_SHAKE',
|
|
152
|
-
'MEDIUM_EXPLOSION_SHAKE',
|
|
153
|
-
'LARGE_EXPLOSION_SHAKE',
|
|
154
|
-
'JOLT_SHAKE',
|
|
155
|
-
'VIBRATE_SHAKE',
|
|
156
|
-
'ROAD_VIBRATION_SHAKE',
|
|
157
|
-
'DRUNK_SHAKE',
|
|
158
|
-
'SKY_DIVING_SHAKE',
|
|
159
|
-
'FAMILY5_DRUG_TRIP_SHAKE',
|
|
160
|
-
'DEATH_FAIL_IN_EFFECT_SHAKE',
|
|
161
|
-
];
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { CheckpointIcon } from
|
|
2
|
-
import { Vector3 } from
|
|
1
|
+
import { CheckpointIcon } from "./enums";
|
|
2
|
+
import { Vector3 } from "./utils";
|
|
3
3
|
export class Checkpoint {
|
|
4
|
+
handle;
|
|
5
|
+
position = new Vector3(0, 0, 0);
|
|
6
|
+
targetPosition = new Vector3(0, 0, 0);
|
|
7
|
+
icon = CheckpointIcon.Empty;
|
|
8
|
+
radius = 0;
|
|
4
9
|
constructor(handle) {
|
|
5
|
-
this.position = new Vector3(0, 0, 0);
|
|
6
|
-
this.targetPosition = new Vector3(0, 0, 0);
|
|
7
|
-
this.icon = CheckpointIcon.Empty;
|
|
8
|
-
this.radius = 0;
|
|
9
10
|
this.handle = handle;
|
|
10
11
|
}
|
|
11
12
|
get Position() {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ClassTypes } from
|
|
2
|
-
import { Ped } from
|
|
3
|
-
import { Vector2, Vector3, Vector4 } from
|
|
4
|
-
import { Player } from
|
|
5
|
-
import { Prop } from
|
|
6
|
-
import { Vehicle } from
|
|
7
|
-
import { BaseEntity } from
|
|
1
|
+
import { ClassTypes } from "../common/utils/ClassTypes";
|
|
2
|
+
import { Ped } from "./models/Ped";
|
|
3
|
+
import { Vector2, Vector3, Vector4 } from "./utils";
|
|
4
|
+
import { Player } from "./models/Player";
|
|
5
|
+
import { Prop } from "./models/Prop";
|
|
6
|
+
import { Vehicle } from "./models/Vehicle";
|
|
7
|
+
import { BaseEntity } from "./models";
|
|
8
8
|
const getClassFromArguments = (...args) => {
|
|
9
9
|
const newArgs = [];
|
|
10
10
|
for (const arg of args) {
|
|
@@ -55,20 +55,20 @@ const getClassFromArguments = (...args) => {
|
|
|
55
55
|
// TODO: Add a third argument to enable recursive decent and change any
|
|
56
56
|
// object/array to its proper type
|
|
57
57
|
export class Events {
|
|
58
|
+
/**
|
|
59
|
+
* An onNet wrapper that properly converts the type into the correct type
|
|
60
|
+
*/
|
|
61
|
+
static onNet = (eventName, event) => {
|
|
62
|
+
onNet(eventName, (...args) => {
|
|
63
|
+
event(...getClassFromArguments(...args));
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* An on wrapper that properly converts the classes
|
|
68
|
+
*/
|
|
69
|
+
static on = (eventName, event) => {
|
|
70
|
+
on(eventName, (...args) => {
|
|
71
|
+
event(...getClassFromArguments(...args));
|
|
72
|
+
});
|
|
73
|
+
};
|
|
58
74
|
}
|
|
59
|
-
/**
|
|
60
|
-
* An onNet wrapper that properly converts the type into the correct type
|
|
61
|
-
*/
|
|
62
|
-
Events.onNet = (eventName, event) => {
|
|
63
|
-
onNet(eventName, (...args) => {
|
|
64
|
-
event(...getClassFromArguments(...args));
|
|
65
|
-
});
|
|
66
|
-
};
|
|
67
|
-
/**
|
|
68
|
-
* An on wrapper that properly converts the classes
|
|
69
|
-
*/
|
|
70
|
-
Events.on = (eventName, event) => {
|
|
71
|
-
on(eventName, (...args) => {
|
|
72
|
-
event(...getClassFromArguments(...args));
|
|
73
|
-
});
|
|
74
|
-
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Blip, Vector3 } from
|
|
2
|
-
import { Control, InputMode, Language, RadioStation } from
|
|
3
|
-
import { Ped, Player, Prop, Vehicle } from
|
|
1
|
+
import { Blip, Vector3 } from ".";
|
|
2
|
+
import { Control, InputMode, Language, RadioStation } from "./enums";
|
|
3
|
+
import { Ped, Player, Prop, Vehicle } from "./models";
|
|
4
4
|
export declare abstract class Game {
|
|
5
|
+
static useHashCache: boolean;
|
|
5
6
|
static hashCache: Map<string, number>;
|
|
6
7
|
/**
|
|
7
8
|
* Calculate the Jenkins One At A Time (joaat) has from the given string.
|
|
@@ -1,17 +1,23 @@
|
|
|
1
|
-
import { Blip, Vector3 } from
|
|
2
|
-
import { Audio } from
|
|
3
|
-
import { InputMode, RadioStation } from
|
|
4
|
-
import { Ped, Player, Prop, Vehicle } from
|
|
1
|
+
import { Blip, Vector3 } from ".";
|
|
2
|
+
import { Audio } from "./Audio";
|
|
3
|
+
import { InputMode, RadioStation } from "./enums";
|
|
4
|
+
import { Ped, Player, Prop, Vehicle } from "./models";
|
|
5
5
|
export class Game {
|
|
6
|
+
static useHashCache = true;
|
|
7
|
+
// A map containing generated hashes.
|
|
8
|
+
static hashCache = new Map();
|
|
6
9
|
/**
|
|
7
10
|
* Calculate the Jenkins One At A Time (joaat) has from the given string.
|
|
8
11
|
*
|
|
9
12
|
* @param input The input string to calculate the hash
|
|
10
13
|
*/
|
|
11
14
|
static generateHash(input) {
|
|
12
|
-
if (typeof input ===
|
|
15
|
+
if (typeof input === "undefined") {
|
|
13
16
|
return 0;
|
|
14
17
|
}
|
|
18
|
+
if (!this.useHashCache) {
|
|
19
|
+
return GetHashKey(input);
|
|
20
|
+
}
|
|
15
21
|
const _hash = this.hashCache.get(input);
|
|
16
22
|
if (_hash)
|
|
17
23
|
return _hash;
|
|
@@ -76,7 +82,8 @@ export class Game {
|
|
|
76
82
|
*/
|
|
77
83
|
static get Player() {
|
|
78
84
|
const handle = PlayerId();
|
|
79
|
-
if (this.cachedPlayer === undefined ||
|
|
85
|
+
if (this.cachedPlayer === undefined ||
|
|
86
|
+
handle !== this.cachedPlayer.Handle) {
|
|
80
87
|
this.cachedPlayer = new Player(handle);
|
|
81
88
|
}
|
|
82
89
|
return this.cachedPlayer;
|
|
@@ -405,7 +412,7 @@ export class Game {
|
|
|
405
412
|
* @constructor
|
|
406
413
|
*/
|
|
407
414
|
static doesGXTEntryExist(entry) {
|
|
408
|
-
if (typeof entry ===
|
|
415
|
+
if (typeof entry === "number") {
|
|
409
416
|
return DoesTextLabelExist(entry.toString());
|
|
410
417
|
}
|
|
411
418
|
else {
|
|
@@ -419,7 +426,7 @@ export class Game {
|
|
|
419
426
|
* @returns The localised string if the key exists; otherwise, empty string
|
|
420
427
|
*/
|
|
421
428
|
static getGXTEntry(entry) {
|
|
422
|
-
return Game.doesGXTEntryExist(entry) ? GetLabelText(entry.toString()) :
|
|
429
|
+
return Game.doesGXTEntryExist(entry) ? GetLabelText(entry.toString()) : "";
|
|
423
430
|
}
|
|
424
431
|
/**
|
|
425
432
|
* Sets the max boundry the local player can go to before they get killed
|
|
@@ -463,6 +470,5 @@ export class Game {
|
|
|
463
470
|
RequestCollisionAtCoord(position.x, position.z, 1000.0);
|
|
464
471
|
return GetGroundZFor_3dCoord(position.x, position.y, 1000.0, false)[1];
|
|
465
472
|
}
|
|
473
|
+
static cachedPlayer;
|
|
466
474
|
}
|
|
467
|
-
// A map containing generated hashes.
|
|
468
|
-
Game.hashCache = new Map();
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import { Dimensions } from
|
|
1
|
+
import { Dimensions } from "./interfaces/Dimensions";
|
|
2
2
|
/**
|
|
3
3
|
* Class to create and manage entity models.
|
|
4
4
|
*/
|
|
5
|
-
export declare class Model {
|
|
5
|
+
export declare class Model implements Disposable {
|
|
6
6
|
/**
|
|
7
7
|
* Hash of this model.
|
|
8
8
|
*/
|
|
9
9
|
private hash;
|
|
10
|
+
private requestedModel;
|
|
10
11
|
/**
|
|
11
12
|
* Creates a model object based on the hash key or model string.
|
|
12
13
|
*
|
|
13
14
|
* @param hash A number or string of the model's hash. Example: "mp_m_freemode_01"
|
|
14
15
|
*/
|
|
15
16
|
constructor(hash: number | string);
|
|
17
|
+
[Symbol.dispose](): void;
|
|
16
18
|
/**
|
|
17
19
|
* Gets the hash of the model.
|
|
18
20
|
*
|
|
@@ -1,23 +1,33 @@
|
|
|
1
|
-
import { Game } from
|
|
2
|
-
import { VehicleHash } from
|
|
3
|
-
import { Vector3, Wait } from
|
|
1
|
+
import { Game } from "./Game";
|
|
2
|
+
import { VehicleHash } from "./hashes";
|
|
3
|
+
import { Vector3, Wait } from "./utils";
|
|
4
4
|
/**
|
|
5
5
|
* Class to create and manage entity models.
|
|
6
6
|
*/
|
|
7
7
|
export class Model {
|
|
8
|
+
/**
|
|
9
|
+
* Hash of this model.
|
|
10
|
+
*/
|
|
11
|
+
hash;
|
|
12
|
+
requestedModel = false;
|
|
8
13
|
/**
|
|
9
14
|
* Creates a model object based on the hash key or model string.
|
|
10
15
|
*
|
|
11
16
|
* @param hash A number or string of the model's hash. Example: "mp_m_freemode_01"
|
|
12
17
|
*/
|
|
13
18
|
constructor(hash) {
|
|
14
|
-
if (typeof hash ===
|
|
19
|
+
if (typeof hash === "string") {
|
|
15
20
|
this.hash = Game.generateHash(hash);
|
|
16
21
|
}
|
|
17
22
|
else {
|
|
18
23
|
this.hash = hash;
|
|
19
24
|
}
|
|
20
25
|
}
|
|
26
|
+
[Symbol.dispose]() {
|
|
27
|
+
if (this.requestedModel) {
|
|
28
|
+
this.markAsNoLongerNeeded();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
21
31
|
/**
|
|
22
32
|
* Gets the hash of the model.
|
|
23
33
|
*
|
|
@@ -131,7 +141,10 @@ export class Model {
|
|
|
131
141
|
* @returns Whether this model is a prop.
|
|
132
142
|
*/
|
|
133
143
|
get IsProp() {
|
|
134
|
-
return this.IsValid &&
|
|
144
|
+
return (this.IsValid &&
|
|
145
|
+
!this.IsPed &&
|
|
146
|
+
!this.IsVehicle &&
|
|
147
|
+
!IsWeaponValid(this.hash));
|
|
135
148
|
}
|
|
136
149
|
/**
|
|
137
150
|
* Gets if the model is a quadbike or not.
|
|
@@ -188,6 +201,7 @@ export class Model {
|
|
|
188
201
|
while (!this.IsLoaded && GetGameTimer() < timeout) {
|
|
189
202
|
await Wait(0);
|
|
190
203
|
}
|
|
204
|
+
this.requestedModel = true;
|
|
191
205
|
return this.IsLoaded;
|
|
192
206
|
}
|
|
193
207
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Ped, Vector3 } from
|
|
2
|
-
import type { BaseEntity } from
|
|
1
|
+
import type { Ped, Vector3 } from ".";
|
|
2
|
+
import type { BaseEntity } from "./models/BaseEntity";
|
|
3
3
|
export declare class NetworkedScene {
|
|
4
4
|
private scene;
|
|
5
5
|
constructor(pos: Vector3, rot: Vector3, rotationOrder: number, holdLastFrame: boolean, looped: boolean, sceneHash: number, animTime: number, animSpeed: number);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export class NetworkedScene {
|
|
2
|
+
scene;
|
|
2
3
|
constructor(pos, rot, rotationOrder, holdLastFrame, looped, sceneHash, animTime, animSpeed) {
|
|
3
4
|
this.scene = NetworkCreateSynchronisedScene(pos.x, pos.y, pos.z, rot.x, rot.y, rot.z, rotationOrder, holdLastFrame, looped, sceneHash, animTime + 0.0, animSpeed + 0.0);
|
|
4
5
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ParticleEffectAsset } from
|
|
2
|
-
import { InvertAxis } from
|
|
3
|
-
import { Color, Vector3 } from
|
|
1
|
+
import { ParticleEffectAsset } from "./";
|
|
2
|
+
import { InvertAxis } from "./enums";
|
|
3
|
+
import { Color, Vector3 } from "./utils";
|
|
4
4
|
/**
|
|
5
5
|
* UNFINISHED! Class to manage particle effects.
|
|
6
6
|
*/
|
|
@@ -1,10 +1,19 @@
|
|
|
1
|
-
import { InvertAxisFlags } from
|
|
2
|
-
import { Color, Vector3 } from
|
|
1
|
+
import { InvertAxisFlags } from "./enums";
|
|
2
|
+
import { Color, Vector3 } from "./utils";
|
|
3
3
|
// TODO: Lots of Matrix stuff through memory access
|
|
4
4
|
/**
|
|
5
5
|
* UNFINISHED! Class to manage particle effects.
|
|
6
6
|
*/
|
|
7
7
|
export class ParticleEffect {
|
|
8
|
+
asset;
|
|
9
|
+
effectName;
|
|
10
|
+
offset = new Vector3(0, 0, 0);
|
|
11
|
+
rotation = new Vector3(0, 0, 0);
|
|
12
|
+
color = Color.Transparent;
|
|
13
|
+
scale = 1.0;
|
|
14
|
+
range = 1.0;
|
|
15
|
+
invertAxis = { flags: InvertAxisFlags.None };
|
|
16
|
+
handle;
|
|
8
17
|
/**
|
|
9
18
|
* Creates a particle effect.
|
|
10
19
|
*
|
|
@@ -12,12 +21,6 @@ export class ParticleEffect {
|
|
|
12
21
|
* @param effectName Name of effect.
|
|
13
22
|
*/
|
|
14
23
|
constructor(asset, effectName) {
|
|
15
|
-
this.offset = new Vector3(0, 0, 0);
|
|
16
|
-
this.rotation = new Vector3(0, 0, 0);
|
|
17
|
-
this.color = Color.Transparent;
|
|
18
|
-
this.scale = 1.0;
|
|
19
|
-
this.range = 1.0;
|
|
20
|
-
this.invertAxis = { flags: InvertAxisFlags.None };
|
|
21
24
|
this.handle = -1;
|
|
22
25
|
this.asset = asset;
|
|
23
26
|
this.effectName = effectName;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { InvertAxis } from
|
|
2
|
-
import type { BaseEntity } from
|
|
3
|
-
import { Vector3 } from
|
|
1
|
+
import { InvertAxis } from "./enums";
|
|
2
|
+
import type { BaseEntity } from "./models/BaseEntity";
|
|
3
|
+
import { Vector3 } from "./utils";
|
|
4
4
|
/**
|
|
5
5
|
* UNFINISHED! Class that represents a particle effect asset.
|
|
6
6
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { InvertAxisFlags } from
|
|
2
|
-
import { Vector3 } from
|
|
1
|
+
import { InvertAxisFlags } from "./enums";
|
|
2
|
+
import { Vector3 } from "./utils";
|
|
3
3
|
/**
|
|
4
4
|
* UNFINISHED! Class that represents a particle effect asset.
|
|
5
5
|
*/
|
|
@@ -10,6 +10,7 @@ export class ParticleEffectAsset {
|
|
|
10
10
|
get Asset() {
|
|
11
11
|
return this.assetName;
|
|
12
12
|
}
|
|
13
|
+
assetName;
|
|
13
14
|
constructor(assetName) {
|
|
14
15
|
this.assetName = assetName;
|
|
15
16
|
}
|
|
@@ -66,7 +67,7 @@ export class ParticleEffectAsset {
|
|
|
66
67
|
* @param timeout Max time to load Particle Effect
|
|
67
68
|
*/
|
|
68
69
|
request(timeout) {
|
|
69
|
-
return new Promise(resolve => {
|
|
70
|
+
return new Promise((resolve) => {
|
|
70
71
|
if (!this.IsLoaded) {
|
|
71
72
|
RequestNamedPtfxAsset(this.assetName);
|
|
72
73
|
const start = GetGameTimer();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { MaterialHash } from
|
|
2
|
-
import { Ped, Prop, Vehicle } from
|
|
3
|
-
import { Vector3 } from
|
|
1
|
+
import { MaterialHash } from "./hashes";
|
|
2
|
+
import { Ped, Prop, Vehicle } from "./models";
|
|
3
|
+
import { Vector3 } from "./utils";
|
|
4
4
|
/**
|
|
5
5
|
* Class that represents the result of a raycast.
|
|
6
6
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ShapeTestStatus } from
|
|
2
|
-
import { Game } from
|
|
3
|
-
import { Delay, Vector3 } from
|
|
1
|
+
import { ShapeTestStatus } from "./enums/RaycastEnums";
|
|
2
|
+
import { Game } from "./Game";
|
|
3
|
+
import { Delay, Vector3 } from "./utils";
|
|
4
4
|
/**
|
|
5
5
|
* Class that represents the result of a raycast.
|
|
6
6
|
*/
|
|
@@ -74,6 +74,13 @@ class RaycastResult {
|
|
|
74
74
|
this.entityHandleArg = Game.entityFromHandle(entityHit);
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
+
handle;
|
|
78
|
+
hitPositionArg;
|
|
79
|
+
hitSomethingArg;
|
|
80
|
+
entityHandleArg;
|
|
81
|
+
surfaceNormalArg;
|
|
82
|
+
materialArg;
|
|
83
|
+
result;
|
|
77
84
|
/**
|
|
78
85
|
* Create a RaycastResult object that gets the results from a StartShapeTestRay()
|
|
79
86
|
*
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
* Class to create and manage a relationship group. Useful to manage behavior between Peds.
|
|
3
3
|
*/
|
|
4
4
|
export class RelationshipGroup {
|
|
5
|
+
/**
|
|
6
|
+
* The hash of the relationship group
|
|
7
|
+
*/
|
|
8
|
+
hash;
|
|
5
9
|
/**
|
|
6
10
|
* Create a relationship group. Optionally pass a group hash.
|
|
7
11
|
*
|