@nativewrappers/fivem 0.0.1
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/LICENSE +21 -0
- package/README.md +33 -0
- package/lib/client/Audio.d.ts +17 -0
- package/lib/client/Audio.js +92 -0
- package/lib/client/Blip.d.ts +39 -0
- package/lib/client/Blip.js +104 -0
- package/lib/client/Camera.d.ts +46 -0
- package/lib/client/Camera.js +161 -0
- package/lib/client/Checkpoint.d.ts +18 -0
- package/lib/client/Checkpoint.js +42 -0
- package/lib/client/Events.d.ts +11 -0
- package/lib/client/Events.js +73 -0
- package/lib/client/Game.d.ts +283 -0
- package/lib/client/Game.js +451 -0
- package/lib/client/GameplayCamera.d.ts +102 -0
- package/lib/client/GameplayCamera.js +141 -0
- package/lib/client/Model.d.ts +134 -0
- package/lib/client/Model.js +198 -0
- package/lib/client/NetworkedScene.d.ts +10 -0
- package/lib/client/NetworkedScene.js +17 -0
- package/lib/client/ParticleEffect.d.ts +80 -0
- package/lib/client/ParticleEffect.js +120 -0
- package/lib/client/ParticleEffectAsset.d.ts +54 -0
- package/lib/client/ParticleEffectAsset.js +104 -0
- package/lib/client/Pickup.d.ts +9 -0
- package/lib/client/Pickup.js +18 -0
- package/lib/client/Raycast.d.ts +49 -0
- package/lib/client/Raycast.js +70 -0
- package/lib/client/RelationshipGroup.d.ts +49 -0
- package/lib/client/RelationshipGroup.js +63 -0
- package/lib/client/Rope.d.ts +99 -0
- package/lib/client/Rope.js +125 -0
- package/lib/client/TaskSequence.d.ts +15 -0
- package/lib/client/TaskSequence.js +43 -0
- package/lib/client/Tasks.d.ts +66 -0
- package/lib/client/Tasks.js +236 -0
- package/lib/client/World.d.ts +402 -0
- package/lib/client/World.js +726 -0
- package/lib/client/cfx/StateBagChangeHandler.d.ts +3 -0
- package/lib/client/cfx/StateBagChangeHandler.js +1 -0
- package/lib/client/cfx/index.d.ts +7 -0
- package/lib/client/cfx/index.js +1 -0
- package/lib/client/enums/Alignment.d.ts +5 -0
- package/lib/client/enums/Alignment.js +6 -0
- package/lib/client/enums/AnimationFlags.d.ts +9 -0
- package/lib/client/enums/AnimationFlags.js +10 -0
- package/lib/client/enums/AudioFlag.d.ts +37 -0
- package/lib/client/enums/AudioFlag.js +38 -0
- package/lib/client/enums/BadgeStyle.d.ts +182 -0
- package/lib/client/enums/BadgeStyle.js +183 -0
- package/lib/client/enums/Blip.d.ts +223 -0
- package/lib/client/enums/Blip.js +225 -0
- package/lib/client/enums/Bone.d.ts +101 -0
- package/lib/client/enums/Bone.js +103 -0
- package/lib/client/enums/CameraShake.d.ts +13 -0
- package/lib/client/enums/CameraShake.js +14 -0
- package/lib/client/enums/CameraTypes.d.ts +7 -0
- package/lib/client/enums/CameraTypes.js +8 -0
- package/lib/client/enums/CheckboxStyle.d.ts +4 -0
- package/lib/client/enums/CheckboxStyle.js +5 -0
- package/lib/client/enums/Checkpoint.d.ts +62 -0
- package/lib/client/enums/Checkpoint.js +67 -0
- package/lib/client/enums/ClassTypes.d.ts +11 -0
- package/lib/client/enums/ClassTypes.js +12 -0
- package/lib/client/enums/CloudHat.d.ts +26 -0
- package/lib/client/enums/CloudHat.js +27 -0
- package/lib/client/enums/Control.d.ts +360 -0
- package/lib/client/enums/Control.js +361 -0
- package/lib/client/enums/CursorSprite.d.ts +14 -0
- package/lib/client/enums/CursorSprite.js +15 -0
- package/lib/client/enums/Driving.d.ts +32 -0
- package/lib/client/enums/Driving.js +34 -0
- package/lib/client/enums/ExplosionType.d.ts +44 -0
- package/lib/client/enums/ExplosionType.js +45 -0
- package/lib/client/enums/FiringPattern.d.ts +19 -0
- package/lib/client/enums/FiringPattern.js +20 -0
- package/lib/client/enums/Font.d.ts +7 -0
- package/lib/client/enums/Font.js +8 -0
- package/lib/client/enums/ForceType.d.ts +8 -0
- package/lib/client/enums/ForceType.js +9 -0
- package/lib/client/enums/Gender.d.ts +4 -0
- package/lib/client/enums/Gender.js +5 -0
- package/lib/client/enums/HelmetType.d.ts +5 -0
- package/lib/client/enums/HelmetType.js +6 -0
- package/lib/client/enums/HudColor.d.ts +183 -0
- package/lib/client/enums/HudColor.js +184 -0
- package/lib/client/enums/HudComponent.d.ts +53 -0
- package/lib/client/enums/HudComponent.js +54 -0
- package/lib/client/enums/InputMode.d.ts +4 -0
- package/lib/client/enums/InputMode.js +5 -0
- package/lib/client/enums/IntersectOptions.d.ts +15 -0
- package/lib/client/enums/IntersectOptions.js +16 -0
- package/lib/client/enums/InvertAxis.d.ts +9 -0
- package/lib/client/enums/InvertAxis.js +7 -0
- package/lib/client/enums/Language.d.ts +14 -0
- package/lib/client/enums/Language.js +15 -0
- package/lib/client/enums/LeaveVehicleFlags.d.ts +10 -0
- package/lib/client/enums/LeaveVehicleFlags.js +11 -0
- package/lib/client/enums/LoadingSpinnerType.d.ts +7 -0
- package/lib/client/enums/LoadingSpinnerType.js +8 -0
- package/lib/client/enums/MarkerType.d.ts +49 -0
- package/lib/client/enums/MarkerType.js +50 -0
- package/lib/client/enums/MenuAlignment.d.ts +4 -0
- package/lib/client/enums/MenuAlignment.js +5 -0
- package/lib/client/enums/NotificationType.d.ts +10 -0
- package/lib/client/enums/NotificationType.js +11 -0
- package/lib/client/enums/Parachute.d.ts +13 -0
- package/lib/client/enums/Parachute.js +15 -0
- package/lib/client/enums/PickupType.d.ts +73 -0
- package/lib/client/enums/PickupType.js +74 -0
- package/lib/client/enums/RadioStation.d.ts +24 -0
- package/lib/client/enums/RadioStation.js +25 -0
- package/lib/client/enums/RagdollType.d.ts +6 -0
- package/lib/client/enums/RagdollType.js +7 -0
- package/lib/client/enums/Relationship.d.ts +9 -0
- package/lib/client/enums/Relationship.js +10 -0
- package/lib/client/enums/RopeType.d.ts +5 -0
- package/lib/client/enums/RopeType.js +6 -0
- package/lib/client/enums/ScreenEffect.d.ts +83 -0
- package/lib/client/enums/ScreenEffect.js +84 -0
- package/lib/client/enums/SpeechModifier.d.ts +39 -0
- package/lib/client/enums/SpeechModifier.js +40 -0
- package/lib/client/enums/Vehicle.d.ts +358 -0
- package/lib/client/enums/Vehicle.js +376 -0
- package/lib/client/enums/Weather.d.ts +21 -0
- package/lib/client/enums/Weather.js +22 -0
- package/lib/client/enums/ZoneID.d.ts +94 -0
- package/lib/client/enums/ZoneID.js +95 -0
- package/lib/client/enums/index.d.ts +42 -0
- package/lib/client/enums/index.js +42 -0
- package/lib/client/hashes/MaterialHash.d.ts +216 -0
- package/lib/client/hashes/MaterialHash.js +217 -0
- package/lib/client/hashes/PedHash.d.ts +724 -0
- package/lib/client/hashes/PedHash.js +725 -0
- package/lib/client/hashes/VehicleHash.d.ts +522 -0
- package/lib/client/hashes/VehicleHash.js +523 -0
- package/lib/client/hashes/WeaponHash.d.ts +147 -0
- package/lib/client/hashes/WeaponHash.js +161 -0
- package/lib/client/hashes/WeatherTypeHash.d.ts +21 -0
- package/lib/client/hashes/WeatherTypeHash.js +22 -0
- package/lib/client/hashes/index.d.ts +5 -0
- package/lib/client/hashes/index.js +5 -0
- package/lib/client/index.d.ts +24 -0
- package/lib/client/index.js +25 -0
- package/lib/client/interfaces/Dimensions.d.ts +5 -0
- package/lib/client/interfaces/Dimensions.js +1 -0
- package/lib/client/models/BaseEntity.d.ts +169 -0
- package/lib/client/models/BaseEntity.js +459 -0
- package/lib/client/models/Entity.d.ts +9 -0
- package/lib/client/models/Entity.js +24 -0
- package/lib/client/models/EntityBone.d.ts +12 -0
- package/lib/client/models/EntityBone.js +24 -0
- package/lib/client/models/EntityBoneCollection.d.ts +11 -0
- package/lib/client/models/EntityBoneCollection.js +16 -0
- package/lib/client/models/Ped.d.ts +199 -0
- package/lib/client/models/Ped.js +685 -0
- package/lib/client/models/PedBone.d.ts +6 -0
- package/lib/client/models/PedBone.js +9 -0
- package/lib/client/models/PedBoneCollection.d.ts +8 -0
- package/lib/client/models/PedBoneCollection.js +19 -0
- package/lib/client/models/Player.d.ts +63 -0
- package/lib/client/models/Player.js +174 -0
- package/lib/client/models/Prop.d.ts +11 -0
- package/lib/client/models/Prop.js +26 -0
- package/lib/client/models/Vehicle.d.ts +171 -0
- package/lib/client/models/Vehicle.js +551 -0
- package/lib/client/models/VehicleDoor.d.ts +19 -0
- package/lib/client/models/VehicleDoor.js +42 -0
- package/lib/client/models/VehicleDoorCollection.d.ts +14 -0
- package/lib/client/models/VehicleDoorCollection.js +61 -0
- package/lib/client/models/VehicleMod.d.ts +16 -0
- package/lib/client/models/VehicleMod.js +33 -0
- package/lib/client/models/VehicleModCollection.d.ts +61 -0
- package/lib/client/models/VehicleModCollection.js +227 -0
- package/lib/client/models/VehicleToggleMod.d.ts +14 -0
- package/lib/client/models/VehicleToggleMod.js +27 -0
- package/lib/client/models/VehicleWheel.d.ts +11 -0
- package/lib/client/models/VehicleWheel.js +21 -0
- package/lib/client/models/VehicleWheelCollection.d.ts +13 -0
- package/lib/client/models/VehicleWheelCollection.js +56 -0
- package/lib/client/models/VehicleWindow.d.ts +16 -0
- package/lib/client/models/VehicleWindow.js +33 -0
- package/lib/client/models/VehicleWindowCollection.d.ts +14 -0
- package/lib/client/models/VehicleWindowCollection.js +55 -0
- package/lib/client/models/index.d.ts +18 -0
- package/lib/client/models/index.js +18 -0
- package/lib/client/types/EntityType.d.ts +2 -0
- package/lib/client/types/EntityType.js +1 -0
- package/lib/client/ui/Container.d.ts +11 -0
- package/lib/client/ui/Container.js +28 -0
- package/lib/client/ui/Effects.d.ts +8 -0
- package/lib/client/ui/Effects.js +106 -0
- package/lib/client/ui/Fading.d.ts +41 -0
- package/lib/client/ui/Fading.js +69 -0
- package/lib/client/ui/Hud.d.ts +16 -0
- package/lib/client/ui/Hud.js +39 -0
- package/lib/client/ui/InstructionalButtons.d.ts +33 -0
- package/lib/client/ui/InstructionalButtons.js +53 -0
- package/lib/client/ui/LoadingPrompt.d.ts +27 -0
- package/lib/client/ui/LoadingPrompt.js +45 -0
- package/lib/client/ui/Notification.d.ts +5 -0
- package/lib/client/ui/Notification.js +8 -0
- package/lib/client/ui/Rectangle.d.ts +10 -0
- package/lib/client/ui/Rectangle.js +37 -0
- package/lib/client/ui/Scaleform.d.ts +106 -0
- package/lib/client/ui/Scaleform.js +234 -0
- package/lib/client/ui/Screen.d.ts +16 -0
- package/lib/client/ui/Screen.js +72 -0
- package/lib/client/ui/Sprite.d.ts +17 -0
- package/lib/client/ui/Sprite.js +53 -0
- package/lib/client/ui/Text.d.ts +31 -0
- package/lib/client/ui/Text.js +102 -0
- package/lib/client/ui/Timerbar.d.ts +44 -0
- package/lib/client/ui/Timerbar.js +241 -0
- package/lib/client/ui/index.d.ts +15 -0
- package/lib/client/ui/index.js +15 -0
- package/lib/client/ui/interfaces/IButton.d.ts +5 -0
- package/lib/client/ui/interfaces/IButton.js +1 -0
- package/lib/client/ui/interfaces/IDrawable.d.ts +7 -0
- package/lib/client/ui/interfaces/IDrawable.js +1 -0
- package/lib/client/ui/interfaces/index.d.ts +2 -0
- package/lib/client/ui/interfaces/index.js +1 -0
- package/lib/client/ui/menu/Menu.d.ts +108 -0
- package/lib/client/ui/menu/Menu.js +802 -0
- package/lib/client/ui/menu/MenuControl.d.ts +6 -0
- package/lib/client/ui/menu/MenuControl.js +11 -0
- package/lib/client/ui/menu/MenuControls.d.ts +9 -0
- package/lib/client/ui/menu/MenuControls.js +11 -0
- package/lib/client/ui/menu/MenuSettings.d.ts +20 -0
- package/lib/client/ui/menu/MenuSettings.js +51 -0
- package/lib/client/ui/menu/index.d.ts +6 -0
- package/lib/client/ui/menu/index.js +6 -0
- package/lib/client/ui/menu/items/UIMenuCheckboxItem.d.ts +20 -0
- package/lib/client/ui/menu/items/UIMenuCheckboxItem.js +57 -0
- package/lib/client/ui/menu/items/UIMenuItem.d.ts +78 -0
- package/lib/client/ui/menu/items/UIMenuItem.js +1090 -0
- package/lib/client/ui/menu/items/UIMenuListItem.d.ts +31 -0
- package/lib/client/ui/menu/items/UIMenuListItem.js +110 -0
- package/lib/client/ui/menu/items/UIMenuSeparatorItem.d.ts +11 -0
- package/lib/client/ui/menu/items/UIMenuSeparatorItem.js +29 -0
- package/lib/client/ui/menu/items/UIMenuSliderItem.d.ts +47 -0
- package/lib/client/ui/menu/items/UIMenuSliderItem.js +173 -0
- package/lib/client/ui/menu/items/index.d.ts +6 -0
- package/lib/client/ui/menu/items/index.js +6 -0
- package/lib/client/ui/menu/items/panels/AbstractUIMenuPanel.d.ts +17 -0
- package/lib/client/ui/menu/items/panels/AbstractUIMenuPanel.js +43 -0
- package/lib/client/ui/menu/items/panels/UIMenuColorPanel.d.ts +36 -0
- package/lib/client/ui/menu/items/panels/UIMenuColorPanel.js +211 -0
- package/lib/client/ui/menu/items/panels/UIMenuGridPanel.d.ts +40 -0
- package/lib/client/ui/menu/items/panels/UIMenuGridPanel.js +215 -0
- package/lib/client/ui/menu/items/panels/UIMenuPercentagePanel.d.ts +26 -0
- package/lib/client/ui/menu/items/panels/UIMenuPercentagePanel.js +115 -0
- package/lib/client/ui/menu/items/panels/UIMenuStatisticsPanel.d.ts +16 -0
- package/lib/client/ui/menu/items/panels/UIMenuStatisticsPanel.js +77 -0
- package/lib/client/ui/menu/items/panels/UIMenuStatisticsPanelItem.d.ts +13 -0
- package/lib/client/ui/menu/items/panels/UIMenuStatisticsPanelItem.js +32 -0
- package/lib/client/ui/menu/items/panels/index.d.ts +6 -0
- package/lib/client/ui/menu/items/panels/index.js +6 -0
- package/lib/client/ui/menu/modules/ListItem.d.ts +6 -0
- package/lib/client/ui/menu/modules/ListItem.js +8 -0
- package/lib/client/ui/menu/modules/index.d.ts +1 -0
- package/lib/client/ui/menu/modules/index.js +1 -0
- package/lib/client/utils/Animations.d.ts +19 -0
- package/lib/client/utils/Animations.js +55 -0
- package/lib/client/utils/Color.d.ts +15 -0
- package/lib/client/utils/Color.js +22 -0
- package/lib/client/utils/Crypto.d.ts +3 -0
- package/lib/client/utils/Crypto.js +25 -0
- package/lib/client/utils/LiteEvent.d.ts +13 -0
- package/lib/client/utils/LiteEvent.js +21 -0
- package/lib/client/utils/Maths.d.ts +4 -0
- package/lib/client/utils/Maths.js +10 -0
- package/lib/client/utils/Point.d.ts +9 -0
- package/lib/client/utils/Point.js +28 -0
- package/lib/client/utils/PointF.d.ts +12 -0
- package/lib/client/utils/PointF.js +11 -0
- package/lib/client/utils/Quaternion.d.ts +10 -0
- package/lib/client/utils/Quaternion.js +23 -0
- package/lib/client/utils/Size.d.ts +5 -0
- package/lib/client/utils/Size.js +6 -0
- package/lib/client/utils/String.d.ts +6 -0
- package/lib/client/utils/String.js +25 -0
- package/lib/client/utils/Vector2.d.ts +54 -0
- package/lib/client/utils/Vector2.js +106 -0
- package/lib/client/utils/Vector3.d.ts +69 -0
- package/lib/client/utils/Vector3.js +140 -0
- package/lib/client/utils/Vector4.d.ts +62 -0
- package/lib/client/utils/Vector4.js +124 -0
- package/lib/client/utils/enumValues.d.ts +12 -0
- package/lib/client/utils/enumValues.js +14 -0
- package/lib/client/utils/getStringFromUInt8Array.d.ts +8 -0
- package/lib/client/utils/getStringFromUInt8Array.js +10 -0
- package/lib/client/utils/getUInt32FromUint8Array.d.ts +8 -0
- package/lib/client/utils/getUInt32FromUint8Array.js +8 -0
- package/lib/client/utils/index.d.ts +10 -0
- package/lib/client/utils/index.js +10 -0
- package/lib/client/weapon/DlcWeaponData.d.ts +43 -0
- package/lib/client/weapon/DlcWeaponData.js +44 -0
- package/lib/client/weapon/Mk2WeaponHash.d.ts +18 -0
- package/lib/client/weapon/Mk2WeaponHash.js +25 -0
- package/lib/client/weapon/Weapon.d.ts +169 -0
- package/lib/client/weapon/Weapon.js +267 -0
- package/lib/client/weapon/WeaponAsset.d.ts +55 -0
- package/lib/client/weapon/WeaponAsset.js +83 -0
- package/lib/client/weapon/WeaponCollection.d.ts +90 -0
- package/lib/client/weapon/WeaponCollection.js +186 -0
- package/lib/client/weapon/WeaponDisplayNameByHash.d.ts +6 -0
- package/lib/client/weapon/WeaponDisplayNameByHash.js +75 -0
- package/lib/client/weapon/WeaponGroup.d.ts +18 -0
- package/lib/client/weapon/WeaponGroup.js +19 -0
- package/lib/client/weapon/WeaponHudStats.d.ts +27 -0
- package/lib/client/weapon/WeaponHudStats.js +38 -0
- package/lib/client/weapon/WeaponLivery.d.ts +13 -0
- package/lib/client/weapon/WeaponLivery.js +14 -0
- package/lib/client/weapon/WeaponLiveryColor.d.ts +34 -0
- package/lib/client/weapon/WeaponLiveryColor.js +35 -0
- package/lib/client/weapon/WeaponTint.d.ts +42 -0
- package/lib/client/weapon/WeaponTint.js +43 -0
- package/lib/client/weapon/index.d.ts +8 -0
- package/lib/client/weapon/index.js +8 -0
- package/lib/client/weaponComponent/ComponentAttachmentPoint.d.ts +18 -0
- package/lib/client/weaponComponent/ComponentAttachmentPoint.js +19 -0
- package/lib/client/weaponComponent/ComponentAttachmentPointByHash.d.ts +7 -0
- package/lib/client/weaponComponent/ComponentAttachmentPointByHash.js +309 -0
- package/lib/client/weaponComponent/ComponentDisplayNameByHash.d.ts +6 -0
- package/lib/client/weaponComponent/ComponentDisplayNameByHash.js +280 -0
- package/lib/client/weaponComponent/DlcWeaponComponentData.d.ts +40 -0
- package/lib/client/weaponComponent/DlcWeaponComponentData.js +44 -0
- package/lib/client/weaponComponent/InvalidWeaponComponent.d.ts +12 -0
- package/lib/client/weaponComponent/InvalidWeaponComponent.js +28 -0
- package/lib/client/weaponComponent/WeaponComponent.d.ts +81 -0
- package/lib/client/weaponComponent/WeaponComponent.js +119 -0
- package/lib/client/weaponComponent/WeaponComponentCollection.d.ts +108 -0
- package/lib/client/weaponComponent/WeaponComponentCollection.js +172 -0
- package/lib/client/weaponComponent/WeaponComponentHash.d.ts +671 -0
- package/lib/client/weaponComponent/WeaponComponentHash.js +887 -0
- package/lib/client/weaponComponent/WeaponComponentHashesByWeaponHash.d.ts +8 -0
- package/lib/client/weaponComponent/WeaponComponentHashesByWeaponHash.js +823 -0
- package/lib/client/weaponComponent/WeaponComponentHudStats.d.ts +27 -0
- package/lib/client/weaponComponent/WeaponComponentHudStats.js +34 -0
- package/lib/client/weaponComponent/index.d.ts +5 -0
- package/lib/client/weaponComponent/index.js +5 -0
- package/lib/common/Convar.d.ts +8 -0
- package/lib/common/Convar.js +20 -0
- package/lib/common/Kvp.d.ts +91 -0
- package/lib/common/Kvp.js +161 -0
- package/lib/common/Resource.d.ts +14 -0
- package/lib/common/Resource.js +35 -0
- package/lib/common/index.d.ts +5 -0
- package/lib/common/index.js +5 -0
- package/lib/common/types.d.ts +6 -0
- package/lib/common/types.js +1 -0
- package/lib/common/utils/Color.d.ts +10 -0
- package/lib/common/utils/Color.js +17 -0
- package/lib/common/utils/Maths.d.ts +4 -0
- package/lib/common/utils/Maths.js +10 -0
- package/lib/common/utils/PointF.d.ts +12 -0
- package/lib/common/utils/PointF.js +11 -0
- package/lib/common/utils/Quaternion.d.ts +10 -0
- package/lib/common/utils/Quaternion.js +23 -0
- package/lib/common/utils/Vector2.d.ts +58 -0
- package/lib/common/utils/Vector2.js +113 -0
- package/lib/common/utils/Vector3.d.ts +73 -0
- package/lib/common/utils/Vector3.js +147 -0
- package/lib/common/utils/Vector4.d.ts +66 -0
- package/lib/common/utils/Vector4.js +131 -0
- package/lib/common/utils/cleanPlayerName.d.ts +6 -0
- package/lib/common/utils/cleanPlayerName.js +27 -0
- package/lib/common/utils/enumValues.d.ts +12 -0
- package/lib/common/utils/enumValues.js +14 -0
- package/lib/common/utils/getStringFromUInt8Array.d.ts +8 -0
- package/lib/common/utils/getStringFromUInt8Array.js +10 -0
- package/lib/common/utils/getUInt32FromUint8Array.d.ts +8 -0
- package/lib/common/utils/getUInt32FromUint8Array.js +8 -0
- package/lib/common/utils/index.d.ts +12 -0
- package/lib/common/utils/index.js +12 -0
- package/lib/server/Anticheat.d.ts +0 -0
- package/lib/server/Anticheat.js +25 -0
- package/lib/server/Events.d.ts +35 -0
- package/lib/server/Events.js +102 -0
- package/lib/server/Game.d.ts +56 -0
- package/lib/server/Game.js +86 -0
- package/lib/server/cfx/StateBagChangeHandler.d.ts +9 -0
- package/lib/server/cfx/StateBagChangeHandler.js +4 -0
- package/lib/server/cfx/index.d.ts +7 -0
- package/lib/server/cfx/index.js +1 -0
- package/lib/server/entities/BaseEntity.d.ts +115 -0
- package/lib/server/entities/BaseEntity.js +161 -0
- package/lib/server/entities/Entity.d.ts +18 -0
- package/lib/server/entities/Entity.js +22 -0
- package/lib/server/entities/Ped.d.ts +87 -0
- package/lib/server/entities/Ped.js +122 -0
- package/lib/server/entities/Player.d.ts +163 -0
- package/lib/server/entities/Player.js +235 -0
- package/lib/server/entities/Prop.d.ts +32 -0
- package/lib/server/entities/Prop.js +42 -0
- package/lib/server/entities/Vehicle.d.ts +230 -0
- package/lib/server/entities/Vehicle.js +331 -0
- package/lib/server/entities/index.d.ts +5 -0
- package/lib/server/entities/index.js +5 -0
- package/lib/server/enum/ClassTypes.d.ts +11 -0
- package/lib/server/enum/ClassTypes.js +12 -0
- package/lib/server/enum/PopulationType.d.ts +13 -0
- package/lib/server/enum/PopulationType.js +14 -0
- package/lib/server/enum/VehicleLockStatus.d.ts +9 -0
- package/lib/server/enum/VehicleLockStatus.js +10 -0
- package/lib/server/enum/VehicleType.d.ts +10 -0
- package/lib/server/enum/VehicleType.js +11 -0
- package/lib/server/enum/eEntityType.d.ts +5 -0
- package/lib/server/enum/eEntityType.js +6 -0
- package/lib/server/enum/index.d.ts +5 -0
- package/lib/server/enum/index.js +5 -0
- package/lib/server/index.d.ts +7 -0
- package/lib/server/index.js +7 -0
- package/lib/server/type/Anticheat.d.ts +471 -0
- package/lib/server/type/Anticheat.js +160 -0
- package/lib/server/type/Hash.d.ts +3 -0
- package/lib/server/type/Hash.js +2 -0
- package/lib/server/utils/index.d.ts +1 -0
- package/lib/server/utils/index.js +1 -0
- package/package.json +54 -0
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import { HudComponent } from '../enums';
|
|
2
|
+
import { Color, Point, Size } from '../utils';
|
|
3
|
+
import { Hud } from './Hud';
|
|
4
|
+
import { LoadingPrompt } from './LoadingPrompt';
|
|
5
|
+
import { Screen } from './Screen';
|
|
6
|
+
import { Sprite } from './Sprite';
|
|
7
|
+
/** @internal */
|
|
8
|
+
const activeTimerBars = [];
|
|
9
|
+
/** @internal */
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11
|
+
const drawText = (text, position, options) => {
|
|
12
|
+
options = {
|
|
13
|
+
...{
|
|
14
|
+
align: 1,
|
|
15
|
+
color: [255, 255, 255, 255],
|
|
16
|
+
font: 4,
|
|
17
|
+
outline: true,
|
|
18
|
+
scale: 0.3,
|
|
19
|
+
shadow: true,
|
|
20
|
+
},
|
|
21
|
+
...options,
|
|
22
|
+
};
|
|
23
|
+
const font = options.font;
|
|
24
|
+
const scale = options.scale;
|
|
25
|
+
const outline = options.outline;
|
|
26
|
+
const shadow = options.shadow;
|
|
27
|
+
const color = options.color;
|
|
28
|
+
const align = options.align;
|
|
29
|
+
SetTextEntry('CELL_EMAIL_BCON');
|
|
30
|
+
for (let i = 0; i < text.length; i += 99) {
|
|
31
|
+
const subStringText = text.substr(i, Math.min(99, text.length - i));
|
|
32
|
+
AddTextComponentSubstringPlayerName(subStringText);
|
|
33
|
+
}
|
|
34
|
+
SetTextFont(font);
|
|
35
|
+
SetTextScale(scale, scale);
|
|
36
|
+
SetTextColour(color[0], color[1], color[2], color[3]);
|
|
37
|
+
if (shadow) {
|
|
38
|
+
SetTextDropShadow();
|
|
39
|
+
}
|
|
40
|
+
if (outline) {
|
|
41
|
+
SetTextOutline();
|
|
42
|
+
}
|
|
43
|
+
switch (align) {
|
|
44
|
+
case 1: {
|
|
45
|
+
SetTextCentre(true);
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
case 2: {
|
|
49
|
+
SetTextRightJustify(true);
|
|
50
|
+
SetTextWrap(0.0, position[0] || 0);
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
DrawText(position[0] || 0, position[1] || 0);
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Create a Timerbar. It's automatically added to the internal Timerbar array and drawn in a FIFO (first in, first out) way.
|
|
58
|
+
*
|
|
59
|
+
* ```typescript
|
|
60
|
+
* // Create simple Timerbar
|
|
61
|
+
* const myTimerbar = new Cfx.Timerbar("Hello");
|
|
62
|
+
* myTimerbar.Text = "World";
|
|
63
|
+
*
|
|
64
|
+
* // Disable Timerbar later on
|
|
65
|
+
* myTimerbar.Visible = false;
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
export class Timerbar {
|
|
69
|
+
constructor(title, useProgressBar = false) {
|
|
70
|
+
this.title = '';
|
|
71
|
+
this.text = '';
|
|
72
|
+
this.useProgressBar = false;
|
|
73
|
+
this.usePlayerStyle = false;
|
|
74
|
+
this.isVisible = false;
|
|
75
|
+
this.pbarValue = 0.0;
|
|
76
|
+
this.textColor = [240, 240, 240, 255];
|
|
77
|
+
this.pbarBgColor = [155, 155, 155, 255];
|
|
78
|
+
this.pbarFgColor = [255, 255, 255, 255];
|
|
79
|
+
this.title = title;
|
|
80
|
+
this.useProgressBar = useProgressBar;
|
|
81
|
+
this.text = '';
|
|
82
|
+
this.pbarValue = 0.0;
|
|
83
|
+
this.textColor = [240, 240, 240, 255];
|
|
84
|
+
this.pbarBgColor = [155, 155, 155, 255];
|
|
85
|
+
this.pbarFgColor = [255, 255, 255, 255];
|
|
86
|
+
this.usePlayerStyle = false;
|
|
87
|
+
const safeZone = GetSafeZoneSize();
|
|
88
|
+
const safeZoneX = (1.0 - safeZone) * 0.5;
|
|
89
|
+
const safeZoneY = (1.0 - safeZone) * 0.5;
|
|
90
|
+
this.sprite = new Sprite('timerbars', 'all_black_bg', new Point(Screen.ScaledWidth * 0.918 - safeZoneX, Screen.Height * 0.984 - safeZoneY), new Size(Screen.ScaledWidth * 0.165, Screen.Height * 0.035), 0, new Color(160, 255, 255, 255));
|
|
91
|
+
if (!this.sprite.IsTextureDictionaryLoaded) {
|
|
92
|
+
this.sprite.loadTextureDictionary();
|
|
93
|
+
}
|
|
94
|
+
this.isVisible = true;
|
|
95
|
+
activeTimerBars.push(this);
|
|
96
|
+
}
|
|
97
|
+
get Title() {
|
|
98
|
+
return this.title;
|
|
99
|
+
}
|
|
100
|
+
set Title(value) {
|
|
101
|
+
this.title = value;
|
|
102
|
+
}
|
|
103
|
+
get Text() {
|
|
104
|
+
return this.text;
|
|
105
|
+
}
|
|
106
|
+
set Text(value) {
|
|
107
|
+
this.text = value;
|
|
108
|
+
}
|
|
109
|
+
get UseProgressBar() {
|
|
110
|
+
return this.useProgressBar;
|
|
111
|
+
}
|
|
112
|
+
get Progress() {
|
|
113
|
+
return this.pbarValue;
|
|
114
|
+
}
|
|
115
|
+
set Progress(value) {
|
|
116
|
+
this.pbarValue = value <= 0.0 ? 0.0 : value >= 1.0 ? 1.0 : value;
|
|
117
|
+
}
|
|
118
|
+
get Visible() {
|
|
119
|
+
return this.isVisible;
|
|
120
|
+
}
|
|
121
|
+
set Visible(value) {
|
|
122
|
+
const idx = activeTimerBars.indexOf(this);
|
|
123
|
+
if (value) {
|
|
124
|
+
if (idx !== -1) {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
activeTimerBars.push(this);
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
if (idx === -1) {
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
activeTimerBars.splice(idx, 1);
|
|
134
|
+
}
|
|
135
|
+
this.isVisible = value;
|
|
136
|
+
}
|
|
137
|
+
get TextColor() {
|
|
138
|
+
return this.textColor;
|
|
139
|
+
}
|
|
140
|
+
set TextColor(value) {
|
|
141
|
+
if (Array.isArray(value)) {
|
|
142
|
+
this.textColor = value;
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
const result = GetHudColour(value);
|
|
146
|
+
this.textColor = [result[0], result[1], result[2], result[3]];
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
get ProgressbarBgColor() {
|
|
150
|
+
return this.pbarBgColor;
|
|
151
|
+
}
|
|
152
|
+
set ProgressbarBgColor(value) {
|
|
153
|
+
if (Array.isArray(value)) {
|
|
154
|
+
this.pbarBgColor = value;
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
const result = GetHudColour(value);
|
|
158
|
+
this.pbarBgColor = [result[0], result[1], result[2], result[3]];
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
get ProgressbarFgColor() {
|
|
162
|
+
return this.pbarFgColor;
|
|
163
|
+
}
|
|
164
|
+
set ProgressbarFgColor(value) {
|
|
165
|
+
if (Array.isArray(value)) {
|
|
166
|
+
this.pbarFgColor = value;
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
const result = GetHudColour(value);
|
|
170
|
+
this.pbarFgColor = [result[0], result[1], result[2], result[3]];
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
set PlayerStyle(value) {
|
|
174
|
+
this.usePlayerStyle = value;
|
|
175
|
+
}
|
|
176
|
+
get PlayerStyle() {
|
|
177
|
+
return this.usePlayerStyle;
|
|
178
|
+
}
|
|
179
|
+
get Sprite() {
|
|
180
|
+
return this.sprite;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
setTick(() => {
|
|
184
|
+
if (activeTimerBars.length <= 0) {
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
const safeZone = GetSafeZoneSize();
|
|
188
|
+
const safeZoneX = (1.0 - safeZone) * 0.5;
|
|
189
|
+
const safeZoneY = (1.0 - safeZone) * 0.5;
|
|
190
|
+
Hud.hideComponentThisFrame(HudComponent.AreaName);
|
|
191
|
+
Hud.hideComponentThisFrame(HudComponent.StreetName);
|
|
192
|
+
let loadingPromptOffset = 0;
|
|
193
|
+
if (LoadingPrompt.IsActive) {
|
|
194
|
+
loadingPromptOffset = 0.035 + 0.035 * 0.038 * 2;
|
|
195
|
+
}
|
|
196
|
+
activeTimerBars.forEach(timerbar => {
|
|
197
|
+
const drawY = 0.984 - loadingPromptOffset - safeZoneY - activeTimerBars.indexOf(timerbar) * 0.038;
|
|
198
|
+
DrawSprite('timerbars', 'all_black_bg', 0.918 - safeZoneX, drawY, 0.165, 0.035, 0.0, 255, 255, 255, 160);
|
|
199
|
+
drawText(timerbar.Title, [0.918 - safeZoneX + 0.012, drawY - 0.009 - (timerbar.PlayerStyle ? 0.00625 : 0)], {
|
|
200
|
+
align: 2,
|
|
201
|
+
color: timerbar.TextColor,
|
|
202
|
+
font: timerbar.PlayerStyle ? 4 : 0,
|
|
203
|
+
outline: false,
|
|
204
|
+
scale: timerbar.PlayerStyle ? 0.465 : 0.3,
|
|
205
|
+
shadow: timerbar.PlayerStyle,
|
|
206
|
+
});
|
|
207
|
+
if (timerbar.UseProgressBar) {
|
|
208
|
+
const pbarX = 0.918 - safeZoneX + 0.047;
|
|
209
|
+
const pbarY = drawY + 0.0015;
|
|
210
|
+
const width = 0.0616 * timerbar.Progress;
|
|
211
|
+
DrawRect(pbarX, pbarY, 0.0616, 0.0105, typeof timerbar.ProgressbarBgColor === 'number'
|
|
212
|
+
? timerbar.ProgressbarBgColor
|
|
213
|
+
: timerbar.ProgressbarBgColor[0], typeof timerbar.ProgressbarBgColor === 'number'
|
|
214
|
+
? timerbar.ProgressbarBgColor
|
|
215
|
+
: timerbar.ProgressbarBgColor[1], typeof timerbar.ProgressbarBgColor === 'number'
|
|
216
|
+
? timerbar.ProgressbarBgColor
|
|
217
|
+
: timerbar.ProgressbarBgColor[2], typeof timerbar.ProgressbarBgColor === 'number'
|
|
218
|
+
? timerbar.ProgressbarBgColor
|
|
219
|
+
: timerbar.ProgressbarBgColor[3]);
|
|
220
|
+
DrawRect(pbarX - 0.0616 / 2 + width / 2, pbarY, width, 0.0105, typeof timerbar.ProgressbarFgColor === 'number'
|
|
221
|
+
? timerbar.ProgressbarFgColor
|
|
222
|
+
: timerbar.ProgressbarFgColor[0], typeof timerbar.ProgressbarFgColor === 'number'
|
|
223
|
+
? timerbar.ProgressbarFgColor
|
|
224
|
+
: timerbar.ProgressbarFgColor[1], typeof timerbar.ProgressbarFgColor === 'number'
|
|
225
|
+
? timerbar.ProgressbarFgColor
|
|
226
|
+
: timerbar.ProgressbarFgColor[2], typeof timerbar.ProgressbarFgColor === 'number'
|
|
227
|
+
? timerbar.ProgressbarFgColor
|
|
228
|
+
: timerbar.ProgressbarFgColor[3]);
|
|
229
|
+
}
|
|
230
|
+
else {
|
|
231
|
+
drawText(timerbar.Text, [0.918 - safeZoneX + 0.0785, drawY + -0.0165], {
|
|
232
|
+
align: 2,
|
|
233
|
+
color: timerbar.TextColor,
|
|
234
|
+
font: 0,
|
|
235
|
+
outline: false,
|
|
236
|
+
scale: 0.425,
|
|
237
|
+
shadow: false,
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
});
|
|
241
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from './interfaces';
|
|
2
|
+
export { Rectangle } from './Rectangle';
|
|
3
|
+
export { Container } from './Container';
|
|
4
|
+
export { Effects } from './Effects';
|
|
5
|
+
export { Fading } from './Fading';
|
|
6
|
+
export { Hud } from './Hud';
|
|
7
|
+
export { InstructionalButtons } from './InstructionalButtons';
|
|
8
|
+
export { LoadingPrompt } from './LoadingPrompt';
|
|
9
|
+
export { Notification } from './Notification';
|
|
10
|
+
export { Scaleform } from './Scaleform';
|
|
11
|
+
export { Screen } from './Screen';
|
|
12
|
+
export { Sprite } from './Sprite';
|
|
13
|
+
export { Text } from './Text';
|
|
14
|
+
export { Timerbar } from './Timerbar';
|
|
15
|
+
export * from './menu';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from './interfaces';
|
|
2
|
+
export { Rectangle } from './Rectangle';
|
|
3
|
+
export { Container } from './Container';
|
|
4
|
+
export { Effects } from './Effects';
|
|
5
|
+
export { Fading } from './Fading';
|
|
6
|
+
export { Hud } from './Hud';
|
|
7
|
+
export { InstructionalButtons } from './InstructionalButtons';
|
|
8
|
+
export { LoadingPrompt } from './LoadingPrompt';
|
|
9
|
+
export { Notification } from './Notification';
|
|
10
|
+
export { Scaleform } from './Scaleform';
|
|
11
|
+
export { Screen } from './Screen';
|
|
12
|
+
export { Sprite } from './Sprite';
|
|
13
|
+
export { Text } from './Text';
|
|
14
|
+
export { Timerbar } from './Timerbar';
|
|
15
|
+
export * from './menu';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { MenuControls, MenuSettings } from '../';
|
|
2
|
+
import { Font, MenuAlignment } from '../../enums';
|
|
3
|
+
import { Color, LiteEvent, Point, Size } from '../../utils';
|
|
4
|
+
import { UIMenuItem } from './items';
|
|
5
|
+
export declare class Menu {
|
|
6
|
+
static screenAspectRatio: number;
|
|
7
|
+
static screenHeight: number;
|
|
8
|
+
static screenWidth: number;
|
|
9
|
+
static screenResolution: Size;
|
|
10
|
+
readonly id: string;
|
|
11
|
+
visible: boolean;
|
|
12
|
+
parentMenu: Menu | undefined;
|
|
13
|
+
parentItem: UIMenuItem | undefined;
|
|
14
|
+
items: UIMenuItem[];
|
|
15
|
+
children: Map<string, Menu>;
|
|
16
|
+
readonly menuOpen: LiteEvent;
|
|
17
|
+
readonly menuClose: LiteEvent;
|
|
18
|
+
readonly menuChange: LiteEvent;
|
|
19
|
+
readonly indexChange: LiteEvent;
|
|
20
|
+
readonly listChange: LiteEvent;
|
|
21
|
+
readonly sliderChange: LiteEvent;
|
|
22
|
+
readonly checkboxChange: LiteEvent;
|
|
23
|
+
readonly listSelect: LiteEvent;
|
|
24
|
+
readonly sliderSelect: LiteEvent;
|
|
25
|
+
readonly itemSelect: LiteEvent;
|
|
26
|
+
readonly panelActivated: LiteEvent;
|
|
27
|
+
private _counterPretext;
|
|
28
|
+
private _counterOverride;
|
|
29
|
+
private _alignment;
|
|
30
|
+
private _offset;
|
|
31
|
+
private _navigationDelay;
|
|
32
|
+
private _lastUpDownNavigation;
|
|
33
|
+
private _lastLeftRightNavigation;
|
|
34
|
+
private _activeItem;
|
|
35
|
+
private _widthOffset;
|
|
36
|
+
private _drawOffset;
|
|
37
|
+
private _justOpened;
|
|
38
|
+
private _mousePressed;
|
|
39
|
+
private _minItem;
|
|
40
|
+
private _maxItem;
|
|
41
|
+
private _maxItemsOnScreen;
|
|
42
|
+
private _controls;
|
|
43
|
+
private _settings;
|
|
44
|
+
private readonly _title;
|
|
45
|
+
private readonly _subtitle;
|
|
46
|
+
private readonly _mainMenu;
|
|
47
|
+
private readonly _logo;
|
|
48
|
+
private readonly _upAndDownSprite;
|
|
49
|
+
private readonly _subtitleResRectangle;
|
|
50
|
+
private readonly _extraRectangleUp;
|
|
51
|
+
private readonly _extraRectangleDown;
|
|
52
|
+
private readonly _descriptionBar;
|
|
53
|
+
private readonly _descriptionRectangle;
|
|
54
|
+
private readonly _descriptionText;
|
|
55
|
+
private readonly _counterText;
|
|
56
|
+
private readonly _background;
|
|
57
|
+
constructor(title: string, subtitle: string, offset?: Point, spriteLibrary?: string, spriteName?: string);
|
|
58
|
+
set Title(text: string);
|
|
59
|
+
get Title(): string;
|
|
60
|
+
get TitleFont(): Font;
|
|
61
|
+
set TitleFont(font: Font);
|
|
62
|
+
set Subtitle(text: string);
|
|
63
|
+
get Subtitle(): string;
|
|
64
|
+
set SubtitleFont(font: Font);
|
|
65
|
+
get SubtitleFont(): Font;
|
|
66
|
+
set SubtitleForeColor(color: Color);
|
|
67
|
+
get SubtitleForeColor(): Color;
|
|
68
|
+
set SubtitleBackColor(color: Color);
|
|
69
|
+
get SubtitleBackColor(): Color;
|
|
70
|
+
get CurrentItem(): UIMenuItem;
|
|
71
|
+
set CurrentItem(value: UIMenuItem);
|
|
72
|
+
get CurrentSelection(): number;
|
|
73
|
+
set CurrentSelection(v: number);
|
|
74
|
+
get Alignment(): MenuAlignment;
|
|
75
|
+
set Alignment(alignment: MenuAlignment);
|
|
76
|
+
get WidthOffset(): number;
|
|
77
|
+
set WidthOffset(widthOffset: number);
|
|
78
|
+
get DrawOffset(): Point;
|
|
79
|
+
get Controls(): MenuControls;
|
|
80
|
+
get Settings(): MenuSettings;
|
|
81
|
+
addNewSubMenu(text: string, description?: string, inherit?: boolean): Menu;
|
|
82
|
+
addSubMenu(subMenuToAdd: Menu, text: string, description?: string, inherit?: boolean): Menu;
|
|
83
|
+
addItem(items: UIMenuItem | UIMenuItem[]): void;
|
|
84
|
+
removeItem(itemOrIndex: UIMenuItem | number): void;
|
|
85
|
+
bindMenuToItem(menuToBind: Menu, itemToBindTo: UIMenuItem): void;
|
|
86
|
+
releaseMenuFromItem(releaseFrom: UIMenuItem): boolean;
|
|
87
|
+
refreshIndex(): void;
|
|
88
|
+
clear(): void;
|
|
89
|
+
open(): void;
|
|
90
|
+
close(): void;
|
|
91
|
+
goLeft(): void;
|
|
92
|
+
goRight(): void;
|
|
93
|
+
selectItem(): void;
|
|
94
|
+
isMouseInBounds(pos: Point, size: Size, drawOffset?: boolean): boolean;
|
|
95
|
+
goUp(): void;
|
|
96
|
+
goDown(): void;
|
|
97
|
+
goBack(): void;
|
|
98
|
+
private _processMouse;
|
|
99
|
+
private _processControl;
|
|
100
|
+
private _isThereAnyItemExcludingSeparators;
|
|
101
|
+
private _playSoundAndReleaseId;
|
|
102
|
+
private _disEnableControls;
|
|
103
|
+
private _recalculateUpAndDown;
|
|
104
|
+
private _recalculateDescriptionPosition;
|
|
105
|
+
private _calculateItemHeight;
|
|
106
|
+
private _calculatePanelPosition;
|
|
107
|
+
private _render;
|
|
108
|
+
}
|