@nativewrappers/fivem 0.0.42 → 0.0.45
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,10 +1,10 @@
|
|
|
1
|
-
import { Blip } from
|
|
2
|
-
import { ForceType } from
|
|
3
|
-
import { Model } from
|
|
4
|
-
import { Quaternion, Vector3 } from
|
|
5
|
-
import { EntityBoneCollection } from
|
|
6
|
-
import cfx from
|
|
7
|
-
import { ClassTypes } from
|
|
1
|
+
import { Blip } from "../Blip";
|
|
2
|
+
import { ForceType } from "../enums";
|
|
3
|
+
import { Model } from "../Model";
|
|
4
|
+
import { Quaternion, Vector3 } from "../utils";
|
|
5
|
+
import { EntityBoneCollection } from "./";
|
|
6
|
+
import cfx from "../cfx";
|
|
7
|
+
import { ClassTypes } from "../../common/utils/ClassTypes";
|
|
8
8
|
export class BaseEntity {
|
|
9
9
|
static fromNetworkId(networkId) {
|
|
10
10
|
return new BaseEntity(NetworkGetEntityFromNetworkId(networkId));
|
|
@@ -15,10 +15,12 @@ export class BaseEntity {
|
|
|
15
15
|
return null;
|
|
16
16
|
return new BaseEntity(entity);
|
|
17
17
|
}
|
|
18
|
+
handle;
|
|
19
|
+
bones;
|
|
20
|
+
stateBagCookies = [];
|
|
21
|
+
netId = null;
|
|
22
|
+
type = ClassTypes.Entity;
|
|
18
23
|
constructor(handle) {
|
|
19
|
-
this.stateBagCookies = [];
|
|
20
|
-
this.netId = null;
|
|
21
|
-
this.type = ClassTypes.Entity;
|
|
22
24
|
this.handle = handle;
|
|
23
25
|
if (this.IsNetworked) {
|
|
24
26
|
this.netId = this.NetworkId;
|
|
@@ -76,7 +78,7 @@ export class BaseEntity {
|
|
|
76
78
|
return this.AddStateBagChangeHandler(keyFilter, handler);
|
|
77
79
|
}
|
|
78
80
|
removeStateListener(tgtCookie) {
|
|
79
|
-
this.stateBagCookies = this.stateBagCookies.filter(cookie => {
|
|
81
|
+
this.stateBagCookies = this.stateBagCookies.filter((cookie) => {
|
|
80
82
|
const isCookie = cookie == tgtCookie;
|
|
81
83
|
if (isCookie)
|
|
82
84
|
RemoveStateBagChangeHandler(cookie);
|
|
@@ -371,21 +373,21 @@ export class BaseEntity {
|
|
|
371
373
|
}
|
|
372
374
|
// TODO: Better example
|
|
373
375
|
/**
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
376
|
+
* @example
|
|
377
|
+
* ```typescript
|
|
378
|
+
* const ply = Game.PlayerPed;
|
|
379
|
+
* const plyPos = ply.Position;
|
|
380
|
+
* const bag = await World.createProp(new Model('ba_prop_battle_bag_01b'), plyPos, true, true, true);
|
|
381
|
+
* bag.attachToBone(
|
|
382
|
+
* ply.Bones.getBone(64113),
|
|
383
|
+
* new Vector3(0.12, -0.25, 0.0),
|
|
384
|
+
* new Vector3(105.0, 50.0, 190.0)
|
|
385
|
+
* )
|
|
386
|
+
* const offset = bag.getRelativePositionOffset(plyPos);
|
|
387
|
+
* ```
|
|
388
|
+
* @param worldCoords: the offset given the world coords
|
|
389
|
+
* @returns the offset position from the entity in relative coords
|
|
390
|
+
*/
|
|
389
391
|
getOffsetInWorldCoords(offset) {
|
|
390
392
|
return Vector3.fromArray(GetOffsetFromEntityInWorldCoords(this.handle, offset.x, offset.y, offset.z));
|
|
391
393
|
}
|
|
@@ -396,14 +398,14 @@ export class BaseEntity {
|
|
|
396
398
|
return this.getOffsetInRelativeCoords(worldCoords);
|
|
397
399
|
}
|
|
398
400
|
/**
|
|
399
|
-
|
|
400
|
-
|
|
401
|
+
* @deprecated use [[getOffsetInWorldCoords]]
|
|
402
|
+
*/
|
|
401
403
|
getOffsetPosition(offset) {
|
|
402
404
|
return this.getOffsetInWorldCoords(offset);
|
|
403
405
|
}
|
|
404
406
|
attachTo(entity, position, rotation, collisions = false, unk9 = true, useSoftPinning = true, rotationOrder = 1) {
|
|
405
407
|
if (this.handle == entity.Handle) {
|
|
406
|
-
throw new Error(
|
|
408
|
+
throw new Error("You cannot attach an entity to the same entity this will result in a crash!");
|
|
407
409
|
}
|
|
408
410
|
AttachEntityToEntity(this.handle, entity.Handle, -1, position.x, position.y, position.z, rotation.x, rotation.y, rotation.z, unk9, useSoftPinning, collisions, IsEntityAPed(entity.Handle), rotationOrder, true);
|
|
409
411
|
}
|
|
@@ -422,7 +424,7 @@ export class BaseEntity {
|
|
|
422
424
|
*/
|
|
423
425
|
attachToBone(entityBone, position, rotation, collisions = false, unk9 = true, useSoftPinning = true, rotationOrder = 1) {
|
|
424
426
|
if (this.handle == entityBone.Owner.Handle) {
|
|
425
|
-
throw new Error(
|
|
427
|
+
throw new Error("You cannot attach an entity to the same entity this will result in a crash!");
|
|
426
428
|
}
|
|
427
429
|
AttachEntityToEntity(this.handle, entityBone.Owner.Handle, entityBone.Index, position.x, position.y, position.z, rotation.x, rotation.y, rotation.z, unk9, useSoftPinning, collisions, IsEntityAPed(entityBone.Owner.Handle), rotationOrder, true);
|
|
428
430
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Vector3 } from
|
|
1
|
+
import { Vector3 } from "../utils";
|
|
2
2
|
export class EntityBone {
|
|
3
3
|
get Index() {
|
|
4
4
|
return this.index;
|
|
@@ -15,10 +15,12 @@ export class EntityBone {
|
|
|
15
15
|
get IsValid() {
|
|
16
16
|
return this.owner.exists() && this.index !== -1;
|
|
17
17
|
}
|
|
18
|
+
owner;
|
|
19
|
+
index;
|
|
18
20
|
constructor(owner, boneIndex, boneName) {
|
|
19
21
|
this.owner = owner;
|
|
20
22
|
this.index = boneIndex
|
|
21
23
|
? boneIndex
|
|
22
|
-
: GetEntityBoneIndexByName(this.owner.Handle, boneName ??
|
|
24
|
+
: GetEntityBoneIndexByName(this.owner.Handle, boneName ?? "");
|
|
23
25
|
}
|
|
24
26
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { EntityBone } from
|
|
2
|
-
import type { BaseEntity } from
|
|
1
|
+
import { EntityBone } from "./";
|
|
2
|
+
import type { BaseEntity } from "./BaseEntity";
|
|
3
3
|
export declare class EntityBoneCollection {
|
|
4
4
|
protected readonly owner: BaseEntity;
|
|
5
5
|
constructor(owner: BaseEntity);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { EntityBone } from
|
|
1
|
+
import { EntityBone } from "./";
|
|
2
2
|
export class EntityBoneCollection {
|
|
3
|
+
owner;
|
|
3
4
|
constructor(owner) {
|
|
4
5
|
this.owner = owner;
|
|
5
6
|
}
|
|
@@ -7,7 +8,9 @@ export class EntityBoneCollection {
|
|
|
7
8
|
return GetEntityBoneIndexByName(this.owner.Handle, name) !== -1;
|
|
8
9
|
}
|
|
9
10
|
getBone(boneIndex, boneName) {
|
|
10
|
-
return new EntityBone(this.owner, boneIndex
|
|
11
|
+
return new EntityBone(this.owner, boneIndex
|
|
12
|
+
? boneIndex
|
|
13
|
+
: GetEntityBoneIndexByName(this.owner.Handle, boneName ?? ""));
|
|
11
14
|
}
|
|
12
15
|
get Core() {
|
|
13
16
|
return new EntityBone(this.owner, -1);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Player, Vector3 } from
|
|
2
|
-
import { DrivingStyle, FiringPattern, Gender, HelmetType, RagdollType, SpeechModifier, VehicleSeat } from
|
|
3
|
-
import { WeaponHash } from
|
|
4
|
-
import { Tasks } from
|
|
5
|
-
import { PedBoneCollection, Vehicle } from
|
|
6
|
-
import { WeaponCollection } from
|
|
7
|
-
import { ClassTypes } from
|
|
8
|
-
import { BaseEntity } from
|
|
1
|
+
import { Player, Vector3 } from "../";
|
|
2
|
+
import { DrivingStyle, FiringPattern, Gender, HelmetType, RagdollType, SpeechModifier, VehicleSeat } from "../enums";
|
|
3
|
+
import { WeaponHash } from "../hashes";
|
|
4
|
+
import { Tasks } from "../Tasks";
|
|
5
|
+
import { PedBoneCollection, Vehicle } from "./";
|
|
6
|
+
import { WeaponCollection } from "../weapon/WeaponCollection";
|
|
7
|
+
import { ClassTypes } from "../../common/utils/ClassTypes";
|
|
8
|
+
import { BaseEntity } from "./BaseEntity";
|
|
9
9
|
export declare class Ped extends BaseEntity {
|
|
10
10
|
static exists(ped: Ped): boolean;
|
|
11
11
|
static fromHandle(handle: number): Ped | null;
|
|
@@ -193,7 +193,18 @@ export declare class Ped extends BaseEntity {
|
|
|
193
193
|
setHeadOverlayOpacity(overlayId: number, opacity: number): void;
|
|
194
194
|
setHeadOverlayColor(overlayId: number, color: number): void;
|
|
195
195
|
setHeadBlend(shapeFirstID: number, shapeSecondID: number, shapeThirdID: number, skinFirstID: number, skinSecondID: number, skinThirdID: number, shapeMix: number, skinMix: number, thirdMix: number, isParent?: boolean): void;
|
|
196
|
-
getHeadBlend(): [
|
|
196
|
+
getHeadBlend(): [
|
|
197
|
+
number,
|
|
198
|
+
number,
|
|
199
|
+
number,
|
|
200
|
+
number,
|
|
201
|
+
number,
|
|
202
|
+
number,
|
|
203
|
+
number,
|
|
204
|
+
number,
|
|
205
|
+
number,
|
|
206
|
+
boolean
|
|
207
|
+
] | void;
|
|
197
208
|
finalizeHeadBlend(): void;
|
|
198
209
|
hasHeadBlendFinished(): boolean;
|
|
199
210
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Player, Vector3 } from
|
|
2
|
-
import { Gender, RagdollType, SpeechModifier, VehicleSeat, } from
|
|
3
|
-
import { Tasks } from
|
|
4
|
-
import { PedBoneCollection, Vehicle } from
|
|
5
|
-
import { WeaponCollection } from
|
|
6
|
-
import { ClassTypes } from
|
|
7
|
-
import { BaseEntity } from
|
|
1
|
+
import { Player, Vector3 } from "../";
|
|
2
|
+
import { Gender, RagdollType, SpeechModifier, VehicleSeat, } from "../enums";
|
|
3
|
+
import { Tasks } from "../Tasks";
|
|
4
|
+
import { PedBoneCollection, Vehicle } from "./";
|
|
5
|
+
import { WeaponCollection } from "../weapon/WeaponCollection";
|
|
6
|
+
import { ClassTypes } from "../../common/utils/ClassTypes";
|
|
7
|
+
import { BaseEntity } from "./BaseEntity";
|
|
8
8
|
export class Ped extends BaseEntity {
|
|
9
9
|
static exists(ped) {
|
|
10
|
-
return typeof ped !==
|
|
10
|
+
return typeof ped !== "undefined" && ped.exists();
|
|
11
11
|
}
|
|
12
12
|
static fromHandle(handle) {
|
|
13
13
|
return new Ped(handle);
|
|
@@ -18,9 +18,51 @@ export class Ped extends BaseEntity {
|
|
|
18
18
|
}
|
|
19
19
|
return new Ped(NetworkGetEntityFromNetworkId(networkId));
|
|
20
20
|
}
|
|
21
|
+
type = ClassTypes.Ped;
|
|
22
|
+
pedBones;
|
|
23
|
+
weapons;
|
|
24
|
+
static speechModifierNames = [
|
|
25
|
+
"SPEECH_PARAMS_STANDARD",
|
|
26
|
+
"SPEECH_PARAMS_ALLOW_REPEAT",
|
|
27
|
+
"SPEECH_PARAMS_BEAT",
|
|
28
|
+
"SPEECH_PARAMS_FORCE",
|
|
29
|
+
"SPEECH_PARAMS_FORCE_FRONTEND",
|
|
30
|
+
"SPEECH_PARAMS_FORCE_NO_REPEAT_FRONTEND",
|
|
31
|
+
"SPEECH_PARAMS_FORCE_NORMAL",
|
|
32
|
+
"SPEECH_PARAMS_FORCE_NORMAL_CLEAR",
|
|
33
|
+
"SPEECH_PARAMS_FORCE_NORMAL_CRITICAL",
|
|
34
|
+
"SPEECH_PARAMS_FORCE_SHOUTED",
|
|
35
|
+
"SPEECH_PARAMS_FORCE_SHOUTED_CLEAR",
|
|
36
|
+
"SPEECH_PARAMS_FORCE_SHOUTED_CRITICAL",
|
|
37
|
+
"SPEECH_PARAMS_FORCE_PRELOAD_ONLY",
|
|
38
|
+
"SPEECH_PARAMS_MEGAPHONE",
|
|
39
|
+
"SPEECH_PARAMS_HELI",
|
|
40
|
+
"SPEECH_PARAMS_FORCE_MEGAPHONE",
|
|
41
|
+
"SPEECH_PARAMS_FORCE_HELI",
|
|
42
|
+
"SPEECH_PARAMS_INTERRUPT",
|
|
43
|
+
"SPEECH_PARAMS_INTERRUPT_SHOUTED",
|
|
44
|
+
"SPEECH_PARAMS_INTERRUPT_SHOUTED_CLEAR",
|
|
45
|
+
"SPEECH_PARAMS_INTERRUPT_SHOUTED_CRITICAL",
|
|
46
|
+
"SPEECH_PARAMS_INTERRUPT_NO_FORCE",
|
|
47
|
+
"SPEECH_PARAMS_INTERRUPT_FRONTEND",
|
|
48
|
+
"SPEECH_PARAMS_INTERRUPT_NO_FORCE_FRONTEND",
|
|
49
|
+
"SPEECH_PARAMS_ADD_BLIP",
|
|
50
|
+
"SPEECH_PARAMS_ADD_BLIP_ALLOW_REPEAT",
|
|
51
|
+
"SPEECH_PARAMS_ADD_BLIP_FORCE",
|
|
52
|
+
"SPEECH_PARAMS_ADD_BLIP_SHOUTED",
|
|
53
|
+
"SPEECH_PARAMS_ADD_BLIP_SHOUTED_FORCE",
|
|
54
|
+
"SPEECH_PARAMS_ADD_BLIP_INTERRUPT",
|
|
55
|
+
"SPEECH_PARAMS_ADD_BLIP_INTERRUPT_FORCE",
|
|
56
|
+
"SPEECH_PARAMS_FORCE_PRELOAD_ONLY_SHOUTED",
|
|
57
|
+
"SPEECH_PARAMS_FORCE_PRELOAD_ONLY_SHOUTED_CLEAR",
|
|
58
|
+
"SPEECH_PARAMS_FORCE_PRELOAD_ONLY_SHOUTED_CRITICAL",
|
|
59
|
+
"SPEECH_PARAMS_SHOUTED",
|
|
60
|
+
"SPEECH_PARAMS_SHOUTED_CLEAR",
|
|
61
|
+
"SPEECH_PARAMS_SHOUTED_CRITICAL",
|
|
62
|
+
];
|
|
63
|
+
tasks;
|
|
21
64
|
constructor(handle) {
|
|
22
65
|
super(handle);
|
|
23
|
-
this.type = ClassTypes.Ped;
|
|
24
66
|
}
|
|
25
67
|
get Player() {
|
|
26
68
|
return new Player(NetworkGetPlayerIndexFromPed(this.handle));
|
|
@@ -401,9 +443,10 @@ export class Ped extends BaseEntity {
|
|
|
401
443
|
leaveGroup() {
|
|
402
444
|
RemovePedFromGroup(this.handle);
|
|
403
445
|
}
|
|
404
|
-
playAmbientSpeed(speechName, voiceName =
|
|
405
|
-
if (Number(modifier) >= 0 &&
|
|
406
|
-
|
|
446
|
+
playAmbientSpeed(speechName, voiceName = "", modifier = SpeechModifier.Standard) {
|
|
447
|
+
if (Number(modifier) >= 0 &&
|
|
448
|
+
Number(modifier) < Ped.speechModifierNames.length) {
|
|
449
|
+
if (voiceName === "") {
|
|
407
450
|
PlayAmbientSpeech1(this.handle, speechName, Ped.speechModifierNames[Number(modifier)]);
|
|
408
451
|
}
|
|
409
452
|
else {
|
|
@@ -411,7 +454,7 @@ export class Ped extends BaseEntity {
|
|
|
411
454
|
}
|
|
412
455
|
}
|
|
413
456
|
else {
|
|
414
|
-
throw new RangeError(
|
|
457
|
+
throw new RangeError("modifier");
|
|
415
458
|
}
|
|
416
459
|
}
|
|
417
460
|
applyDamage(damageAmount, armorFirst = true) {
|
|
@@ -586,11 +629,17 @@ export class Ped extends BaseEntity {
|
|
|
586
629
|
this.setHeadOverlay(overlayId, value, opacity);
|
|
587
630
|
}
|
|
588
631
|
getHeadOverlay(overlayId) {
|
|
589
|
-
const [ret, overlayValue, colourType, firstColour, secondColour, overlayOpacity] = GetPedHeadOverlayData(this.handle, overlayId);
|
|
632
|
+
const [ret, overlayValue, colourType, firstColour, secondColour, overlayOpacity,] = GetPedHeadOverlayData(this.handle, overlayId);
|
|
590
633
|
if (!ret) {
|
|
591
634
|
return undefined;
|
|
592
635
|
}
|
|
593
|
-
return [
|
|
636
|
+
return [
|
|
637
|
+
overlayValue,
|
|
638
|
+
colourType,
|
|
639
|
+
firstColour,
|
|
640
|
+
secondColour,
|
|
641
|
+
overlayOpacity,
|
|
642
|
+
];
|
|
594
643
|
}
|
|
595
644
|
setHeadOverlay(overlayId, index, opacity) {
|
|
596
645
|
SetPedHeadOverlay(this.handle, overlayId, index, opacity);
|
|
@@ -616,11 +665,11 @@ export class Ped extends BaseEntity {
|
|
|
616
665
|
}
|
|
617
666
|
getHeadBlend() {
|
|
618
667
|
const buffer = new ArrayBuffer(80);
|
|
619
|
-
if (!Citizen.invokeNative(
|
|
668
|
+
if (!Citizen.invokeNative("0x2746BD9D88C5C5D0", this.handle, new Float32Array(buffer))) {
|
|
620
669
|
return undefined;
|
|
621
670
|
}
|
|
622
671
|
const { 0: shapeFirstId, 2: shapeSecondId, 4: shapeThirdId, 6: skinFirstId, 8: skinSecondId, 10: skinThirdId, 18: isParent, } = new Uint32Array(buffer);
|
|
623
|
-
const { 0: shapeMix, 2: skinMix, 4: thirdMix } = new Float32Array(buffer, 48);
|
|
672
|
+
const { 0: shapeMix, 2: skinMix, 4: thirdMix, } = new Float32Array(buffer, 48);
|
|
624
673
|
return [
|
|
625
674
|
shapeFirstId,
|
|
626
675
|
shapeSecondId,
|
|
@@ -641,42 +690,3 @@ export class Ped extends BaseEntity {
|
|
|
641
690
|
return HasPedHeadBlendFinished(this.handle);
|
|
642
691
|
}
|
|
643
692
|
}
|
|
644
|
-
Ped.speechModifierNames = [
|
|
645
|
-
'SPEECH_PARAMS_STANDARD',
|
|
646
|
-
'SPEECH_PARAMS_ALLOW_REPEAT',
|
|
647
|
-
'SPEECH_PARAMS_BEAT',
|
|
648
|
-
'SPEECH_PARAMS_FORCE',
|
|
649
|
-
'SPEECH_PARAMS_FORCE_FRONTEND',
|
|
650
|
-
'SPEECH_PARAMS_FORCE_NO_REPEAT_FRONTEND',
|
|
651
|
-
'SPEECH_PARAMS_FORCE_NORMAL',
|
|
652
|
-
'SPEECH_PARAMS_FORCE_NORMAL_CLEAR',
|
|
653
|
-
'SPEECH_PARAMS_FORCE_NORMAL_CRITICAL',
|
|
654
|
-
'SPEECH_PARAMS_FORCE_SHOUTED',
|
|
655
|
-
'SPEECH_PARAMS_FORCE_SHOUTED_CLEAR',
|
|
656
|
-
'SPEECH_PARAMS_FORCE_SHOUTED_CRITICAL',
|
|
657
|
-
'SPEECH_PARAMS_FORCE_PRELOAD_ONLY',
|
|
658
|
-
'SPEECH_PARAMS_MEGAPHONE',
|
|
659
|
-
'SPEECH_PARAMS_HELI',
|
|
660
|
-
'SPEECH_PARAMS_FORCE_MEGAPHONE',
|
|
661
|
-
'SPEECH_PARAMS_FORCE_HELI',
|
|
662
|
-
'SPEECH_PARAMS_INTERRUPT',
|
|
663
|
-
'SPEECH_PARAMS_INTERRUPT_SHOUTED',
|
|
664
|
-
'SPEECH_PARAMS_INTERRUPT_SHOUTED_CLEAR',
|
|
665
|
-
'SPEECH_PARAMS_INTERRUPT_SHOUTED_CRITICAL',
|
|
666
|
-
'SPEECH_PARAMS_INTERRUPT_NO_FORCE',
|
|
667
|
-
'SPEECH_PARAMS_INTERRUPT_FRONTEND',
|
|
668
|
-
'SPEECH_PARAMS_INTERRUPT_NO_FORCE_FRONTEND',
|
|
669
|
-
'SPEECH_PARAMS_ADD_BLIP',
|
|
670
|
-
'SPEECH_PARAMS_ADD_BLIP_ALLOW_REPEAT',
|
|
671
|
-
'SPEECH_PARAMS_ADD_BLIP_FORCE',
|
|
672
|
-
'SPEECH_PARAMS_ADD_BLIP_SHOUTED',
|
|
673
|
-
'SPEECH_PARAMS_ADD_BLIP_SHOUTED_FORCE',
|
|
674
|
-
'SPEECH_PARAMS_ADD_BLIP_INTERRUPT',
|
|
675
|
-
'SPEECH_PARAMS_ADD_BLIP_INTERRUPT_FORCE',
|
|
676
|
-
'SPEECH_PARAMS_FORCE_PRELOAD_ONLY_SHOUTED',
|
|
677
|
-
'SPEECH_PARAMS_FORCE_PRELOAD_ONLY_SHOUTED_CLEAR',
|
|
678
|
-
'SPEECH_PARAMS_FORCE_PRELOAD_ONLY_SHOUTED_CRITICAL',
|
|
679
|
-
'SPEECH_PARAMS_SHOUTED',
|
|
680
|
-
'SPEECH_PARAMS_SHOUTED_CLEAR',
|
|
681
|
-
'SPEECH_PARAMS_SHOUTED_CRITICAL',
|
|
682
|
-
];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EntityBoneCollection, PedBone } from
|
|
1
|
+
import { EntityBoneCollection, PedBone } from "./";
|
|
2
2
|
export class PedBoneCollection extends EntityBoneCollection {
|
|
3
3
|
constructor(owner) {
|
|
4
4
|
super(owner);
|
|
@@ -14,6 +14,8 @@ export class PedBoneCollection extends EntityBoneCollection {
|
|
|
14
14
|
ClearPedLastDamageBone(this.owner.Handle);
|
|
15
15
|
}
|
|
16
16
|
getBone(boneIndex, boneName) {
|
|
17
|
-
return new PedBone(this.owner, boneIndex
|
|
17
|
+
return new PedBone(this.owner, boneIndex
|
|
18
|
+
? boneIndex
|
|
19
|
+
: GetEntityBoneIndexByName(this.owner.Handle, boneName ?? ""));
|
|
18
20
|
}
|
|
19
21
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Model, Color } from
|
|
2
|
-
import { StateBagChangeHandler } from
|
|
3
|
-
import { BaseEntity, Ped } from
|
|
1
|
+
import { Model, Color } from "..";
|
|
2
|
+
import { StateBagChangeHandler } from "../cfx";
|
|
3
|
+
import { BaseEntity, Ped } from "./";
|
|
4
4
|
export declare class Player {
|
|
5
5
|
private handle;
|
|
6
6
|
private ped?;
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import { Model, Color } from
|
|
2
|
-
import cfx from
|
|
3
|
-
import { ClassTypes } from
|
|
4
|
-
import { BaseEntity, Ped } from
|
|
1
|
+
import { Model, Color } from "..";
|
|
2
|
+
import cfx from "../cfx";
|
|
3
|
+
import { ClassTypes } from "../../common/utils/ClassTypes";
|
|
4
|
+
import { BaseEntity, Ped } from "./";
|
|
5
5
|
export class Player {
|
|
6
|
+
handle;
|
|
7
|
+
ped;
|
|
8
|
+
pvp = false;
|
|
9
|
+
stateBagCookies = [];
|
|
10
|
+
source;
|
|
11
|
+
type = ClassTypes.Player;
|
|
6
12
|
static fromPedHandle(handle) {
|
|
7
13
|
return new Player(NetworkGetPlayerIndexFromPed(handle));
|
|
8
14
|
}
|
|
@@ -13,9 +19,6 @@ export class Player {
|
|
|
13
19
|
* @param handle the player handle, or if on the server, their source.
|
|
14
20
|
*/
|
|
15
21
|
constructor(handle = -1) {
|
|
16
|
-
this.pvp = false;
|
|
17
|
-
this.stateBagCookies = [];
|
|
18
|
-
this.type = ClassTypes.Player;
|
|
19
22
|
this.handle = handle;
|
|
20
23
|
this.source = this.ServerId;
|
|
21
24
|
if (!IsDuplicityVersion()) {
|
|
@@ -33,7 +36,7 @@ export class Player {
|
|
|
33
36
|
}
|
|
34
37
|
get Ped() {
|
|
35
38
|
const handle = GetPlayerPed(this.handle);
|
|
36
|
-
if (typeof this.ped ===
|
|
39
|
+
if (typeof this.ped === "undefined" || handle !== this.ped.Handle) {
|
|
37
40
|
this.ped = new Ped(handle);
|
|
38
41
|
}
|
|
39
42
|
return this.ped;
|
|
@@ -64,7 +67,7 @@ export class Player {
|
|
|
64
67
|
return this.AddStateBagChangeHandler(keyFilter, handler);
|
|
65
68
|
}
|
|
66
69
|
removeStateListener(tgtCookie) {
|
|
67
|
-
this.stateBagCookies = this.stateBagCookies.filter(cookie => {
|
|
70
|
+
this.stateBagCookies = this.stateBagCookies.filter((cookie) => {
|
|
68
71
|
const isCookie = cookie == tgtCookie;
|
|
69
72
|
if (isCookie)
|
|
70
73
|
RemoveStateBagChangeHandler(cookie);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ClassTypes } from
|
|
2
|
-
import { BaseEntity } from
|
|
1
|
+
import { ClassTypes } from "../../common/utils/ClassTypes";
|
|
2
|
+
import { BaseEntity } from "./BaseEntity";
|
|
3
3
|
export declare class Prop extends BaseEntity {
|
|
4
4
|
static exists(prop: Prop): boolean;
|
|
5
5
|
static fromHandle(handle: number): Prop | null;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ClassTypes } from
|
|
2
|
-
import { BaseEntity } from
|
|
1
|
+
import { ClassTypes } from "../../common/utils/ClassTypes";
|
|
2
|
+
import { BaseEntity } from "./BaseEntity";
|
|
3
3
|
export class Prop extends BaseEntity {
|
|
4
4
|
static exists(prop) {
|
|
5
|
-
return typeof prop !==
|
|
5
|
+
return typeof prop !== "undefined" && prop.exists();
|
|
6
6
|
}
|
|
7
7
|
static fromHandle(handle) {
|
|
8
8
|
return new Prop(handle);
|
|
@@ -13,9 +13,9 @@ export class Prop extends BaseEntity {
|
|
|
13
13
|
}
|
|
14
14
|
return new Prop(NetworkGetEntityFromNetworkId(networkId));
|
|
15
15
|
}
|
|
16
|
+
type = ClassTypes.Prop;
|
|
16
17
|
constructor(handle) {
|
|
17
18
|
super(handle);
|
|
18
|
-
this.type = ClassTypes.Prop;
|
|
19
19
|
}
|
|
20
20
|
exists() {
|
|
21
21
|
return super.exists() && GetEntityType(this.handle) === 3;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Ped, VehicleDoorCollection, VehicleModCollection, VehicleWheelCollection, VehicleWindowCollection } from
|
|
2
|
-
import { RadioStation, VehicleClass, VehicleLandingGearState, VehicleLockStatus, VehicleRoofState, VehicleSeat } from
|
|
3
|
-
import { Model } from
|
|
4
|
-
import { Vector3 } from
|
|
5
|
-
import { ClassTypes } from
|
|
6
|
-
import { BaseEntity } from
|
|
1
|
+
import { Ped, VehicleDoorCollection, VehicleModCollection, VehicleWheelCollection, VehicleWindowCollection } from "./";
|
|
2
|
+
import { RadioStation, VehicleClass, VehicleLandingGearState, VehicleLockStatus, VehicleRoofState, VehicleSeat } from "../enums";
|
|
3
|
+
import { Model } from "../Model";
|
|
4
|
+
import { Vector3 } from "../utils";
|
|
5
|
+
import { ClassTypes } from "../../common/utils/ClassTypes";
|
|
6
|
+
import { BaseEntity } from "./BaseEntity";
|
|
7
7
|
export declare class Vehicle extends BaseEntity {
|
|
8
8
|
static getModelDisplayName(vehicleModel: Model): string;
|
|
9
9
|
static getModelClass(vehicleModel: Model): VehicleClass;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Ped, VehicleDoorCollection, VehicleModCollection, VehicleWheelCollection, VehicleWindowCollection, } from
|
|
2
|
-
import { VehicleRoofState, VehicleSeat, } from
|
|
3
|
-
import { Game } from
|
|
4
|
-
import { Vector3 } from
|
|
5
|
-
import { ClassTypes } from
|
|
6
|
-
import { BaseEntity } from
|
|
1
|
+
import { Ped, VehicleDoorCollection, VehicleModCollection, VehicleWheelCollection, VehicleWindowCollection, } from "./";
|
|
2
|
+
import { VehicleRoofState, VehicleSeat, } from "../enums";
|
|
3
|
+
import { Game } from "../Game";
|
|
4
|
+
import { Vector3 } from "../utils";
|
|
5
|
+
import { ClassTypes } from "../../common/utils/ClassTypes";
|
|
6
|
+
import { BaseEntity } from "./BaseEntity";
|
|
7
7
|
export class Vehicle extends BaseEntity {
|
|
8
8
|
static getModelDisplayName(vehicleModel) {
|
|
9
9
|
return GetDisplayNameFromVehicleModel(vehicleModel.Hash);
|
|
@@ -15,7 +15,7 @@ export class Vehicle extends BaseEntity {
|
|
|
15
15
|
return `VEH_CLASS_${vehicleClass}`;
|
|
16
16
|
}
|
|
17
17
|
static exists(vehicle) {
|
|
18
|
-
return typeof vehicle !==
|
|
18
|
+
return typeof vehicle !== "undefined" && vehicle.exists();
|
|
19
19
|
}
|
|
20
20
|
static fromHandle(handle) {
|
|
21
21
|
if (!DoesEntityExist(handle))
|
|
@@ -28,9 +28,13 @@ export class Vehicle extends BaseEntity {
|
|
|
28
28
|
}
|
|
29
29
|
return new Vehicle(NetworkGetEntityFromNetworkId(networkId));
|
|
30
30
|
}
|
|
31
|
+
_doors;
|
|
32
|
+
_mods;
|
|
33
|
+
_wheels;
|
|
34
|
+
_windows;
|
|
35
|
+
type = ClassTypes.Vehicle;
|
|
31
36
|
constructor(handle) {
|
|
32
37
|
super(handle);
|
|
33
|
-
this.type = ClassTypes.Vehicle;
|
|
34
38
|
}
|
|
35
39
|
exists() {
|
|
36
40
|
return super.exists() && GetEntityType(this.handle) === 2;
|
|
@@ -186,7 +190,7 @@ export class Vehicle extends BaseEntity {
|
|
|
186
190
|
set HasMutedSirens(value) {
|
|
187
191
|
SetVehicleHasMutedSirens(this.handle, value);
|
|
188
192
|
}
|
|
189
|
-
soundHorn(duration, mode = Game.generateHash(
|
|
193
|
+
soundHorn(duration, mode = Game.generateHash("HELDDOWN")) {
|
|
190
194
|
StartVehicleHorn(this.handle, duration, mode, false);
|
|
191
195
|
}
|
|
192
196
|
get IsWanted() {
|
|
@@ -456,7 +460,9 @@ export class Vehicle extends BaseEntity {
|
|
|
456
460
|
return DoesExtraExist(this.handle, extra);
|
|
457
461
|
}
|
|
458
462
|
isExtraOn(extra) {
|
|
459
|
-
return this.extraExists(extra)
|
|
463
|
+
return this.extraExists(extra)
|
|
464
|
+
? IsVehicleExtraTurnedOn(this.handle, extra)
|
|
465
|
+
: false;
|
|
460
466
|
}
|
|
461
467
|
toggleExtra(extra, toggle) {
|
|
462
468
|
if (this.extraExists(extra)) {
|
|
@@ -504,7 +510,7 @@ export class Vehicle extends BaseEntity {
|
|
|
504
510
|
}
|
|
505
511
|
get HasBombBay() {
|
|
506
512
|
return this.Bones
|
|
507
|
-
? this.Bones.hasBone(
|
|
513
|
+
? this.Bones.hasBone("door_hatch_1") && this.Bones.hasBone("door_hatch_r")
|
|
508
514
|
: false;
|
|
509
515
|
}
|
|
510
516
|
openBombBay() {
|
|
@@ -553,18 +559,18 @@ export class Vehicle extends BaseEntity {
|
|
|
553
559
|
SetNetworkVehicleRespotTimer(this.NetworkId, time);
|
|
554
560
|
}
|
|
555
561
|
getHandlingFloat(fieldName) {
|
|
556
|
-
return GetVehicleHandlingFloat(this.handle,
|
|
562
|
+
return GetVehicleHandlingFloat(this.handle, "CHandlingData", fieldName);
|
|
557
563
|
}
|
|
558
564
|
setHandlingFloat(fieldName, value) {
|
|
559
|
-
SetVehicleHandlingFloat(this.handle,
|
|
565
|
+
SetVehicleHandlingFloat(this.handle, "CHandlingData", fieldName, value);
|
|
560
566
|
}
|
|
561
567
|
getHandlingInt(fieldName) {
|
|
562
|
-
return GetVehicleHandlingInt(this.handle,
|
|
568
|
+
return GetVehicleHandlingInt(this.handle, "CHandlingData", fieldName);
|
|
563
569
|
}
|
|
564
570
|
setHandlingInt(fieldName, value) {
|
|
565
|
-
SetVehicleHandlingInt(this.handle,
|
|
571
|
+
SetVehicleHandlingInt(this.handle, "CHandlingData", fieldName, Math.ceil(value));
|
|
566
572
|
}
|
|
567
573
|
getHandlingVector(fieldName) {
|
|
568
|
-
return Vector3.fromArray(GetVehicleHandlingVector(this.handle,
|
|
574
|
+
return Vector3.fromArray(GetVehicleHandlingVector(this.handle, "CHandlingData", fieldName));
|
|
569
575
|
}
|
|
570
576
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Vehicle } from
|
|
2
|
-
import { VehicleDoorIndex } from
|
|
3
|
-
import { VehicleDoor } from
|
|
1
|
+
import { Vehicle } from "./Vehicle";
|
|
2
|
+
import { VehicleDoorIndex } from "../enums";
|
|
3
|
+
import { VehicleDoor } from "./VehicleDoor";
|
|
4
4
|
export declare class VehicleDoorCollection {
|
|
5
5
|
private _owner;
|
|
6
6
|
private readonly _vehicleDoors;
|