@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,87 @@
|
|
|
1
|
+
import { ClassTypes } from '../enum/ClassTypes';
|
|
2
|
+
import { Hash } from '../type/Hash';
|
|
3
|
+
import { BaseEntity } from './BaseEntity';
|
|
4
|
+
/** @extends BaseEntity */
|
|
5
|
+
export declare class Ped extends BaseEntity {
|
|
6
|
+
/**
|
|
7
|
+
* @protected
|
|
8
|
+
* @default import("/home/skaggs/projects/fivem/server/src/enum/ClassTypes").ClassTypes.Ped
|
|
9
|
+
*/
|
|
10
|
+
protected type: ClassTypes;
|
|
11
|
+
constructor(handle: number);
|
|
12
|
+
/**
|
|
13
|
+
* Get an interable list of peds currently on the server
|
|
14
|
+
* @public
|
|
15
|
+
* @static
|
|
16
|
+
* @returns {IterableIterator<Ped>} Iterable list of Peds.
|
|
17
|
+
*/
|
|
18
|
+
static AllPeds(): IterableIterator<Ped>;
|
|
19
|
+
/**
|
|
20
|
+
* @public
|
|
21
|
+
* @static
|
|
22
|
+
* @param {number} netId
|
|
23
|
+
* @returns {Ped}
|
|
24
|
+
*/
|
|
25
|
+
static fromNetworkId(netId: number): Ped;
|
|
26
|
+
/**
|
|
27
|
+
* @public
|
|
28
|
+
* @static
|
|
29
|
+
* @param {number} handle
|
|
30
|
+
* @returns {Ped}
|
|
31
|
+
*/
|
|
32
|
+
static fromHandle(handle: number): Ped;
|
|
33
|
+
/**
|
|
34
|
+
* @public
|
|
35
|
+
*/
|
|
36
|
+
get Armour(): number;
|
|
37
|
+
/**
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
40
|
+
get CauseOfDeath(): Hash;
|
|
41
|
+
/**
|
|
42
|
+
* @public
|
|
43
|
+
*/
|
|
44
|
+
get DesiredHeading(): number;
|
|
45
|
+
/**
|
|
46
|
+
* @public
|
|
47
|
+
*/
|
|
48
|
+
get MaxHealth(): number;
|
|
49
|
+
/**
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
52
|
+
get TaskCommand(): Hash;
|
|
53
|
+
/**
|
|
54
|
+
* @public
|
|
55
|
+
*/
|
|
56
|
+
get TaskStage(): number;
|
|
57
|
+
/**
|
|
58
|
+
* @public
|
|
59
|
+
*/
|
|
60
|
+
get LastSourceOfDamage(): number;
|
|
61
|
+
/**
|
|
62
|
+
* @public
|
|
63
|
+
*/
|
|
64
|
+
get DeathCause(): number;
|
|
65
|
+
/**
|
|
66
|
+
* @public
|
|
67
|
+
*/
|
|
68
|
+
get Weapon(): Hash;
|
|
69
|
+
/**
|
|
70
|
+
* @public
|
|
71
|
+
*/
|
|
72
|
+
get Vehicle(): number;
|
|
73
|
+
/**
|
|
74
|
+
* @public
|
|
75
|
+
*/
|
|
76
|
+
get LastVehicle(): number;
|
|
77
|
+
/**
|
|
78
|
+
* @public
|
|
79
|
+
*/
|
|
80
|
+
get IsPlayer(): boolean;
|
|
81
|
+
/**
|
|
82
|
+
* @public
|
|
83
|
+
* @param {number} index
|
|
84
|
+
* @returns {number}
|
|
85
|
+
*/
|
|
86
|
+
specificTaskType(index: number): number;
|
|
87
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { ClassTypes } from '../enum/ClassTypes';
|
|
2
|
+
import { BaseEntity } from './BaseEntity';
|
|
3
|
+
/** @extends BaseEntity */
|
|
4
|
+
export class Ped extends BaseEntity {
|
|
5
|
+
constructor(handle) {
|
|
6
|
+
super(handle);
|
|
7
|
+
/**
|
|
8
|
+
* @protected
|
|
9
|
+
* @default import("/home/skaggs/projects/fivem/server/src/enum/ClassTypes").ClassTypes.Ped
|
|
10
|
+
*/
|
|
11
|
+
this.type = ClassTypes.Ped;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Get an interable list of peds currently on the server
|
|
15
|
+
* @public
|
|
16
|
+
* @static
|
|
17
|
+
* @returns {IterableIterator<Ped>} Iterable list of Peds.
|
|
18
|
+
*/
|
|
19
|
+
static *AllPeds() {
|
|
20
|
+
for (const pedId of GetAllPeds()) {
|
|
21
|
+
yield new Ped(pedId);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @public
|
|
26
|
+
* @static
|
|
27
|
+
* @param {number} netId
|
|
28
|
+
* @returns {Ped}
|
|
29
|
+
*/
|
|
30
|
+
static fromNetworkId(netId) {
|
|
31
|
+
return new Ped(NetworkGetEntityFromNetworkId(netId));
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @public
|
|
35
|
+
* @static
|
|
36
|
+
* @param {number} handle
|
|
37
|
+
* @returns {Ped}
|
|
38
|
+
*/
|
|
39
|
+
static fromHandle(handle) {
|
|
40
|
+
return new Ped(handle);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
45
|
+
get Armour() {
|
|
46
|
+
return GetPedArmour(this.handle);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* @public
|
|
50
|
+
*/
|
|
51
|
+
get CauseOfDeath() {
|
|
52
|
+
return GetPedCauseOfDeath(this.handle);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* @public
|
|
56
|
+
*/
|
|
57
|
+
get DesiredHeading() {
|
|
58
|
+
return GetPedDesiredHeading(this.handle);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* @public
|
|
62
|
+
*/
|
|
63
|
+
get MaxHealth() {
|
|
64
|
+
return GetPedMaxHealth(this.handle);
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* @public
|
|
68
|
+
*/
|
|
69
|
+
get TaskCommand() {
|
|
70
|
+
return GetPedScriptTaskCommand(this.handle);
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* @public
|
|
74
|
+
*/
|
|
75
|
+
get TaskStage() {
|
|
76
|
+
return GetPedScriptTaskStage(this.handle);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* @public
|
|
80
|
+
*/
|
|
81
|
+
get LastSourceOfDamage() {
|
|
82
|
+
return GetPedSourceOfDamage(this.handle);
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* @public
|
|
86
|
+
*/
|
|
87
|
+
get DeathCause() {
|
|
88
|
+
return GetPedCauseOfDeath(this.handle);
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* @public
|
|
92
|
+
*/
|
|
93
|
+
get Weapon() {
|
|
94
|
+
return GetSelectedPedWeapon(this.handle);
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* @public
|
|
98
|
+
*/
|
|
99
|
+
get Vehicle() {
|
|
100
|
+
return GetVehiclePedIsIn(this.handle, false);
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* @public
|
|
104
|
+
*/
|
|
105
|
+
get LastVehicle() {
|
|
106
|
+
return GetVehiclePedIsIn(this.handle, true);
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* @public
|
|
110
|
+
*/
|
|
111
|
+
get IsPlayer() {
|
|
112
|
+
return IsPedAPlayer(this.handle);
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* @public
|
|
116
|
+
* @param {number} index
|
|
117
|
+
* @returns {number}
|
|
118
|
+
*/
|
|
119
|
+
specificTaskType(index) {
|
|
120
|
+
return GetPedSpecificTaskType(this.handle, index);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/// <reference types="@citizenfx/server" />
|
|
2
|
+
import { ClassTypes } from '../enum/ClassTypes';
|
|
3
|
+
import { Vector3 } from '../utils';
|
|
4
|
+
import { Ped } from './Ped';
|
|
5
|
+
export declare class Player {
|
|
6
|
+
private readonly source;
|
|
7
|
+
/**
|
|
8
|
+
* @protected
|
|
9
|
+
* @default import("/home/skaggs/projects/fivem/server/src/enum/ClassTypes").ClassTypes.Player
|
|
10
|
+
*/
|
|
11
|
+
protected type: ClassTypes;
|
|
12
|
+
constructor(source: number);
|
|
13
|
+
/**
|
|
14
|
+
* Get an interable list of players currently on the server
|
|
15
|
+
* @public
|
|
16
|
+
* @static
|
|
17
|
+
* @returns {IterableIterator<Player>} Iterable list of Players.
|
|
18
|
+
*/
|
|
19
|
+
static AllPlayers(): IterableIterator<Player>;
|
|
20
|
+
/**
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
get Exists(): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* @public
|
|
26
|
+
*/
|
|
27
|
+
get Source(): number;
|
|
28
|
+
/**
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
|
+
get State(): StateBagInterface;
|
|
32
|
+
/**
|
|
33
|
+
* Returns the player source casted as a string
|
|
34
|
+
* @public
|
|
35
|
+
*/
|
|
36
|
+
get Src(): string;
|
|
37
|
+
/**
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
40
|
+
get Ped(): Ped;
|
|
41
|
+
/**
|
|
42
|
+
* @public
|
|
43
|
+
*/
|
|
44
|
+
get Tokens(): string[];
|
|
45
|
+
/**
|
|
46
|
+
* @public
|
|
47
|
+
*/
|
|
48
|
+
get Identifiers(): string[];
|
|
49
|
+
/**
|
|
50
|
+
* @public
|
|
51
|
+
*/
|
|
52
|
+
get Endpoint(): string;
|
|
53
|
+
/**
|
|
54
|
+
* @public
|
|
55
|
+
*/
|
|
56
|
+
get CamerRotation(): Vector3;
|
|
57
|
+
/**
|
|
58
|
+
* Returns the time since the last player UDP message
|
|
59
|
+
* @public
|
|
60
|
+
*/
|
|
61
|
+
get LastMessage(): number;
|
|
62
|
+
/**
|
|
63
|
+
* @public
|
|
64
|
+
*/
|
|
65
|
+
get MaxArmour(): number;
|
|
66
|
+
/**
|
|
67
|
+
* @public
|
|
68
|
+
*/
|
|
69
|
+
get MaxHealth(): number;
|
|
70
|
+
/**
|
|
71
|
+
* @public
|
|
72
|
+
*/
|
|
73
|
+
get MeleeModifier(): number;
|
|
74
|
+
/**
|
|
75
|
+
* @returns the players name
|
|
76
|
+
* @public
|
|
77
|
+
*/
|
|
78
|
+
get Name(): string;
|
|
79
|
+
/**
|
|
80
|
+
* @public
|
|
81
|
+
* @returns {string} the players name with any color code unicode, etc removed, this can lead to there being no name at all
|
|
82
|
+
*/
|
|
83
|
+
filteredName(): string;
|
|
84
|
+
/**
|
|
85
|
+
* @returns the players round trip ping
|
|
86
|
+
* @public
|
|
87
|
+
*/
|
|
88
|
+
get Ping(): number;
|
|
89
|
+
/**
|
|
90
|
+
* @returns the current routhing bucket the player is in, default is 0
|
|
91
|
+
* @public
|
|
92
|
+
*/
|
|
93
|
+
get RoutingBucket(): number;
|
|
94
|
+
/**
|
|
95
|
+
* @public
|
|
96
|
+
*/
|
|
97
|
+
get Team(): number;
|
|
98
|
+
/**
|
|
99
|
+
* @public
|
|
100
|
+
*/
|
|
101
|
+
get WantedPosition(): Vector3;
|
|
102
|
+
/**
|
|
103
|
+
* @public
|
|
104
|
+
*/
|
|
105
|
+
get WantedLevel(): number;
|
|
106
|
+
/**
|
|
107
|
+
* @public
|
|
108
|
+
*/
|
|
109
|
+
get IsEvadingWanted(): boolean;
|
|
110
|
+
/**
|
|
111
|
+
* @public
|
|
112
|
+
*/
|
|
113
|
+
get WeaponDamageModifier(): number;
|
|
114
|
+
/**
|
|
115
|
+
* @public
|
|
116
|
+
*/
|
|
117
|
+
get WeaponDefenseModifier(): number;
|
|
118
|
+
/**
|
|
119
|
+
* @public
|
|
120
|
+
*/
|
|
121
|
+
get WeaponDefenseModifier2(): number;
|
|
122
|
+
/**
|
|
123
|
+
* @public
|
|
124
|
+
*/
|
|
125
|
+
get AirDragMultiplier(): number;
|
|
126
|
+
/**
|
|
127
|
+
* @public
|
|
128
|
+
*/
|
|
129
|
+
get IsUsingSuperJump(): boolean;
|
|
130
|
+
/**
|
|
131
|
+
* @public
|
|
132
|
+
*/
|
|
133
|
+
get IsMuted(): boolean;
|
|
134
|
+
/**
|
|
135
|
+
* @public
|
|
136
|
+
*/
|
|
137
|
+
set IsMuted(isMuted: boolean);
|
|
138
|
+
/**
|
|
139
|
+
* @public
|
|
140
|
+
* @param {string} object
|
|
141
|
+
* @returns {boolean}
|
|
142
|
+
*/
|
|
143
|
+
isAceAllowed(object: string): boolean;
|
|
144
|
+
/**
|
|
145
|
+
* @public
|
|
146
|
+
* @param {boolean} [lastPursuit=false]
|
|
147
|
+
* @returns {number}
|
|
148
|
+
*/
|
|
149
|
+
timeInPersuit(lastPursuit?: boolean): number;
|
|
150
|
+
/**
|
|
151
|
+
* @public
|
|
152
|
+
* @param {string} [reason='No reason specified']
|
|
153
|
+
* @returns {void}
|
|
154
|
+
*/
|
|
155
|
+
drop(reason?: string): void;
|
|
156
|
+
/**
|
|
157
|
+
* @public
|
|
158
|
+
* @param {string} eventName
|
|
159
|
+
* @param {...any} [args]
|
|
160
|
+
* @returns {void}
|
|
161
|
+
*/
|
|
162
|
+
emit(eventName: string, ...args: any[]): void;
|
|
163
|
+
}
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import cfx from '../cfx';
|
|
2
|
+
import { ClassTypes } from '../enum/ClassTypes';
|
|
3
|
+
import { cleanPlayerName } from '../utils';
|
|
4
|
+
import { Vector3 } from '../utils';
|
|
5
|
+
import { Ped } from './Ped';
|
|
6
|
+
export class Player {
|
|
7
|
+
constructor(source) {
|
|
8
|
+
this.source = source;
|
|
9
|
+
/**
|
|
10
|
+
* @protected
|
|
11
|
+
* @default import("/home/skaggs/projects/fivem/server/src/enum/ClassTypes").ClassTypes.Player
|
|
12
|
+
*/
|
|
13
|
+
this.type = ClassTypes.Player;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Get an interable list of players currently on the server
|
|
17
|
+
* @public
|
|
18
|
+
* @static
|
|
19
|
+
* @returns {IterableIterator<Player>} Iterable list of Players.
|
|
20
|
+
*/
|
|
21
|
+
static *AllPlayers() {
|
|
22
|
+
const num = GetNumPlayerIndices();
|
|
23
|
+
for (let i = 0; i < num; i++) {
|
|
24
|
+
yield new Player(parseInt(GetPlayerFromIndex(i)));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
30
|
+
get Exists() {
|
|
31
|
+
return this.source !== 0;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @public
|
|
35
|
+
*/
|
|
36
|
+
get Source() {
|
|
37
|
+
return this.source;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
get State() {
|
|
43
|
+
return cfx.Player(this.source).state;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Returns the player source casted as a string
|
|
47
|
+
* @public
|
|
48
|
+
*/
|
|
49
|
+
get Src() {
|
|
50
|
+
return this.source;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* @public
|
|
54
|
+
*/
|
|
55
|
+
get Ped() {
|
|
56
|
+
return new Ped(GetPlayerPed(this.Src));
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* @public
|
|
60
|
+
*/
|
|
61
|
+
get Tokens() {
|
|
62
|
+
return getPlayerTokens(this.source);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* @public
|
|
66
|
+
*/
|
|
67
|
+
get Identifiers() {
|
|
68
|
+
return getPlayerIdentifiers(this.source);
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* @public
|
|
72
|
+
*/
|
|
73
|
+
get Endpoint() {
|
|
74
|
+
return GetPlayerEndpoint(this.Src);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* @public
|
|
78
|
+
*/
|
|
79
|
+
get CamerRotation() {
|
|
80
|
+
return Vector3.fromArray(GetPlayerCameraRotation(this.Src));
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Returns the time since the last player UDP message
|
|
84
|
+
* @public
|
|
85
|
+
*/
|
|
86
|
+
get LastMessage() {
|
|
87
|
+
return GetPlayerLastMsg(this.Src);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* @public
|
|
91
|
+
*/
|
|
92
|
+
get MaxArmour() {
|
|
93
|
+
return GetPlayerMaxArmour(this.Src);
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* @public
|
|
97
|
+
*/
|
|
98
|
+
get MaxHealth() {
|
|
99
|
+
return GetPlayerMaxHealth(this.Src);
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* @public
|
|
103
|
+
*/
|
|
104
|
+
get MeleeModifier() {
|
|
105
|
+
return GetPlayerMeleeWeaponDamageModifier(this.Src);
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* @returns the players name
|
|
109
|
+
* @public
|
|
110
|
+
*/
|
|
111
|
+
get Name() {
|
|
112
|
+
return GetPlayerName(this.Src);
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* @public
|
|
116
|
+
* @returns {string} the players name with any color code unicode, etc removed, this can lead to there being no name at all
|
|
117
|
+
*/
|
|
118
|
+
filteredName() {
|
|
119
|
+
return cleanPlayerName(this.Name);
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* @returns the players round trip ping
|
|
123
|
+
* @public
|
|
124
|
+
*/
|
|
125
|
+
get Ping() {
|
|
126
|
+
return GetPlayerPing(this.Src);
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* @returns the current routhing bucket the player is in, default is 0
|
|
130
|
+
* @public
|
|
131
|
+
*/
|
|
132
|
+
get RoutingBucket() {
|
|
133
|
+
return GetPlayerRoutingBucket(this.Src);
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* @public
|
|
137
|
+
*/
|
|
138
|
+
get Team() {
|
|
139
|
+
return GetPlayerTeam(this.Src);
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* @public
|
|
143
|
+
*/
|
|
144
|
+
get WantedPosition() {
|
|
145
|
+
return Vector3.fromArray(GetPlayerWantedCentrePosition(this.Src));
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* @public
|
|
149
|
+
*/
|
|
150
|
+
get WantedLevel() {
|
|
151
|
+
return GetPlayerWantedLevel(this.Src);
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* @public
|
|
155
|
+
*/
|
|
156
|
+
get IsEvadingWanted() {
|
|
157
|
+
return IsPlayerEvadingWantedLevel(this.Src);
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* @public
|
|
161
|
+
*/
|
|
162
|
+
get WeaponDamageModifier() {
|
|
163
|
+
return GetPlayerWeaponDamageModifier(this.Src);
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* @public
|
|
167
|
+
*/
|
|
168
|
+
get WeaponDefenseModifier() {
|
|
169
|
+
return GetPlayerWeaponDefenseModifier(this.Src);
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* @public
|
|
173
|
+
*/
|
|
174
|
+
get WeaponDefenseModifier2() {
|
|
175
|
+
return GetPlayerWeaponDefenseModifier_2(this.Src);
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* @public
|
|
179
|
+
*/
|
|
180
|
+
get AirDragMultiplier() {
|
|
181
|
+
return GetAirDragMultiplierForPlayersVehicle(this.Src);
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* @public
|
|
185
|
+
*/
|
|
186
|
+
get IsUsingSuperJump() {
|
|
187
|
+
return IsPlayerUsingSuperJump(this.Src);
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* @public
|
|
191
|
+
*/
|
|
192
|
+
get IsMuted() {
|
|
193
|
+
return MumbleIsPlayerMuted(this.source);
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* @public
|
|
197
|
+
*/
|
|
198
|
+
set IsMuted(isMuted) {
|
|
199
|
+
MumbleSetPlayerMuted(this.source, isMuted);
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* @public
|
|
203
|
+
* @param {string} object
|
|
204
|
+
* @returns {boolean}
|
|
205
|
+
*/
|
|
206
|
+
isAceAllowed(object) {
|
|
207
|
+
return IsPlayerAceAllowed(this.Src, object);
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* @public
|
|
211
|
+
* @param {boolean} [lastPursuit=false]
|
|
212
|
+
* @returns {number}
|
|
213
|
+
*/
|
|
214
|
+
timeInPersuit(lastPursuit = false) {
|
|
215
|
+
return GetPlayerTimeInPursuit(this.Src, lastPursuit);
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* @public
|
|
219
|
+
* @param {string} [reason='No reason specified']
|
|
220
|
+
* @returns {void}
|
|
221
|
+
*/
|
|
222
|
+
drop(reason = 'No reason specified') {
|
|
223
|
+
DropPlayer(this.Src, reason);
|
|
224
|
+
}
|
|
225
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
226
|
+
/**
|
|
227
|
+
* @public
|
|
228
|
+
* @param {string} eventName
|
|
229
|
+
* @param {...any} [args]
|
|
230
|
+
* @returns {void}
|
|
231
|
+
*/
|
|
232
|
+
emit(eventName, ...args) {
|
|
233
|
+
TriggerClientEvent(eventName, this.source, ...args);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ClassTypes } from '../enum/ClassTypes';
|
|
2
|
+
import { BaseEntity } from './BaseEntity';
|
|
3
|
+
/** @extends BaseEntity */
|
|
4
|
+
export declare class Prop extends BaseEntity {
|
|
5
|
+
/**
|
|
6
|
+
* @protected
|
|
7
|
+
* @default import("/home/skaggs/projects/fivem/server/src/enum/ClassTypes").ClassTypes.Prop
|
|
8
|
+
*/
|
|
9
|
+
protected type: ClassTypes;
|
|
10
|
+
constructor(handle: number);
|
|
11
|
+
/**
|
|
12
|
+
* Get an interable list of props currently on the server
|
|
13
|
+
* @public
|
|
14
|
+
* @static
|
|
15
|
+
* @returns {IterableIterator<Prop>} Iterable list of Props.
|
|
16
|
+
*/
|
|
17
|
+
static AllProps(): IterableIterator<Prop>;
|
|
18
|
+
/**
|
|
19
|
+
* @public
|
|
20
|
+
* @static
|
|
21
|
+
* @param {number} netId
|
|
22
|
+
* @returns {Prop}
|
|
23
|
+
*/
|
|
24
|
+
static fromNetworkId(netId: number): Prop;
|
|
25
|
+
/**
|
|
26
|
+
* @public
|
|
27
|
+
* @static
|
|
28
|
+
* @param {number} handle
|
|
29
|
+
* @returns {Prop}
|
|
30
|
+
*/
|
|
31
|
+
static fromHandle(handle: number): Prop;
|
|
32
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ClassTypes } from '../enum/ClassTypes';
|
|
2
|
+
import { BaseEntity } from './BaseEntity';
|
|
3
|
+
/** @extends BaseEntity */
|
|
4
|
+
export class Prop extends BaseEntity {
|
|
5
|
+
constructor(handle) {
|
|
6
|
+
super(handle);
|
|
7
|
+
/**
|
|
8
|
+
* @protected
|
|
9
|
+
* @default import("/home/skaggs/projects/fivem/server/src/enum/ClassTypes").ClassTypes.Prop
|
|
10
|
+
*/
|
|
11
|
+
this.type = ClassTypes.Prop;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Get an interable list of props currently on the server
|
|
15
|
+
* @public
|
|
16
|
+
* @static
|
|
17
|
+
* @returns {IterableIterator<Prop>} Iterable list of Props.
|
|
18
|
+
*/
|
|
19
|
+
static *AllProps() {
|
|
20
|
+
for (const prop of GetAllObjects()) {
|
|
21
|
+
yield new Prop(prop);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @public
|
|
26
|
+
* @static
|
|
27
|
+
* @param {number} netId
|
|
28
|
+
* @returns {Prop}
|
|
29
|
+
*/
|
|
30
|
+
static fromNetworkId(netId) {
|
|
31
|
+
return new Prop(NetworkGetEntityFromNetworkId(netId));
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @public
|
|
35
|
+
* @static
|
|
36
|
+
* @param {number} handle
|
|
37
|
+
* @returns {Prop}
|
|
38
|
+
*/
|
|
39
|
+
static fromHandle(handle) {
|
|
40
|
+
return new Prop(handle);
|
|
41
|
+
}
|
|
42
|
+
}
|