@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,66 @@
|
|
|
1
|
+
import { AnimationFlags, DrivingStyle, FiringPattern, LeaveVehicleFlags, VehicleSeat } from './enums';
|
|
2
|
+
import { Entity, Ped, Vehicle } from './models';
|
|
3
|
+
import { BaseEntity } from './models/BaseEntity';
|
|
4
|
+
import { TaskSequence } from './TaskSequence';
|
|
5
|
+
import { Vector3 } from './utils';
|
|
6
|
+
export declare class Tasks {
|
|
7
|
+
private ped;
|
|
8
|
+
constructor(ped: Ped);
|
|
9
|
+
achieveHeading(heading: number, timeout?: number): void;
|
|
10
|
+
blockTemporaryEvents(block?: boolean): void;
|
|
11
|
+
aimAt(target: BaseEntity | Vector3, duration: number): void;
|
|
12
|
+
arrest(ped: Ped): void;
|
|
13
|
+
chatTo(ped: Ped): void;
|
|
14
|
+
jump(): void;
|
|
15
|
+
climb(): void;
|
|
16
|
+
climbLadder(): void;
|
|
17
|
+
cower(duration: number): void;
|
|
18
|
+
chaseWithGroundVehicle(target: BaseEntity): void;
|
|
19
|
+
chaseWithHelicopter(target: BaseEntity, offset: Vector3): void;
|
|
20
|
+
chaseWithPlane(target: BaseEntity, offset: Vector3): void;
|
|
21
|
+
cruiseWithVehicle(vehicle: Vehicle, speed: number, drivingstyle?: DrivingStyle): void;
|
|
22
|
+
driveTo(vehicle: Vehicle, target: Vector3, radius: number, speed: number, drivingstyle?: DrivingStyle): void;
|
|
23
|
+
enterAnyVehicle(seat?: VehicleSeat, timeout?: number, speed?: number, flag?: number): void;
|
|
24
|
+
static everyoneLeaveVehicle(vehicle: Vehicle): void;
|
|
25
|
+
fightAgainst(target: Ped, duration?: number): void;
|
|
26
|
+
fightAgainstHatedTargets(radius: number, duration?: number): void;
|
|
27
|
+
fleeFrom(pedOrPosition: Ped | Vector3, duration?: number): void;
|
|
28
|
+
followPointRoute(points: Vector3[]): void;
|
|
29
|
+
followToOffsetFromEntity(target: BaseEntity, offset: Vector3, timeout: number, stoppingRange: number, movementSpeed?: number, persistFollowing?: boolean): void;
|
|
30
|
+
goTo(position: Vector3, ignorePaths?: boolean, timeout?: number, speed?: number): void;
|
|
31
|
+
goToEntity(target: BaseEntity, offset?: Vector3 | null, timeout?: number): void;
|
|
32
|
+
guardCurrentPosition(): void;
|
|
33
|
+
handsUp(duration: number): void;
|
|
34
|
+
landPlane(startPosition: Vector3, touchdownPosition: Vector3, plane?: Vehicle | null): void;
|
|
35
|
+
lookAt(targetOrPosition: Entity | Vector3, duration?: number): void;
|
|
36
|
+
parachuteTo(position: Vector3): void;
|
|
37
|
+
parkVehicle(vehicle: Vehicle, position: Vector3, heading: number, radius?: number, keepEngineOn?: boolean): void;
|
|
38
|
+
performSequence(sequence: TaskSequence): void;
|
|
39
|
+
playAnimation(animDict: string, animName: string, blendInSpeed: number, blendOutSpeed: number, duration: number, playbackRate: number, flags: AnimationFlags): Promise<void>;
|
|
40
|
+
reactAndFlee(ped: Ped): void;
|
|
41
|
+
reloadWeapon(): void;
|
|
42
|
+
shootAt(targetOrPosition: Ped | Vector3, duration?: number, pattern?: FiringPattern): void;
|
|
43
|
+
shuffleToNextVehicleSeat(vehicle: Vehicle): void;
|
|
44
|
+
skyDive(): void;
|
|
45
|
+
slideTo(position: Vector3, heading: number, duration?: number): void;
|
|
46
|
+
standStill(duration: number): void;
|
|
47
|
+
startScenario(name: string, position: Vector3, heading?: number, duration?: number, sittingScenario?: boolean, teleport?: boolean): void;
|
|
48
|
+
swapWeapon(): void;
|
|
49
|
+
turnTo(targetOrPosition: Entity | Vector3, duration?: number): void;
|
|
50
|
+
useParachute(): void;
|
|
51
|
+
useMobilePhone(duration?: number): void;
|
|
52
|
+
putAwayParachute(): void;
|
|
53
|
+
putAwayMobilePhone(): void;
|
|
54
|
+
vehicleChase(target: Ped): void;
|
|
55
|
+
vehicleShootAtPed(target: Ped): void;
|
|
56
|
+
wait(duration: number): void;
|
|
57
|
+
wanderAround(position?: Vector3, radius?: number): void;
|
|
58
|
+
warpIntoVehicle(vehicle: Vehicle, seat: VehicleSeat): void;
|
|
59
|
+
warpOutOfVehicle(vehicle: Vehicle, flags: LeaveVehicleFlags): void;
|
|
60
|
+
isPlayingAnim(dict: string, anim: string, taskFlag?: number): boolean;
|
|
61
|
+
clearAll(): void;
|
|
62
|
+
clearAllImmediately(): void;
|
|
63
|
+
clearLookAt(): void;
|
|
64
|
+
clearSecondary(): void;
|
|
65
|
+
clearAnimation(animDict: string, animName: string): void;
|
|
66
|
+
}
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import { DrivingStyle, FiringPattern, VehicleSeat, } from './enums';
|
|
2
|
+
import { Entity, Ped } from './models';
|
|
3
|
+
import { BaseEntity } from './models/BaseEntity';
|
|
4
|
+
import { Vector3 } from './utils';
|
|
5
|
+
import { LoadAnimDict } from './utils/Animations';
|
|
6
|
+
export class Tasks {
|
|
7
|
+
constructor(ped) {
|
|
8
|
+
this.ped = ped;
|
|
9
|
+
}
|
|
10
|
+
achieveHeading(heading, timeout = 0) {
|
|
11
|
+
TaskAchieveHeading(this.ped.Handle, heading, timeout);
|
|
12
|
+
}
|
|
13
|
+
blockTemporaryEvents(block = true) {
|
|
14
|
+
TaskSetBlockingOfNonTemporaryEvents(this.ped.Handle, block);
|
|
15
|
+
}
|
|
16
|
+
aimAt(target, duration) {
|
|
17
|
+
if (target instanceof BaseEntity)
|
|
18
|
+
TaskAimGunAtEntity(this.ped.Handle, target.Handle, duration, false);
|
|
19
|
+
else
|
|
20
|
+
TaskAimGunAtCoord(this.ped.Handle, target.x, target.y, target.z, duration, false, false);
|
|
21
|
+
}
|
|
22
|
+
arrest(ped) {
|
|
23
|
+
TaskArrestPed(this.ped.Handle, ped.Handle);
|
|
24
|
+
}
|
|
25
|
+
chatTo(ped) {
|
|
26
|
+
TaskChatToPed(this.ped.Handle, ped.Handle, 16, 0, 0, 0, 0, 0);
|
|
27
|
+
}
|
|
28
|
+
jump() {
|
|
29
|
+
TaskJump(this.ped.Handle, true);
|
|
30
|
+
}
|
|
31
|
+
climb() {
|
|
32
|
+
TaskClimb(this.ped.Handle, true);
|
|
33
|
+
}
|
|
34
|
+
climbLadder() {
|
|
35
|
+
TaskClimbLadder(this.ped.Handle, 1);
|
|
36
|
+
}
|
|
37
|
+
cower(duration) {
|
|
38
|
+
TaskCower(this.ped.Handle, duration);
|
|
39
|
+
}
|
|
40
|
+
chaseWithGroundVehicle(target) {
|
|
41
|
+
TaskVehicleChase(this.ped.Handle, target.Handle);
|
|
42
|
+
}
|
|
43
|
+
chaseWithHelicopter(target, offset) {
|
|
44
|
+
TaskHeliChase(this.ped.Handle, target.Handle, offset.x, offset.y, offset.z);
|
|
45
|
+
}
|
|
46
|
+
chaseWithPlane(target, offset) {
|
|
47
|
+
TaskPlaneChase(this.ped.Handle, target.Handle, offset.x, offset.y, offset.z);
|
|
48
|
+
}
|
|
49
|
+
cruiseWithVehicle(vehicle, speed, drivingstyle = DrivingStyle.None) {
|
|
50
|
+
TaskVehicleDriveWander(this.ped.Handle, vehicle.Handle, speed, drivingstyle);
|
|
51
|
+
}
|
|
52
|
+
driveTo(vehicle, target, radius, speed, drivingstyle = DrivingStyle.None) {
|
|
53
|
+
TaskVehicleDriveToCoordLongrange(this.ped.Handle, vehicle.Handle, target.x, target.y, target.z, speed, drivingstyle, radius);
|
|
54
|
+
}
|
|
55
|
+
enterAnyVehicle(seat = VehicleSeat.Any, timeout = -1, speed = 0, flag = 0) {
|
|
56
|
+
TaskEnterVehicle(this.ped.Handle, 0, timeout, seat, speed, flag, 0);
|
|
57
|
+
}
|
|
58
|
+
static everyoneLeaveVehicle(vehicle) {
|
|
59
|
+
TaskEveryoneLeaveVehicle(vehicle.Handle);
|
|
60
|
+
}
|
|
61
|
+
fightAgainst(target, duration) {
|
|
62
|
+
if (duration) {
|
|
63
|
+
TaskCombatPedTimed(this.ped.Handle, target.Handle, duration, 0);
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
TaskCombatPed(this.ped.Handle, target.Handle, 0, 16);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
fightAgainstHatedTargets(radius, duration) {
|
|
70
|
+
if (duration) {
|
|
71
|
+
TaskCombatHatedTargetsAroundPedTimed(this.ped.Handle, radius, duration, 0);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
TaskCombatHatedTargetsAroundPed(this.ped.Handle, radius, 0);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
fleeFrom(pedOrPosition, duration = -1) {
|
|
78
|
+
if (pedOrPosition instanceof Ped) {
|
|
79
|
+
TaskSmartFleePed(this.ped.Handle, pedOrPosition.Handle, 100, duration, false, false);
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
TaskSmartFleeCoord(this.ped.Handle, pedOrPosition.x, pedOrPosition.y, pedOrPosition.z, 100, duration, false, false);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
followPointRoute(points) {
|
|
86
|
+
TaskFlushRoute();
|
|
87
|
+
points.forEach(point => TaskExtendRoute(point.x, point.y, point.z));
|
|
88
|
+
TaskFollowPointRoute(this.ped.Handle, 1, 0);
|
|
89
|
+
}
|
|
90
|
+
followToOffsetFromEntity(target, offset, timeout, stoppingRange, movementSpeed = 1, persistFollowing = true) {
|
|
91
|
+
TaskFollowToOffsetOfEntity(this.ped.Handle, target.Handle, offset.x, offset.y, offset.z, movementSpeed, timeout, stoppingRange, persistFollowing);
|
|
92
|
+
}
|
|
93
|
+
goTo(position, ignorePaths = false, timeout = -1, speed = 1) {
|
|
94
|
+
if (ignorePaths) {
|
|
95
|
+
TaskGoStraightToCoord(this.ped.Handle, position.x, position.y, position.z, speed, timeout, 0, 0);
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
TaskFollowNavMeshToCoord(this.ped.Handle, position.x, position.y, position.z, speed, timeout, 0, 0, 0);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
goToEntity(target, offset = null, timeout = -1) {
|
|
102
|
+
if (offset === null) {
|
|
103
|
+
offset = new Vector3(0, 0, 0);
|
|
104
|
+
}
|
|
105
|
+
TaskGotoEntityOffsetXy(this.ped.Handle, target.Handle, timeout, offset.x, offset.y, offset.z, 1, true);
|
|
106
|
+
}
|
|
107
|
+
guardCurrentPosition() {
|
|
108
|
+
TaskGuardCurrentPosition(this.ped.Handle, 15, 10, true);
|
|
109
|
+
}
|
|
110
|
+
handsUp(duration) {
|
|
111
|
+
TaskHandsUp(this.ped.Handle, duration, 0, -1, false);
|
|
112
|
+
}
|
|
113
|
+
landPlane(startPosition, touchdownPosition, plane = null) {
|
|
114
|
+
if (plane === null) {
|
|
115
|
+
plane = this.ped.CurrentVehicle;
|
|
116
|
+
}
|
|
117
|
+
if (plane === null || !plane.exists() || plane.isDead()) {
|
|
118
|
+
TaskPlaneLand(this.ped.Handle, 0, startPosition.x, startPosition.y, startPosition.z, touchdownPosition.x, touchdownPosition.y, touchdownPosition.z);
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
TaskPlaneLand(this.ped.Handle, plane.Handle, startPosition.x, startPosition.y, startPosition.z, touchdownPosition.x, touchdownPosition.y, touchdownPosition.z);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
lookAt(targetOrPosition, duration = -1) {
|
|
125
|
+
if (targetOrPosition instanceof Entity)
|
|
126
|
+
TaskLookAtEntity(this.ped.Handle, targetOrPosition.Handle, duration, 0, 2);
|
|
127
|
+
else
|
|
128
|
+
TaskLookAtCoord(this.ped.Handle, targetOrPosition.x, targetOrPosition.y, targetOrPosition.z, duration, 0, 2);
|
|
129
|
+
}
|
|
130
|
+
parachuteTo(position) {
|
|
131
|
+
TaskParachuteToTarget(this.ped.Handle, position.x, position.y, position.z);
|
|
132
|
+
}
|
|
133
|
+
parkVehicle(vehicle, position, heading, radius = 20, keepEngineOn = false) {
|
|
134
|
+
TaskVehiclePark(this.ped.Handle, vehicle.Handle, position.x, position.y, position.z, heading, 1, radius, keepEngineOn);
|
|
135
|
+
}
|
|
136
|
+
performSequence(sequence) {
|
|
137
|
+
if (!sequence.IsClosed) {
|
|
138
|
+
sequence.close();
|
|
139
|
+
}
|
|
140
|
+
this.clearAll();
|
|
141
|
+
this.ped.BlockPermanentEvents = true;
|
|
142
|
+
TaskPerformSequence(this.ped.Handle, sequence.Handle);
|
|
143
|
+
}
|
|
144
|
+
async playAnimation(animDict, animName, blendInSpeed, blendOutSpeed, duration, playbackRate, flags) {
|
|
145
|
+
await LoadAnimDict(animDict);
|
|
146
|
+
TaskPlayAnim(this.ped.Handle, animDict, animName, blendInSpeed, blendOutSpeed, duration, flags, playbackRate, false, false, false);
|
|
147
|
+
RemoveAnimDict(animDict);
|
|
148
|
+
}
|
|
149
|
+
reactAndFlee(ped) {
|
|
150
|
+
TaskReactAndFleePed(this.ped.Handle, ped.Handle);
|
|
151
|
+
}
|
|
152
|
+
reloadWeapon() {
|
|
153
|
+
TaskReloadWeapon(this.ped.Handle, true);
|
|
154
|
+
}
|
|
155
|
+
shootAt(targetOrPosition, duration = -1, pattern = FiringPattern.Default) {
|
|
156
|
+
if (targetOrPosition instanceof Ped)
|
|
157
|
+
TaskShootAtEntity(this.ped.Handle, targetOrPosition.Handle, duration, pattern);
|
|
158
|
+
else
|
|
159
|
+
TaskShootAtCoord(this.ped.Handle, targetOrPosition.x, targetOrPosition.y, targetOrPosition.z, duration, pattern);
|
|
160
|
+
}
|
|
161
|
+
shuffleToNextVehicleSeat(vehicle) {
|
|
162
|
+
TaskShuffleToNextVehicleSeat(this.ped.Handle, vehicle.Handle);
|
|
163
|
+
}
|
|
164
|
+
skyDive() {
|
|
165
|
+
TaskSkyDive(this.ped.Handle);
|
|
166
|
+
}
|
|
167
|
+
slideTo(position, heading, duration = 0.7) {
|
|
168
|
+
TaskPedSlideToCoord(this.ped.Handle, position.x, position.y, position.z, heading, duration);
|
|
169
|
+
}
|
|
170
|
+
standStill(duration) {
|
|
171
|
+
TaskStandStill(this.ped.Handle, duration);
|
|
172
|
+
}
|
|
173
|
+
startScenario(name, position, heading = 0, duration = 0, sittingScenario = false, teleport = true) {
|
|
174
|
+
TaskStartScenarioAtPosition(this.ped.Handle, name, position.x, position.y, position.z, heading, duration, sittingScenario, teleport);
|
|
175
|
+
}
|
|
176
|
+
swapWeapon() {
|
|
177
|
+
TaskSwapWeapon(this.ped.Handle, false);
|
|
178
|
+
}
|
|
179
|
+
turnTo(targetOrPosition, duration = -1) {
|
|
180
|
+
if (targetOrPosition instanceof Entity)
|
|
181
|
+
TaskTurnPedToFaceEntity(this.ped.Handle, targetOrPosition.Handle, duration);
|
|
182
|
+
else
|
|
183
|
+
TaskTurnPedToFaceCoord(this.ped.Handle, targetOrPosition.x, targetOrPosition.y, targetOrPosition.z, duration);
|
|
184
|
+
}
|
|
185
|
+
useParachute() {
|
|
186
|
+
TaskParachute(this.ped.Handle, true);
|
|
187
|
+
}
|
|
188
|
+
useMobilePhone(duration = 1) {
|
|
189
|
+
TaskUseMobilePhone(this.ped.Handle, duration);
|
|
190
|
+
}
|
|
191
|
+
putAwayParachute() {
|
|
192
|
+
TaskParachute(this.ped.Handle, false);
|
|
193
|
+
}
|
|
194
|
+
putAwayMobilePhone() {
|
|
195
|
+
TaskUseMobilePhone(this.ped.Handle, 0);
|
|
196
|
+
}
|
|
197
|
+
vehicleChase(target) {
|
|
198
|
+
TaskVehicleChase(this.ped.Handle, target.Handle);
|
|
199
|
+
}
|
|
200
|
+
vehicleShootAtPed(target) {
|
|
201
|
+
TaskVehicleShootAtPed(this.ped.Handle, target.Handle, 20);
|
|
202
|
+
}
|
|
203
|
+
wait(duration) {
|
|
204
|
+
TaskPause(this.ped.Handle, duration);
|
|
205
|
+
}
|
|
206
|
+
wanderAround(position, radius) {
|
|
207
|
+
if (position && radius)
|
|
208
|
+
TaskWanderInArea(this.ped.Handle, position.x, position.y, position.z, radius, 0, 0);
|
|
209
|
+
else
|
|
210
|
+
TaskWanderStandard(this.ped.Handle, 0, 0);
|
|
211
|
+
}
|
|
212
|
+
warpIntoVehicle(vehicle, seat) {
|
|
213
|
+
TaskWarpPedIntoVehicle(this.ped.Handle, vehicle.Handle, seat);
|
|
214
|
+
}
|
|
215
|
+
warpOutOfVehicle(vehicle, flags) {
|
|
216
|
+
TaskLeaveVehicle(this.ped.Handle, vehicle.Handle, flags);
|
|
217
|
+
}
|
|
218
|
+
isPlayingAnim(dict, anim, taskFlag = 3) {
|
|
219
|
+
return IsEntityPlayingAnim(this.ped.Handle, dict, anim, taskFlag);
|
|
220
|
+
}
|
|
221
|
+
clearAll() {
|
|
222
|
+
ClearPedTasks(this.ped.Handle);
|
|
223
|
+
}
|
|
224
|
+
clearAllImmediately() {
|
|
225
|
+
ClearPedTasksImmediately(this.ped.Handle);
|
|
226
|
+
}
|
|
227
|
+
clearLookAt() {
|
|
228
|
+
TaskClearLookAt(this.ped.Handle);
|
|
229
|
+
}
|
|
230
|
+
clearSecondary() {
|
|
231
|
+
ClearPedSecondaryTask(this.ped.Handle);
|
|
232
|
+
}
|
|
233
|
+
clearAnimation(animDict, animName) {
|
|
234
|
+
StopAnimTask(this.ped.Handle, animDict, animName, -4);
|
|
235
|
+
}
|
|
236
|
+
}
|