diff --git a/library/natives/GTAV/AUDIO.lua b/library/natives/GTAV/AUDIO.lua index 8cb067f..443e8ca 100644 --- a/library/natives/GTAV/AUDIO.lua +++ b/library/natives/GTAV/AUDIO.lua @@ -287,6 +287,17 @@ SetVehicleAudio = ForceUseAudioGameObject ---@deprecated ForceVehicleEngineAudio = ForceUseAudioGameObject +---**`AUDIO` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0xEB7D0E1FCC8FE17A) +---This native is used alongside with [`SET_VEHICLE_TYRE_BURST`](#\_0xEC6A202EE4960385). +--- +---``` +---NativeDB Introduced: v3258 +---``` +---@param vehicle integer +---@param force boolean +function ForceVehicleEngineSynth(vehicle, force) end + ---**`AUDIO` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xD57AAAE0E2214D11) ---Allows script to freeze the microphone for a single frame, mantaining its current transform/settings. @@ -814,11 +825,6 @@ SetRadioStationDisabled = LockRadioStation ---@param trackListName string function LockRadioStationTrackList(radioStation, trackListName) end ----**`AUDIO` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0x0150B6FF25A9E2E5) ----This native does not have an official description. -function N_0x0150b6ff25a9e2e5() end - ---**`AUDIO` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x02E93C796ABD3A97) ---**This native does absolutely nothing, just a nullsub** @@ -831,25 +837,11 @@ function N_0x02e93c796abd3a97(p0) end ---@param p0 any function N_0x11579d940949c49e(p0) end ----**`AUDIO` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0x159B7318403A1CD8) ----This native does not have an official description. ----@param p0 any -function N_0x159b7318403a1cd8(p0) end - ---**`AUDIO` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x19AF7ED9B9D23058) ---This native does not have an official description. function N_0x19af7ed9b9d23058() end ----**`AUDIO` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0x2ACABED337622DF2) ----``` ----NativeDB Introduced: v1493 ----``` ----@param p0 string -function N_0x2acabed337622df2(p0) end - ---**`AUDIO` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x2DD39BF3E2F9C47F) ---``` @@ -1061,12 +1053,12 @@ PlayAmbientSpeechAtCoords = PlayAmbientSpeechFromPositionNative ---```cpp ---enum eAudAnimalType { --- AUD_ANIMAL_NONE = -1, ---- AUD_ANIMAL_BOAR, ---- AUD_ANIMAL_CHICKEN, ---- AUD_ANIMAL_DOG, ---- AUD_ANIMAL_DOG_ROTTWEILER, ---- AUD_ANIMAL_HORSE, ---- AUD_NUM_ANIMALS +--- AUD_ANIMAL_BOAR = 0, +--- AUD_ANIMAL_CHICKEN = 1, +--- AUD_ANIMAL_DOG = 2, +--- AUD_ANIMAL_DOG_ROTTWEILER = 3, +--- AUD_ANIMAL_HORSE = 4, +--- AUD_NUM_ANIMALS = 5 ---} ---``` ---@param pedHandle integer @@ -1105,6 +1097,10 @@ function PlayMissionCompleteAudio(audioName) end ---This native had a 4th parameter added in newer game builds ---`syncOverNetwork` creates a `CPedPlayPainEvent` when set to true, by default this variable is false. --- +---You won't be able to use this for clones (remote pedestrians that are not owned by you) or migrating peds if `syncOverNetwork` is set to true; it simply won't execute. +--- +---The `ped` should also have speech for this to work. +--- ---```cpp ---enum eAudDamageReason { --- AUD_DAMAGE_REASON_DEFAULT = 0, @@ -1117,7 +1113,8 @@ function PlayMissionCompleteAudio(audioName) end --- AUD_DAMAGE_REASON_SCREAM_TERROR = 7, --- AUD_DAMAGE_REASON_ON_FIRE = 8, --- AUD_DAMAGE_REASON_DROWNING = 9, ---- AUD_DAMAGE_REASON_SURFACE_DROWNING = 10, // drowning on the surface of water, after we time out +--- // drowning on the surface of water, after we time out +--- AUD_DAMAGE_REASON_SURFACE_DROWNING = 10, --- AUD_DAMAGE_REASON_INHALE = 11, --- AUD_DAMAGE_REASON_EXHALE = 12, --- AUD_DAMAGE_REASON_POST_FALL_GRUNT = 13, @@ -1640,10 +1637,10 @@ function SetAmbientZoneStatePersistent(zoneName, enabled, forceUpdate) end ---[Native Documentation](https://docs.fivem.net/natives/?_0xCC97B29285B1DC3B) ---```cpp ---enum eAudAnimalMood { ---- AUD_ANIMAL_MOOD_ANGRY, ---- AUD_ANIMAL_MOOD_PLAYFUL, +--- AUD_ANIMAL_MOOD_ANGRY = 0, +--- AUD_ANIMAL_MOOD_PLAYFUL = 1, --- ---- AUD_ANIMAL_MOOD_NUM_MOODS +--- AUD_ANIMAL_MOOD_NUM_MOODS = 2 ---} ---``` ---@param animal integer @@ -1654,49 +1651,51 @@ function SetAnimalMood(animal, mood) end ---[Native Documentation](https://docs.fivem.net/natives/?_0xB9EFD5C25018725A) ---Generic interface to toggle audio functionality, with auto-reset on script termination and support for multiple script threads --- +---Flags used in game scripts: +---| Flag Name | Description of Usage | +---| ----- | -------- | +---| ActivateSwitchWheelAudio | | +---| AllowAmbientSpeechInSlowMo | | +---| AllowCutsceneOverScreenFade | | +---| AllowForceRadioAfterRetune | | +---| AllowPainAndAmbientSpeechToPlayDuringCutscene | | +---| AllowPlayerAIOnMission | | +---| AllowPoliceScannerWhenPlayerHasNoControl | | +---| AllowRadioDuringSwitch | | +---| AllowRadioOverScreenFade | | +---| AllowScoreAndRadio | | +---| AllowScriptedSpeechInSlowMo | | +---| AvoidMissionCompleteDelay | | +---| DisableAbortConversationForDeathAndInjury | | +---| DisableAbortConversationForRagdoll | | +---| DisableBarks | | +---| DisableFlightMusic | | +---| DisableNPCHeadsetSpeechAttenuation | | +---| DisableReplayScriptStreamRecording | | +---| EnableHeadsetBeep | | +---| EnableMissileLockWarningForAllVehicles | | +---| ForceConversationInterrupt | | +---| ForceSeamlessRadioSwitch | | +---| ForceSniperAudio | | +---| FrontendRadioDisabled | | +---| HoldMissionCompleteWhenPrepared | | +---| IsDirectorModeActive | Allows you to play speech infinitely without any pauses like in Director Mode. | +---| IsPlayerOnMissionForSpeech | | +---| ListenerReverbDisabled | | +---| LoadMPData | | +---| MobileRadioInGame | | +---| OnlyAllowScriptTriggerPoliceScanner | | +---| PlayerOnDLCHeist4Island | | +---| PlayMenuMusic | | +---| PoliceScannerDisabled | | +---| ScriptedConvListenerMaySpeak | | +---| SpeechDucksScore | | +---| SuppressPlayerScubaBreathing | | +---| UseQuietSceneSoftVersion | | +---| WantedMusicDisabled | | +---| WantedMusicOnMission | | +--- ---``` ----Possible flag names: ----"ActivateSwitchWheelAudio" ----"AllowAmbientSpeechInSlowMo" ----"AllowCutsceneOverScreenFade" ----"AllowForceRadioAfterRetune" ----"AllowPainAndAmbientSpeechToPlayDuringCutscene" ----"AllowPlayerAIOnMission" ----"AllowPoliceScannerWhenPlayerHasNoControl" ----"AllowRadioDuringSwitch" ----"AllowRadioOverScreenFade" ----"AllowScoreAndRadio" ----"AllowScriptedSpeechInSlowMo" ----"AvoidMissionCompleteDelay" ----"DisableAbortConversationForDeathAndInjury" ----"DisableAbortConversationForRagdoll" ----"DisableBarks" ----"DisableFlightMusic" ----"DisableReplayScriptStreamRecording" ----"EnableHeadsetBeep" ----"ForceConversationInterrupt" ----"ForceSeamlessRadioSwitch" ----"ForceSniperAudio" ----"FrontendRadioDisabled" ----"HoldMissionCompleteWhenPrepared" ----"IsDirectorModeActive" ----"IsPlayerOnMissionForSpeech" ----"ListenerReverbDisabled" ----"LoadMPData" ----"MobileRadioInGame" ----"OnlyAllowScriptTriggerPoliceScanner" ----"PlayMenuMusic" ----"PoliceScannerDisabled" ----"ScriptedConvListenerMaySpeak" ----"SpeechDucksScore" ----"SuppressPlayerScubaBreathing" ----"WantedMusicDisabled" ----"WantedMusicOnMission" ----------------------------------- ----No added flag names between b393d and b573d, including b573d. ----####################################################################### ----"IsDirectorModeActive" is an audio flag which will allow you to play speech infinitely without any pauses like in Director Mode. --------------------------------------------------------------------------- ---All flag IDs and hashes: ---ID: 01 | Hash: 0x20A7858F ---ID: 02 | Hash: 0xA11C2259 @@ -1785,7 +1784,7 @@ function SetAudioScriptCleanupTime(timeMs) end ---Needs to be called every frame. --- ---```cpp ----enum audSpecialEffectMode +---enum eAudSpecialEffectMode ---{ --- kSpecialEffectModeNormal = 0, --- kSpecialEffectModeUnderwater = 1, @@ -1880,6 +1879,13 @@ function SetEntityForNullConvPed(speakerConversationIndex, entity) end ---@param active boolean function SetFrontendRadioActive(active) end +---**`AUDIO` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0x159B7318403A1CD8) +---Sets the global radio signal level, lower value will cause radio static. +---Used only a handful of times in scripts. +---@param signalLevel number +function SetGlobalRadioSignalLevel(signalLevel) end + ---**`AUDIO` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x3BD3F52BA9B1E4E8) ---This native does not have an official description. @@ -2461,6 +2467,16 @@ function TriggerMusicEvent(eventName) end ---@param vehicle integer function TriggerSiren(vehicle) end +---**`AUDIO` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0x2ACABED337622DF2) +---``` +---NativeDB Introduced: v1493 +---``` +--- +---Removes all instances of a given context block. +---@param groupName string +function UnblockSpeechContextGroup(groupName) end + ---**`AUDIO` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xFC00454CF60B91DD) ---This native does not have an official description. @@ -2491,6 +2507,11 @@ function UnlockRadioStationTrackList(radioStation, trackListName) end ---``` function UnregisterScriptWithAudio() end +---**`AUDIO` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0x0150B6FF25A9E2E5) +---Unloads tennis vocalization banks loaded with [`REQUEST_TENNIS_BANKS`](#\_0x4ADA3F19BE4A6047). +function UnrequestTennisBanks() end + ---**`AUDIO` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x7EC3C679D0E7E46B) ---Updates a playing sounds absolute position. diff --git a/library/natives/GTAV/CAM.lua b/library/natives/GTAV/CAM.lua index e49281a..4819f8c 100644 --- a/library/natives/GTAV/CAM.lua +++ b/library/natives/GTAV/CAM.lua @@ -1,5 +1,18 @@ ---@meta +---**`CAM` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0x34CFC4C2A38E83E3) +---``` +---NativeDB Introduced: v3258 +---``` +---@param camTo integer +---@param camFrom integer +---@param duration integer +---@param easeLocation integer +---@param easeRotation integer +---@param easeFove integer +function ActivateCamWithInterpAndFovCurve(camTo, camFrom, duration, easeLocation, easeRotation, easeFove) end + ---**`CAM` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x8609C75EC438FB3B) ---``` @@ -113,23 +126,6 @@ function AttachCamToEntity(cam, entity, xOffset, yOffset, zOffset, isRelative) e ---@param isRelative boolean function AttachCamToPedBone(cam, ped, boneIndex, xOffset, yOffset, zOffset, isRelative) end ----**`CAM` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0x149916F50C34A40D) ----``` ----NativeDB Introduced: v1180 ----``` ----@param cam integer ----@param ped integer ----@param boneIndex integer ----@param p3 number ----@param p4 number ----@param p5 number ----@param p6 number ----@param p7 number ----@param p8 number ----@param p9 boolean -function AttachCamToPedBone_2(cam, ped, boneIndex, p3, p4, p5, p6, p7, p8, p9) end - ---**`CAM` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x8DB3F12A02CAEF72) ---This native works with vehicles only. @@ -193,7 +189,14 @@ function CreateCam(camName, active) end ---**`CAM` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x5E3CF89C6BCCA67D) ----This native does not have an official description. +---Creates a camera with the specified camera hash, You can use `SET_CAM_` natives to manipulate the camera. +---Make sure to call [RENDER_SCRIPT_CAMS](#\_0x07E5B515DB0636FC) once the camera is created, or this won't have any visible effect. +--- +---Take a look at [CREATE_CAM](#\_0xC3981DCE61D9E13F) if you would like to see the available camera names. +--- +---``` +---NativeDB Introduced: v323 +---``` ---@param camHash integer | string ---@param active boolean ---@return integer @@ -201,10 +204,14 @@ function CreateCamera(camHash, active) end ---**`CAM` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x6ABFA3E16460F22D) ----CAM::\_GET_GAMEPLAY_CAM_COORDS can be used instead of posX,Y,Z\ ----CAM::\_GET_GAMEPLAY_CAM_ROT can be used instead of rotX,Y,Z\ ----CAM::\_GET_FINAL_RENDERED_CAM_FOV can be used instead of p7 (Possible p7 is FOV parameter. )\ ----rotationOrder is 2 usually +---Create a camera with the specified camera hash, You can use `SET_CAM_` natives to manipulate the camera. +---Make sure to call [RENDER_SCRIPT_CAMS](#\_0x07E5B515DB0636FC) once the camera is created, or this won't have any visible effect. +--- +---Take a look at [CREATE_CAM](#\_0xC3981DCE61D9E13F) if you would like to see the available camera names. +--- +---``` +---NativeDB Introduced: v323 +---``` ---@param camHash integer | string ---@param posX number ---@param posY number @@ -351,7 +358,7 @@ function ForceCinematicRenderingThisUpdate(p0) end ---Enumerated type defined in camControlHelperMetadataViewModes: --- ---```cpp ----enum Context { +---enum eContext { --- ON_FOOT = 0, // [G|S]ET_FOLLOW_PED_CAM_* --- IN_VEHICLE = 1, // [G|S]ET_FOLLOW_VEHICLE_CAM_* --- ON_BIKE = 2, @@ -587,7 +594,7 @@ function GetFocusPedOnScreen(p0, p1, p2, p3, p4, p5, p6, p7, p8) end ---[Native Documentation](https://docs.fivem.net/natives/?_0x8D4D46230B2C353A) ---```cpp ---// view mode enumeration ----enum _0xA11D7CA8 +---enum eCamViewMode ---{ --- THIRD_PERSON_NEAR = 0, --- THIRD_PERSON_MEDIUM = 1, @@ -656,6 +663,69 @@ function GetGameplayCamRot(rotationOrder) end ---@return integer function GetRenderingCam() end +---**`CAM` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0x202A5ED9CE01D6E7) +---Attaches a camera to an entity, including full matrix transformations for both rotation and position offsets. +--- +---``` +---NativeDB Introduced: v2189 +---``` +---@param cam integer +---@param entity integer +---@param xRot number +---@param yRot number +---@param zRot number +---@param xOffset number +---@param yOffset number +---@param zOffset number +---@param isRelative boolean +function HardAttachCamToEntity(cam, entity, xRot, yRot, zRot, xOffset, yOffset, zOffset, isRelative) end + +---**`CAM` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0x149916F50C34A40D) +---Attaches a camera to a specific bone of a Ped, including full matrix transformations for both rotation and position offsets. +---This native works with peds only. +--- +---``` +---NativeDB Introduced: v1180 +---``` +---@param cam integer +---@param ped integer +---@param boneIndex integer +---@param xRot number +---@param yRot number +---@param zRot number +---@param xOffset number +---@param yOffset number +---@param zOffset number +---@param isRelative boolean +function HardAttachCamToPedBone(cam, ped, boneIndex, xRot, yRot, zRot, xOffset, yOffset, zOffset, isRelative) end + +---@deprecated +AttachCamToPedBone_2 = HardAttachCamToPedBone + +---**`CAM` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0xDDA77EE33C005AAF) +---Interpolates the camera to specified parameters over a set duration using various curve types for position, rotation, and fov. +--- +---``` +---NativeDB Introduced: v3258 +---``` +---@param camera integer +---@param camPosX number +---@param camPosY number +---@param camPosZ number +---@param camRotX number +---@param camRotY number +---@param camRotZ number +---@param fov number +---@param duration integer +---@param posCurveType integer +---@param rotCurveType integer +---@param rotOrder integer +---@param fovCurveType integer +function InterpolateCamWithParams(camera, camPosX, camPosY, camPosZ, camRotX, camRotY, camRotZ, fov, duration, posCurveType, rotCurveType, rotOrder, fovCurveType) end + ---**`CAM` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xF4F2C0D4EE209E20) ---Resets the idle camera timer. Calling that in a loop once every few seconds is enough to disable the idle cinematic camera. @@ -898,22 +968,6 @@ function N_0x17fca7199a530203() end ---@return any function N_0x1f2300cb7fa7b7f6() end ----**`CAM` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0x202A5ED9CE01D6E7) ----``` ----NativeDB Introduced: v2189 ----``` ----@param p0 any ----@param p1 any ----@param p2 any ----@param p3 any ----@param p4 any ----@param p5 any ----@param p6 any ----@param p7 any ----@param p8 any -function N_0x202a5ed9ce01d6e7(p0, p1, p2, p3, p4, p5, p6, p7, p8) end - ---**`CAM` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x247ACBC4ABBC9D1C) ---This native does not have an official description. @@ -927,13 +981,6 @@ function N_0x247acbc4abbc9d1c(p0) end ---@param p1 boolean function N_0x271017b9ba825366(p0, p1) end ----**`CAM` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0x271401846BD26E92) ----This native does not have an official description. ----@param p0 boolean ----@param p1 boolean -function N_0x271401846bd26e92(p0, p1) end - ---**`CAM` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x28B022A17B068A3A) ---F\* @@ -1285,13 +1332,7 @@ function PointCamAtPedBone(cam, ped, boneIndex, x, y, z, p6) end ---**`CAM` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x07E5B515DB0636FC) ----``` ----ease - smooth transition between the camera's positions ----easeTime - Time in milliseconds for the transition to happen ----If you have created a script (rendering) camera, and want to go back to the ----character (gameplay) camera, call this native with render set to 0. ----Setting ease to 1 will smooth the transition. ----``` +---Renders the camera previously created with [CREATE_CAM](#\_0xC3981DCE61D9E13F) or [CREATE_CAMERA](#\_0x5E3CF89C6BCCA67D) --- ---``` ---NativeDB Added Parameter 6: Any p5 @@ -1299,9 +1340,9 @@ function PointCamAtPedBone(cam, ped, boneIndex, x, y, z, p6) end ---@param render boolean ---@param ease boolean ---@param easeTime integer ----@param p3 boolean +---@param easeCoordsAnim boolean ---@param p4 boolean -function RenderScriptCams(render, ease, easeTime, p3, p4) end +function RenderScriptCams(render, ease, easeTime, easeCoordsAnim, p4) end ---**`CAM` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x8BFCEB5EA1B161B6) @@ -1743,19 +1784,38 @@ function SetFlyCamVerticalSpeedMultiplier(cam, p1, p2, p3) end ---**`CAM` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x44A113DD6FFC48D1) ----``` ----From the scripts: ----CAM::SET_FOLLOW_PED_CAM_THIS_UPDATE("FOLLOW_PED_ATTACHED_TO_ROPE_CAMERA", 0); ----CAM::SET_FOLLOW_PED_CAM_THIS_UPDATE("FOLLOW_PED_ON_EXILE1_LADDER_CAMERA", 1500); ----CAM::SET_FOLLOW_PED_CAM_THIS_UPDATE("FOLLOW_PED_SKY_DIVING_CAMERA", 0); ----CAM::SET_FOLLOW_PED_CAM_THIS_UPDATE("FOLLOW_PED_SKY_DIVING_CAMERA", 3000); ----CAM::SET_FOLLOW_PED_CAM_THIS_UPDATE("FOLLOW_PED_SKY_DIVING_FAMILY5_CAMERA", 0); ----CAM::SET_FOLLOW_PED_CAM_THIS_UPDATE("FOLLOW_PED_SKY_DIVING_CAMERA", 0); +---Overrides the ped follow camera (not first person camera) with the specified camera. The game loads all camera metadata from `update/update.rpf/x64/data/metadata/cameras.ymt` and `x64a.rpf/data/metadata/cameras.ymt` with the ped follow cameras being of type `camFollowPedCameraMetadata`. +--- +---| Follow Camera Names | +---|----------------------------------------------| +---| DEFAULT_FOLLOW_PED_CAMERA | +---| FOLLOW_PED_ATTACHED_TO_ROPE_CAMERA | +---| FOLLOW_PED_ON_EXILE1\_LADDER_CAMERA | +---| FOLLOW_PED_SKY_DIVING_CAMERA | +---| FOLLOW_PED_SKY_DIVING_FAMILY5\_CAMERA | +---| NIGHTCLUB_FOLLOW_PED_CAMERA | +---| FOLLOW_PED_INTIMIDATION_CAMERA | +---| FOLLOW_PED_IN_WATER_CAMERA | +---| FOLLOW_PED_PRONE_CAMERA | +---| FOLLOW_PED_ON_SEAT_CAMERA | +---| FOLLOW_PED_HANGING_UPSIDE_DOWN_CAMERA | +---| FOLLOW_PED_ATTACHED_TO_ROPE_CAMERA | +---| CUSTOM_TRANSITION_AFTER_WARP_SKY_DIVE_CAMERA | +---| FOLLOW_PED_ON_HORSE_CAMERA | +---| FOLLOW_PED_ON_LOUNGER_CAMERA | +--- +---Other camera hashes (names not found yet) +--- +---```cpp +---// 0x5DBBFB6E +---// 0xA38DB056 +---// 0x16B702A3 +---// 0x41D72A2E ---``` ---@param camName string ----@param p1 integer +---@param easeTime integer ---@return boolean -function SetFollowPedCamThisUpdate(camName, p1) end +function SetFollowPedCamThisUpdate(camName, easeTime) end ---@deprecated SetFollowPedCamCutsceneChat = SetFollowPedCamThisUpdate @@ -2163,32 +2223,36 @@ function StopGameplayHint(bStopImmediately) end --- ---```cpp ---enum eCamSplineSmoothingFlags { ---- CAM_SPLINE_NO_SMOOTH = 0, // No smoothing just moves at a constant rate ---- CAM_SPLINE_SLOW_IN_SMOOTH = 1, // Decelerates when approaching a node ---- CAM_SPLINE_SLOW_OUT_SMOOTH = 2, // Accelerates slowly when leaving a node ---- CAM_SPLINE_SLOW_IN_OUT_SMOOTH = 3, // Decelerates when approaching a node and accelerates slowly when leaving a node ---- CAM_SPLINE_VERY_SLOW_IN = 4, ---- CAM_SPLINE_VERY_SLOW_OUT = 5, ---- CAM_SPLINE_VERY_SLOW_IN_SLOW_OUT = 6, ---- CAM_SPLINE_SLOW_IN_VERY_SLOW_OUT = 7, ---- CAM_SPLINE_VERY_SLOW_IN_VERY_SLOW_OUT = 8, ---- CAM_SPLINE_EASE_IN = 9, ---- CAM_SPLINE_EASE_OUT = 10, ---- CAM_SPLINE_QUADRATIC_EASE_IN = 11, ---- CAM_SPLINE_QUADRATIC_EASE_OUT = 12, ---- CAM_SPLINE_QUADRATIC_EASE_IN_OUT = 13, ---- CAM_SPLINE_CUBIC_EASE_IN = 14, ---- CAM_SPLINE_CUBIC_EASE_OUT = 15, ---- CAM_SPLINE_CUBIC_EASE_IN_OUT = 16, ---- CAM_SPLINE_QUARTIC_EASE_IN = 17, ---- CAM_SPLINE_QUARTIC_EASE_OUT = 18, ---- CAM_SPLINE_QUARTIC_EASE_IN_OUT = 19, ---- CAM_SPLINE_QUINTIC_EASE_IN = 20, ---- CAM_SPLINE_QUINTIC_EASE_OUT = 21, ---- CAM_SPLINE_QUINTIC_EASE_IN_OUT = 22, ---- CAM_SPLINE_CIRCULAR_EASE_IN = 23, ---- CAM_SPLINE_CIRCULAR_EASE_OUT = 24, ---- CAM_SPLINE_CIRCULAR_EASE_IN_OUT = 25 +--- // No smoothing just moves at a constant rate +--- CAM_SPLINE_NO_SMOOTH = 0, +--- // Decelerates when approaching a node +--- CAM_SPLINE_SLOW_IN_SMOOTH = 1, +--- // Accelerates slowly when leaving a node +--- CAM_SPLINE_SLOW_OUT_SMOOTH = 2, +--- // Decelerates when approaching a node and accelerates slowly when leaving a node +--- CAM_SPLINE_SLOW_IN_OUT_SMOOTH = 3, +--- CAM_SPLINE_VERY_SLOW_IN = 4, +--- CAM_SPLINE_VERY_SLOW_OUT = 5, +--- CAM_SPLINE_VERY_SLOW_IN_SLOW_OUT = 6, +--- CAM_SPLINE_SLOW_IN_VERY_SLOW_OUT = 7, +--- CAM_SPLINE_VERY_SLOW_IN_VERY_SLOW_OUT = 8, +--- CAM_SPLINE_EASE_IN = 9, +--- CAM_SPLINE_EASE_OUT = 10, +--- CAM_SPLINE_QUADRATIC_EASE_IN = 11, +--- CAM_SPLINE_QUADRATIC_EASE_OUT = 12, +--- CAM_SPLINE_QUADRATIC_EASE_IN_OUT = 13, +--- CAM_SPLINE_CUBIC_EASE_IN = 14, +--- CAM_SPLINE_CUBIC_EASE_OUT = 15, +--- CAM_SPLINE_CUBIC_EASE_IN_OUT = 16, +--- CAM_SPLINE_QUARTIC_EASE_IN = 17, +--- CAM_SPLINE_QUARTIC_EASE_OUT = 18, +--- CAM_SPLINE_QUARTIC_EASE_IN_OUT = 19, +--- CAM_SPLINE_QUINTIC_EASE_IN = 20, +--- CAM_SPLINE_QUINTIC_EASE_OUT = 21, +--- CAM_SPLINE_QUINTIC_EASE_IN_OUT = 22, +--- CAM_SPLINE_CIRCULAR_EASE_IN = 23, +--- CAM_SPLINE_CIRCULAR_EASE_OUT = 24, +--- CAM_SPLINE_CIRCULAR_EASE_IN_OUT = 25 ---}; ---``` --- @@ -2217,6 +2281,14 @@ RenderFirstPersonCam = StopRenderingScriptCamsUsingCatchUp ---@param bStopImmediately boolean function StopScriptGlobalShaking(bStopImmediately) end +---**`CAM` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0x271401846BD26E92) +---Sets the ambient ped & vehicle population spawning origin to be based around the active scripted camera for this frame +---This will prevent vehicles from being created close to the camera and/or on-screen +---@param vehicles boolean +---@param peds boolean +function UseScriptCamForAmbientPopulationOriginThisFrame(vehicles, peds) end + ---**`CAM` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x6493CF69859B116A) ---Applies a predefined set of vehicle camera settings optimized for capturing stunts, effective for the current game update/frame. diff --git a/library/natives/GTAV/CUTSCENE.lua b/library/natives/GTAV/CUTSCENE.lua index b51856c..66595d7 100644 --- a/library/natives/GTAV/CUTSCENE.lua +++ b/library/natives/GTAV/CUTSCENE.lua @@ -68,6 +68,16 @@ function GetCutFileNumSections(cutsceneName) end ---@return integer function GetCutsceneEndTime() end +---**`CUTSCENE` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0x710286BC5EF4D6E1) +---Gets the current time of the cutscene. +--- +---``` +---NativeDB Introduced: v3258 +---``` +---@return integer +function GetCutscenePlayTime() end + ---**`CUTSCENE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x49010A6A396553D8) ---This native does not have an official description. diff --git a/library/natives/GTAV/DECORATOR.lua b/library/natives/GTAV/DECORATOR.lua index aafbd86..4844c00 100644 --- a/library/natives/GTAV/DECORATOR.lua +++ b/library/natives/GTAV/DECORATOR.lua @@ -44,15 +44,13 @@ function DecorIsRegisteredAsType(propertyName, type) end ---**`DECORATOR` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x9FD90732F56403CE) ----Decor types: ---- ----``` +---```cpp ---enum eDecorType ---{ --- DECOR_TYPE_FLOAT = 1, --- DECOR_TYPE_BOOL = 2, --- DECOR_TYPE_INT = 3, ---- DECOR_TYPE_UNK = 4, +--- DECOR_TYPE_STRING = 4, --- DECOR_TYPE_TIME = 5 ---}; ---``` diff --git a/library/natives/GTAV/ENTITY.lua b/library/natives/GTAV/ENTITY.lua index e756ddf..c6ffbd3 100644 --- a/library/natives/GTAV/ENTITY.lua +++ b/library/natives/GTAV/ENTITY.lua @@ -4,10 +4,8 @@ ---[Native Documentation](https://docs.fivem.net/natives/?_0xC5F68BE9613E2D18) ---Applies a force to the specified entity. --- ----**List of force types (p1)**: ---- ----``` ----public enum ForceType +---```cpp +---enum eForceType ---{ --- MinForce = 0, --- MaxForceRot = 1, @@ -37,22 +35,7 @@ function ApplyForceToEntity(entity, forceType, x, y, z, offX, offY, offZ, boneIn ---**`ENTITY` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x18FF00FC7EFF559E) ----``` ----Applies a force to the specified entity. ----**List of force types (p1)**: ----public enum ForceType ----{ ---- MinForce = 0, ---- MaxForceRot = 1, ---- MinForce2 = 2, ---- MaxForceRot2 = 3, ---- ForceNoRot = 4, ---- ForceRotPlusForce = 5 ----} ----Research/documentation on the gtaforums can be found here https://gtaforums.com/topic/885669-precisely-define-object-physics/) and here https://gtaforums.com/topic/887362-apply-forces-and-momentums-to-entityobject/. ----p6/relative - makes the xyz force not relative to world coords, but to something else ----p7/highForce - setting false will make the force really low ----``` +---This native does not have an official description. ---@param entity integer ---@param forceType integer ---@param x number @@ -524,6 +507,16 @@ function GetEntityForwardY(entity) end ---@return number function GetEntityHeading(entity) end +---**`ENTITY` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0x846BF6291198A71E) +---Gets the heading of the entity physics in degrees, which tends to be more accurate than just [`GET_ENTITY_HEADING`](#\_0xE83D4F9BA2A38914). This can be clearly seen while, for example, ragdolling a ped/player. +---@param entity integer +---@return number +function GetEntityHeadingFromEulers(entity) end + +---@deprecated +GetEntityPhysicsHeading = GetEntityHeadingFromEulers + ---**`ENTITY` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xEEF059FAD016D209) ---``` @@ -599,16 +592,6 @@ function GetEntityMaxHealth(entity) end ---@return integer function GetEntityModel(entity) end ----**`ENTITY` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0x846BF6291198A71E) ----``` ----Gets the heading of the entity physics in degrees, which tends to be more accurate than just "GET_ENTITY_HEADING". This can be clearly seen while, for example, ragdolling a ped/player. ----NOTE: The name and description of this native are based on independent research. If you find this native to be more suitable under a different name and/or described differently, please feel free to do so. ----``` ----@param entity integer ----@return number -function GetEntityPhysicsHeading(entity) end - ---**`ENTITY` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x1F922734E259BD26) ---``` @@ -667,23 +650,24 @@ function GetEntityRoll(entity) end ---**`ENTITY` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xAFBD61CC738D9EB9) ----``` ----rotationOrder refers to the order yaw pitch roll is applied; value ranges from 0 to 5 and is usually *2* in scripts. ---- ----What you use for rotationOrder when getting must be the same as rotationOrder when setting the rotation. +---**NOTE**: What you use for rotationOrder when getting must be the same as rotationOrder when setting the rotation. --- ----What it returns is the yaw on the z part of the vector, which makes sense considering R* considers z as vertical. Here's a picture for those of you who don't understand pitch, yaw, and roll: ----www.allstar.fiu.edu/aero/images/pic5-1.gif +---```cpp +---enum eRotationOrder { +--- // Rotate around the z-axis, then the y-axis and finally the x-axis. +--- ROT_ZYX = 0, +--- // Rotate around the y-axis, then the z-axis and finally the x-axis. +--- ROT_YZX = 1, +--- // Rotate around the z-axis, then the x-axis and finally the y-axis. +--- ROT_ZXY = 2, +--- // Rotate around the x-axis, then the z-axis and finally the y-axis. +--- ROT_XZY = 3, +--- // Rotate around the y-axis, then the x-axis and finally the z-axis. +--- ROT_YXZ = 4, +--- // Rotate around the x-axis, then the y-axis and finally the z-axis. +--- ROT_XYZ = 5, +---} ---``` ---- ----### Rotation Orders ---- ----* **0**: ZYX - Rotate around the z-axis, then the y-axis and finally the x-axis. ----* **1**: YZX - Rotate around the y-axis, then the z-axis and finally the x-axis. ----* **2**: ZXY - Rotate around the z-axis, then the x-axis and finally the y-axis. ----* **3**: XZY - Rotate around the x-axis, then the z-axis and finally the y-axis. ----* **4**: YXZ - Rotate around the y-axis, then the x-axis and finally the z-axis. ----* **5**: XYZ - Rotate around the x-axis, then the y-axis and finally the z-axis. ---@param entity integer ---@param rotationOrder integer ---@return vector3 @@ -904,16 +888,12 @@ function HasEntityBeenDamagedByAnyVehicle(entity) end ---**`ENTITY` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xC86D67D52A707CF8) ----``` ----Entity 1 = Victim ----Entity 2 = Attacker ----p2 seems to always be 1 ----``` ----@param entity1 integer ----@param entity2 integer ----@param p2 boolean +---This native does not have an official description. +---@param entity integer +---@param damager integer +---@param bCheckDamagerVehicle boolean ---@return boolean -function HasEntityBeenDamagedByEntity(entity1, entity2, p2) end +function HasEntityBeenDamagedByEntity(entity, damager, bCheckDamagerVehicle) end ---**`ENTITY` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xFCDFF7B72D23A1AC) @@ -1279,15 +1259,6 @@ function N_0x5c3b791d580e0bc2(entity, p1) end ---@param p1 any function N_0x68b562e124cc0aef(p0, p1) end ----**`ENTITY` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0x694E00132F2823ED) ----``` ----SET_ENTITY_R* ----``` ----@param entity integer ----@param toggle boolean -function N_0x694e00132f2823ed(entity, toggle) end - ---**`ENTITY` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x78E8E3A640178255) ---``` @@ -1320,19 +1291,6 @@ function N_0xc34bc448da29f5e9(entity, toggle) end ---@param p1 any function N_0xcea7c8e1b48ff68c(p0, p1) end ----**`ENTITY` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0xDC6F8601FAF2E893) ----``` ----SET_* ----Only called within 1 script for x360. 'fm_mission_controller' and it used on an object. ----Ran after these 2 natives, ----set_object_targettable(uParam0, 0); ----set_entity_invincible(uParam0, 1); ----``` ----@param entity integer ----@param toggle boolean -function N_0xdc6f8601faf2e893(entity, toggle) end - ---**`ENTITY` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xE66377CDDADA4810) ---SET_ENTITY_M\* @@ -1660,15 +1618,15 @@ function SetEntityHeading(entity, heading) end ---**`ENTITY` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x6B76DC1F3AE6E6A3) ----health >= 0 +---When setting health for a player ped, the game will clamp the health value to ensure it does not exceed the maximum health. This maximum health can be retrieved by calling [`GET_PED_MAX_HEALTH`](#\_0x4700A416E8324EF3). It can also be modified by calling [`SET_PED_MAX_HEALTH`](#\_0xF5F6378C4F3419D3). --- ----male ped ~= 100 - 200 +---When setting the health for non-player peds or entities, the maximum health will be increased if the new health value exceeds the current maximum. --- ----female ped ~= 0 - 100 +---Default health for male peds is `200`, for female peds it is `175`. --- ----``` ----NativeDB Added Parameter 3: int p2 ----``` +---### Added parameters +--- +---* **inflictor**: The handle for the entity that caused the damage. ---@param entity integer ---@param health integer function SetEntityHealth(entity, health) end @@ -1826,6 +1784,13 @@ function SetEntityRecordsCollisions(entity, toggle) end ---@param toggle boolean function SetEntityRenderScorched(entity, toggle) end +---**`ENTITY` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0x694E00132F2823ED) +---This native does not have an official description. +---@param entity integer +---@param toggle boolean +function SetEntityRequiresMoreExpensiveRiverCheck(entity, toggle) end + ---**`ENTITY` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x8524A8B0171D5E07) ---Sets the rotation of a specified entity in the game world. @@ -1843,13 +1808,18 @@ function SetEntityRotation(entity, pitch, roll, yaw, rotationOrder, bDeadCheck) ---**`ENTITY` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x57C5DB656185EAC4) ----``` ----Example here: www.gtaforums.com/topic/830463-help-with-turning-lights-green-and-causing-peds-to-crash-into-each-other/#entry1068211340 ----0 = green ----1 = red ----2 = yellow ----3 = reset changes ----changing lights may not change the behavior of vehicles +---Changing traffic-lights will not change the behavior of NPCs. +--- +---Example: [here](https://www.gtaforums.com/topic/830463-help-with-turning-lights-green-and-causing-peds-to-crash-into-each-other/#entry1068211340) +--- +---```cpp +---enum eTrafficlightOverrideMode +---{ +--- TLO_RED = 0, +--- TLO_AMBER = 1, +--- TLO_GREEN = 2, +--- TLO_NONE = 3 +---} ---``` ---@param entity integer ---@param state integer @@ -1909,6 +1879,19 @@ function SetPickUpByCargobobDisabled(entity, toggle) end ---@param vehicle integer function SetVehicleAsNoLongerNeeded(vehicle) end +---**`ENTITY` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0xDC6F8601FAF2E893) +---``` +---SET_* +---Only called within 1 script for x360. 'fm_mission_controller' and it used on an object. +---Ran after these 2 natives, +---set_object_targettable(uParam0, 0); +---set_entity_invincible(uParam0, 1); +---``` +---@param entity integer +---@param toggle boolean +function SetWaitForCollisionsBeforeProbe(entity, toggle) end + ---**`ENTITY` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x28004F88151E03E0) ---``` diff --git a/library/natives/GTAV/FILES.lua b/library/natives/GTAV/FILES.lua index 2f3460c..a393967 100644 --- a/library/natives/GTAV/FILES.lua +++ b/library/natives/GTAV/FILES.lua @@ -330,42 +330,43 @@ function GetShopPedQueryProp(componentId) end ---**`FILES` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xFF56381874F82086) +---Returns data that adheres to the tattoo shop item data that is used in shop_tattoo.meta +--- ---Character types: --- ----``` ----0 = Michael, ----1 = Franklin, ----2 = Trevor, ----3 = MPMale, ----4 = MPFemale +---```cpp +---enum eTattooFaction +---{ +--- TATTOO_SP_MICHAEL = 0, +--- TATTOO_SP_FRANKLIN = 1, +--- TATTOO_SP_TREVOR = 2, +--- TATTOO_MP_FM = 3, +--- TATTOO_MP_FM_F = 4 +---} ---``` --- ----```csharp ----enum TattooZoneData ----{ ---- ZONE_TORSO = 0, ---- ZONE_HEAD = 1, ---- ZONE_LEFT_ARM = 2, ---- ZONE_RIGHT_ARM = 3, ---- ZONE_LEFT_LEG = 4, ---- ZONE_RIGHT_LEG = 5, ---- ZONE_UNKNOWN = 6, ---- ZONE_NONE = 7, ----}; +---Returned struct properties: --- ----struct outComponent +---```cpp +---struct sTattooShopItemValues ---{ ---- // these vars are suffixed with 4 bytes of padding each. ---- uint unk; ---- int unk2; ---- uint tattooCollectionHash; ---- uint tattooNameHash; ---- int unk3; ---- TattooZoneData zoneId; ---- uint unk4; ---- uint unk5; ---- // maybe more, not sure exactly, decompiled scripts are very vague around this part. ----} +--- // Lock hash, used with IS_CONTENT_ITEM_LOCKED +--- int LockHash; +--- // Unique ID of this slot. It can also be 0. +--- int Index; +--- // Collection hash of this tattoo +--- int CollectionHash; +--- // Preset hash of this tattoo +--- int PresetHash; +--- // Cost of this tattoo in shops. +--- int Cost; +--- // Secondary placement of this tattoo. +--- int eFacing; +--- // Location of this tattoo on the body (for example, for torso there would be chest upper, stomach, etc) +--- int UpdateGroup; +--- // This tattoo's name in the form of a text label. +--- const char* NameTextLabel; +---}; ---``` ---@param characterType integer ---@param decorationIndex integer diff --git a/library/natives/GTAV/FIRE.lua b/library/natives/GTAV/FIRE.lua index a336be5..a99e562 100644 --- a/library/natives/GTAV/FIRE.lua +++ b/library/natives/GTAV/FIRE.lua @@ -13,92 +13,93 @@ ---``` --- ---```cpp ----enum class eExplosionTag : uint32_t +---enum eExplosionTag ---{ ---- DONTCARE = 0xFFFFFFFF, ---- GRENADE = 0, ---- GRENADELAUNCHER = 1, ---- STICKYBOMB = 2, ---- MOLOTOV = 3, ---- ROCKET = 4, ---- TANKSHELL = 5, ---- HI_OCTANE = 6, ---- CAR = 7, ---- PLANE = 8, ---- PETROL_PUMP = 9, ---- BIKE = 10, ---- DIR_STEAM = 11, ---- DIR_FLAME = 12, ---- DIR_WATER_HYDRANT = 13, ---- DIR_GAS_CANISTER = 14, ---- BOAT = 15, ---- SHIP_DESTROY = 16, ---- TRUCK = 17, ---- BULLET = 18, ---- SMOKEGRENADELAUNCHER = 19, ---- SMOKEGRENADE = 20, ---- BZGAS = 21, ---- FLARE = 22, ---- GAS_CANISTER = 23, ---- EXTINGUISHER = 24, ---- _0x988620B8 = 25, ---- EXP_TAG_TRAIN = 26, ---- EXP_TAG_BARREL = 27, ---- EXP_TAG_PROPANE = 28, ---- EXP_TAG_BLIMP = 29, ---- EXP_TAG_DIR_FLAME_EXPLODE = 30, ---- EXP_TAG_TANKER = 31, ---- PLANE_ROCKET = 32, ---- EXP_TAG_VEHICLE_BULLET = 33, ---- EXP_TAG_GAS_TANK = 34, ---- EXP_TAG_BIRD_CRAP = 35, ---- EXP_TAG_RAILGUN = 36, ---- EXP_TAG_BLIMP2 = 37, ---- EXP_TAG_FIREWORK = 38, ---- EXP_TAG_SNOWBALL = 39, ---- EXP_TAG_PROXMINE = 40, ---- EXP_TAG_VALKYRIE_CANNON = 41, ---- EXP_TAG_AIR_DEFENCE = 42, ---- EXP_TAG_PIPEBOMB = 43, ---- EXP_TAG_VEHICLEMINE = 44, ---- EXP_TAG_EXPLOSIVEAMMO = 45, ---- EXP_TAG_APCSHELL = 46, ---- EXP_TAG_BOMB_CLUSTER = 47, ---- EXP_TAG_BOMB_GAS = 48, ---- EXP_TAG_BOMB_INCENDIARY = 49, ---- EXP_TAG_BOMB_STANDARD = 50, ---- EXP_TAG_TORPEDO = 51, ---- EXP_TAG_TORPEDO_UNDERWATER = 52, ---- EXP_TAG_BOMBUSHKA_CANNON = 53, ---- EXP_TAG_BOMB_CLUSTER_SECONDARY = 54, ---- EXP_TAG_HUNTER_BARRAGE = 55, ---- EXP_TAG_HUNTER_CANNON = 56, ---- EXP_TAG_ROGUE_CANNON = 57, ---- EXP_TAG_MINE_UNDERWATER = 58, ---- EXP_TAG_ORBITAL_CANNON = 59, ---- EXP_TAG_BOMB_STANDARD_WIDE = 60, ---- EXP_TAG_EXPLOSIVEAMMO_SHOTGUN = 61, ---- EXP_TAG_OPPRESSOR2_CANNON = 62, ---- EXP_TAG_MORTAR_KINETIC = 63, ---- EXP_TAG_VEHICLEMINE_KINETIC = 64, ---- EXP_TAG_VEHICLEMINE_EMP = 65, ---- EXP_TAG_VEHICLEMINE_SPIKE = 66, ---- EXP_TAG_VEHICLEMINE_SLICK = 67, ---- EXP_TAG_VEHICLEMINE_TAR = 68, ---- EXP_TAG_SCRIPT_DRONE = 69, ---- EXP_TAG_RAYGUN = 70, ---- EXP_TAG_BURIEDMINE = 71, ---- EXP_TAG_SCRIPT_MISSILE = 72, ---- EXP_TAG_RCTANK_ROCKET = 73, ---- EXP_TAG_BOMB_WATER = 74, ---- EXP_TAG_BOMB_WATER_SECONDARY = 75, ---- _0xF728C4A9 = 76, ---- _0xBAEC056F = 77, ---- EXP_TAG_FLASHGRENADE = 78, ---- EXP_TAG_STUNGRENADE = 79, ---- _0x763D3B3B = 80, ---- EXP_TAG_SCRIPT_MISSILE_LARGE = 81, ---- EXP_TAG_SUBMARINE_BIG = 82, +--- DONTCARE = -1, +--- GRENADE = 0, +--- GRENADELAUNCHER = 1, +--- STICKYBOMB = 2, +--- MOLOTOV = 3, +--- ROCKET = 4, +--- TANKSHELL = 5, +--- HI_OCTANE = 6, +--- CAR = 7, +--- PLANE = 8, +--- PETROL_PUMP = 9, +--- BIKE = 10, +--- DIR_STEAM = 11, +--- DIR_FLAME = 12, +--- DIR_WATER_HYDRANT = 13, +--- DIR_GAS_CANISTER = 14, +--- BOAT = 15, +--- SHIP_DESTROY = 16, +--- TRUCK = 17, +--- BULLET = 18, +--- SMOKE_GRENADE_LAUNCHER = 19, +--- SMOKE_GRENADE = 20, +--- BZGAS = 21, +--- FLARE = 22, +--- GAS_CANISTER = 23, +--- EXTINGUISHER = 24, +--- PROGRAMMABLEAR = 25, +--- TRAIN = 26, +--- BARREL = 27, +--- PROPANE = 28, +--- BLIMP = 29, +--- DIR_FLAME_EXPLODE = 30, +--- TANKER = 31, +--- PLANE_ROCKET = 32, +--- VEHICLE_BULLET = 33, +--- GAS_TANK = 34, +--- BIRD_CRAP = 35, +--- RAILGUN = 36, +--- BLIMP2 = 37, +--- FIREWORK = 38, +--- SNOWBALL = 39, +--- PROXMINE = 40, +--- VALKYRIE_CANNON = 41, +--- AIR_DEFENCE = 42, +--- PIPEBOMB = 43, +--- VEHICLEMINE = 44, +--- EXPLOSIVEAMMO = 45, +--- APCSHELL = 46, +--- BOMB_CLUSTER = 47, +--- BOMB_GAS = 48, +--- BOMB_INCENDIARY = 49, +--- BOMB_STANDARD = 50, +--- TORPEDO = 51, +--- TORPEDO_UNDERWATER = 52, +--- BOMBUSHKA_CANNON = 53, +--- BOMB_CLUSTER_SECONDARY = 54, +--- HUNTER_BARRAGE = 55, +--- HUNTER_CANNON = 56, +--- ROGUE_CANNON = 57, +--- MINE_UNDERWATER = 58, +--- ORBITAL_CANNON = 59, +--- BOMB_STANDARD_WIDE = 60, +--- EXPLOSIVEAMMO_SHOTGUN = 61, +--- OPPRESSOR2_CANNON = 62, +--- MORTAR_KINETIC = 63, +--- VEHICLEMINE_KINETIC = 64, +--- VEHICLEMINE_EMP = 65, +--- VEHICLEMINE_SPIKE = 66, +--- VEHICLEMINE_SLICK = 67, +--- VEHICLEMINE_TAR = 68, +--- SCRIPT_DRONE = 69, +--- RAYGUN = 70, +--- BURIEDMINE = 71, +--- SCRIPT_MISSILE = 72, +--- RCTANK_ROCKET = 73, +--- BOMB_WATER = 74, +--- BOMB_WATER_SECONDARY = 75, +--- MINE_CNCSPIKE = 76, +--- BZGAS_MK2 = 77, +--- FLASHGRENADE = 78, +--- STUNGRENADE = 79, +--- CNC_KINETICRAM = 80, +--- SCRIPT_MISSILE_LARGE = 81, +--- SUBMARINE_BIG = 82, +--- EMPLAUNCHER_EMP = 83 ---}; ---``` ---@param x number diff --git a/library/natives/GTAV/GRAPHICS.lua b/library/natives/GTAV/GRAPHICS.lua index 5c76779..4c044e3 100644 --- a/library/natives/GTAV/GRAPHICS.lua +++ b/library/natives/GTAV/GRAPHICS.lua @@ -686,22 +686,10 @@ function DrawBinkMovie(binkMovie, posX, posY, scaleX, scaleY, rotation, r, g, b, ---**`GRAPHICS` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xD3A9971CADAC7252) +---This native draws a box between two vectors in the game world. It is typically used for visualizing boundaries or areas of interest. The color of the box is specified by the red, green, and blue parameters, with alpha determining its opacity. This native should be called every frame for continuous rendering. +--- ---``` ----x,y,z = start pos ----x2,y2,z2 = end pos ----Draw's a 3D Box between the two x,y,z coords. ------------------ ----Keep in mind that the edges of the box do only align to the worlds base-vectors. Therefore something like rotation cannot be applied. That means this function is pretty much useless, unless you want a static unicolor box somewhere. ----I recommend using a predefined function to call this. ----[VB.NET] ----Public Sub DrawBox(a As Vector3, b As Vector3, col As Color) ---- [Function].Call(Hash.DRAW_BOX,a.X, a.Y, a.Z,b.X, b.Y, b.Z,col.R, col.G, col.B, col.A) ----End Sub ----[C#] ----public void DrawBox(Vector3 a, Vector3 b, Color col) ----{ ---- Function.Call(Hash.DRAW_BOX,a.X, a.Y, a.Z,b.X, b.Y, b.Z,col.R, col.G, col.B, col.A); ----} +---NativeDB Introduced: v323 ---``` ---@param x1 number ---@param y1 number @@ -892,22 +880,10 @@ DrawLightWithRangeWithShadow = DrawLightWithRangeAndShadow ---**`GRAPHICS` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x6B7256074AE34680) +---This native draws a line between two vectors in the game world. It is typically used for visualizing paths or connections between points. The color of the line is specified by the red, green, and blue parameters, with alpha determining its opacity. This native should be called every frame for continuous rendering. +--- ---``` ----Draws a depth-tested line from one point to another. -------------------- ----x1, y1, z1 : Coordinates for the first point ----x2, y2, z2 : Coordinates for the second point ----r, g, b, alpha : Color with RGBA-Values ----I recommend using a predefined function to call this. ----[VB.NET] ----Public Sub DrawLine(from As Vector3, [to] As Vector3, col As Color) ---- [Function].Call(Hash.DRAW_LINE, from.X, from.Y, from.Z, [to].X, [to].Y, [to].Z, col.R, col.G, col.B, col.A) ----End Sub ----[C#] ----public void DrawLine(Vector3 from, Vector3 to, Color col) ----{ ---- Function.Call(Hash.DRAW_LINE, from.X, from.Y, from.Z, to.X, to.Y, to.Z, col.R, col.G, col.B, col.A); ----} +---NativeDB Introduced: v323 ---``` ---@param x1 number ---@param y1 number @@ -1257,37 +1233,6 @@ function DrawSpotLightWithShadow(posX, posY, posZ, dirX, dirY, dirZ, colorR, col ---@param alpha integer function DrawSprite(textureDict, textureName, screenX, screenY, width, height, heading, red, green, blue, alpha) end ----**`GRAPHICS` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0x29280002282F1928) ----Used for drawling Deadline trailing lights, see deadline.ytd ---- ----For UVW mapping (u,v,w parameters), reference your favourite internet resource for more details. ----@param x1 number ----@param y1 number ----@param z1 number ----@param x2 number ----@param y2 number ----@param z2 number ----@param x3 number ----@param y3 number ----@param z3 number ----@param red integer ----@param green integer ----@param blue integer ----@param alpha integer ----@param textureDict string ----@param textureName string ----@param u1 number ----@param v1 number ----@param w1 number ----@param u2 number ----@param v2 number ----@param w2 number ----@param u3 number ----@param v3 number ----@param w3 number -function DrawSpritePoly(x1, y1, z1, x2, y2, z2, x3, y3, z3, red, green, blue, alpha, textureDict, textureName, u1, v1, w1, u2, v2, w2, u3, v3, w3) end - ---**`GRAPHICS` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x736D7AA1B750856B) ---Used for drawling Deadline trailing lights, see deadline.ytd @@ -1355,6 +1300,42 @@ function DrawSpritePoly_2(x1, y1, z1, x2, y2, z2, x3, y3, z3, red1, green1, blue ---@param alpha integer function DrawSpriteUv(textureDict, textureName, x, y, width, height, u1, v1, u2, v2, heading, red, green, blue, alpha) end +---**`GRAPHICS` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0x29280002282F1928) +---This native draws a textured polygon between three vectors in the game world. It's commonly utilized for rendering deadline trailing lights, with additional details available in the `deadline.ytd` file. UVW mapping details (u,v,w parameters) can be found on various internet resources. This native is specifically used for drawing textured polygons on the screen, where UV coordinates define the texture mapping and color/alpha parameters define the appearance of the polygon. This native should be called every frame for continuous rendering. +--- +---``` +---NativeDB Introduced: v877 +---``` +---@param x1 number +---@param y1 number +---@param z1 number +---@param x2 number +---@param y2 number +---@param z2 number +---@param x3 number +---@param y3 number +---@param z3 number +---@param red integer +---@param green integer +---@param blue integer +---@param alpha integer +---@param textureDict string +---@param textureName string +---@param u1 number +---@param v1 number +---@param w1 number +---@param u2 number +---@param v2 number +---@param w2 number +---@param u3 number +---@param v3 number +---@param w3 number +function DrawTexturedPoly(x1, y1, z1, x2, y2, z2, x3, y3, z3, red, green, blue, alpha, textureDict, textureName, u1, v1, w1, u2, v2, w2, u3, v3, w3) end + +---@deprecated +DrawSpritePoly = DrawTexturedPoly + ---**`GRAPHICS` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xFDDC2B4ED3C69DF0) ---``` @@ -1499,10 +1480,12 @@ EndTextComponent = EndTextCommandScaleformString ---**`GRAPHICS` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xAE4E8157D9ECF087) ----``` ---Same as END_TEXT_COMMAND_SCALEFORM_STRING but does not perform HTML conversion for text tokens. ----``` -function EndTextCommandScaleformString_2() end +---Also useful for when you are trying to add blips and inputs in your scaleform (If the scaleform supports it). +function EndTextCommandUnparsedScaleformString() end + +---@deprecated +EndTextCommandScaleformString_2 = EndTextCommandUnparsedScaleformString ---**`GRAPHICS` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xD77EDADB0420E6E0) @@ -1543,21 +1526,29 @@ function FreeMemoryForMissionCreatorPhoto() end ---**`GRAPHICS` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x873C9F3104101DD3) +---Returns current screen resolution. +--- ---``` ----Returns current screen resolution. +---NativeDB Introduced: v323 ---``` ---@return integer, integer -function GetActiveScreenResolution() end +function GetActualScreenResolution() end ---@deprecated -GetScreenActiveResolution = GetActiveScreenResolution +GetScreenActiveResolution = GetActualScreenResolution +---@deprecated +GetActiveScreenResolution = GetActualScreenResolution ---**`GRAPHICS` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xF1307EF624A80D87) ----This native does not have an official description. ----@param b boolean +---This native retrieves the aspect ratio of the game window. If `physicalAspect` is `true`, it returns the physical aspect ratio of the game window, which is useful for 3x1 modes. Otherwise, it returns the aspect ratio of the main game window, considering any custom overrides from the settings menu. +--- +---``` +---NativeDB Introduced: v323 +---``` +---@param physicalAspect boolean ---@return number -function GetAspectRatio(b) end +function GetAspectRatio(physicalAspect) end ---@deprecated GetScreenAspectRatio = GetAspectRatio @@ -1599,9 +1590,10 @@ function GetExtraTimecycleModifierIndex() end ---**`GRAPHICS` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x84ED31191CC5D2C9) +---This native indicates whether the game is running in high-definition (HD) resolution. It returns `false` if the resolution is less than `1280x720` and `true` if it's equal to or greater than `1280x720`. +--- ---``` ----false = Any resolution < 1280x720 ----true = Any resolution >= 1280x720 +---NativeDB Introduced: v323 ---``` ---@return boolean function GetIsHidef() end @@ -1618,11 +1610,10 @@ function GetIsPetrolDecalInRange(xCoord, yCoord, zCoord, radius) end ---**`GRAPHICS` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x30CF4BDA4FCB1905) +---This native retrieves whether the game is running in widescreen mode or not. +--- ---``` ----Setting Aspect Ratio Manually in game will return: ----false - for Narrow format Aspect Ratios (3:2, 4:3, 5:4, etc. ) ----true - for Wide format Aspect Ratios (5:3, 16:9, 16:10, etc. ) ----Setting Aspect Ratio to "Auto" in game will return "false" or "true" based on the actual set Resolution Ratio. +---NativeDB Introduced: v323 ---``` ---@return boolean function GetIsWidescreen() end @@ -1662,9 +1653,7 @@ function GetSafeZoneSize() end ---**`GRAPHICS` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xD80A80346A45D761) ----``` ----methodReturn: The return value of this native: END_SCALEFORM_MOVIE_METHOD_RETURN_VALUE ----``` +---This native does not have an official description. ---@param methodReturn integer ---@return boolean function GetScaleformMovieMethodReturnValueBool(methodReturn) end @@ -2259,13 +2248,6 @@ function N_0x2fcb133ca50a49eb(p0) end ---@return integer function N_0x30432a0118736e00() end ----**`GRAPHICS` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0x32F34FF7F617643B) ----This native does not have an official description. ----@param p0 any ----@param p1 any -function N_0x32f34ff7f617643b(p0, p1) end - ---**`GRAPHICS` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x346EF3ECAAAB149E) ---This native does not have an official description. @@ -2629,11 +2611,6 @@ function N_0xcfd16f0db5a3535c(toggle) end ---@param p0 any function N_0xd1c55b110e4df534(p0) end ----**`GRAPHICS` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0xD9454B5752C857DC) ----This native does not have an official description. -function N_0xd9454b5752c857dc() end - ---**`GRAPHICS` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xDB1EA9411C8911EC) ---``` @@ -3089,6 +3066,18 @@ function ScaleformMovieMethodAddParamLatestBriefString(value) end ---@deprecated ScaleformMovieMethodAddParamIntString = ScaleformMovieMethodAddParamLatestBriefString +---**`GRAPHICS` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0x77FE3402004CD1B0) +---Adds a literal string to a scaleform movie method. +---There doesn't seem to be any difference between this and other `SCALEFORM_MOVIE_METHOD_ADD_PARAM_*_STRING` natives in game code. +---@param string string +function ScaleformMovieMethodAddParamLiteralString(string) end + +---@deprecated +PushScaleformMovieMethodParameterString_2 = ScaleformMovieMethodAddParamLiteralString +---@deprecated +ScaleformMovieMethodAddParamTextureNameString_2 = ScaleformMovieMethodAddParamLiteralString + ---**`GRAPHICS` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xE83A3E3557A56640) ---``` @@ -3112,18 +3101,6 @@ PushScaleformMovieFunctionParameterString = ScaleformMovieMethodAddParamTextureN ---@deprecated PushScaleformMovieMethodParameterString = ScaleformMovieMethodAddParamTextureNameString ----**`GRAPHICS` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0x77FE3402004CD1B0) ----GRAPHICS::\_0x77FE3402004CD1B0(HUD::\_GET_LABEL_TEXT("YACHT_GSY")); ----GRAPHICS::\_0x77FE3402004CD1B0(PLAYER::GET_PLAYER_NAME(PLAYER::PLAYER_ID())); ---- ----Both \_0xBA7148484BD90365 / \_0x77FE3402004CD1B0 works, but \_0x77FE3402004CD1B0 is usually used for "name" (organisation, players..). ----@param string string -function ScaleformMovieMethodAddParamTextureNameString_2(string) end - ----@deprecated -PushScaleformMovieMethodParameterString_2 = ScaleformMovieMethodAddParamTextureNameString_2 - ---**`GRAPHICS` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x43DBAE39626CE83F) ---``` @@ -3361,6 +3338,13 @@ function SetDebugLinesAndSpheresDrawingActive(enabled) end ---This native does not have an official description. function SetDisableDecalRenderingThisFrame() end +---**`GRAPHICS` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0xD9454B5752C857DC) +---Prevents gas / petrol decals (aka gas / petrol trails and puddles) to be ignited on fire during the frame in which the native is called. +--- +---**Note**: This native needs to be called every frame to prevent ignition. +function SetDisablePetrolDecalsIgnitingThisFrame() end + ---**`GRAPHICS` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xAA0008F3BBB8F416) ---Sets the on-screen drawing origin for draw-functions in world coordinates. @@ -3499,16 +3483,15 @@ function SetParticleFxLoopedAlpha(ptfxHandle, alpha) end ---**`GRAPHICS` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x7F8F65877F88783B) ----``` ----only works on some fx's ----p4 = 0 ----``` +---Sets the colour tint of a previously started looped particle effect +--- +---You can use the [inverse lerp](https://www.gamedev.net/articles/programming/general-and-gameplay-programming/inverse-lerp-a-super-useful-yet-often-overlooked-function-r5230/) method to normalize in a range from 0.0 to 1.0 an rgb ---@param ptfxHandle integer ---@param r number ---@param g number ---@param b number ----@param p4 boolean -function SetParticleFxLoopedColour(ptfxHandle, r, g, b, p4) end +---@param bLocalOnly boolean +function SetParticleFxLoopedColour(ptfxHandle, r, g, b, bLocalOnly) end ---**`GRAPHICS` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x5F0C4B5B1C393BE2) @@ -3603,19 +3586,33 @@ function SetParticleFxShootoutBoat(p0) end ---@param value number function SetPlayerTcmodifierTransition(value) end ----**`GRAPHICS` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0xE6A9F00D4240B519) ----This native is used in some casino scripts to fit the scaleform in the rendertarget. ----@param scaleformHandle integer ----@param toggle boolean -function SetScaleformFitRendertarget(scaleformHandle, toggle) end - ---**`GRAPHICS` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x1D132D614DD86811) ---This native does not have an official description. ---@param scaleformHandle integer function SetScaleformMovieAsNoLongerNeeded(scaleformHandle) end +---**`GRAPHICS` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0x32F34FF7F617643B) +---``` +---NativeDB Introduced: v573 +---``` +--- +---Configures a Scaleform movie to render to a large render target (1280x720), which is useful for ensuring higher quality and clarity in certain display scenarios. Such as displaying the name of an organization (CEO Office) in a visually impactful way for example. +---@param scaleformMovieId integer +---@param useLargeRT boolean +function SetScaleformMovieToUseLargeRt(scaleformMovieId, useLargeRT) end + +---**`GRAPHICS` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0xE6A9F00D4240B519) +---Adjusts a scaleform movie's dimensions to fit a large rendertarget. Mostly used in casino scripts. +---@param scaleformHandle integer +---@param toggle boolean +function SetScaleformMovieToUseSuperLargeRt(scaleformHandle, toggle) end + +---@deprecated +SetScaleformFitRendertarget = SetScaleformMovieToUseSuperLargeRt + ---**`GRAPHICS` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x6D8EB211944DCE08) ---This native does not have an official description. @@ -3692,6 +3689,21 @@ function SetScriptGfxDrawBehindPausemenu(flag) end ---GRAPHICS::DRAW_RECT(0.5, 0.5, 3.0, 3.0, v\_4, v\_5, v\_6, a\_0.\_f172, 0); ---GRAPHICS::SET_SCRIPT_GFX_DRAW_ORDER(1); ---GRAPHICS::DRAW_RECT(0.5, 0.5, 1.5, 1.5, 0, 0, 0, 255, 0); +--- +---```cpp +---enum eGfxDrawOrder +---{ +--- GFX_ORDER_BEFORE_HUD_PRIORITY_LOW = 0, +--- GFX_ORDER_BEFORE_HUD = 1, +--- GFX_ORDER_BEFORE_HUD_PRIORITY_HIGH = 2, +--- GFX_ORDER_AFTER_HUD_PRIORITY_LOW = 3, +--- GFX_ORDER_AFTER_HUD = 4, +--- GFX_ORDER_AFTER_HUD_PRIORITY_HIGH = 5, +--- GFX_ORDER_AFTER_FADE_PRIORITY_LOW = 6, +--- GFX_ORDER_AFTER_FADE = 7, +--- GFX_ORDER_AFTER_FADE_PRIORITY_HIGH = 8, +---} +---``` ---@param order integer function SetScriptGfxDrawOrder(order) end diff --git a/library/natives/GTAV/HUD.lua b/library/natives/GTAV/HUD.lua index b16ed29..b168987 100644 --- a/library/natives/GTAV/HUD.lua +++ b/library/natives/GTAV/HUD.lua @@ -112,8 +112,8 @@ function AddBlipForRadius(posX, posY, posZ, radius) end ---**`HUD` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x60296AF4BA14ABC5) ---This native does not have an official description. ----@param p0 boolean -function AddNextMessageToPreviousBriefs(p0) end +---@param addToBrief boolean +function AddNextMessageToPreviousBriefs(addToBrief) end ---**`HUD` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x311438A071DD9B1A) @@ -161,7 +161,7 @@ function AddTextComponentSubstringBlipName(blip) end ---**`HUD` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x5F68520888E69014) ----This native does not have an official description. +---Certain characters like `<` will have to be escaped using html entities (e.g. `<`), otherwise the text wont display properly. ---@param string string function AddTextComponentSubstringKeyboardDisplay(string) end @@ -769,14 +769,14 @@ CenterPlayerOnRadarThisFrame = DontTiltMinimapThisFrame ---**`HUD` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xBD12F8228410D9B4) ----``` +---```cpp ---enum eBusySpinnerType ---{ ---- BUSY_SPINNER_LEFT, ---- BUSY_SPINNER_LEFT_2, ---- BUSY_SPINNER_LEFT_3, ---- BUSY_SPINNER_SAVE, ---- BUSY_SPINNER_RIGHT, +--- BUSY_SPINNER_LEFT = 0, +--- BUSY_SPINNER_LEFT_2 = 1, +--- BUSY_SPINNER_LEFT_3 = 2, +--- BUSY_SPINNER_SAVE = 3, +--- BUSY_SPINNER_RIGHT = 4, ---}; ---``` ---@param busySpinnerType integer @@ -1567,6 +1567,16 @@ function GetCurrentWebsiteId() end ---@return integer function GetDefaultScriptRendertargetRenderId() end +---**`HUD` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0x7B5280EBA9840C72) +---Gets a localized string literal from a label name. This is used to get the filename of the audio conversation associated with the provided label name. +---@param labelName string +---@return string +function GetFilenameForAudioConversation(labelName) end + +---@deprecated +GetLabelText = GetFilenameForAudioConversation + ---**`HUD` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x1BEDE233E6CD2A1F) ---Also see [`GET_NEXT_BLIP_INFO_ID`](#\_0x14F96AA50D6FBEA7) for an example. @@ -1621,16 +1631,6 @@ function GetHudScreenPositionFromWorldPosition(worldX, worldY, worldZ) end ---@deprecated Get_2dCoordFrom_3dCoord = GetHudScreenPositionFromWorldPosition ----**`HUD` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0x7B5280EBA9840C72) ----``` ----Gets a string literal from a label name. ----GET_F* ----``` ----@param labelName string ----@return string -function GetLabelText(labelName) end - ---**`HUD` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xF030907CCBB8A9FD) ---``` @@ -1792,16 +1792,18 @@ function GetPauseMenuSelectionData() end ---**`HUD` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x272ACD84970869C5) ----``` ----Returns: ----0 ----5 ----10 ----15 ----20 ----25 ----30 ----35 +---```cpp +---enum ePauseMenuState +---{ +--- PM_INACTIVE = 0, +--- PM_STARTING_UP = 5, +--- PM_RESTARTING = 10, +--- PM_READY = 15, +--- PM_IN_STORE = 20, +--- PM_IN_SC_MENU = 25, +--- PM_SHUTTING_DOWN = 30, +--- PM_IN_VIDEOEDITOR = 35, +---} ---``` ---@return integer function GetPauseMenuState() end @@ -2251,10 +2253,12 @@ function IsMissionCreatorBlip(blip) end ---**`HUD` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x3D9ACB1EB139E702) ----Returns true if the cursor is hovering above instructional buttons. ----Note: The buttons need to support mouse (with the TOGGLE_MOUSE_SUPPORT scaleform movie method) for it to return true. +---**Note:** The buttons need to support mouse (with the `TOGGLE_MOUSE_SUPPORT` scaleform movie method) for it to return `true`. ---@return boolean -function IsMouseCursorAboveInstructionalButtons() end +function IsMouseRolledOverInstructionalButtons() end + +---@deprecated +IsMouseCursorAboveInstructionalButtons = IsMouseRolledOverInstructionalButtons ---**`HUD` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x4E929E7A5796FD26) @@ -2483,14 +2487,6 @@ function N_0x0c698d8f099174c7(p0) end ---@param p0 any function N_0x0cf54f20de43879c(p0) end ----**`HUD` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0x1185A8087587322C) ----``` ----SET_TEXT_??? - Used in golf and golf_mp ----``` ----@param p0 boolean -function N_0x1185a8087587322c(p0) end - ---**`HUD` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x211C4EF450086857) ---**This native does absolutely nothing, just a nullsub** @@ -2586,12 +2582,6 @@ function N_0x4b5b620c9b59ed34(p0, p1) end ---``` function N_0x55f5a5f07134de60() end ----**`HUD` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0x577599CCED639CA2) ----This native does not have an official description. ----@param p0 any -function N_0x577599cced639ca2(p0) end - ---**`HUD` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x57D760D55F54E071) ---``` @@ -2820,18 +2810,31 @@ function N_0xf284ac67940c6812() end ---**`HUD` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xF83D0FEBE75E62C9) ---``` ----NativeDB Added Parameter 9: Any p8 +---NativeDB Added Parameter 9: int hudColour ---NativeDB Introduced: v1290 ---``` ----@param p0 any +--- +---Sets the 'data' for a cone for a blip +--- +---See [here](https://docs.fivem.net/docs/game-references/hud-colors/) for the hud colours for the cone +--- +---Name in scripts: `SETUP_FAKE_CONE_DATA()` +--- +---For people who don't know how to convert degrees to radians and the other way around: +--- +---``` +---degrees = radians * 180 / pi +---radians = degrees * pi / 180 +---``` +---@param blip integer ---@param p1 any ---@param p2 any ----@param p3 any +---@param width number ---@param p4 any ----@param p5 any ----@param p6 any +---@param length number +---@param heading number ---@param p7 any -function N_0xf83d0febe75e62c9(p0, p1, p2, p3, p4, p5, p6, p7) end +function N_0xf83d0febe75e62c9(blip, p1, p2, width, p4, length, heading, p7) end ---**`HUD` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x805D7CBB36FD6C4C) @@ -2974,11 +2977,11 @@ EnableDeathbloodSeethrough = PauseMenuRedrawInstructionalButtons ---**`HUD` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xC78E239AC5B2DDB9) ----This native does not have an official description. ----@param p0 boolean ----@param p1 any ----@param p2 any -function PauseMenuSetBusySpinner(p0, p1, p2) end +---Sets a loading icon in the pause menu. +---@param bVisible boolean +---@param iColumnID integer +---@param iSpinnerIndex integer +function PauseMenuSetBusySpinner(bVisible, iColumnID, iSpinnerIndex) end ---**`HUD` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xF06EBB91A81E09E3) @@ -3193,6 +3196,12 @@ function SetAbilityBarVisibilityInMultiplayer(visible) end ---@param toggle boolean function SetAllowAbilityBarInMultiplayer(toggle) end +---**`HUD` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0x577599CCED639CA2) +---**NOTE:** This must be called before you open the text input box. +---@param allow boolean +function SetAllowCommaOnTextInput(allow) end + ---**`HUD` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x231C8F89D0539D8F) ---Toggles the big minimap state like in GTA:Online. @@ -3501,6 +3510,256 @@ function SetColourOfNextTextComponent(hudColor) end ---@deprecated SetNotificationColorNext = SetColourOfNextTextComponent +---**`HUD` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0x2ACCB195F3CCD9DE) +---Set a custom color for the MP HUD, providing a way to customize the HUD's appearance similar to character color changes in MP. +--- +---```cpp +---enum eHudColours { +--- HUD_COLOUR_PURE_WHITE = 0, +--- HUD_COLOUR_WHITE = 1, +--- HUD_COLOUR_BLACK = 2, +--- HUD_COLOUR_GREY = 3, +--- HUD_COLOUR_GREYLIGHT = 4, +--- HUD_COLOUR_GREYDARK = 5, +--- HUD_COLOUR_RED = 6, +--- HUD_COLOUR_REDLIGHT = 7, +--- HUD_COLOUR_REDDARK = 8, +--- HUD_COLOUR_BLUE = 9, +--- HUD_COLOUR_BLUELIGHT = 10, +--- HUD_COLOUR_BLUEDARK = 11, +--- HUD_COLOUR_YELLOW = 12, +--- HUD_COLOUR_YELLOWLIGHT = 13, +--- HUD_COLOUR_YELLOWDARK = 14, +--- HUD_COLOUR_ORANGE = 15, +--- HUD_COLOUR_ORANGELIGHT = 16, +--- HUD_COLOUR_ORANGEDARK = 17, +--- HUD_COLOUR_GREEN = 18, +--- HUD_COLOUR_GREENLIGHT = 19, +--- HUD_COLOUR_GREENDARK = 20, +--- HUD_COLOUR_PURPLE = 21, +--- HUD_COLOUR_PURPLELIGHT = 22, +--- HUD_COLOUR_PURPLEDARK = 23, +--- HUD_COLOUR_PINK = 24, +--- HUD_COLOUR_STAR = 25, +--- HUD_COLOUR_STARLIGHT = 26, +--- HUD_COLOUR_STARDARK = 27, +--- HUD_COLOUR_NET_PLAYER1 = 28, +--- HUD_COLOUR_NET_PLAYER2 = 29, +--- HUD_COLOUR_NET_PLAYER3 = 30, +--- HUD_COLOUR_NET_PLAYER4 = 31, +--- HUD_COLOUR_NET_PLAYER5 = 32, +--- HUD_COLOUR_NET_PLAYER6 = 33, +--- HUD_COLOUR_NET_PLAYER7 = 34, +--- HUD_COLOUR_NET_PLAYER8 = 35, +--- HUD_COLOUR_NET_PLAYER9 = 36, +--- HUD_COLOUR_NET_PLAYER10 = 37, +--- HUD_COLOUR_NET_PLAYER11 = 38, +--- HUD_COLOUR_NET_PLAYER12 = 39, +--- HUD_COLOUR_NET_PLAYER13 = 40, +--- HUD_COLOUR_NET_PLAYER14 = 41, +--- HUD_COLOUR_NET_PLAYER15 = 42, +--- HUD_COLOUR_NET_PLAYER16 = 43, +--- HUD_COLOUR_NET_PLAYER17 = 44, +--- HUD_COLOUR_NET_PLAYER18 = 45, +--- HUD_COLOUR_NET_PLAYER19 = 46, +--- HUD_COLOUR_NET_PLAYER20 = 47, +--- HUD_COLOUR_NET_PLAYER21 = 48, +--- HUD_COLOUR_NET_PLAYER22 = 49, +--- HUD_COLOUR_NET_PLAYER23 = 50, +--- HUD_COLOUR_NET_PLAYER24 = 51, +--- HUD_COLOUR_NET_PLAYER25 = 52, +--- HUD_COLOUR_NET_PLAYER26 = 53, +--- HUD_COLOUR_NET_PLAYER27 = 54, +--- HUD_COLOUR_NET_PLAYER28 = 55, +--- HUD_COLOUR_NET_PLAYER29 = 56, +--- HUD_COLOUR_NET_PLAYER30 = 57, +--- HUD_COLOUR_NET_PLAYER31 = 58, +--- HUD_COLOUR_NET_PLAYER32 = 59, +--- HUD_COLOUR_SIMPLEBLIP_DEFAULT = 60, +--- HUD_COLOUR_MENU_BLUE = 61, +--- HUD_COLOUR_MENU_GREY_LIGHT = 62, +--- HUD_COLOUR_MENU_BLUE_EXTRA_DARK = 63, +--- HUD_COLOUR_MENU_YELLOW = 64, +--- HUD_COLOUR_MENU_YELLOW_DARK = 65, +--- HUD_COLOUR_MENU_GREEN = 66, +--- HUD_COLOUR_MENU_GREY = 67, +--- HUD_COLOUR_MENU_GREY_DARK = 68, +--- HUD_COLOUR_MENU_HIGHLIGHT = 69, +--- HUD_COLOUR_MENU_STANDARD = 70, +--- HUD_COLOUR_MENU_DIMMED = 71, +--- HUD_COLOUR_MENU_EXTRA_DIMMED = 72, +--- HUD_COLOUR_BRIEF_TITLE = 73, +--- HUD_COLOUR_MID_GREY_MP = 74, +--- HUD_COLOUR_NET_PLAYER1_DARK = 75, +--- HUD_COLOUR_NET_PLAYER2_DARK = 76, +--- HUD_COLOUR_NET_PLAYER3_DARK = 77, +--- HUD_COLOUR_NET_PLAYER4_DARK = 78, +--- HUD_COLOUR_NET_PLAYER5_DARK = 79, +--- HUD_COLOUR_NET_PLAYER6_DARK = 80, +--- HUD_COLOUR_NET_PLAYER7_DARK = 81, +--- HUD_COLOUR_NET_PLAYER8_DARK = 82, +--- HUD_COLOUR_NET_PLAYER9_DARK = 83, +--- HUD_COLOUR_NET_PLAYER10_DARK = 84, +--- HUD_COLOUR_NET_PLAYER11_DARK = 85, +--- HUD_COLOUR_NET_PLAYER12_DARK = 86, +--- HUD_COLOUR_NET_PLAYER13_DARK = 87, +--- HUD_COLOUR_NET_PLAYER14_DARK = 88, +--- HUD_COLOUR_NET_PLAYER15_DARK = 89, +--- HUD_COLOUR_NET_PLAYER16_DARK = 90, +--- HUD_COLOUR_NET_PLAYER17_DARK = 91, +--- HUD_COLOUR_NET_PLAYER18_DARK = 92, +--- HUD_COLOUR_NET_PLAYER19_DARK = 93, +--- HUD_COLOUR_NET_PLAYER20_DARK = 94, +--- HUD_COLOUR_NET_PLAYER21_DARK = 95, +--- HUD_COLOUR_NET_PLAYER22_DARK = 96, +--- HUD_COLOUR_NET_PLAYER23_DARK = 97, +--- HUD_COLOUR_NET_PLAYER24_DARK = 98, +--- HUD_COLOUR_NET_PLAYER25_DARK = 99, +--- HUD_COLOUR_NET_PLAYER26_DARK = 100, +--- HUD_COLOUR_NET_PLAYER27_DARK = 101, +--- HUD_COLOUR_NET_PLAYER28_DARK = 102, +--- HUD_COLOUR_NET_PLAYER29_DARK = 103, +--- HUD_COLOUR_NET_PLAYER30_DARK = 104, +--- HUD_COLOUR_NET_PLAYER31_DARK = 105, +--- HUD_COLOUR_NET_PLAYER32_DARK = 106, +--- HUD_COLOUR_BRONZE = 107, +--- HUD_COLOUR_SILVER = 108, +--- HUD_COLOUR_GOLD = 109, +--- HUD_COLOUR_PLATINUM = 110, +--- HUD_COLOUR_GANG1 = 111, +--- HUD_COLOUR_GANG2 = 112, +--- HUD_COLOUR_GANG3 = 113, +--- HUD_COLOUR_GANG4 = 114, +--- HUD_COLOUR_SAME_CREW = 115, +--- HUD_COLOUR_FREEMODE = 116, +--- HUD_COLOUR_PAUSE_BG = 117, +--- HUD_COLOUR_FRIENDLY = 118, +--- HUD_COLOUR_ENEMY = 119, +--- HUD_COLOUR_LOCATION = 120, +--- HUD_COLOUR_PICKUP = 121, +--- HUD_COLOUR_PAUSE_SINGLEPLAYER = 122, +--- HUD_COLOUR_FREEMODE_DARK = 123, +--- HUD_COLOUR_INACTIVE_MISSION = 124, +--- HUD_COLOUR_DAMAGE = 125, +--- HUD_COLOUR_PINKLIGHT = 126, +--- HUD_COLOUR_PM_MITEM_HIGHLIGHT = 127, +--- HUD_COLOUR_SCRIPT_VARIABLE = 128, +--- HUD_COLOUR_YOGA = 129, +--- HUD_COLOUR_TENNIS = 130, +--- HUD_COLOUR_GOLF = 131, +--- HUD_COLOUR_SHOOTING_RANGE = 132, +--- HUD_COLOUR_FLIGHT_SCHOOL = 133, +--- HUD_COLOUR_NORTH_BLUE = 134, +--- HUD_COLOUR_SOCIAL_CLUB = 135, +--- HUD_COLOUR_PLATFORM_BLUE = 136, +--- HUD_COLOUR_PLATFORM_GREEN = 137, +--- HUD_COLOUR_PLATFORM_GREY = 138, +--- HUD_COLOUR_FACEBOOK_BLUE = 139, +--- HUD_COLOUR_INGAME_BG = 140, +--- HUD_COLOUR_DARTS = 141, +--- HUD_COLOUR_WAYPOINT = 142, +--- HUD_COLOUR_MICHAEL = 143, +--- HUD_COLOUR_FRANKLIN = 144, +--- HUD_COLOUR_TREVOR = 145, +--- HUD_COLOUR_GOLF_P1 = 146, +--- HUD_COLOUR_GOLF_P2 = 147, +--- HUD_COLOUR_GOLF_P3 = 148, +--- HUD_COLOUR_GOLF_P4 = 149, +--- HUD_COLOUR_WAYPOINTLIGHT = 150, +--- HUD_COLOUR_WAYPOINTDARK = 151, +--- HUD_COLOUR_PANEL_LIGHT = 152, +--- HUD_COLOUR_MICHAEL_DARK = 153, +--- HUD_COLOUR_FRANKLIN_DARK = 154, +--- HUD_COLOUR_TREVOR_DARK = 155, +--- HUD_COLOUR_OBJECTIVE_ROUTE = 156, +--- HUD_COLOUR_PAUSEMAP_TINT = 157, +--- HUD_COLOUR_PAUSE_DESELECT = 158, +--- HUD_COLOUR_PM_WEAPONS_PURCHASABLE = 159, +--- HUD_COLOUR_PM_WEAPONS_LOCKED = 160, +--- HUD_COLOUR_END_SCREEN_BG = 161, +--- HUD_COLOUR_CHOP = 162, +--- HUD_COLOUR_PAUSEMAP_TINT_HALF = 163, +--- HUD_COLOUR_NORTH_BLUE_OFFICIAL = 164, +--- HUD_COLOUR_SCRIPT_VARIABLE_2 = 165, +--- HUD_COLOUR_H = 166, +--- HUD_COLOUR_HDARK = 167, +--- HUD_COLOUR_T = 168, +--- HUD_COLOUR_TDARK = 169, +--- HUD_COLOUR_HSHARD = 170, +--- HUD_COLOUR_CONTROLLER_MICHAEL = 171 +--- HUD_COLOUR_CONTROLLER_FRANKLIN = 172 +--- HUD_COLOUR_CONTROLLER_TREVOR = 173 +--- HUD_COLOUR_CONTROLLER_CHOP = 174, +--- HUD_COLOUR_VIDEO_EDITOR_VIDEO = 175, +--- HUD_COLOUR_VIDEO_EDITOR_AUDIO = 176, +--- HUD_COLOUR_VIDEO_EDITOR_TEXT = 177, +--- HUD_COLOUR_HB_BLUE = 178, +--- HUD_COLOUR_HB_YELLOW = 179, +--- HUD_COLOUR_VIDEO_EDITOR_SCORE = 180, +--- HUD_COLOUR_VIDEO_EDITOR_AUDIO_FADEOUT = 181, +--- HUD_COLOUR_VIDEO_EDITOR_TEXT_FADEOUT = 182, +--- HUD_COLOUR_VIDEO_EDITOR_SCORE_FADEOUT = 183, +--- HUD_COLOUR_HEIST_BACKGROUND = 184, +--- HUD_COLOUR_VIDEO_EDITOR_AMBIENT = 185, +--- HUD_COLOUR_VIDEO_EDITOR_AMBIENT_FADEOUT = 186, +--- HUD_COLOUR_GANG_BOSS = 187, +--- HUD_COLOUR_GOON = 188, +--- HUD_COLOUR_BOSS = 189, +--- HUD_COLOUR_LOW_FLOW = 190, +--- HUD_COLOUR_LOW_FLOW_DARK = 191, +--- HUD_COLOUR_G1 = 192, +--- HUD_COLOUR_G2 = 193, +--- HUD_COLOUR_G3 = 194, +--- HUD_COLOUR_G4 = 195, +--- HUD_COLOUR_G5 = 196, +--- HUD_COLOUR_G6 = 197, +--- HUD_COLOUR_G7 = 198, +--- HUD_COLOUR_G8 = 199, +--- HUD_COLOUR_G9 = 200, +--- HUD_COLOUR_G10 = 201, +--- HUD_COLOUR_G11 = 202, +--- HUD_COLOUR_G12 = 203, +--- HUD_COLOUR_G13 = 204, +--- HUD_COLOUR_G14 = 205, +--- HUD_COLOUR_G15 = 206, +--- HUD_COLOUR_ADVERSARY = 207, +--- HUD_COLOUR_DEGEN_RED = 208, +--- HUD_COLOUR_DEGEN_YELLOW = 209, +--- HUD_COLOUR_DEGEN_GREEN = 210, +--- HUD_COLOUR_DEGEN_CYAN = 211, +--- HUD_COLOUR_DEGEN_BLUE = 212, +--- HUD_COLOUR_DEGEN_MAGENTA = 213, +--- HUD_COLOUR_STUNT_1 = 214, +--- HUD_COLOUR_STUNT_2 = 215, +--- HUD_COLOUR_SPECIAL_RACE_SERIES = 216 +--- HUD_COLOUR_SPECIAL_RACE_SERIES_DARK = 217, +--- HUD_COLOUR_CS = 218 +--- HUD_COLOUR_CS_DARK = 219, +--- HUD_COLOUR_TECH_GREEN = 220, +--- HUD_COLOUR_TECH_GREEN_DARK = 221, +--- HUD_COLOUR_TECH_RED = 222, +--- HUD_COLOUR_TECH_GREEN_VERY_DARK = 223, +--- HUD_COLOUR_PLACEHOLDER_01 = 224, +--- HUD_COLOUR_PLACEHOLDER_02 = 225, +--- HUD_COLOUR_PLACEHOLDER_03 = 226, +--- HUD_COLOUR_PLACEHOLDER_04 = 227, +--- HUD_COLOUR_PLACEHOLDER_05 = 228, +--- HUD_COLOUR_PLACEHOLDER_06 = 229, +--- HUD_COLOUR_PLACEHOLDER_07 = 230, +--- HUD_COLOUR_PLACEHOLDER_08 = 231, +--- HUD_COLOUR_PLACEHOLDER_09 = 232, +--- HUD_COLOUR_PLACEHOLDER_10 = 233, +--- HUD_COLOUR_JUNK_ENERGY = 234 +---}; +---``` +--- +---``` +---NativeDB Introduced: 2545 +---``` +---@param hudColorId integer +function SetCustomMpHudColor(hudColorId) end + ---**`HUD` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x2632482FD6B9AB87) ---``` @@ -3803,48 +4062,51 @@ function SetMissionName(p0, name) end function SetMissionName_2(p0, name) end ---**`HUD` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0xAAE7CE1D63167423) ----``` ----Shows the cursor on screen for one frame. +---[Native Documentation](https://docs.fivem.net/natives/?_0x8DB8CFFD58B62552) +---Changes the mouse style. +--- +---```cpp +---enum eMousePointerStyle { +--- ARROW = 1, +--- ARROW_DIMMED = 2, +--- HAND_OPEN = 3, +--- HAND_GRAB = 4, +--- HAND_MIDDLE_FINGER = 5, +--- ARROW_LEFT = 6, +--- ARROW_RIGHT = 7, +--- ARROW_UP = 8, +--- ARROW_DOWN = 9, +--- ARROW_TRIMMING = 10, +--- ARROW_PLUS = 11, +--- ARROW_MINUS = 12 +---}; ---``` -function SetMouseCursorActiveThisFrame() end +---@param style integer +function SetMouseCursorStyle(style) end ---@deprecated -ShowCursorThisFrame = SetMouseCursorActiveThisFrame +SetCursorSprite = SetMouseCursorStyle +---@deprecated +SetMouseCursorSprite = SetMouseCursorStyle ---**`HUD` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0x8DB8CFFD58B62552) ----``` ----Changes the mouse cursor's sprite. ----public enum CursorType ----{ ---- None = 0, ---- Normal = 1, ---- TransparentNormal = 2, ---- PreGrab = 3, ---- Grab = 4, ---- MiddleFinger = 5, ---- LeftArrow = 6, ---- RightArrow = 7, ---- UpArrow = 8, ---- DownArrow = 9, ---- HorizontalExpand = 10, ---- Add = 11, ---- Remove = 12, ----} ----``` ----@param spriteId integer -function SetMouseCursorSprite(spriteId) end +---[Native Documentation](https://docs.fivem.net/natives/?_0xAAE7CE1D63167423) +---Sets the mouse pointer to be active on current frame. +function SetMouseCursorThisFrame() end ---@deprecated -SetCursorSprite = SetMouseCursorSprite +ShowCursorThisFrame = SetMouseCursorThisFrame +---@deprecated +SetMouseCursorActiveThisFrame = SetMouseCursorThisFrame ---**`HUD` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x98215325A695E78A) ----Shows/hides the frontend cursor on the pause menu or similar menus. ----Clicking off and then on the game window will show it again. ----@param enable boolean -function SetMouseCursorVisibleInMenus(enable) end +---Toggles the visibility of the cursor. Do note that if the game loses focus and then regains it, the cursor will become visible again. +---@param isVisible boolean +function SetMouseCursorVisible(isVisible) end + +---@deprecated +SetMouseCursorVisibleInMenus = SetMouseCursorVisible ---**`HUD` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xD48FE545CD46F857) @@ -3942,36 +4204,36 @@ SetMpGamerTagIcons = SetMpGamerTagUseVehicleHealth ---```cpp ---enum eMpGamerTagComponent ---{ ---- MP_TAG_GAMER_NAME, ---- MP_TAG_CREW_TAG, ---- MP_TAG_HEALTH_ARMOUR, ---- MP_TAG_BIG_TEXT, ---- MP_TAG_AUDIO_ICON, ---- MP_TAG_USING_MENU, ---- MP_TAG_PASSIVE_MODE, ---- MP_TAG_WANTED_STARS, ---- MP_TAG_DRIVER, ---- MP_TAG_CO_DRIVER, ---- MP_TAG_TAGGED, ---- MP_TAG_GAMER_NAME_NEARBY, ---- MP_TAG_ARROW, ---- MP_TAG_PACKAGES, ---- MP_TAG_INV_IF_PED_FOLLOWING, ---- MP_TAG_RANK_TEXT, ---- MP_TAG_TYPING, ---- MP_TAG_BAG_LARGE, ---- MP_TAG_ARROW, ---- MP_TAG_GANG_CEO, ---- MP_TAG_GANG_BIKER, ---- MP_TAG_BIKER_ARROW, ---- MP_TAG_MC_ROLE_PRESIDENT, ---- MP_TAG_MC_ROLE_VICE_PRESIDENT, ---- MP_TAG_MC_ROLE_ROAD_CAPTAIN, ---- MP_TAG_MC_ROLE_SARGEANT, ---- MP_TAG_MC_ROLE_ENFORCER, ---- MP_TAG_MC_ROLE_PROSPECT, ---- MP_TAG_TRANSMITTER, ---- MP_TAG_BOMB +--- MP_TAG_GAMER_NAME = 0, +--- MP_TAG_CREW_TAG = 1, +--- MP_TAG_HEALTH_ARMOUR = 2, +--- MP_TAG_BIG_TEXT = 3, +--- MP_TAG_AUDIO_ICON = 4, +--- MP_TAG_USING_MENU = 5, +--- MP_TAG_PASSIVE_MODE = 6, +--- MP_TAG_WANTED_STARS = 7, +--- MP_TAG_DRIVER = 8, +--- MP_TAG_CO_DRIVER = 9, +--- MP_TAG_TAGGED = 10, +--- MP_TAG_GAMER_NAME_NEARBY = 11, +--- MP_TAG_ARROW = 12, +--- MP_TAG_PACKAGES = 13, +--- MP_TAG_INV_IF_PED_FOLLOWING = 14, +--- MP_TAG_RANK_TEXT = 15, +--- MP_TAG_TYPING = 16, +--- MP_TAG_BAG_LARGE = 17, +--- MP_TAG_ARROW = 18, +--- MP_TAG_GANG_CEO = 19, +--- MP_TAG_GANG_BIKER = 20, +--- MP_TAG_BIKER_ARROW = 21, +--- MP_TAG_MC_ROLE_PRESIDENT = 22, +--- MP_TAG_MC_ROLE_VICE_PRESIDENT = 23, +--- MP_TAG_MC_ROLE_ROAD_CAPTAIN = 24, +--- MP_TAG_MC_ROLE_SARGEANT = 25, +--- MP_TAG_MC_ROLE_ENFORCER = 26, +--- MP_TAG_MC_ROLE_PROSPECT = 27, +--- MP_TAG_TRANSMITTER = 28, +--- MP_TAG_BOMB = 29 ---}; ---``` --- @@ -4303,12 +4565,29 @@ function SetTextEdge(p0, r, g, b, a) end ---**`HUD` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x66E0276CC5F6B9DA) ----``` ----fonts that mess up your text where made for number values/misc stuff +---```cpp +---enum eTextFonts +---{ +--- FONT_STANDARD = 0, +--- FONT_CURSIVE = 1, +--- FONT_ROCKSTAR_TAG = 2, +--- FONT_LEADERBOAR0D = 3, +--- FONT_CONDENSED = 4, +--- FONT_STYLE_FIXED_WIDTH_NUMBERS = 5, +--- FONT_CONDENSED_NOT_GAMERNAME = 6, +--- FONT_STYLE_PRICEDOWN = 7, +--- FONT_STYLE_TAXI = 8, +---} ---``` ---@param fontType integer function SetTextFont(fontType) end +---**`HUD` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0x1185A8087587322C) +---Toggles if the text input box can be opened with [`DISPLAY_ONSCREEN_KEYBOARD`](#\_0x00DC833F2568DBF6). +---@param state boolean +function SetTextInputBoxEnabled(state) end + ---**`HUD` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x4E096588B13FFECA) ---``` @@ -4401,10 +4680,8 @@ function SetUseWaypointAsDestination(toggle) end ---**`HUD` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x7B1776B3B53F8D74) ----**instructionalKey enum list**: ---- ----``` ----enum INSTRUCTIONAL_BUTTON_TYPES +---```cpp +---enum eInstructionalButtonTypes ---{ --- NONE = 0, --- SELECT = 1, @@ -4613,20 +4890,22 @@ SetWarningMessage_3 = SetWarningMessageWithHeaderAndSubstringFlags ---**`HUD` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x38B55259C2E078ED) ----``` ----NativeDB Introduced: v1493 ----``` ----@param entryHeader string ----@param entryLine1 string ----@param flags integer ----@param entryLine2 string ----@param p4 boolean ----@param p5 any ----@param showBg boolean ----@param p9 any ----@param p10 any ----@return any, any -function SetWarningMessageWithHeaderUnk(entryHeader, entryLine1, flags, entryLine2, p4, p5, showBg, p9, p10) end +---Sets a warning message for one frame with header and upper buttons bit field that don't fit the standard 32 bit set. +---@param headerTextLabel string +---@param line1TextLabel string +---@param buttonsBitField integer +---@param buttonsBitFieldUpper integer +---@param line2TextLabel string +---@param addNumber boolean +---@param numberToAdd integer +---@param firstSubstring string +---@param secondSubstring string +---@param showBackground boolean +---@param errorCode integer +function SetWarningMessageWithHeaderExtended(headerTextLabel, line1TextLabel, buttonsBitField, buttonsBitFieldUpper, line2TextLabel, addNumber, numberToAdd, firstSubstring, secondSubstring, showBackground, errorCode) end + +---@deprecated +SetWarningMessageWithHeaderUnk = SetWarningMessageWithHeaderExtended ---**`HUD` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xA7E4E2D361C2627F) @@ -4646,6 +4925,16 @@ function SetWaypointOff() end ---@param p0 any function SetWidescreenFormat(p0) end +---**`HUD` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0xC772A904CDE1186F) +---Controls the visibility of the "Contact" instructional buttons on the map screen. +--- +---``` +---NativeDB Introduced: 2545 +---``` +---@param toggle boolean +function ShowContactInstructionalButton(toggle) end + ---**`HUD` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xDCFB5D4DB8BF367E) ---Enables or disables the blue half circle ![](https://i.imgur.com/iZes9Ec.png) around the specified blip on the left side of the blip. This is used to indicate that the player is in your crew in GTA:O. Color is changeable by using [`SET_BLIP_SECONDARY_COLOUR`](#\_0x14892474891E09EB). diff --git a/library/natives/GTAV/MISC.lua b/library/natives/GTAV/MISC.lua index 9cc784e..2e82a5e 100644 --- a/library/natives/GTAV/MISC.lua +++ b/library/natives/GTAV/MISC.lua @@ -228,9 +228,9 @@ function AreStringsEqual(string1, string2) end ---**`MISC` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xC843060B5765DCE7) ---This native does not have an official description. ----@param p0 number +---@param value number ---@return number -function Asin(p0) end +function Asin(value) end ---**`MISC` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xA9D1795CD5043663) @@ -263,11 +263,10 @@ function BlockDispatchServiceResourceCreation(dispatchService, toggle) end ---**`MISC` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x58A39BE597CE99CD) ----``` ----DO NOT use this as it doesn't clean up the text input box properly and your script will get stuck in the UPDATE_ONSCREEN_KEYBOARD() loop. ----Use _FORCE_CLOSE_TEXT_INPUT_BOX instead. ----CANCEL_* ----``` +---Closes the onscreen keyboard on console versions of the game. +--- +---**NOTE:** Do not use this native in FiveM/PC, because [`UPDATE_ONSCREEN_KEYBOARD`](#\_0x0CF2B696BBF945AE) value doesn't get cleaned up and stays as `0`. +---You should use [`FORCE_CLOSE_TEXT_INPUT_BOX`](#\_0x8817605C2BA76200) instead. function CancelOnscreenKeyboard() end ---**`MISC` `client`** @@ -488,22 +487,6 @@ function CopyMemory(src, size) end ---**`MISC` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x3F892CAF67444AE7) ---``` ----enum IncidentTypes ----{ ---- FireDepartment = 3, ---- Paramedics = 5, ---- Police = 7, ---- PedsInCavalcades = 11, ---- Merryweather = 14 ----}; ----As for the 'police' incident, it will call police cars to you, but unlike PedsInCavalcades & Merryweather they won't start shooting at you unless you shoot first or shoot at them. The top 2 however seem to cancel theirselves if there is noone dead around you or a fire. I only figured them out as I found out the 3rd param is definately the amountOfPeople and they called incident 3 in scripts with 4 people (which the firetruck has) and incident 5 with 2 people (which the ambulence has). The 4 param I cant say is radius, but for the pedsInCavalcades and Merryweather R* uses 0.0f and for the top 3 (Emergency Services) they use 3.0f. ----Side Note: It seems calling the pedsInCavalcades or Merryweather then removing it seems to break you from calling the EmergencyEvents and I also believe pedsInCavalcades. (The V cavalcades of course not IV). ----Side Note 2: I say it breaks as if you call this proper, ----if(CREATE_INCIDENT) etc it will return false if you do as I said above. ----===================================================== ----``` ---- ----``` ---NativeDB Added Parameter 8: Any p7 ---NativeDB Added Parameter 9: Any p8 ---``` @@ -519,26 +502,6 @@ function CreateIncident(dispatchService, x, y, z, numUnits, radius) end ---**`MISC` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x05983472F0494E60) ---``` ----p0 could be type (valueused in scripts: 14, 7, 5, 3, 11) ----p1 is a return from get_player_ped() in am_gang_call.c, but player_ped_id() in other (non am) scripts. ----p3 is usually 0f or 3f ----===================================================== ----enum IncidentTypes ----{ ---- FireDepartment = 3, ---- Paramedics = 5, ---- Police = 7, ---- PedsInCavalcades = 11, ---- Merryweather = 14 ----}; ----As for the 'police' incident, it will call police cars to you, but unlike PedsInCavalcades & Merryweather they won't start shooting at you unless you shoot first or shoot at them. The top 2 however seem to cancel theirselves if there is noone dead around you or a fire. I only figured them out as I found out the 3rd param is definately the amountOfPeople and they called incident 3 in scripts with 4 people (which the firetruck has) and incident 5 with 2 people (which the ambulence has). The 4 param I cant say is radius, but for the pedsInCavalcades and Merryweather R* uses 0.0f and for the top 3 (Emergency Services) they use 3.0f. ----Side Note: It seems calling the pedsInCavalcades or Merryweather then removing it seems to break you from calling the EmergencyEvents and I also believe pedsInCavalcades. (The V cavalcades of course not IV). ----Side Note 2: I say it breaks as if you call this proper, ----if(CREATE_INCIDENT) etc it will return false if you do as I said above. ----===================================================== ----``` ---- ----``` ---NativeDB Added Parameter 6: Any p5 ---NativeDB Added Parameter 7: Any p6 ---``` @@ -597,49 +560,36 @@ function DisableStuntJumpSet(p0) end ---**`MISC` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x00DC833F2568DBF6) +---Displays a text input box. +--- +---```cpp +---enum eKeyboardType +---{ +--- ONSCREEN_KEYBOARD_ENGLISH = 0, +--- ONSCREEN_KEYBOARD_LOCALISED = 1, +--- ONSCREEN_KEYBOARD_PASSWORD = 2, +--- ONSCREEN_KEYBOARD_GAMERTAG = 3, +--- ONSCREEN_KEYBOARD_EMAIL = 4, +--- ONSCREEN_KEYBOARD_BASIC_ENGLISH = 5, +--- ONSCREEN_KEYBOARD_FILENAME = 6 +---}; ---``` ----windowTitle's --------------------- ----CELL_EMAIL_BOD = "Enter your Eyefind message" ----CELL_EMAIL_BODE = "Message too long. Try again" ----CELL_EMAIL_BODF = "Forbidden message. Try again" ----CELL_EMAIL_SOD = "Enter your Eyefind subject" ----CELL_EMAIL_SODE = "Subject too long. Try again" ----CELL_EMAIL_SODF = "Forbidden text. Try again" ----CELL_EMASH_BOD = "Enter your Eyefind message" ----CELL_EMASH_BODE = "Message too long. Try again" ----CELL_EMASH_BODF = "Forbidden message. Try again" ----CELL_EMASH_SOD = "Enter your Eyefind subject" ----CELL_EMASH_SODE = "Subject too long. Try again" ----CELL_EMASH_SODF = "Forbidden Text. Try again" ----FMMC_KEY_TIP10 = "Enter Synopsis" ----FMMC_KEY_TIP12 = "Enter Custom Team Name" ----FMMC_KEY_TIP12F = "Forbidden Text. Try again" ----FMMC_KEY_TIP12N = "Custom Team Name" ----FMMC_KEY_TIP8 = "Enter Message" ----FMMC_KEY_TIP8F = "Forbidden Text. Try again" ----FMMC_KEY_TIP8FS = "Invalid Message. Try again" ----FMMC_KEY_TIP8S = "Enter Message" ----FMMC_KEY_TIP9 = "Enter Outfit Name" ----FMMC_KEY_TIP9F = "Invalid Outfit Name. Try again" ----FMMC_KEY_TIP9N = "Outfit Name" ----PM_NAME_CHALL = "Enter Challenge Name" ----``` ----@param p0 integer +---@param keyboardType integer ---@param windowTitle string ----@param p2 string +---@param description string ---@param defaultText string ---@param defaultConcat1 string ---@param defaultConcat2 string ---@param defaultConcat3 string ---@param maxInputLength integer -function DisplayOnscreenKeyboard(p0, windowTitle, p2, defaultText, defaultConcat1, defaultConcat2, defaultConcat3, maxInputLength) end +function DisplayOnscreenKeyboard(keyboardType, windowTitle, description, defaultText, defaultConcat1, defaultConcat2, defaultConcat3, maxInputLength) end ---**`MISC` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xCA78CFA0366592FE) ----This native does not have an official description. ----@param p0 integer +---Displays the text input box with support for input with 500 characters. +---@param keyboardType integer ---@param windowTitle string +---@param description string ---@param defaultText string ---@param defaultConcat1 string ---@param defaultConcat2 string @@ -649,8 +599,7 @@ function DisplayOnscreenKeyboard(p0, windowTitle, p2, defaultText, defaultConcat ---@param defaultConcat6 string ---@param defaultConcat7 string ---@param maxInputLength integer ----@return any -function DisplayOnscreenKeyboardWithLongerInitialString(p0, windowTitle, defaultText, defaultConcat1, defaultConcat2, defaultConcat3, defaultConcat4, defaultConcat5, defaultConcat6, defaultConcat7, maxInputLength) end +function DisplayOnscreenKeyboardWithLongerInitialString(keyboardType, windowTitle, description, defaultText, defaultConcat1, defaultConcat2, defaultConcat3, defaultConcat4, defaultConcat5, defaultConcat6, defaultConcat7, maxInputLength) end ---@deprecated DisplayOnscreenKeyboard_2 = DisplayOnscreenKeyboardWithLongerInitialString @@ -681,23 +630,23 @@ function DoesPopMultiplierSphereExist(id) end ---List of dispatch services: --- ---```cpp ----enum DispatchType +---enum eDispatchType ---{ --- DT_Invalid = 0, ---- DT_PoliceAutomobile, ---- DT_PoliceHelicopter, ---- DT_FireDepartment, ---- DT_SwatAutomobile, ---- DT_AmbulanceDepartment, ---- DT_PoliceRiders, ---- DT_PoliceVehicleRequest, ---- DT_PoliceRoadBlock, ---- DT_PoliceAutomobileWaitPulledOver, ---- DT_PoliceAutomobileWaitCruising, ---- DT_Gangs, ---- DT_SwatHelicopter, ---- DT_PoliceBoat, ---- DT_ArmyVehicle, +--- DT_PoliceAutomobile = 1, +--- DT_PoliceHelicopter = 2, +--- DT_FireDepartment = 3, +--- DT_SwatAutomobile = 4, +--- DT_AmbulanceDepartment = 5, +--- DT_PoliceRiders = 6, +--- DT_PoliceVehicleRequest = 7, +--- DT_PoliceRoadBlock = 8, +--- DT_PoliceAutomobileWaitPulledOver = 9, +--- DT_PoliceAutomobileWaitCruising = 10, +--- DT_Gangs = 11, +--- DT_SwatHelicopter = 13, +--- DT_PoliceBoat = 14, +--- DT_ArmyVehicle = 15, --- DT_BikerBackup = 15 ---}; ---``` @@ -954,9 +903,8 @@ GetGroundZFor_3dCoord_2 = GetGroundZExcludingObjectsFor_3dCoord ---**`MISC` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xC906A7DAB05C8D2B) ----``` ----Bear in mind this native can only calculate the elevation when the coordinates are within the client's render distance. ----``` +---This native gets the ground level (ground elevation) and returns the Z coordinate that represents it. +---Note: This native can only calculate the elevation when the coordinates are within the render distance of the client. --- ---``` ---NativeDB Added Parameter 6: BOOL p5 @@ -964,9 +912,9 @@ GetGroundZFor_3dCoord_2 = GetGroundZExcludingObjectsFor_3dCoord ---@param x number ---@param y number ---@param z number ----@param ignoreWater boolean +---@param includeWater boolean ---@return boolean, number -function GetGroundZFor_3dCoord(x, y, z, ignoreWater) end +function GetGroundZFor_3dCoord(x, y, z, includeWater) end ---**`MISC` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xD24D37CC275948CC) @@ -1221,7 +1169,7 @@ function GetWeatherTypeTransition() end ---**`MISC` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x1F400FEF721170DA) ----This native does not have an official description. +---Used for hunting in singleplayer and for golfing in both sp and online. The [`GET_HEADING_FROM_VECTOR_2D`](#\_0x2FFB6B224F4B2926) native can be used to get the wind heading from the direction. ---@return vector3 function GetWindDirection() end @@ -1452,6 +1400,14 @@ function IsIncidentValid(incidentId) end ---@return boolean function IsInPowerSavingMode() end +---**`MISC` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0xB8C0BB75D8A77DB3) +---``` +---NativeDB Introduced: 2545 +---``` +---@return boolean +function IsJapaneseVersion() end + ---**`MISC` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x8A75CE2956274ADD) ---This native does not have an official description. @@ -1624,6 +1580,14 @@ function IsSniperBulletInArea(x1, y1, z1, x2, y2, z2) end ---@return boolean function IsSniperInverted() end +---**`MISC` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0x0A27B2B6282F7169) +---``` +---NativeDB Introduced: 2545 +---``` +---@return boolean +function IsSteamVersion() end + ---**`MISC` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xF22B6C47C6EAB066) ---This native does not have an official description. @@ -2078,12 +2042,21 @@ function NetworkSetScriptIsSafeForNetworkGame() end ---**`MISC` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x3ED1438C1F5C6612) +---```cpp +---enum eFontBitField +---{ +--- FONT_BIT_STANDARD = 1, +--- FONT_BIT_CURSIVE = 2, +--- FONT_BIT_ROCKSTAR_TAG = 4 +--- FONT_BIT_LEADERBOARD = 8 +--- FONT_BIT_CONDENSED = 16 +--- FONT_BIT_FIXED_WIDTH_NUMBERS = 32 +--- FONT_BIT_CONDENSED_NOT_GAMERNAME = 64 +--- FONT_BIT_PRICEDOWN = 128 +---}; ---``` ----p0 was always 2 in R* scripts. ----Called before calling DISPLAY_ONSCREEN_KEYBOARD if the input needs to be saved. ----``` ----@param p0 integer -function NextOnscreenKeyboardResultWillDisplayUsingTheseFonts(p0) end +---@param fontBitField integer +function NextOnscreenKeyboardResultWillDisplayUsingTheseFonts(fontBitField) end ---**`MISC` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x1162EA8AE9D24EEA) @@ -2501,12 +2474,14 @@ function SetGamePaused(toggle) end ---**`MISC` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x740E14FAD5842351) ----``` ----level can be from 0 to 3 ----0: 9.8 ----1: 2.4 ----2: 0.1 - very low ----3: 0.0 +---```cpp +---enum eGravityLevel +---{ +--- GRAV_EARTH = 0, // earth gravity 9.8m/s2 +--- GRAV_MOON = 1, // moon gravity 2.4m/s2 +--- GRAV_LOW = 2, // very low gravity +--- GRAV_ZERO = 3 // zero gravity +---} ---``` ---@param level integer function SetGravityLevel(level) end @@ -2781,23 +2756,19 @@ function SetWeatherTypeTransition(weatherType1, weatherType2, percentWeather2) e ---**`MISC` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xAC3A74E8384A9919) ----``` ----Sets the the raw wind speed value. ----``` +---Sets the the raw wind speed value. The wind speed will stay persistent until it is reset (see examples). ---@param speed number function SetWind(speed) end ---**`MISC` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xEB0F4468467B4528) ----Sets the wind direction. +---Sets the wind direction. The wind direction will stay persistent until it is reset (see examples). ---@param direction number function SetWindDirection(direction) end ---**`MISC` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xEE09ECEDBABE47FC) ----``` ----Using this native will clamp the wind speed value to a range of 0.0- 12.0. Using SET_WIND sets the same value but without the restriction. ----``` +---Using this native will clamp the wind speed value to a range of 0.0 - 12.0. The wind speed will stay persistent until it is reset (see examples). ---@param speed number function SetWindSpeed(speed) end @@ -3016,13 +2987,12 @@ function ToggleShowOptionalStuntJumpCamera(toggle) end ---**`MISC` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xEA2F2061875EED90) ----``` ----Returns true if the current frontend menu is FE_MENU_VERSION_SP_PAUSE ---- ----U* ----``` +---Returns whether the In-Game Pause Menu Launched the Benchmark Tests. ---@return boolean -function UiIsSingleplayerPauseMenuActive() end +function UiStartedEndUserBenchmark() end + +---@deprecated +UiIsSingleplayerPauseMenuActive = UiStartedEndUserBenchmark ---**`MISC` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xA74802FB8D0B7814) @@ -3036,13 +3006,17 @@ function UnloadCloudHat(name, p1) end ---**`MISC` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x0CF2B696BBF945AE) ----``` ----Returns the current status of the onscreen keyboard, and updates the output. ----Status Codes: -----1: Keyboard isn't active ----0: User still editing ----1: User has finished editing ----2: User has canceled editing +---Returns the current state of the text input box. +--- +---```cpp +---enum eOSKStatus +---{ +--- OSK_INVALID = -1, +--- OSK_PENDING = 0, +--- OSK_SUCCESS = 1, +--- OSK_CANCELLED = 2, +--- OSK_FAILED = 3 +---}; ---``` ---@return integer function UpdateOnscreenKeyboard() end diff --git a/library/natives/GTAV/MOBILE.lua b/library/natives/GTAV/MOBILE.lua index e0307e7..91a7cf8 100644 --- a/library/natives/GTAV/MOBILE.lua +++ b/library/natives/GTAV/MOBILE.lua @@ -36,8 +36,17 @@ function CellCamIsCharVisibleNoFaceCheck(entity) end ---**`MOBILE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x95C9E72F3D7DEC9B) ----``` ----For move the finger of player, the value of int goes 1 at 5. +---Moves the character's finger in a swiping motion when holding a cellphone in their hand through the use of the [CREATE_MOBILE_PHONE](#\_0xA4E8E696C532FBC7) native. +--- +---```cpp +---enum eCellInput { +--- CELL_INPUT_NONE = 0, +--- CELL_INPUT_UP = 1, +--- CELL_INPUT_DOWN = 2, +--- CELL_INPUT_LEFT = 3, +--- CELL_INPUT_RIGHT = 4, +--- CELL_INPUT_SELECT = 5 +---} ---``` ---@param direction integer function CellCamMoveFinger(direction) end diff --git a/library/natives/GTAV/NETWORK.lua b/library/natives/GTAV/NETWORK.lua index 992658c..e927268 100644 --- a/library/natives/GTAV/NETWORK.lua +++ b/library/natives/GTAV/NETWORK.lua @@ -1992,26 +1992,27 @@ function NetworkAddMapEntityToSynchronisedScene(netScene, modelHash, x, y, z, an ---Adds a ped to a networked synchronised scene. --- ---Synchronized scene playback flags (Also works in other `NETWORK_ADD_*_TO_SYNCHRONISED_SCENE` natives): ----|Value| Name | Notes | ----|:----:|:------:| :--------: | ----|`0`| None | No flag set. | ----|`1`| USE_PHYSICS | Allows the ped to have physics during the scene. | ----|`2`| TAG_SYNC_OUT | The task will do a tag synchronized blend out with the movement behaviour of the ped. | ----|`4`| DONT_INTERRUPT | The scene will not be interrupted by external events. | ----|`8`| ON_ABORT_STOP_SCENE | The scene will be stopped if the scripted task is aborted. | ----|`16`| ABORT_ON_WEAPON_DAMAGE | The scene will be stopped if the ped is damaged by a weapon. | ----|`32`| BLOCK_MOVER_UPDATE | The task will not update the mover. | ----|`64`| LOOP_WITHIN_SCENE | Animations within this scene will be looped until the scene is finished. | ----|`128`| PRESERVE_VELOCITY | The task will keep it's velocity when the scene is cleaned up/stopped. Do note that the `USE_PHYSICS` flag must also be present. | ----|`256`| EXPAND_PED_CAPSULE_FROM_SKELETON | The task will apply the `ExpandPedCapsuleFromSkeleton` reset flag to the ped (See [`SET_PED_RESET_FLAG`](#\_0xC1E8A365BF3B29F2)). | ----|`512`| ACTIVATE_RAGDOLL_ON_COLLISION | The ped will be ragdoll if it comes in contact with an object. | ----|`1024`| HIDE_WEAPON | The ped's current weapon will be hidden during the scene. | ----|`2048`| ABORT_ON_DEATH | The synchronised scene will be aborted if the ped dies. | ----|`4096`| VEHICLE_ABORT_ON_LARGE_IMPACT | If the scene is running on a vehicle, then it will be aborted if the vehicle takes a heavy collision with another vehicle. | ----|`16384`| PROCESS_ATTACHMENTS_ON_START | Attachments will be processed at the start of the scene. | ----|`32768`| NET_ON_EARLY_NON_PED_STOP_RETURN_TO_START | A non-ped entity will be returned to their starting position if the scene finishes early. | ----|`65536`| SET_PED_OUT_OF_VEHICLE_AT_START | If the ped is in a vehicle when the scene starts, it will be set out of the vehicle. | ----|`131072`| NET_DISREGARD_ATTACHMENT_CHECKS | Attachment checks will be disregarded when the scene is running. | +---| Value | Name | Notes | +---| :-------: | :---------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------: | +---| `0` | None | No flag set. | +---| `1` | USE_PHYSICS | Allows the ped to have physics during the scene. | +---| `2` | TAG_SYNC_OUT | The task will do a tag synchronized blend out with the movement behaviour of the ped. | +---| `4` | DONT_INTERRUPT | The scene will not be interrupted by external events. | +---| `8` | ON_ABORT_STOP_SCENE | The scene will be stopped if the scripted task is aborted. | +---| `16` | ABORT_ON_WEAPON_DAMAGE | The scene will be stopped if the ped is damaged by a weapon. | +---| `32` | BLOCK_MOVER_UPDATE | The task will not update the mover. | +---| `64` | LOOP_WITHIN_SCENE | Animations within this scene will be looped until the scene is finished. | +---| `128` | PRESERVE_VELOCITY | The task will keep it's velocity when the scene is cleaned up/stopped. Do note that the `USE_PHYSICS` flag must also be present. | +---| `256` | EXPAND_PED_CAPSULE_FROM_SKELETON | The task will apply the `ExpandPedCapsuleFromSkeleton` reset flag to the ped (See [`SET_PED_RESET_FLAG`](#\_0xC1E8A365BF3B29F2)). | +---| `512` | ACTIVATE_RAGDOLL_ON_COLLISION | The ped will be ragdoll if it comes in contact with an object. | +---| `1024` | HIDE_WEAPON | The ped's current weapon will be hidden during the scene. | +---| `2048` | ABORT_ON_DEATH | The synchronised scene will be aborted if the ped dies. | +---| `4096` | VEHICLE_ABORT_ON_LARGE_IMPACT | If the scene is running on a vehicle, then it will be aborted if the vehicle takes a heavy collision with another vehicle. | +---| `8192` | VEHICLE_ALLOW_PLAYER_ENTRY | If the scene is on a vehicle, it allows players to enter it. | +---| `16384` | PROCESS_ATTACHMENTS_ON_START | Attachments will be processed at the start of the scene. | +---| `32768` | NET_ON_EARLY_NON_PED_STOP_RETURN_TO_START | A non-ped entity will be returned to their starting position if the scene finishes early. | +---| `65536` | SET_PED_OUT_OF_VEHICLE_AT_START | If the ped is in a vehicle when the scene starts, it will be set out of the vehicle. | +---| `131072` | NET_DISREGARD_ATTACHMENT_CHECKS | Attachment checks will be disregarded when the scene is running. | --- ---These flags can be combined with the `|` operator. ---@param ped integer @@ -2564,10 +2565,22 @@ function NetworkConcealEntity(entity, toggle) end ---**`NETWORK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xBBDF066252829606) ---This is what R\* uses to hide players in MP interiors. +--- +---To manage player visibility with NetworkConcealPlayer, here’s a solid approach: +--- +---**General Population (players not in any instance):** +--- +---* Use NetworkConcealPlayer to hide players who are in any instance. This way, general population players won’t see or interact with instance players. +--- +---**Instance Players (players in a specific instance):** +--- +---* Use NetworkConcealPlayer to hide players who aren’t in the same instance. Instance players can still see and interact with the general population but not with players in other instances. +--- +---This setup keeps instance players separate from each other while allowing interaction with the general population. ---@param player integer ---@param toggle boolean ----@param p2 boolean -function NetworkConcealPlayer(player, toggle, p2) end +---@param bAllowDamagingWhileConcealed boolean +function NetworkConcealPlayer(player, toggle, bAllowDamagingWhileConcealed) end ---**`NETWORK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x7CD6BC4C2BBDD526) @@ -2791,18 +2804,16 @@ function NetworkExplodeVehicle(vehicle, isAudible, isInvisible, p3) end ---**`NETWORK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x1F4ED342ACEFE62D) ----``` ----state - 0 does 5 fades ----state - 1 does 6 fades ----native is missing third argument, also boolean, setting to 1 made vehicle fade in slower, probably "slow" as per NETWORK_FADE_OUT_ENTITY ----``` +---Fade the given entity back in, usually used after the entity has been faded out with [NETWORK_FADE_OUT_ENTITY](#\_0xDE564951F95E09ED) --- ----``` ----NativeDB Added Parameter 3: BOOL slow ----``` +---When used on a entity which isn't invisible or faded out then the native will still work, it will just instanly make the ped invisible before fading in. +--- +---**Additional Parameters**: +--- +---* **flash**: If set to true the entity will flash while fading in. ---@param entity integer ----@param state boolean -function NetworkFadeInEntity(entity, state) end +---@param bNetwork boolean +function NetworkFadeInEntity(entity, bNetwork) end ---**`NETWORK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xDE564951F95E09ED) @@ -4832,67 +4843,69 @@ function NetworkRespawnCoords(player, x, y, z, p4, p5) end --- ---```cpp ---enum ePlayerSpawnLocation { ---- SPAWN_LOCATION_AUTOMATIC = 0, // system will decide ---- SPAWN_LOCATION_NEAR_DEATH, ---- SPAWN_LOCATION_NEAR_TEAM_MATES, ---- SPAWN_LOCATION_MISSION_AREA, // script defined area ---- SPAWN_LOCATION_NEAR_OTHER_PLAYERS, ---- SPAWN_LOCATION_NEAR_CURRENT_POSITION, ---- SPAWN_LOCATION_AT_CURRENT_POSITION, ---- SPAWN_LOCATION_NET_TEST_BED, ---- SPAWN_LOCATION_CUSTOM_SPAWN_POINTS, ---- SPAWN_LOCATION_OUTSIDE_SIMEON_GARAGE, ---- SPAWN_LOCATION_NEAR_SPECIFIC_COORDS, ---- SPAWN_LOCATION_AT_SPECIFIC_COORDS, ---- SPAWN_LOCATION_AT_AIRPORT_ARRIVALS, ---- SPAWN_LOCATION_AT_SPECIFIC_COORDS_IF_POSSIBLE, ---- SPAWN_LOCATION_IN_SPECIFIC_ANGLED_AREA, ---- SPAWN_LOCATION_NEAREST_RESPAWN_POINT, ---- SPAWN_LOCATION_AT_SPECIFIC_COORDS_RACE_CORONA, ---- SPAWN_LOCATION_INSIDE_GARAGE, ---- SPAWN_LOCATION_INSIDE_PROPERTY, ---- SPAWN_LOCATION_INSIDE_PROPERTY_OR_GARAGE, ---- SPAWN_LOCATION_NEAR_DEATH_IMPROMPTU, ---- SPAWN_LOCATION_NEAR_CURRENT_POSITION_SPREAD_OUT, ---- SPAWN_LOCATION_NEAREST_RESPAWN_POINT_TO_SPECIFIC_COORDS, ---- SPAWN_LOCATION_NEAREST_HOSPITAL, ---- SPAWN_LOCATION_NEAREST_POLICE_STATION, ---- SPAWN_LOCATION_NEAREST_HOTEL_TO_SPECIFIC_COORDS, ---- SPAWN_LOCATION_MISSION_AREA_NEAR_CURRENT_POSITION, ---- SPAWN_LOCATION_PRIVATE_YACHT, ---- SPAWN_LOCATION_PRIVATE_YACHT_APARTMENT, ---- SPAWN_LOCATION_PRIVATE_FRIEND_YACHT, ---- SPAWN_LOCATION_PRIVATE_YACHT_NEAR_SHORE, ---- SPAWN_LOCATION_NEAR_GANG_BOSS, ---- SPAWN_LOCATION_NEAR_SPECIFIC_COORDS_WITH_GANG, ---- SPAWN_LOCATION_GANG_DM, ---- SPAWN_LOCATION_GANG_BOSS_PRIVATE_YACHT, ---- SPAWN_LOCATION_OFFICE, ---- SPAWN_LOCATION_CLUBHOUSE, ---- SPAWN_LOCATION_NEAR_CURRENT_POSITION_AS_POSSIBLE, ---- SPAWN_LOCATION_NEAR_CURRENT_PERCEIVED_POSITION, ---- SPAWN_LOCATION_IE_WAREHOUSE, ---- SPAWN_LOCATION_BUNKER, ---- SPAWN_LOCATION_HANGAR, ---- SPAWN_LOCATION_DEFUNCT_BASE, ---- SPAWN_LOCATION_NIGHTCLUB, ---- SPAWN_LOCATION_ARENA_GARAGE, ---- SPAWN_LOCATION_CASINO, ---- SPAWN_LOCATION_CASINO_APARTMENT, ---- SPAWN_LOCATION_CASINO_OUTSIDE, ---- SPAWN_LOCATION_ARCADE, ---- SPAWN_LOCATION_CASINO_NIGHTCLUB, ---- SPAWN_LOCATION_SUBMARINE, ---- SPAWN_LOCATION_HEIST_ISLAND_NEAR_DEATH, ---- SPAWN_LOCATION_HEIST_ISLAND_BEACH_PARTY, ---- SPAWN_LOCATION_LAND_NEAR_SUBMARINE, ---- SPAWN_LOCATION_CAR_MEET, ---- SPAWN_LOCATION_AUTO_SHOP, ---- SPAWN_LOCATION_FIXER_HQ, ---- SPAWN_LOCATION_SITTING_SMOKING, ---- SPAWN_LOCATION_DRUNK_WAKE_UP_MUSIC_STUDIO, ---- SPAWN_LOCATION_MUSIC_STUDIO, ---- TOTAL_SPAWN_LOCATIONS +--- // system will decide +--- SPAWN_LOCATION_AUTOMATIC = 0, +--- SPAWN_LOCATION_NEAR_DEATH = 1, +--- SPAWN_LOCATION_NEAR_TEAM_MATES = 2, +--- // script defined area +--- SPAWN_LOCATION_MISSION_AREA = 3, +--- SPAWN_LOCATION_NEAR_OTHER_PLAYERS = 4, +--- SPAWN_LOCATION_NEAR_CURRENT_POSITION = 5, +--- SPAWN_LOCATION_AT_CURRENT_POSITION = 6, +--- SPAWN_LOCATION_NET_TEST_BED = 7, +--- SPAWN_LOCATION_CUSTOM_SPAWN_POINTS = 8, +--- SPAWN_LOCATION_OUTSIDE_SIMEON_GARAGE = 9, +--- SPAWN_LOCATION_NEAR_SPECIFIC_COORDS = 10, +--- SPAWN_LOCATION_AT_SPECIFIC_COORDS = 11, +--- SPAWN_LOCATION_AT_AIRPORT_ARRIVALS = 12, +--- SPAWN_LOCATION_AT_SPECIFIC_COORDS_IF_POSSIBLE = 13, +--- SPAWN_LOCATION_IN_SPECIFIC_ANGLED_AREA = 14, +--- SPAWN_LOCATION_NEAREST_RESPAWN_POINT = 15, +--- SPAWN_LOCATION_AT_SPECIFIC_COORDS_RACE_CORONA = 16, +--- SPAWN_LOCATION_INSIDE_GARAGE = 17, +--- SPAWN_LOCATION_INSIDE_PROPERTY = 18, +--- SPAWN_LOCATION_INSIDE_PROPERTY_OR_GARAGE = 19, +--- SPAWN_LOCATION_NEAR_DEATH_IMPROMPTU = 20, +--- SPAWN_LOCATION_NEAR_CURRENT_POSITION_SPREAD_OUT = 21, +--- SPAWN_LOCATION_NEAREST_RESPAWN_POINT_TO_SPECIFIC_COORDS = 22, +--- SPAWN_LOCATION_NEAREST_HOSPITAL = 23, +--- SPAWN_LOCATION_NEAREST_POLICE_STATION = 24, +--- SPAWN_LOCATION_NEAREST_HOTEL_TO_SPECIFIC_COORDS = 25, +--- SPAWN_LOCATION_MISSION_AREA_NEAR_CURRENT_POSITION = 26, +--- SPAWN_LOCATION_PRIVATE_YACHT = 27, +--- SPAWN_LOCATION_PRIVATE_YACHT_APARTMENT = 28, +--- SPAWN_LOCATION_PRIVATE_FRIEND_YACHT = 29, +--- SPAWN_LOCATION_PRIVATE_YACHT_NEAR_SHORE = 30, +--- SPAWN_LOCATION_NEAR_GANG_BOSS = 31, +--- SPAWN_LOCATION_NEAR_SPECIFIC_COORDS_WITH_GANG = 32, +--- SPAWN_LOCATION_GANG_DM = 33, +--- SPAWN_LOCATION_GANG_BOSS_PRIVATE_YACHT = 34, +--- SPAWN_LOCATION_OFFICE = 35, +--- SPAWN_LOCATION_CLUBHOUSE = 36, +--- SPAWN_LOCATION_NEAR_CURRENT_POSITION_AS_POSSIBLE = 37, +--- SPAWN_LOCATION_NEAR_CURRENT_PERCEIVED_POSITION = 38, +--- SPAWN_LOCATION_IE_WAREHOUSE = 39, +--- SPAWN_LOCATION_BUNKER = 40, +--- SPAWN_LOCATION_HANGAR = 41, +--- SPAWN_LOCATION_DEFUNCT_BASE = 42, +--- SPAWN_LOCATION_NIGHTCLUB = 43, +--- SPAWN_LOCATION_ARENA_GARAGE = 44, +--- SPAWN_LOCATION_CASINO = 45, +--- SPAWN_LOCATION_CASINO_APARTMENT = 46, +--- SPAWN_LOCATION_CASINO_OUTSIDE = 47, +--- SPAWN_LOCATION_ARCADE = 48, +--- SPAWN_LOCATION_CASINO_NIGHTCLUB = 49, +--- SPAWN_LOCATION_SUBMARINE = 50, +--- SPAWN_LOCATION_HEIST_ISLAND_NEAR_DEATH = 51, +--- SPAWN_LOCATION_HEIST_ISLAND_BEACH_PARTY = 52, +--- SPAWN_LOCATION_LAND_NEAR_SUBMARINE = 53, +--- SPAWN_LOCATION_CAR_MEET = 54, +--- SPAWN_LOCATION_AUTO_SHOP = 55, +--- SPAWN_LOCATION_FIXER_HQ = 56, +--- SPAWN_LOCATION_SITTING_SMOKING = 57, +--- SPAWN_LOCATION_DRUNK_WAKE_UP_MUSIC_STUDIO = 58, +--- SPAWN_LOCATION_MUSIC_STUDIO = 59, +--- TOTAL_SPAWN_LOCATIONS = 60 ---}; ---``` --- @@ -5361,32 +5374,30 @@ function NetworkSetCurrentMissionId(missionId) end ---**`NETWORK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xAA6D5451DC3448B6) ----``` ----mpSettingSpawn: ---- +---```cpp ---enum eMpSettingSpawn ---{ ---- MP_SETTING_SPAWN_NULL, ---- MP_SETTING_SPAWN_PROPERTY, ---- MP_SETTING_SPAWN_LAST_POSITION, ---- MP_SETTING_SPAWN_GARAGE, ---- MP_SETTING_SPAWN_RANDOM, ---- MP_SETTING_SPAWN_PRIVATE_YACHT, ---- MP_SETTING_SPAWN_OFFICE, ---- MP_SETTING_SPAWN_CLUBHOUSE, ---- MP_SETTING_SPAWN_IE_WAREHOUSE, ---- MP_SETTING_SPAWN_BUNKER, ---- MP_SETTING_SPAWN_HANGAR, ---- MP_SETTING_SPAWN_DEFUNCT_BASE, ---- MP_SETTING_SPAWN_NIGHTCLUB, ---- MP_SETTING_SPAWN_ARENA_GARAGE, ---- MP_SETTING_SPAWN_CASINO_APARTMENT, ---- MP_SETTING_SPAWN_ARCADE, ---- MP_SETTING_SPAWN_SUBMARINE, ---- MP_SETTING_SPAWN_CAR_MEET, ---- MP_SETTING_SPAWN_AUTO_SHOP, ---- MP_SETTING_SPAWN_FIXER_HQ, ---- MP_SETTING_SPAWN_MAX, +--- MP_SETTING_SPAWN_NULL = 0, +--- MP_SETTING_SPAWN_PROPERTY = 1, +--- MP_SETTING_SPAWN_LAST_POSITION = 2, +--- MP_SETTING_SPAWN_GARAGE = 3, +--- MP_SETTING_SPAWN_RANDOM = 4, +--- MP_SETTING_SPAWN_PRIVATE_YACHT = 5, +--- MP_SETTING_SPAWN_OFFICE = 6, +--- MP_SETTING_SPAWN_CLUBHOUSE = 7, +--- MP_SETTING_SPAWN_IE_WAREHOUSE = 8, +--- MP_SETTING_SPAWN_BUNKER = 9, +--- MP_SETTING_SPAWN_HANGAR = 10, +--- MP_SETTING_SPAWN_DEFUNCT_BASE = 11, +--- MP_SETTING_SPAWN_NIGHTCLUB = 12, +--- MP_SETTING_SPAWN_ARENA_GARAGE = 13, +--- MP_SETTING_SPAWN_CASINO_APARTMENT = 14, +--- MP_SETTING_SPAWN_ARCADE = 15, +--- MP_SETTING_SPAWN_SUBMARINE = 16, +--- MP_SETTING_SPAWN_CAR_MEET = 17, +--- MP_SETTING_SPAWN_AUTO_SHOP = 18, +--- MP_SETTING_SPAWN_FIXER_HQ = 19, +--- MP_SETTING_SPAWN_MAX = 20, ---}; ---``` --- diff --git a/library/natives/GTAV/OBJECT.lua b/library/natives/GTAV/OBJECT.lua index 70c1639..211ccf0 100644 --- a/library/natives/GTAV/OBJECT.lua +++ b/library/natives/GTAV/OBJECT.lua @@ -210,8 +210,12 @@ function CreatePortablePickup(pickupHash, x, y, z, placeOnGround, modelHash) end ---**`OBJECT` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x539E0AE3E6634B9F) +---Deletes the specified object. +--- +---**Note**: If for some reason the entity won't delete, you might want to check if the object is a mission entity. +--- ---``` ----Deletes the specified object, then sets the handle pointed to by the pointer to NULL. +---NativeDB Introduced: v323 ---``` ---@param object integer function DeleteObject(object) end @@ -1498,10 +1502,18 @@ function SetObjectStuntPropSpeedup(object, intensity) end ---@param targettable boolean function SetObjectTargettable(object, targettable) end +---**`OBJECT` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0xB39F03368DB0CAA2) +---This native does not have an official description. +---@param object integer +---@param setFlag34 boolean +---@param setFlag35 boolean +function SetObjectTargettableByPlayer(object, setFlag34, setFlag35) end + ---**`OBJECT` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x971DA0055324D033) ----``` ----enum ObjectPaintVariants +---```cpp +---enum eObjectPaintVariants ---{ --- Pacific = 0, --- Azure = 1, diff --git a/library/natives/GTAV/PAD.lua b/library/natives/GTAV/PAD.lua index 8cbe083..3dc9e98 100644 --- a/library/natives/GTAV/PAD.lua +++ b/library/natives/GTAV/PAD.lua @@ -25,11 +25,12 @@ function DisableInputGroup(padIndex) end ---**`PAD` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xA5FFE9B05F199DE7) ----``` ----padIndex: ----0 - PLAYER_CONTROL ----1 - Unknown ----2 - FRONTEND_CONTROL +---```cpp +---enum ePadType { +--- PLAYER_CONTROL = 0, +--- CAMERA_CONTROL = 1, +--- FRONTEND_CONTRO = 2 +---}; ---``` ---@param padIndex integer function EnableAllControlActions(padIndex) end diff --git a/library/natives/GTAV/PATHFIND.lua b/library/natives/GTAV/PATHFIND.lua index f1e5daf..e408464 100644 --- a/library/natives/GTAV/PATHFIND.lua +++ b/library/natives/GTAV/PATHFIND.lua @@ -6,13 +6,18 @@ --- ---Only 32 blocking objects may exist at a given time and must be manually managed. See [`REMOVE_NAVMESH_BLOCKING_OBJECT`](#\_0x46399A7895957C0E) and [`onResourceStop`](https://docs.fivem.net/docs/scripting-reference/events/list/onResourceStop/) --- ----``` +---```cpp ---enum eBlockingObjectFlags { ---- BLOCKING_OBJECT_DEFAULT = 0, // Default Flag ---- BLOCKING_OBJECT_WANDERPATH = 1, // Blocking object will block wander paths ---- BLOCKING_OBJECT_SHORTESTPATH = 2, // Blocking object will block (regular) shortest-paths ---- BLOCKING_OBJECT_FLEEPATH = 4, // Blocking object will block flee paths ---- BLOCKING_OBJECT_ALLPATHS = 7, // Blocking object will block all paths +--- // Default Flag +--- BLOCKING_OBJECT_DEFAULT = 0, +--- // Blocking object will block wander paths +--- BLOCKING_OBJECT_WANDERPATH = 1, +--- // Blocking object will block (regular) shortest-paths +--- BLOCKING_OBJECT_SHORTESTPATH = 2, +--- // Blocking object will block flee paths +--- BLOCKING_OBJECT_FLEEPATH = 4, +--- // Blocking object will block all paths +--- BLOCKING_OBJECT_ALLPATHS = 7, ---} ---``` ---@param x number @@ -134,17 +139,15 @@ function GetClosestMajorVehicleNode(x, y, z, unknown1, unknown2) end ---**`PATHFIND` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x132F52BBA570FE92) ----``` ----p1 seems to be always 1.0f in the scripts ----``` +---Finds an edge (node connection to another node) that satisfies the specified criteria. ---@param x number ---@param y number ---@param z number ----@param p3 number ----@param p4 integer ----@param p10 boolean ----@return any, vector3, vector3, any, any, number -function GetClosestRoad(x, y, z, p3, p4, p10) end +---@param minimumEdgeLength number +---@param minimumLaneCount integer +---@param onlyMajorRoads boolean +---@return boolean, vector3, vector3, integer, integer, number +function GetClosestRoad(x, y, z, minimumEdgeLength, minimumLaneCount, onlyMajorRoads) end ---**`PATHFIND` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x240A18690AE96513) @@ -217,15 +220,6 @@ function GetGpsBlipRouteFound() end ---@return integer function GetGpsBlipRouteLength() end ----**`PATHFIND` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0xF3162836C28F9DA5) ----p3 can be 0, 1 or 2. ----@param p1 boolean ----@param p2 number ----@param p3 integer ----@return boolean, vector3 -function GetGpsWaypointRouteEnd(p1, p2, p3) end - ---**`PATHFIND` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x3599D741C9AC6310) ---``` @@ -344,18 +338,27 @@ function GetNthClosestVehicleNodeIdWithHeading(x, y, z, nthClosest, p6, p7, p8) ---**`PATHFIND` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x80CA6A8B6C094CC4) ----``` ----Get the nth closest vehicle node and its heading. (unknown2 = 9, unknown3 = 3.0, unknown4 = 2.5) +---Get the nth closest vehicle node with its heading and total lane count. +---If you need specific forward and backward lane counts use [GET_CLOSEST_ROAD](#\_0x132F52BBA570FE92) +--- +---```cpp +---enum eNodeFlags { +--- NONE = 0, +--- INCLUDE_SWITCHED_OFF_NODES = 1, +--- INCLUDE_BOAT_NODES = 2, +--- IGNORE_SLIPLANES = 4, +--- IGNORE_SWITCHED_OFF_DEAD_ENDS = 8, +---} ---``` ---@param x number ---@param y number ---@param z number ---@param nthClosest integer ----@param unknown2 integer ----@param unknown3 number ----@param unknown4 number ----@return boolean, vector3, number, any -function GetNthClosestVehicleNodeWithHeading(x, y, z, nthClosest, unknown2, unknown3, unknown4) end +---@param searchFlags integer +---@param zMeasureMult number +---@param zTolerance number +---@return boolean, vector3, number, integer +function GetNthClosestVehicleNodeWithHeading(x, y, z, nthClosest, searchFlags, zMeasureMult, zTolerance) end ---**`PATHFIND` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x01708E8DD3FF8C65) @@ -379,6 +382,27 @@ function GetNumNavmeshesExistingInArea(posMinX, posMinY, posMinZ, posMaxX, posMa ---@return boolean, vector3 function GetPointOnRoadSide(x, y, z, p3) end +---**`PATHFIND` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0xF3162836C28F9DA5) +---Native to get a position along current player GPS route using supplied slot. +---This native was previously named `GET_GPS_WAYPOINT_ROUTE_END`, but its named changed. +--- +---```cpp +---enum eGpsSlotType { +--- GPS_SLOT_WAYPOINT = 0, +--- GPS_SLOT_RADAR_BLIP = 1, +--- GPS_SLOT_DISCRETE = 2 +---} +---``` +---@param bStartAtPlayerPos boolean +---@param fDistanceAlongRoute number +---@param slotType integer +---@return boolean, vector3 +function GetPosAlongGpsTypeRoute(bStartAtPlayerPos, fDistanceAlongRoute, slotType) end + +---@deprecated +GetGpsWaypointRouteEnd = GetPosAlongGpsTypeRoute + ---**`PATHFIND` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x93E0DB8440B73A7D) ---This native does not have an official description. @@ -482,10 +506,23 @@ function GetVehicleNodePosition(nodeId) end ---**`PATHFIND` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x0568566ACBB5DEDC) ----``` ----Gets the density and flags of the closest node to the specified position. ----Density is a value between 0 and 15, indicating how busy the road is. ----Flags is a bit field. +---Gets the density and flags of the closest node to the specified position.\ +---Density is a value between 0 and 15, indicating how busy the road is. +--- +---```cpp +---enum eVehicleNodeProperties { +--- OFF_ROAD = 1 << 0, +--- ON_PLAYERS_ROAD = 1 << 1, +--- NO_BIG_VEHICLES = 1 << 2, +--- SWITCHED_OFF = 1 << 3, +--- TUNNEL_OR_INTERIOR = 1 << 4, +--- LEADS_TO_DEAD_END = 1 << 5, +--- HIGHWAY = 1 << 6, +--- JUNCTION = 1 << 7, +--- TRAFFIC_LIGHT = 1 << 8, +--- GIVE_WAY = 1 << 9, +--- WATER = 1 << 10, +---} ---``` ---@param x number ---@param y number diff --git a/library/natives/GTAV/PED.lua b/library/natives/GTAV/PED.lua index e98b140..5e29783 100644 --- a/library/natives/GTAV/PED.lua +++ b/library/natives/GTAV/PED.lua @@ -153,16 +153,6 @@ function ApplyPedBloodSpecific(ped, component, u, v, rotation, scale, forcedFram ---**`PED` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x397C38AA7B4A5F83) ---``` ----enum eDamageZone ----{ ---- DZ_Torso = 0, ---- DZ_Head, ---- DZ_LeftArm, ---- DZ_RightArm, ---- DZ_LeftLeg, ---- DZ_RightLeg, ----}; ----Decal Names: ---scar ---blushing ---cs_flush_anger @@ -174,7 +164,6 @@ function ApplyPedBloodSpecific(ped, component, u, v, rotation, scale, forcedFram ---basic_dirt_cloth ---basic_dirt_skin ---cs_trev1_dirt ----APPLY_PED_DAMAGE_DECAL(ped, 1, 0.5f, 0.513f, 0f, 1f, unk, 0, 0, "blushing"); ---``` ---@param ped integer ---@param damageZone integer @@ -730,34 +719,42 @@ function ForcePedAiAndAnimationUpdate(ped, p1, p2) end ---**`PED` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xF28965D04F570DCA) ----``` ----Some motionstate hashes are ----0xec17e58 (standing idle), 0xbac0f10b (nothing?), 0x3f67c6af (aiming with pistol 2-h), 0x422d7a25 (stealth), 0xbd8817db, 0x916e828c ----and those for the strings ----"motionstate_idle", "motionstate_walk", "motionstate_run", "motionstate_actionmode_idle", and "motionstate_actionmode_walk". ----Regarding p2, p3 and p4: Most common is 0, 0, 0); followed by 0, 1, 0); and 1, 1, 0); in the scripts. p4 is very rarely something other than 0. ---- [31/03/2017] ins1de : ---- enum MotionState ---- { ---- StopRunning = -530524, ---- StopWalking = -668482597, ---- Idle = 247561816, // 1, 1, 0 ---- Idl2 = -1871534317, ---- SkyDive =-1161760501, // 0, 1, 0 ---- Stealth = 1110276645, ---- Sprint = -1115154469, ---- Swim = -1855028596, ---- Unknown1 = 1063765679, ---- Unknown2 = -633298724, ---- } +---```cpp +---enum ePedMotionState +---{ +--- MOTIONSTATE_NONE = -294553821, // MotionState_None +--- MOTIONSTATE_IDLE = -1871534317, // MotionState_Idle +--- MOTIONSTATE_WALK = -668482597, // MotionState_Walk +--- MOTIONSTATE_RUN = -530524, // MotionState_Run +--- MOTIONSTATE_SPRINT = -1115154469, // MotionState_Sprint +--- MOTIONSTATE_CROUCH_IDLE = 1140525470, // MotionState_Crouch_Idle +--- MOTIONSTATE_CROUCH_WALK = 147004056, // MotionState_Crouch_Walk +--- MOTIONSTATE_CROUCH_RUN = 898879241, // MotionState_Crouch_Run +--- MOTIONSTATE_DONOTHING = 247561816, // MotionState_DoNothing +--- MOTIONSTATE_ANIMATEDVELOCITY = 1427811395, // MotionState_AnimatedVelocity +--- MOTIONSTATE_INVEHICLE = -1797663347, // MotionState_InVehicle +--- MOTIONSTATE_AIMING = 1063765679, // MotionState_Aiming +--- MOTIONSTATE_DIVING_IDLE = 1212730861, // MotionState_Diving_Idle +--- MOTIONSTATE_DIVING_SWIM = -1855028596, // MotionState_Diving_Swim +--- MOTIONSTATE_SWIMMING_TREADWATER = -776007225, // MotionState_Swimming_TreadWater +--- MOTIONSTATE_DEAD = 230360860, // MotionState_Dead +--- MOTIONSTATE_STEALTH_IDLE = 1110276645, // MotionState_Stealth_Idle +--- MOTIONSTATE_STEALTH_WALK = 69908130, // MotionState_Stealth_Walk +--- MOTIONSTATE_STEALTH_RUN = -83133983, // MotionState_Stealth_Run +--- MOTIONSTATE_PARACHUTING = -1161760501, // MotionState_Parachuting +--- MOTIONSTATE_ACTIONMODE_IDLE = -633298724, // MotionState_ActionMode_Idle +--- MOTIONSTATE_ACTIONMODE_WALK = -762290521, // MotionState_ActionMode_Walk +--- MOTIONSTATE_ACTIONMODE_RUN = 834330132, // MotionState_ActionMode_Run +--- MOTIONSTATE_JETPACK = 1398696542 // MotionState_Jetpack +---} ---``` ---@param ped integer ---@param motionStateHash integer | string ----@param p2 boolean ----@param p3 integer ----@param p4 boolean +---@param shouldReset boolean +---@param updateState integer +---@param forceAIPreCameraUpdate boolean ---@return boolean -function ForcePedMotionState(ped, motionStateHash, p2, p3, p4) end +function ForcePedMotionState(ped, motionStateHash, shouldReset, updateState, forceAIPreCameraUpdate) end ---**`PED` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x16E42E800B472221) @@ -1053,7 +1050,7 @@ function GetPedBoneCoords(ped, boneId, offsetX, offsetY, offsetZ) end ---**`PED` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x3F428D08BE5AAE31) ----``` +---```cpp ---enum ePedBoneId : uint16_t ---{ --- SKEL_ROOT = 0x0, @@ -1469,8 +1466,7 @@ function GetPedDecorationsState(ped) end ---**`PED` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x9FD452BFBE7A7A8B) ----``` ----Returns the zoneID for the overlay if it is a member of collection. +---```cpp ---enum ePedDecorationZone ---{ --- ZONE_TORSO = 0, @@ -1916,36 +1912,36 @@ function GetPedTimeOfDeath(ped) end ---```cpp ---enum ePedType ---{ ---- PED_TYPE_PLAYER_0, ---- PED_TYPE_PLAYER_1, ---- PED_TYPE_NETWORK_PLAYER, ---- PED_TYPE_PLAYER_2, ---- PED_TYPE_CIVMALE, ---- PED_TYPE_CIVFEMALE, ---- PED_TYPE_COP, ---- PED_TYPE_GANG_ALBANIAN, ---- PED_TYPE_GANG_BIKER_1, ---- PED_TYPE_GANG_BIKER_2, ---- PED_TYPE_GANG_ITALIAN, ---- PED_TYPE_GANG_RUSSIAN, ---- PED_TYPE_GANG_RUSSIAN_2, ---- PED_TYPE_GANG_IRISH, ---- PED_TYPE_GANG_JAMAICAN, ---- PED_TYPE_GANG_AFRICAN_AMERICAN, ---- PED_TYPE_GANG_KOREAN, ---- PED_TYPE_GANG_CHINESE_JAPANESE, ---- PED_TYPE_GANG_PUERTO_RICAN, ---- PED_TYPE_DEALER, ---- PED_TYPE_MEDIC, ---- PED_TYPE_FIREMAN, ---- PED_TYPE_CRIMINAL, ---- PED_TYPE_BUM, ---- PED_TYPE_PROSTITUTE, ---- PED_TYPE_SPECIAL, ---- PED_TYPE_MISSION, ---- PED_TYPE_SWAT, ---- PED_TYPE_ANIMAL, ---- PED_TYPE_ARMY +--- PED_TYPE_PLAYER_0 = 0, +--- PED_TYPE_PLAYER_1 = 1, +--- PED_TYPE_NETWORK_PLAYER = 2, +--- PED_TYPE_PLAYER_2 = 3, +--- PED_TYPE_CIVMALE = 4, +--- PED_TYPE_CIVFEMALE = 5, +--- PED_TYPE_COP = 6, +--- PED_TYPE_GANG_ALBANIAN = 7, +--- PED_TYPE_GANG_BIKER_1 = 8, +--- PED_TYPE_GANG_BIKER_2 = 9, +--- PED_TYPE_GANG_ITALIAN = 10, +--- PED_TYPE_GANG_RUSSIAN = 11, +--- PED_TYPE_GANG_RUSSIAN_2 = 12, +--- PED_TYPE_GANG_IRISH = 13, +--- PED_TYPE_GANG_JAMAICAN = 14, +--- PED_TYPE_GANG_AFRICAN_AMERICAN = 15, +--- PED_TYPE_GANG_KOREAN = 16, +--- PED_TYPE_GANG_CHINESE_JAPANESE = 17, +--- PED_TYPE_GANG_PUERTO_RICAN = 18, +--- PED_TYPE_DEALER = 19, +--- PED_TYPE_MEDIC = 20, +--- PED_TYPE_FIREMAN = 21, +--- PED_TYPE_CRIMINAL = 22, +--- PED_TYPE_BUM = 23, +--- PED_TYPE_PROSTITUTE = 24, +--- PED_TYPE_SPECIAL = 25, +--- PED_TYPE_MISSION = 26, +--- PED_TYPE_SWAT = 27, +--- PED_TYPE_ANIMAL = 28, +--- PED_TYPE_ARMY = 29 ---}; ---``` ---@param ped integer @@ -2103,7 +2099,7 @@ function GetVehiclePedIsUsing(ped) end ---**`PED` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x54C7C4A94367717E) ----Gives the ped a helmet. Can be removed by invoking [`REMOVE_PED_HELMET`](#0xA7B2458D0AD6DED8). +---Gives the ped a helmet. Can be removed by invoking [`REMOVE_PED_HELMET`](#\_0xA7B2458D0AD6DED8). --- ---```cpp ---enum ePedCompFlags { @@ -2695,10 +2691,16 @@ IsPedStandingInCover = IsPedInHighCover ---**`PED` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x84A2DD9AC37C35C1) ----``` ----Gets a value indicating whether this ped's health is below its injured threshold. ----The default threshold is 100. ----``` +---Indicates whether this ped's health is below its injured threshold. +---The default threshold is 100, these are stored in the `pedhealth.meta` file located in `common:\data\` +--- +---### Below are some of the values +--- +---| InjuredHealthThreshold | Name | +---|------------------------|-----------| +---| 100.000000 | Strong | +---| 100.000000 | Average | +---| 100.000000 | Weak | ---@param ped integer ---@return boolean function IsPedInjured(ped) end @@ -3049,7 +3051,7 @@ function IsPedUsingAnyScenario(ped) end ---**`PED` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x1BF094736DD62C2E) ----This native does not have an official description. +---See [`TASK_START_SCENARIO_IN_PLACE`](#\_0x142A02425FF02BD9) for a list of scenarios. ---@param ped integer ---@param scenario string ---@return boolean @@ -3656,17 +3658,6 @@ function N_0xf2385935bffd4d92(ped) end ---@param toggle boolean function N_0xf2bebcdfafdaa19e(toggle) end ----**`PED` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0xF9ACF4A08098EA25) ----``` ----p1 was always 1 (true). ----Kicks the ped from the current vehicle and keeps the rendering-focus on this ped (also disables its collision). If doing this for your player ped, you'll still be able to drive the vehicle. ----Actual name begins with 'S' ----``` ----@param ped integer ----@param p1 boolean -function N_0xf9acf4a08098ea25(ped, p1) end - ---**`PED` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xFAB944D4D481ACCB) ---SET_A\* @@ -3982,6 +3973,15 @@ function SetAiWeaponDamageModifier(value) end ---@param p0 boolean function SetAmbientPedsDropMoney(p0) end +---**`PED` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0xC73EFFC5E043A8BA) +---Prevents ambient peds from dropping their weapons for the current frame. +--- +---``` +---NativeDB Introduced: v3258 +---``` +function SetBlockAmbientPedsFromDroppingWeaponsThisFrame() end + ---**`PED` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x9F8AA94D6D97DBF4) ---``` @@ -4189,7 +4189,53 @@ function SetHeadBlendPaletteColor(ped, r, g, b, id) end ---**`PED` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xC32779C16FCEECD9) ----This native does not have an official description. +---Sets the IK target for a given IK part belonging to the ped. +--- +---**Please note:** The IK target will only be valid for one update, so it needs to be set for as long as it is needed (to avoid IK targets not being cleared and getting stuck enabled). +--- +---```cpp +---enum eIkPart { +--- IK_PART_INVALID = 0, +--- // head +--- IK_PART_HEAD = 1, +--- // spine +--- IK_PART_SPINE = 2, +--- // Left Arm +--- IK_PART_ARM_LEFT = 3, +--- // Right Arm +--- IK_PART_ARM_RIGHT = 4, +--- // Left Leg +--- IK_PART_LEG_LEFT = 5, +--- // Right Leg +--- IK_PART_LEG_RIGHT = 6 +---}; +--- +---``` +--- +---```cpp +---enum eIkTargetFlags { +--- ITF_DEFAULT = 0, +--- // arm target relative to the handbone +--- ITF_ARM_TARGET_WRT_HANDBON = 1, +--- // arm target relative to the pointhelper +--- ITF_ARM_TARGET_WRT_POINTHELPER = 2, +--- // arm target relative to the ikhelper +--- ITF_ARM_TARGET_WRT_IKHELPE = 4, +--- // use animation tags directly +--- ITF_IK_TAG_MODE_NORMAL = 8, +--- // use animation tags in ALLOW mode +--- ITF_IK_TAG_MODE_ALLOW = 16, +--- // use animation tags in BLOCK mode +--- ITF_IK_TAG_MODE_BLOCK = 32, +--- // solve for orientation in addition to position +--- ITF_ARM_USE_ORIENTATION = 64 +---}; +--- +---``` +--- +---``` +---NativeDB Introduced: v323 +---``` ---@param ped integer ---@param ikIndex integer ---@param entityLookAt integer @@ -4197,10 +4243,10 @@ function SetHeadBlendPaletteColor(ped, r, g, b, id) end ---@param offsetX number ---@param offsetY number ---@param offsetZ number ----@param p7 any +---@param ikTargetFlags integer ---@param blendInDuration integer ---@param blendOutDuration integer -function SetIkTarget(ped, ikIndex, entityLookAt, boneLookAt, offsetX, offsetY, offsetZ, p7, blendInDuration, blendOutDuration) end +function SetIkTarget(ped, ikIndex, entityLookAt, boneLookAt, offsetX, offsetY, offsetZ, ikTargetFlags, blendInDuration, blendOutDuration) end ---**`PED` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x781DE8FA214E87D2) @@ -4635,88 +4681,170 @@ function SetPedCombatAbility(ped, p1) end ---enum eCombatAttribute ---{ --- CA_INVALID = -1, ---- CA_USE_COVER = 0, // AI will only use cover if this is set ---- CA_USE_VEHICLE = 1, // AI will only use vehicles if this is set ---- CA_DO_DRIVEBYS = 2, // AI will only driveby from a vehicle if this is set ---- CA_LEAVE_VEHICLES = 3, // Will be forced to stay in a ny vehicel if this isn't set ---- CA_CAN_USE_DYNAMIC_STRAFE_DECISIONS = 4, // This ped can make decisions on whether to strafe or not based on distance to destination, recent bullet events, etc. ---- CA_ALWAYS_FIGHT = 5, // Ped will always fight upon getting threat response task ---- CA_FLEE_WHILST_IN_VEHICLE = 6, // If in combat and in a vehicle, the ped will flee rather than attacking ---- CA_JUST_FOLLOW_VEHICLE = 7, // If in combat and chasing in a vehicle, the ped will keep a distance behind rather than ramming ---- CA_PLAY_REACTION_ANIMS = 8, // Deprecated ---- CA_WILL_SCAN_FOR_DEAD_PEDS = 9, // Peds will scan for and react to dead peds found ---- CA_IS_A_GUARD = 10, // Deprecated ---- CA_JUST_SEEK_COVER = 11, // The ped will seek cover only ---- CA_BLIND_FIRE_IN_COVER = 12, // Ped will only blind fire when in cover ---- CA_AGGRESSIVE = 13, // Ped may advance ---- CA_CAN_INVESTIGATE = 14, // Ped can investigate events such as distant gunfire, footsteps, explosions etc ---- CA_CAN_USE_RADIO = 15, // Ped can use a radio to call for backup (happens after a reaction) ---- CA_CAN_CAPTURE_ENEMY_PEDS = 16, // Deprecated ---- CA_ALWAYS_FLEE = 17, // Ped will always flee upon getting threat response task ---- CA_CAN_TAUNT_IN_VEHICLE = 20, // Ped can do unarmed taunts in vehicle ---- CA_CAN_CHASE_TARGET_ON_FOOT = 21, // Ped will be able to chase their targets if both are on foot and the target is running away ---- CA_WILL_DRAG_INJURED_PEDS_TO_SAFETY = 22, // Ped can drag injured peds to safety ---- CA_REQUIRES_LOS_TO_SHOOT = 23, // Ped will require LOS to the target it is aiming at before shooting ---- CA_USE_PROXIMITY_FIRING_RATE = 24, // Ped is allowed to use proximity based fire rate (increasing fire rate at closer distances) ---- CA_DISABLE_SECONDARY_TARGET = 25, // Normally peds can switch briefly to a secondary target in combat, setting this will prevent that ---- CA_DISABLE_ENTRY_REACTIONS = 26, // This will disable the flinching combat entry reactions for peds, instead only playing the turn and aim anims ---- CA_PERFECT_ACCURACY = 27, // Force ped to be 100% accurate in all situations (added by Jay Reinebold) ---- CA_CAN_USE_FRUSTRATED_ADVANCE = 28, // If we don't have cover and can't see our target it's possible we will advance, even if the target is in cover ---- CA_MOVE_TO_LOCATION_BEFORE_COVER_SEARCH = 29, // This will have the ped move to defensive areas and within attack windows before performing the cover search ---- CA_CAN_SHOOT_WITHOUT_LOS = 30, // Allow shooting of our weapon even if we don't have LOS (this isn't X-ray vision as it only affects weapon firing) ---- CA_MAINTAIN_MIN_DISTANCE_TO_TARGET = 31, // Ped will try to maintain a min distance to the target, even if using defensive areas (currently only for cover finding + usage) ---- CA_CAN_USE_PEEKING_VARIATIONS = 34, // Allows ped to use steamed variations of peeking anims ---- CA_DISABLE_PINNED_DOWN = 35, // Disables pinned down behaviors ---- CA_DISABLE_PIN_DOWN_OTHERS = 36, // Disables pinning down others ---- CA_OPEN_COMBAT_WHEN_DEFENSIVE_AREA_IS_REACHED = 37, // When defensive area is reached the area is cleared and the ped is set to use defensive combat movement ---- CA_DISABLE_BULLET_REACTIONS = 38, // Disables bullet reactions ---- CA_CAN_BUST = 39, // Allows ped to bust the player ---- CA_IGNORED_BY_OTHER_PEDS_WHEN_WANTED = 40, // This ped is ignored by other peds when wanted ---- CA_CAN_COMMANDEER_VEHICLES = 41, // Ped is allowed to "jack" vehicles when needing to chase a target in combat ---- CA_CAN_FLANK = 42, // Ped is allowed to flank ---- CA_SWITCH_TO_ADVANCE_IF_CANT_FIND_COVER = 43, // Ped will switch to advance if they can't find cover ---- CA_SWITCH_TO_DEFENSIVE_IF_IN_COVER = 44, // Ped will switch to defensive if they are in cover ---- CA_CLEAR_PRIMARY_DEFENSIVE_AREA_WHEN_REACHED = 45, // Ped will clear their primary defensive area when it is reached ---- CA_CAN_FIGHT_ARMED_PEDS_WHEN_NOT_ARMED = 46, // Ped is allowed to fight armed peds when not armed ---- CA_ENABLE_TACTICAL_POINTS_WHEN_DEFENSIVE = 47, // Ped is not allowed to use tactical points if set to use defensive movement (will only use cover) ---- CA_DISABLE_COVER_ARC_ADJUSTMENTS = 48, // Ped cannot adjust cover arcs when testing cover safety (atm done on corner cover points when ped usingdefensive area + no LOS) ---- CA_USE_ENEMY_ACCURACY_SCALING = 49, // Ped may use reduced accuracy with large number of enemies attacking the same local player target ---- CA_CAN_CHARGE = 50, // Ped is allowed to charge the enemy position ---- CA_REMOVE_AREA_SET_WILL_ADVANCE_WHEN_DEFENSIVE_AREA_REACHED = 51, // When defensive area is reached the area is cleared and the ped is set to use will advance movement ---- CA_USE_VEHICLE_ATTACK = 52, // Use the vehicle attack mission during combat (only works on driver) ---- CA_USE_VEHICLE_ATTACK_IF_VEHICLE_HAS_MOUNTED_GUNS = 53, // Use the vehicle attack mission during combat if the vehicle has mounted guns (only works on driver) ---- CA_ALWAYS_EQUIP_BEST_WEAPON = 54, // Always equip best weapon in combat ---- CA_CAN_SEE_UNDERWATER_PEDS = 55, // Ignores in water at depth visibility check ---- CA_DISABLE_AIM_AT_AI_TARGETS_IN_HELIS = 56, // Will prevent this ped from aiming at any AI targets that are in helicopters ---- CA_DISABLE_SEEK_DUE_TO_LINE_OF_SIGHT = 57, // Disables peds seeking due to no clear line of sight ---- CA_DISABLE_FLEE_FROM_COMBAT = 58, // To be used when releasing missions peds if we don't want them fleeing from combat (mission peds already prevent flee) ---- CA_DISABLE_TARGET_CHANGES_DURING_VEHICLE_PURSUIT = 59, // Disables target changes during vehicle pursuit ---- CA_CAN_THROW_SMOKE_GRENADE = 60, // Ped may throw a smoke grenade at player loitering in combat ---- CA_CLEAR_AREA_SET_DEFENSIVE_IF_DEFENSIVE_CANNOT_BE_REACHED = 62, // Will clear a set defensive area if that area cannot be reached ---- CA_DISABLE_BLOCK_FROM_PURSUE_DURING_VEHICLE_CHASE = 64, // Disable block from pursue during vehicle chases ---- CA_DISABLE_SPIN_OUT_DURING_VEHICLE_CHASE = 65, // Disable spin out during vehicle chases ---- CA_DISABLE_CRUISE_IN_FRONT_DURING_BLOCK_DURING_VEHICLE_CHASE = 66, // Disable cruise in front during block during vehicle chases ---- CA_CAN_IGNORE_BLOCKED_LOS_WEIGHTING = 67, // Makes it more likely that the ped will continue targeting a target with blocked los for a few seconds ---- CA_DISABLE_REACT_TO_BUDDY_SHOT = 68, // Disables the react to buddy shot behaviour. ---- CA_PREFER_NAVMESH_DURING_VEHICLE_CHASE = 69, // Prefer pathing using navmesh over road nodes ---- CA_ALLOWED_TO_AVOID_OFFROAD_DURING_VEHICLE_CHASE = 70, // Ignore road edges when avoiding ---- CA_PERMIT_CHARGE_BEYOND_DEFENSIVE_AREA = 71, // Permits ped to charge a target outside the assigned defensive area. ---- CA_USE_ROCKETS_AGAINST_VEHICLES_ONLY = 72, // This ped will switch to an RPG if target is in a vehicle, otherwise will use alternate weapon. ---- CA_DISABLE_TACTICAL_POINTS_WITHOUT_CLEAR_LOS = 73, // Disables peds moving to a tactical point without clear los ---- CA_DISABLE_PULL_ALONGSIDE_DURING_VEHICLE_CHASE = 74, // Disables pull alongside during vehicle chase ---- CA_DISABLE_ALL_RANDOMS_FLEE = 78, // If set on a ped, they will not flee when all random peds flee is set to TRUE (they are still able to flee due to other reasons) ---- CA_WILL_GENERATE_DEAD_PED_SEEN_SCRIPT_EVENTS = 79, // This ped will send out a script DeadPedSeenEvent when they see a dead ped ---- CA_USE_MAX_SENSE_RANGE_WHEN_RECEIVING_EVENTS = 80, // This will use the receiving peds sense range rather than the range supplied to the communicate event ---- CA_RESTRICT_IN_VEHICLE_AIMING_TO_CURRENT_SIDE = 81, // When aiming from a vehicle the ped will only aim at targets on his side of the vehicle ---- CA_USE_DEFAULT_BLOCKED_LOS_POSITION_AND_DIRECTION = 82, // LOS to the target is blocked we return to our default position and direction until we have LOS (no aiming) ---- CA_REQUIRES_LOS_TO_AIM = 83, // LOS to the target is blocked we return to our default position and direction until we have LOS (no aiming) ---- CA_CAN_CRUISE_AND_BLOCK_IN_VEHICLE = 84, // Allow vehicles spawned infront of target facing away to enter cruise and wait to block approaching target ---- CA_PREFER_AIR_COMBAT_WHEN_IN_AIRCRAFT = 85, // Peds flying aircraft will prefer to target other aircraft over entities on the ground ---- CA_ALLOW_DOG_FIGHTING = 86, //Allow peds flying aircraft to use dog fighting behaviours ---- CA_PREFER_NON_AIRCRAFT_TARGETS = 87, // This will make the weight of targets who aircraft vehicles be reduced greatly compared to targets on foot or in ground based vehicles ---- CA_PREFER_KNOWN_TARGETS_WHEN_COMBAT_CLOSEST_TARGET = 88, //When peds are tasked to go to combat, they keep searching for a known target for a while before forcing an unknown one ---- CA_FORCE_CHECK_ATTACK_ANGLE_FOR_MOUNTED_GUNS = 89, // Only allow mounted weapons to fire if within the correct attack angle (default 25-degree cone). On a flag in order to keep exiting behaviour and only fix in specific cases. ---- CA_BLOCK_FIRE_FOR_VEHICLE_PASSENGER_MOUNTED_GUNS = 90 // Blocks the firing state for passenger-controlled mounted weapons. Existing flags CA_USE_VEHICLE_ATTACK and CA_USE_VEHICLE_ATTACK_IF_VEHICLE_HAS_MOUNTED_GUNS only work for drivers. +--- // AI will only use cover if this is set +--- CA_USE_COVER = 0, +--- // AI will only use vehicles if this is set +--- CA_USE_VEHICLE = 1, +--- // AI will only driveby from a vehicle if this is set +--- CA_DO_DRIVEBYS = 2, +--- // Will be forced to stay in a ny vehicel if this isn't set +--- CA_LEAVE_VEHICLES = 3, +--- // This ped can make decisions on whether to strafe or not based on distance to destination, recent bullet events, etc. +--- CA_CAN_USE_DYNAMIC_STRAFE_DECISIONS = 4, +--- // Ped will always fight upon getting threat response task +--- CA_ALWAYS_FIGHT = 5, +--- // If in combat and in a vehicle, the ped will flee rather than attacking +--- CA_FLEE_WHILST_IN_VEHICLE = 6, +--- // If in combat and chasing in a vehicle, the ped will keep a distance behind rather than ramming +--- CA_JUST_FOLLOW_VEHICLE = 7, +--- // Deprecated +--- CA_PLAY_REACTION_ANIMS = 8, +--- // Peds will scan for and react to dead peds found +--- CA_WILL_SCAN_FOR_DEAD_PEDS = 9, +--- // Deprecated +--- CA_IS_A_GUARD = 10, +--- // The ped will seek cover only +--- CA_JUST_SEEK_COVER = 11, +--- // Ped will only blind fire when in cover +--- CA_BLIND_FIRE_IN_COVER = 12, +--- // Ped may advance +--- CA_AGGRESSIVE = 13, +--- // Ped can investigate events such as distant gunfire, footsteps, explosions etc +--- CA_CAN_INVESTIGATE = 14, +--- // Ped can use a radio to call for backup (happens after a reaction) +--- CA_CAN_USE_RADIO = 15, +--- // Deprecated +--- CA_CAN_CAPTURE_ENEMY_PEDS = 16, +--- // Ped will always flee upon getting threat response task +--- CA_ALWAYS_FLEE = 17, +--- // Ped can do unarmed taunts in vehicle +--- CA_CAN_TAUNT_IN_VEHICLE = 20, +--- // Ped will be able to chase their targets if both are on foot and the target is running away +--- CA_CAN_CHASE_TARGET_ON_FOOT = 21, +--- // Ped can drag injured peds to safety +--- CA_WILL_DRAG_INJURED_PEDS_TO_SAFETY = 22, +--- // Ped will require LOS to the target it is aiming at before shooting +--- CA_REQUIRES_LOS_TO_SHOOT = 23, +--- // Ped is allowed to use proximity based fire rate (increasing fire rate at closer distances) +--- CA_USE_PROXIMITY_FIRING_RATE = 24, +--- // Normally peds can switch briefly to a secondary target in combat, setting this will prevent that +--- CA_DISABLE_SECONDARY_TARGET = 25, +--- // This will disable the flinching combat entry reactions for peds, instead only playing the turn and aim anims +--- CA_DISABLE_ENTRY_REACTIONS = 26, +--- // Force ped to be 100% accurate in all situations (added by Jay Reinebold) +--- CA_PERFECT_ACCURACY = 27, +--- // If we don't have cover and can't see our target it's possible we will advance, even if the target is in cover +--- CA_CAN_USE_FRUSTRATED_ADVANCE = 28, +--- // This will have the ped move to defensive areas and within attack windows before performing the cover search +--- CA_MOVE_TO_LOCATION_BEFORE_COVER_SEARCH = 29, +--- // Allow shooting of our weapon even if we don't have LOS (this isn't X-ray vision as it only affects weapon firing) +--- CA_CAN_SHOOT_WITHOUT_LOS = 30, +--- // Ped will try to maintain a min distance to the target, even if using defensive areas (currently only for cover finding + usage) +--- CA_MAINTAIN_MIN_DISTANCE_TO_TARGET = 31, +--- // Allows ped to use steamed variations of peeking anims +--- CA_CAN_USE_PEEKING_VARIATIONS = 34, +--- // Disables pinned down behaviors +--- CA_DISABLE_PINNED_DOWN = 35, +--- // Disables pinning down others +--- CA_DISABLE_PIN_DOWN_OTHERS = 36, +--- // When defensive area is reached the area is cleared and the ped is set to use defensive combat movement +--- CA_OPEN_COMBAT_WHEN_DEFENSIVE_AREA_IS_REACHED = 37, +--- // Disables bullet reactions +--- CA_DISABLE_BULLET_REACTIONS = 38, +--- // Allows ped to bust the player +--- CA_CAN_BUST = 39, +--- // This ped is ignored by other peds when wanted +--- CA_IGNORED_BY_OTHER_PEDS_WHEN_WANTED = 40, +--- // Ped is allowed to "jack" vehicles when needing to chase a target in combat +--- CA_CAN_COMMANDEER_VEHICLES = 41, +--- // Ped is allowed to flank +--- CA_CAN_FLANK = 42, +--- // Ped will switch to advance if they can't find cover +--- CA_SWITCH_TO_ADVANCE_IF_CANT_FIND_COVER = 43, +--- // Ped will switch to defensive if they are in cover +--- CA_SWITCH_TO_DEFENSIVE_IF_IN_COVER = 44, +--- // Ped will clear their primary defensive area when it is reached +--- CA_CLEAR_PRIMARY_DEFENSIVE_AREA_WHEN_REACHED = 45, +--- // Ped is allowed to fight armed peds when not armed +--- CA_CAN_FIGHT_ARMED_PEDS_WHEN_NOT_ARMED = 46, +--- // Ped is not allowed to use tactical points if set to use defensive movement (will only use cover) +--- CA_ENABLE_TACTICAL_POINTS_WHEN_DEFENSIVE = 47, +--- // Ped cannot adjust cover arcs when testing cover safety (atm done on corner cover points when ped usingdefensive area + no LOS) +--- CA_DISABLE_COVER_ARC_ADJUSTMENTS = 48, +--- // Ped may use reduced accuracy with large number of enemies attacking the same local player target +--- CA_USE_ENEMY_ACCURACY_SCALING = 49, +--- // Ped is allowed to charge the enemy position +--- CA_CAN_CHARGE = 50, +--- // When defensive area is reached the area is cleared and the ped is set to use will advance movement +--- CA_REMOVE_AREA_SET_WILL_ADVANCE_WHEN_DEFENSIVE_AREA_REACHED = 51, +--- // Use the vehicle attack mission during combat (only works on driver) +--- CA_USE_VEHICLE_ATTACK = 52, +--- // Use the vehicle attack mission during combat if the vehicle has mounted guns (only works on driver) +--- CA_USE_VEHICLE_ATTACK_IF_VEHICLE_HAS_MOUNTED_GUNS = 53, +--- // Always equip best weapon in combat +--- CA_ALWAYS_EQUIP_BEST_WEAPON = 54, +--- // Ignores in water at depth visibility check +--- CA_CAN_SEE_UNDERWATER_PEDS = 55, +--- // Will prevent this ped from aiming at any AI targets that are in helicopters +--- CA_DISABLE_AIM_AT_AI_TARGETS_IN_HELIS = 56, +--- // Disables peds seeking due to no clear line of sight +--- CA_DISABLE_SEEK_DUE_TO_LINE_OF_SIGHT = 57, +--- // To be used when releasing missions peds if we don't want them fleeing from combat (mission peds already prevent flee) +--- CA_DISABLE_FLEE_FROM_COMBAT = 58, +--- // Disables target changes during vehicle pursuit +--- CA_DISABLE_TARGET_CHANGES_DURING_VEHICLE_PURSUIT = 59, +--- // Ped may throw a smoke grenade at player loitering in combat +--- CA_CAN_THROW_SMOKE_GRENADE = 60, +--- // Will clear a set defensive area if that area cannot be reached +--- CA_CLEAR_AREA_SET_DEFENSIVE_IF_DEFENSIVE_CANNOT_BE_REACHED = 62, +--- // Disable block from pursue during vehicle chases +--- CA_DISABLE_BLOCK_FROM_PURSUE_DURING_VEHICLE_CHASE = 64, +--- // Disable spin out during vehicle chases +--- CA_DISABLE_SPIN_OUT_DURING_VEHICLE_CHASE = 65, +--- // Disable cruise in front during block during vehicle chases +--- CA_DISABLE_CRUISE_IN_FRONT_DURING_BLOCK_DURING_VEHICLE_CHASE = 66, +--- // Makes it more likely that the ped will continue targeting a target with blocked los for a few seconds +--- CA_CAN_IGNORE_BLOCKED_LOS_WEIGHTING = 67, +--- // Disables the react to buddy shot behaviour. +--- CA_DISABLE_REACT_TO_BUDDY_SHOT = 68, +--- // Prefer pathing using navmesh over road nodes +--- CA_PREFER_NAVMESH_DURING_VEHICLE_CHASE = 69, +--- // Ignore road edges when avoiding +--- CA_ALLOWED_TO_AVOID_OFFROAD_DURING_VEHICLE_CHASE = 70, +--- // Permits ped to charge a target outside the assigned defensive area. +--- CA_PERMIT_CHARGE_BEYOND_DEFENSIVE_AREA = 71, +--- // This ped will switch to an RPG if target is in a vehicle, otherwise will use alternate weapon. +--- CA_USE_ROCKETS_AGAINST_VEHICLES_ONLY = 72, +--- // Disables peds moving to a tactical point without clear los +--- CA_DISABLE_TACTICAL_POINTS_WITHOUT_CLEAR_LOS = 73, +--- // Disables pull alongside during vehicle chase +--- CA_DISABLE_PULL_ALONGSIDE_DURING_VEHICLE_CHASE = 74, +--- // If set on a ped, they will not flee when all random peds flee is set to TRUE (they are still able to flee due to other reasons) +--- CA_DISABLE_ALL_RANDOMS_FLEE = 78, +--- // This ped will send out a script DeadPedSeenEvent when they see a dead ped +--- CA_WILL_GENERATE_DEAD_PED_SEEN_SCRIPT_EVENTS = 79, +--- // This will use the receiving peds sense range rather than the range supplied to the communicate event +--- CA_USE_MAX_SENSE_RANGE_WHEN_RECEIVING_EVENTS = 80, +--- // When aiming from a vehicle the ped will only aim at targets on his side of the vehicle +--- CA_RESTRICT_IN_VEHICLE_AIMING_TO_CURRENT_SIDE = 81, +--- // LOS to the target is blocked we return to our default position and direction until we have LOS (no aiming) +--- CA_USE_DEFAULT_BLOCKED_LOS_POSITION_AND_DIRECTION = 82, +--- // LOS to the target is blocked we return to our default position and direction until we have LOS (no aiming) +--- CA_REQUIRES_LOS_TO_AIM = 83, +--- // Allow vehicles spawned infront of target facing away to enter cruise and wait to block approaching target +--- CA_CAN_CRUISE_AND_BLOCK_IN_VEHICLE = 84, +--- // Peds flying aircraft will prefer to target other aircraft over entities on the ground +--- CA_PREFER_AIR_COMBAT_WHEN_IN_AIRCRAFT = 85, +--- //Allow peds flying aircraft to use dog fighting behaviours +--- CA_ALLOW_DOG_FIGHTING = 86, +--- // This will make the weight of targets who aircraft vehicles be reduced greatly compared to targets on foot or in ground based vehicles +--- CA_PREFER_NON_AIRCRAFT_TARGETS = 87, +--- //When peds are tasked to go to combat, they keep searching for a known target for a while before forcing an unknown one +--- CA_PREFER_KNOWN_TARGETS_WHEN_COMBAT_CLOSEST_TARGET = 88, +--- // Only allow mounted weapons to fire if within the correct attack angle (default 25-degree cone). On a flag in order to keep exiting behaviour and only fix in specific cases. +--- CA_FORCE_CHECK_ATTACK_ANGLE_FOR_MOUNTED_GUNS = 89, +--- // Blocks the firing state for passenger-controlled mounted weapons. Existing flags CA_USE_VEHICLE_ATTACK and CA_USE_VEHICLE_ATTACK_IF_VEHICLE_HAS_MOUNTED_GUNS only work for drivers. +--- CA_BLOCK_FIRE_FOR_VEHICLE_PASSENGER_MOUNTED_GUNS = 90 ---}; ---``` ---@param ped integer @@ -4743,9 +4871,9 @@ function SetPedCombatMovement(ped, combatMovement) end ---```cpp ---enum eCombatRange { --- CR_NEAR = 0, // keeps within 5-15m ---- CR_MEDIUM, // keeps within 7-30m ---- CR_FAR, // keeps within 15-40m ---- CR_VERY_FAR // keeps within 22-45m +--- CR_MEDIUM = 1, // keeps within 7-30m +--- CR_FAR = 2, // keeps within 15-40m +--- CR_VERY_FAR = 3 // keeps within 22-45m ---}; ---``` ---@param ped integer @@ -4805,64 +4933,64 @@ function SetPedComponentVariation(ped, componentId, drawableId, textureId, palet ---```cpp ---// Potential names and hash collisions included as comments ---enum ePedConfigFlags { ---- _0x67D1A445 = 0, ---- _0xC63DE95E = 1, +--- CPED_CONFIG_FLAG_CreatedByFactory = 0, +--- CPED_CONFIG_FLAG_CanBeShotInVehicle = 1, --- CPED_CONFIG_FLAG_NoCriticalHits = 2, --- CPED_CONFIG_FLAG_DrownsInWater = 3, ---- CPED_CONFIG_FLAG_DisableReticuleFixedLockon = 4, ---- _0x37D196F4 = 5, ---- _0xE2462399 = 6, +--- CPED_CONFIG_FLAG_DrownsInSinkingVehicle = 4, +--- CPED_CONFIG_FLAG_DiesInstantlyWhenSwimming = 5, +--- CPED_CONFIG_FLAG_HasBulletProofVest = 6, --- CPED_CONFIG_FLAG_UpperBodyDamageAnimsOnly = 7, ---- _0xEDDEB838 = 8, ---- _0xB398B6FD = 9, ---- _0xF6664E68 = 10, ---- _0xA05E7CA3 = 11, ---- _0xCE394045 = 12, +--- CPED_CONFIG_FLAG_NeverFallOffSkis = 8, +--- CPED_CONFIG_FLAG_NeverEverTargetThisPed = 9, +--- CPED_CONFIG_FLAG_ThisPedIsATargetPriority = 10, +--- CPED_CONFIG_FLAG_TargettableWithNoLos = 11, +--- CPED_CONFIG_FLAG_DoesntListenToPlayerGroupCommands = 12, --- CPED_CONFIG_FLAG_NeverLeavesGroup = 13, ---- _0xCD8D1411 = 14, ---- _0xB031F1A9 = 15, ---- _0xFE65BEE3 = 16, +--- CPED_CONFIG_FLAG_DoesntDropWeaponsWhenDead = 14, +--- CPED_CONFIG_FLAG_SetDelayedWeaponAsCurrent = 15, +--- CPED_CONFIG_FLAG_KeepTasksAfterCleanUp = 16, --- CPED_CONFIG_FLAG_BlockNonTemporaryEvents = 17, ---- _0x380165BD = 18, ---- _0x07C045C7 = 19, ---- _0x583B5E2D = 20, ---- _0x475EDA58 = 21, ---- _0x8629D05B = 22, ---- _0x1522968B = 23, +--- CPED_CONFIG_FLAG_HasAScriptBrain = 18, +--- CPED_CONFIG_FLAG_WaitingForScriptBrainToLoad = 19, +--- CPED_CONFIG_FLAG_AllowMedicsToReviveMe = 20, +--- CPED_CONFIG_FLAG_MoneyHasBeenGivenByScript = 21, +--- CPED_CONFIG_FLAG_NotAllowedToCrouch = 22, +--- CPED_CONFIG_FLAG_DeathPickupsPersist = 23, --- CPED_CONFIG_FLAG_IgnoreSeenMelee = 24, ---- _0x4CC09C4B = 25, ---- _0x034F3053 = 26, ---- _0xD91BA7CC = 27, ---- _0x5C8DC66E = 28, ---- _0x8902EAA0 = 29, ---- _0x6580B9D2 = 30, ---- _0x0EF7A297 = 31, ---- _0x6BF86E5B = 32, +--- CPED_CONFIG_FLAG_ForceDieIfInjured = 25, +--- CPED_CONFIG_FLAG_DontDragMeOutCar = 26, +--- CPED_CONFIG_FLAG_StayInCarOnJack = 27, +--- CPED_CONFIG_FLAG_ForceDieInCar = 28, +--- CPED_CONFIG_FLAG_GetOutUndriveableVehicle = 29, +--- CPED_CONFIG_FLAG_WillRemainOnBoatAfterMissionEnds = 30, +--- CPED_CONFIG_FLAG_DontStoreAsPersistent = 31, +--- CPED_CONFIG_FLAG_WillFlyThroughWindscreen = 32, --- CPED_CONFIG_FLAG_DieWhenRagdoll = 33, --- CPED_CONFIG_FLAG_HasHelmet = 34, --- CPED_CONFIG_FLAG_UseHelmet = 35, ---- _0xEEB3D630 = 36, ---- _0xB130D17B = 37, ---- _0x5F071200 = 38, +--- CPED_CONFIG_FLAG_DontTakeOffHelmet = 36, +--- CPED_CONFIG_FLAG_HideInCutscene = 37, +--- CPED_CONFIG_FLAG_PedIsEnemyToPlayer = 38, --- CPED_CONFIG_FLAG_DisableEvasiveDives = 39, ---- _0xC287AAFF = 40, ---- _0x203328CC = 41, +--- CPED_CONFIG_FLAG_PedGeneratesDeadBodyEvents = 40, +--- CPED_CONFIG_FLAG_DontAttackPlayerWithoutWantedLevel = 41, --- CPED_CONFIG_FLAG_DontInfluenceWantedLevel = 42, --- CPED_CONFIG_FLAG_DisablePlayerLockon = 43, --- CPED_CONFIG_FLAG_DisableLockonToRandomPeds = 44, ---- _0xEC4A8ACF = 45, +--- CPED_CONFIG_FLAG_AllowLockonToFriendlyPlayers = 45, --- _0xDB115BFA = 46, --- CPED_CONFIG_FLAG_PedBeingDeleted = 47, --- CPED_CONFIG_FLAG_BlockWeaponSwitching = 48, ---- _0xF8E99565 = 49, ---- _0xDD17FEE6 = 50, ---- _0x7ED9B2C9 = 51, ---- _0x655E8618 = 52, ---- _0x5A6C1F6E = 53, ---- _0xD749FC41 = 54, ---- _0x357F63F3 = 55, ---- _0xC5E60961 = 56, ---- _0x29275C3E = 57, +--- CPED_CONFIG_FLAG_BlockGroupPedAimedAtResponse = 49, +--- CPED_CONFIG_FLAG_WillFollowLeaderAnyMeans = 50, +--- CPED_CONFIG_FLAG_BlippedByScript = 51, +--- CPED_CONFIG_FLAG_DrawRadarVisualField = 52, +--- CPED_CONFIG_FLAG_StopWeaponFiringOnImpact = 53, +--- CPED_CONFIG_FLAG_DissableAutoFallOffTests = 54, +--- CPED_CONFIG_FLAG_SteerAroundDeadBodies = 55, +--- CPED_CONFIG_FLAG_ConstrainToNavMesh = 56, +--- CPED_CONFIG_FLAG_SyncingAnimatedProps = 57, --- CPED_CONFIG_FLAG_IsFiring = 58, --- CPED_CONFIG_FLAG_WasFiring = 59, --- CPED_CONFIG_FLAG_IsStanding = 60, @@ -4877,392 +5005,398 @@ function SetPedComponentVariation(ped, componentId, drawableId, textureId, palet --- CPED_CONFIG_FLAG_KilledByStealth = 69, --- CPED_CONFIG_FLAG_KilledByTakedown = 70, --- CPED_CONFIG_FLAG_Knockedout = 71, ---- _0x3E3C4560 = 72, ---- _0x2994C7B7 = 73, ---- _0x6D59D275 = 74, +--- CPED_CONFIG_FLAG_ClearRadarBlipOnDeath = 72, +--- CPED_CONFIG_FLAG_JustGotOffTrain = 73, +--- CPED_CONFIG_FLAG_JustGotOnTrain = 74, --- CPED_CONFIG_FLAG_UsingCoverPoint = 75, --- CPED_CONFIG_FLAG_IsInTheAir = 76, ---- _0x2D493FB7 = 77, +--- CPED_CONFIG_FLAG_KnockedUpIntoAir = 77, --- CPED_CONFIG_FLAG_IsAimingGun = 78, ---- _0x14D69875 = 79, ---- _0x40B05311 = 80, ---- _0x8B230BC5 = 81, ---- _0xC74E5842 = 82, ---- _0x9EA86147 = 83, ---- _0x674C746C = 84, ---- _0x3E56A8C2 = 85, ---- _0xC144A1EF = 86, ---- _0x0548512D = 87, ---- _0x31C93909 = 88, ---- _0xA0269315 = 89, ---- _0xD4D59D4D = 90, ---- _0x411D4420 = 91, ---- _0xDF4AEF0D = 92, +--- CPED_CONFIG_FLAG_HasJustLeftCar = 79, +--- CPED_CONFIG_FLAG_TargetWhenInjuredAllowed = 80, +--- CPED_CONFIG_FLAG_CurrLeftFootCollNM = 81, +--- CPED_CONFIG_FLAG_PrevLeftFootCollNM = 82, +--- CPED_CONFIG_FLAG_CurrRightFootCollNM = 83, +--- CPED_CONFIG_FLAG_PrevRightFootCollNM = 84, +--- CPED_CONFIG_FLAG_HasBeenBumpedInCar = 85, +--- CPED_CONFIG_FLAG_InWaterTaskQuitToClimbLadder = 86, +--- CPED_CONFIG_FLAG_NMTwoHandedWeaponBothHandsConstrained = 87, +--- CPED_CONFIG_FLAG_CreatedBloodPoolTimer = 88, +--- CPED_CONFIG_FLAG_DontActivateRagdollFromAnyPedImpact = 89, +--- CPED_CONFIG_FLAG_GroupPedFailedToEnterCover = 90, +--- CPED_CONFIG_FLAG_AlreadyChattedOnPhone = 91, +--- CPED_CONFIG_FLAG_AlreadyReactedToPedOnRoof = 92, --- CPED_CONFIG_FLAG_ForcePedLoadCover = 93, ---- _0x300E4CD3 = 94, ---- _0xF1C5BF04 = 95, ---- _0x89C2EF13 = 96, +--- CPED_CONFIG_FLAG_BlockCoweringInCover = 94, +--- CPED_CONFIG_FLAG_BlockPeekingInCover = 95, +--- CPED_CONFIG_FLAG_JustLeftCarNotCheckedForDoors = 96, --- CPED_CONFIG_FLAG_VaultFromCover = 97, ---- _0x02A852C8 = 98, ---- _0x3D9407F1 = 99, ---- _0x319B4558 = 100, +--- CPED_CONFIG_FLAG_AutoConversationLookAts = 98, +--- CPED_CONFIG_FLAG_UsingCrouchedPedCapsule = 99, +--- CPED_CONFIG_FLAG_HasDeadPedBeenReported = 100, --- CPED_CONFIG_FLAG_ForcedAim = 101, ---- _0xB942D71A = 102, ---- _0xD26C55A8 = 103, ---- _0xB89E703B = 104, +--- CPED_CONFIG_FLAG_SteersAroundPeds = 102, +--- CPED_CONFIG_FLAG_SteersAroundObjects = 103, +--- CPED_CONFIG_FLAG_OpenDoorArmIK = 104, --- CPED_CONFIG_FLAG_ForceReload = 105, ---- _0xD9E73DA2 = 106, ---- _0xFF71DC2C = 107, ---- _0x1E27E8D8 = 108, ---- _0xF2C53966 = 109, ---- _0xC4DBE247 = 110, ---- _0x83C0A4BF = 111, ---- _0x0E0FAF8C = 112, ---- _0x26616660 = 113, ---- _0x43B80B79 = 114, ---- _0x0D2A9309 = 115, ---- _0x12C1C983 = 116, +--- CPED_CONFIG_FLAG_DontActivateRagdollFromVehicleImpact = 106, +--- CPED_CONFIG_FLAG_DontActivateRagdollFromBulletImpact = 107, +--- CPED_CONFIG_FLAG_DontActivateRagdollFromExplosions = 108, +--- CPED_CONFIG_FLAG_DontActivateRagdollFromFire = 109, +--- CPED_CONFIG_FLAG_DontActivateRagdollFromElectrocution = 110, +--- CPED_CONFIG_FLAG_IsBeingDraggedToSafety = 111, +--- CPED_CONFIG_FLAG_HasBeenDraggedToSafety = 112, +--- CPED_CONFIG_FLAG_KeepWeaponHolsteredUnlessFired = 113, +--- CPED_CONFIG_FLAG_ForceScriptControlledKnockout = 114, +--- CPED_CONFIG_FLAG_FallOutOfVehicleWhenKilled = 115, +--- CPED_CONFIG_FLAG_GetOutBurningVehicle = 116, --- CPED_CONFIG_FLAG_BumpedByPlayer = 117, ---- _0xE586D504 = 118, ---- _0x52374204 = 119, +--- CPED_CONFIG_FLAG_RunFromFiresAndExplosions = 118, +--- CPED_CONFIG_FLAG_TreatAsPlayerDuringTargeting = 119, --- CPED_CONFIG_FLAG_IsHandCuffed = 120, --- CPED_CONFIG_FLAG_IsAnkleCuffed = 121, --- CPED_CONFIG_FLAG_DisableMelee = 122, ---- _0xFE714397 = 123, ---- _0xB3E660BD = 124, ---- _0x5FED6BFD = 125, ---- _0xC9D6F66F = 126, ---- _0x519BC986 = 127, +--- CPED_CONFIG_FLAG_DisableUnarmedDrivebys = 123, +--- CPED_CONFIG_FLAG_JustGetsPulledOutWhenElectrocuted = 124, +--- CPED_CONFIG_FLAG_UNUSED_REPLACE_ME = 125, +--- CPED_CONFIG_FLAG_WillNotHotwireLawEnforcementVehicle = 126, +--- CPED_CONFIG_FLAG_WillCommandeerRatherThanJack = 127, --- CPED_CONFIG_FLAG_CanBeAgitated = 128, ---- _0x9A4B617C = 129, // CPED_CONFIG_FLAG_FaceDirInsult ---- _0xDAB70E9F = 130, ---- _0xE569438A = 131, ---- _0xBBC77D6D = 132, ---- _0xCB59EF0F = 133, ---- _0x8C5EA971 = 134, +--- CPED_CONFIG_FLAG_ForcePedToFaceLeftInCover = 129, +--- CPED_CONFIG_FLAG_ForcePedToFaceRightInCover = 130, +--- CPED_CONFIG_FLAG_BlockPedFromTurningInCover = 131, +--- CPED_CONFIG_FLAG_KeepRelationshipGroupAfterCleanUp = 132, +--- CPED_CONFIG_FLAG_ForcePedToBeDragged = 133, +--- CPED_CONFIG_FLAG_PreventPedFromReactingToBeingJacked = 134, --- CPED_CONFIG_FLAG_IsScuba = 135, --- CPED_CONFIG_FLAG_WillArrestRatherThanJack = 136, ---- _0xDCE59B58 = 137, +--- CPED_CONFIG_FLAG_RemoveDeadExtraFarAway = 137, --- CPED_CONFIG_FLAG_RidingTrain = 138, --- CPED_CONFIG_FLAG_ArrestResult = 139, --- CPED_CONFIG_FLAG_CanAttackFriendly = 140, ---- _0x98A4BE43 = 141, ---- _0x6901E731 = 142, ---- _0x9EC9BF6C = 143, ---- _0x42841A8F = 144, ---- CPED_CONFIG_FLAG_ShootingAnimFlag = 145, +--- CPED_CONFIG_FLAG_WillJackAnyPlayer = 141, +--- CPED_CONFIG_FLAG_BumpedByPlayerVehicle = 142, +--- CPED_CONFIG_FLAG_DodgedPlayerVehicle = 143, +--- CPED_CONFIG_FLAG_WillJackWantedPlayersRatherThanStealCar = 144, +--- CPED_CONFIG_FLAG_NoCopWantedAggro = 145, --- CPED_CONFIG_FLAG_DisableLadderClimbing = 146, --- CPED_CONFIG_FLAG_StairsDetected = 147, --- CPED_CONFIG_FLAG_SlopeDetected = 148, ---- _0x1A15670B = 149, ---- _0x61786EE5 = 150, ---- _0xCB9186BD = 151, ---- _0xF0710152 = 152, ---- _0x43DFE310 = 153, ---- _0xC43C624E = 154, +--- CPED_CONFIG_FLAG_HelmetHasBeenShot = 149, +--- CPED_CONFIG_FLAG_CowerInsteadOfFlee = 150, +--- CPED_CONFIG_FLAG_CanActivateRagdollWhenVehicleUpsideDown = 151, +--- CPED_CONFIG_FLAG_AlwaysRespondToCriesForHelp = 152, +--- CPED_CONFIG_FLAG_DisableBloodPoolCreation = 153, +--- CPED_CONFIG_FLAG_ShouldFixIfNoCollision = 154, --- CPED_CONFIG_FLAG_CanPerformArrest = 155, --- CPED_CONFIG_FLAG_CanPerformUncuff = 156, --- CPED_CONFIG_FLAG_CanBeArrested = 157, ---- _0xF7960FF5 = 158, ---- _0x59564113 = 159, ---- _0x0C6C3099 = 160, ---- _0x645F927A = 161, ---- _0xA86549B9 = 162, ---- _0x8AAF337A = 163, ---- _0x13BAA6E7 = 164, ---- _0x5FB9D1F5 = 165, +--- CPED_CONFIG_FLAG_MoverConstrictedByOpposingCollisions = 158, +--- CPED_CONFIG_FLAG_PlayerPreferFrontSeatMP = 159, +--- CPED_CONFIG_FLAG_DontActivateRagdollFromImpactObject = 160, +--- CPED_CONFIG_FLAG_DontActivateRagdollFromMelee = 161, +--- CPED_CONFIG_FLAG_DontActivateRagdollFromWaterJet = 162, +--- CPED_CONFIG_FLAG_DontActivateRagdollFromDrowning = 163, +--- CPED_CONFIG_FLAG_DontActivateRagdollFromFalling = 164, +--- CPED_CONFIG_FLAG_DontActivateRagdollFromRubberBullet = 165, --- CPED_CONFIG_FLAG_IsInjured = 166, ---- _0x6398A20B = 167, ---- _0xD8072639 = 168, ---- _0xA05B1845 = 169, ---- _0x83F6D220 = 170, ---- _0xD8430331 = 171, ---- _0x4B547520 = 172, ---- _0xE66E1406 = 173, ---- _0x1C4BFE0C = 174, ---- _0x90008BFA = 175, ---- _0x07C7A910 = 176, ---- _0xF15F8191 = 177, ---- _0xCE4E8BE2 = 178, ---- _0x1D46E4F2 = 179, +--- CPED_CONFIG_FLAG_DontEnterVehiclesInPlayersGroup = 167, +--- CPED_CONFIG_FLAG_SwimmingTasksRunning = 168, +--- CPED_CONFIG_FLAG_PreventAllMeleeTaunts = 169, +--- CPED_CONFIG_FLAG_ForceDirectEntry = 170, +--- CPED_CONFIG_FLAG_AlwaysSeeApproachingVehicles = 171, +--- CPED_CONFIG_FLAG_CanDiveAwayFromApproachingVehicles = 172, +--- CPED_CONFIG_FLAG_AllowPlayerToInterruptVehicleEntryExit = 173, +--- CPED_CONFIG_FLAG_OnlyAttackLawIfPlayerIsWanted = 174, +--- CPED_CONFIG_FLAG_PlayerInContactWithKinematicPed = 175, +--- CPED_CONFIG_FLAG_PlayerInContactWithSomethingOtherThanKinematicPed = 176, +--- CPED_CONFIG_FLAG_PedsJackingMeDontGetIn = 177, +--- CPED_CONFIG_FLAG_AdditionalRappellingPed = 178, +--- CPED_CONFIG_FLAG_PedIgnoresAnimInterruptEvents = 179, --- CPED_CONFIG_FLAG_IsInCustody = 180, ---- _0xE4FD9B3A = 181, ---- _0x67AE0812 = 182, +--- CPED_CONFIG_FLAG_ForceStandardBumpReactionThresholds = 181, +--- CPED_CONFIG_FLAG_LawWillOnlyAttackIfPlayerIsWanted = 182, --- CPED_CONFIG_FLAG_IsAgitated = 183, --- CPED_CONFIG_FLAG_PreventAutoShuffleToDriversSeat = 184, ---- _0x7B2D325E = 185, +--- CPED_CONFIG_FLAG_UseKinematicModeWhenStationary = 185, --- CPED_CONFIG_FLAG_EnableWeaponBlocking = 186, --- CPED_CONFIG_FLAG_HasHurtStarted = 187, --- CPED_CONFIG_FLAG_DisableHurt = 188, --- CPED_CONFIG_FLAG_PlayerIsWeird = 189, ---- _0x32FC208B = 190, ---- _0x0C296E5A = 191, ---- _0xE63B73EC = 192, ---- _0x04E9CC80 = 193, +--- CPED_CONFIG_FLAG_PedHadPhoneConversation = 190, +--- CPED_CONFIG_FLAG_BeganCrossingRoad = 191, +--- CPED_CONFIG_FLAG_WarpIntoLeadersVehicle = 192, +--- CPED_CONFIG_FLAG_DoNothingWhenOnFootByDefault = 193, --- CPED_CONFIG_FLAG_UsingScenario = 194, --- CPED_CONFIG_FLAG_VisibleOnScreen = 195, ---- _0xD88C58A1 = 196, ---- _0x5A3DCF43 = 197, // CPED_CONFIG_FLAG_AvoidUnderSide ---- _0xEA02B420 = 198, ---- _0x3F559CFF = 199, ---- _0x8C55D029 = 200, ---- _0x5E6466F6 = 201, ---- _0xEB5AD706 = 202, ---- _0x0EDDDDE7 = 203, ---- _0xA64F7B1D = 204, ---- _0x48532CBA = 205, ---- _0xAA25A9E7 = 206, ---- _0x415B26B9 = 207, +--- CPED_CONFIG_FLAG_DontCollideWithKinematic = 196, +--- CPED_CONFIG_FLAG_ActivateOnSwitchFromLowPhysicsLod = 197, +--- CPED_CONFIG_FLAG_DontActivateRagdollOnPedCollisionWhenDead = 198, +--- CPED_CONFIG_FLAG_DontActivateRagdollOnVehicleCollisionWhenDead = 199, +--- CPED_CONFIG_FLAG_HasBeenInArmedCombat = 200, +--- CPED_CONFIG_FLAG_UseDiminishingAmmoRate = 201, +--- CPED_CONFIG_FLAG_Avoidance_Ignore_All = 202, +--- CPED_CONFIG_FLAG_Avoidance_Ignored_by_All = 203, +--- CPED_CONFIG_FLAG_Avoidance_Ignore_Group1 = 204, +--- CPED_CONFIG_FLAG_Avoidance_Member_of_Group1 = 205, +--- CPED_CONFIG_FLAG_ForcedToUseSpecificGroupSeatIndex = 206, +--- CPED_CONFIG_FLAG_LowPhysicsLodMayPlaceOnNavMesh = 207, --- CPED_CONFIG_FLAG_DisableExplosionReactions = 208, --- CPED_CONFIG_FLAG_DodgedPlayer = 209, ---- _0x67405504 = 210, ---- _0x75DDD68C = 211, ---- _0x2AD879B4 = 212, ---- _0x51486F91 = 213, ---- _0x32F79E21 = 214, ---- _0xBF099213 = 215, ---- _0x054AC8E2 = 216, ---- _0x14E495CC = 217, ---- _0x3C7DF9DF = 218, ---- _0x848FFEF2 = 219, +--- CPED_CONFIG_FLAG_WaitingForPlayerControlInterrupt = 210, +--- CPED_CONFIG_FLAG_ForcedToStayInCover = 211, +--- CPED_CONFIG_FLAG_GeneratesSoundEvents = 212, +--- CPED_CONFIG_FLAG_ListensToSoundEvents = 213, +--- CPED_CONFIG_FLAG_AllowToBeTargetedInAVehicle = 214, +--- CPED_CONFIG_FLAG_WaitForDirectEntryPointToBeFreeWhenExiting = 215, +--- CPED_CONFIG_FLAG_OnlyRequireOnePressToExitVehicle = 216, +--- CPED_CONFIG_FLAG_ForceExitToSkyDive = 217, +--- CPED_CONFIG_FLAG_SteersAroundVehicles = 218, +--- CPED_CONFIG_FLAG_AllowPedInVehiclesOverrideTaskFlags = 219, --- CPED_CONFIG_FLAG_DontEnterLeadersVehicle = 220, ---- _0x2618E1CF = 221, ---- _0x84F722FA = 222, ---- _0xD1B87B1F = 223, ---- _0x728AA918 = 224, +--- CPED_CONFIG_FLAG_DisableExitToSkyDive = 221, +--- CPED_CONFIG_FLAG_ScriptHasDisabledCollision = 222, +--- CPED_CONFIG_FLAG_UseAmbientModelScaling = 223, +--- CPED_CONFIG_FLAG_DontWatchFirstOnNextHurryAway = 224, --- CPED_CONFIG_FLAG_DisablePotentialToBeWalkedIntoResponse = 225, --- CPED_CONFIG_FLAG_DisablePedAvoidance = 226, ---- _0x59E91185 = 227, ---- _0x1EA7225F = 228, +--- CPED_CONFIG_FLAG_ForceRagdollUponDeath = 227, +--- CPED_CONFIG_FLAG_CanLosePropsOnDamage = 228, --- CPED_CONFIG_FLAG_DisablePanicInVehicle = 229, ---- _0x6DCA7D88 = 230, ---- _0xFC3E572D = 231, ---- _0x08E9F9CF = 232, ---- _0x2D3BA52D = 233, ---- _0xFD2F53EA = 234, ---- _0x31A1B03B = 235, +--- CPED_CONFIG_FLAG_AllowedToDetachTrailer = 230, +--- CPED_CONFIG_FLAG_HasShotBeenReactedToFromFront = 231, +--- CPED_CONFIG_FLAG_HasShotBeenReactedToFromBack = 232, +--- CPED_CONFIG_FLAG_HasShotBeenReactedToFromLeft = 233, +--- CPED_CONFIG_FLAG_HasShotBeenReactedToFromRight = 234, +--- CPED_CONFIG_FLAG_AllowBlockDeadPedRagdollActivation = 235, --- CPED_CONFIG_FLAG_IsHoldingProp = 236, ---- _0x82ED0A66 = 237, // CPED_CONFIG_FLAG_BlocksPathingWhenDead ---- _0xCE57C9A3 = 238, ---- _0x26149198 = 239, ---- _0x1B33B598 = 240, ---- _0x719B6E87 = 241, ---- _0x13E8E8E8 = 242, ---- _0xF29739AE = 243, ---- _0xABEA8A74 = 244, ---- _0xB60EA2BA = 245, ---- _0x536B0950 = 246, ---- _0x0C754ACA = 247, ---- CPED_CONFIG_FLAG_DisableVehicleSeatRandomAnimations = 248, ---- _0x12659168 = 249, ---- _0x1BDF2F04 = 250, ---- _0x7728FAA3 = 251, ---- _0x6A807ED8 = 252, +--- CPED_CONFIG_FLAG_BlocksPathingWhenDead = 237, +--- CPED_CONFIG_FLAG_ForcePlayNormalScenarioExitOnNextScriptCommand = 238, +--- CPED_CONFIG_FLAG_ForcePlayImmediateScenarioExitOnNextScriptCommand = 239, +--- CPED_CONFIG_FLAG_ForceSkinCharacterCloth = 240, +--- CPED_CONFIG_FLAG_LeaveEngineOnWhenExitingVehicles = 241, +--- CPED_CONFIG_FLAG_PhoneDisableTextingAnimations = 242, +--- CPED_CONFIG_FLAG_PhoneDisableTalkingAnimations = 243, +--- CPED_CONFIG_FLAG_PhoneDisableCameraAnimations = 244, +--- CPED_CONFIG_FLAG_DisableBlindFiringInShotReactions = 245, +--- CPED_CONFIG_FLAG_AllowNearbyCoverUsage = 246, +--- CPED_CONFIG_FLAG_InStrafeTransition = 247, +--- CPED_CONFIG_FLAG_CanPlayInCarIdles = 248, +--- CPED_CONFIG_FLAG_CanAttackNonWantedPlayerAsLaw = 249, +--- CPED_CONFIG_FLAG_WillTakeDamageWhenVehicleCrashes = 250, +--- CPED_CONFIG_FLAG_AICanDrivePlayerAsRearPassenger = 251, +--- CPED_CONFIG_FLAG_PlayerCanJackFriendlyPlayers = 252, --- CPED_CONFIG_FLAG_OnStairs = 253, ---- _0xE1A2F73F = 254, ---- _0x5B3697C8 = 255, ---- _0xF1EB20A9 = 256, ---- _0x8B7DF407 = 257, ---- _0x329DCF1A = 258, ---- _0x8D90DD1B = 259, ---- _0xB8A292B7 = 260, ---- _0x8374B087 = 261, ---- _0x2AF558F0 = 262, ---- _0x82251455 = 263, ---- _0x30CF498B = 264, ---- _0xE1CD50AF = 265, ---- _0x72E4AE48 = 266, ---- _0xC2657EA1 = 267, ---- _0x29FF6030 = 268, ---- _0x8248A5EC = 269, +--- CPED_CONFIG_FLAG_SimulatingAiming = 254, +--- CPED_CONFIG_FLAG_AIDriverAllowFriendlyPassengerSeatEntry = 255, +--- CPED_CONFIG_FLAG_ParentCarIsBeingRemoved = 256, +--- CPED_CONFIG_FLAG_AllowMissionPedToUseInjuredMovement = 257, +--- CPED_CONFIG_FLAG_CanLoseHelmetOnDamage = 258, +--- CPED_CONFIG_FLAG_NeverDoScenarioExitProbeChecks = 259, +--- CPED_CONFIG_FLAG_SuppressLowLODRagdollSwitchWhenCorpseSettles = 260, +--- CPED_CONFIG_FLAG_PreventUsingLowerPrioritySeats = 261, +--- CPED_CONFIG_FLAG_JustLeftVehicleNeedsReset = 262, +--- CPED_CONFIG_FLAG_TeleportIfCantReachPlayer = 263, +--- CPED_CONFIG_FLAG_PedsInVehiclePositionNeedsReset = 264, +--- CPED_CONFIG_FLAG_PedsFullyInSeat = 265, +--- CPED_CONFIG_FLAG_AllowPlayerLockOnIfFriendly = 266, +--- CPED_CONFIG_FLAG_UseCameraHeadingForDesiredDirectionLockOnTest = 267, +--- CPED_CONFIG_FLAG_TeleportToLeaderVehicle = 268, +--- CPED_CONFIG_FLAG_Avoidance_Ignore_WeirdPedBuffer = 269, --- CPED_CONFIG_FLAG_OnStairSlope = 270, ---- _0xA0897933 = 271, +--- CPED_CONFIG_FLAG_HasPlayedNMGetup = 271, --- CPED_CONFIG_FLAG_DontBlipCop = 272, ---- CPED_CONFIG_FLAG_ClimbedShiftedFence = 273, ---- _0xF7823618 = 274, ---- _0xDC305CCE = 275, // CPED_CONFIG_FLAG_KillWhenTrapped +--- CPED_CONFIG_FLAG_SpawnedAtExtendedRangeScenario = 273, +--- CPED_CONFIG_FLAG_WalkAlongsideLeaderWhenClose = 274, +--- CPED_CONFIG_FLAG_KillWhenTrapped = 275, --- CPED_CONFIG_FLAG_EdgeDetected = 276, ---- _0x92B67896 = 277, ---- _0xCAD677C9 = 278, +--- CPED_CONFIG_FLAG_AlwaysWakeUpPhysicsOfIntersectedPeds = 277, +--- CPED_CONFIG_FLAG_EquippedAmbientLoadOutWeapon = 278, --- CPED_CONFIG_FLAG_AvoidTearGas = 279, ---- _0x5276AC7B = 280, ---- _0x1032692A = 281, ---- _0xDA23E7F1 = 282, ---- _0x9139724D = 283, ---- _0xA1457461 = 284, ---- _0x4186E095 = 285, ---- _0xAC68E2EB = 286, +--- CPED_CONFIG_FLAG_StoppedSpeechUponFreezing = 280, +--- CPED_CONFIG_FLAG_DisableGoToWritheWhenInjured = 281, +--- CPED_CONFIG_FLAG_OnlyUseForcedSeatWhenEnteringHeliInGroup = 282, +--- CPED_CONFIG_FLAG_ThrownFromVehicleDueToExhaustion = 283, +--- CPED_CONFIG_FLAG_UpdateEnclosedSearchRegion = 284, +--- CPED_CONFIG_FLAG_DisableWeirdPedEvents = 285, +--- CPED_CONFIG_FLAG_ShouldChargeNow = 286, --- CPED_CONFIG_FLAG_RagdollingOnBoat = 287, --- CPED_CONFIG_FLAG_HasBrandishedWeapon = 288, ---- _0x1B9EE8A1 = 289, ---- _0xF3F5758C = 290, ---- _0x2A9307F1 = 291, ---- _0x7403D216 = 292, ---- _0xA06A3C6C = 293, +--- CPED_CONFIG_FLAG_AllowMinorReactionsAsMissionPed = 289, +--- CPED_CONFIG_FLAG_BlockDeadBodyShockingEventsWhenDead = 290, +--- CPED_CONFIG_FLAG_PedHasBeenSeen = 291, +--- CPED_CONFIG_FLAG_PedIsInReusePool = 292, +--- CPED_CONFIG_FLAG_PedWasReused = 293, --- CPED_CONFIG_FLAG_DisableShockingEvents = 294, ---- _0xF8DA25A5 = 295, ---- _0x7EF55802 = 296, ---- _0xB31F1187 = 297, ---- _0x84315402 = 298, ---- _0x0FD69867 = 299, ---- _0xC7829B67 = 300, +--- CPED_CONFIG_FLAG_MovedUsingLowLodPhysicsSinceLastActive = 295, +--- CPED_CONFIG_FLAG_NeverReactToPedOnRoof = 296, +--- CPED_CONFIG_FLAG_ForcePlayFleeScenarioExitOnNextScriptCommand = 297, +--- CPED_CONFIG_FLAG_JustBumpedIntoVehicle = 298, +--- CPED_CONFIG_FLAG_DisableShockingDrivingOnPavementEvents = 299, +--- CPED_CONFIG_FLAG_ShouldThrowSmokeNow = 300, --- CPED_CONFIG_FLAG_DisablePedConstraints = 301, ---- _0x6D23CF25 = 302, ---- _0x2ADA871B = 303, ---- _0x47BC8A58 = 304, ---- _0xEB692FA5 = 305, ---- _0x4A133C50 = 306, ---- _0xC58099C3 = 307, ---- _0xF3D76D41 = 308, ---- _0xB0EEE9F2 = 309, +--- CPED_CONFIG_FLAG_ForceInitialPeekInCover = 302, +--- CPED_CONFIG_FLAG_CreatedByDispatch = 303, +--- CPED_CONFIG_FLAG_PointGunLeftHandSupporting = 304, +--- CPED_CONFIG_FLAG_DisableJumpingFromVehiclesAfterLeader = 305, +--- CPED_CONFIG_FLAG_DontActivateRagdollFromPlayerPedImpact = 306, +--- CPED_CONFIG_FLAG_DontActivateRagdollFromAiRagdollImpact = 307, +--- CPED_CONFIG_FLAG_DontActivateRagdollFromPlayerRagdollImpact = 308, +--- CPED_CONFIG_FLAG_DisableQuadrupedSpring = 309, --- CPED_CONFIG_FLAG_IsInCluster = 310, ---- _0x0FA153EF = 311, ---- _0xD73F5CD3 = 312, ---- _0xD4136C22 = 313, ---- _0xE404CA6B = 314, ---- _0xB9597446 = 315, ---- _0xD5C98277 = 316, ---- _0xD5060A9C = 317, ---- _0x3E5F1CBB = 318, ---- _0xD8BE1D54 = 319, ---- _0x0B1F191F = 320, ---- _0xC995167A = 321, +--- CPED_CONFIG_FLAG_ShoutToGroupOnPlayerMelee = 311, +--- CPED_CONFIG_FLAG_IgnoredByAutoOpenDoors = 312, +--- CPED_CONFIG_FLAG_PreferInjuredGetup = 313, +--- CPED_CONFIG_FLAG_ForceIgnoreMeleeActiveCombatant = 314, +--- CPED_CONFIG_FLAG_CheckLoSForSoundEvents = 315, +--- CPED_CONFIG_FLAG_JackedAbandonedCar = 316, +--- CPED_CONFIG_FLAG_CanSayFollowedByPlayerAudio = 317, +--- CPED_CONFIG_FLAG_ActivateRagdollFromMinorPlayerContact = 318, +--- CPED_CONFIG_FLAG_HasPortablePickupAttached = 319, +--- CPED_CONFIG_FLAG_ForcePoseCharacterCloth = 320, +--- CPED_CONFIG_FLAG_HasClothCollisionBounds = 321, --- CPED_CONFIG_FLAG_HasHighHeels = 322, ---- _0x86B01E54 = 323, ---- _0x3A56FE15 = 324, ---- _0xC03B736C = 325, // CPED_CONFIG_FLAG_SpawnedAtScenario ---- _0xBBF47729 = 326, ---- _0x22B668A8 = 327, ---- _0x2624D4D4 = 328, +--- CPED_CONFIG_FLAG_TreatAsAmbientPedForDriverLockOn = 323, +--- CPED_CONFIG_FLAG_DontBehaveLikeLaw = 324, +--- CPED_CONFIG_FLAG_SpawnedAtScenario = 325, +--- CPED_CONFIG_FLAG_DisablePoliceInvestigatingBody = 326, +--- CPED_CONFIG_FLAG_DisableWritheShootFromGround = 327, +--- CPED_CONFIG_FLAG_LowerPriorityOfWarpSeats = 328, --- CPED_CONFIG_FLAG_DisableTalkTo = 329, --- CPED_CONFIG_FLAG_DontBlip = 330, --- CPED_CONFIG_FLAG_IsSwitchingWeapon = 331, ---- _0x630F55F3 = 332, ---- _0x150468FD = 333, ---- _0x914EBD6B = 334, ---- _0x79AF3B6D = 335, ---- _0x75C7A632 = 336, ---- _0x52D530E2 = 337, ---- _0xDB2A90E0 = 338, ---- _0x5922763D = 339, ---- _0x12ADB567 = 340, ---- _0x105C8518 = 341, ---- _0x106F703D = 342, ---- _0xED152C3E = 343, ---- _0xA0EFE6A8 = 344, ---- _0xBF348C82 = 345, ---- _0xCDDFE830 = 346, ---- _0x7B59BD9B = 347, ---- _0x0124C788 = 348, +--- CPED_CONFIG_FLAG_IgnoreLegIkRestrictions = 332, +--- CPED_CONFIG_FLAG_ScriptForceNoTimesliceIntelligenceUpdate = 333, +--- CPED_CONFIG_FLAG_JackedOutOfMyVehicle = 334, +--- CPED_CONFIG_FLAG_WentIntoCombatAfterBeingJacked = 335, +--- CPED_CONFIG_FLAG_DontActivateRagdollForVehicleGrab = 336, +--- CPED_CONFIG_FLAG_ForcePackageCharacterCloth = 337, +--- CPED_CONFIG_FLAG_DontRemoveWithValidOrder = 338, +--- CPED_CONFIG_FLAG_AllowTaskDoNothingTimeslicing = 339, +--- CPED_CONFIG_FLAG_ForcedToStayInCoverDueToPlayerSwitch = 340, +--- CPED_CONFIG_FLAG_ForceProneCharacterCloth = 341, +--- CPED_CONFIG_FLAG_NotAllowedToJackAnyPlayers = 342, +--- CPED_CONFIG_FLAG_InToStrafeTransition = 343, +--- CPED_CONFIG_FLAG_KilledByStandardMelee = 344, +--- CPED_CONFIG_FLAG_AlwaysLeaveTrainUponArrival = 345, +--- CPED_CONFIG_FLAG_ForcePlayDirectedNormalScenarioExitOnNextScriptCommand = 346, +--- CPED_CONFIG_FLAG_OnlyWritheFromWeaponDamage = 347, +--- CPED_CONFIG_FLAG_UseSloMoBloodVfx = 348, --- CPED_CONFIG_FLAG_EquipJetpack = 349, ---- _0x08D361A5 = 350, ---- _0xE13D1F7C = 351, ---- _0x40E25FB9 = 352, ---- _0x930629D9 = 353, ---- _0xECCF0C7F = 354, ---- _0xB6E9613B = 355, ---- _0x490C0478 = 356, ---- _0xE8865BEA = 357, ---- _0xF3C34A29 = 358, +--- CPED_CONFIG_FLAG_PreventDraggedOutOfCarThreatResponse = 350, +--- CPED_CONFIG_FLAG_ScriptHasCompletelyDisabledCollision = 351, +--- CPED_CONFIG_FLAG_NeverDoScenarioNavChecks = 352, +--- CPED_CONFIG_FLAG_ForceSynchronousScenarioExitChecking = 353, +--- CPED_CONFIG_FLAG_ThrowingGrenadeWhileAiming = 354, +--- CPED_CONFIG_FLAG_HeadbobToRadioEnabled = 355, +--- CPED_CONFIG_FLAG_ForceDeepSurfaceCheck = 356, +--- CPED_CONFIG_FLAG_DisableDeepSurfaceAnims = 357, +--- CPED_CONFIG_FLAG_DontBlipNotSynced = 358, --- CPED_CONFIG_FLAG_IsDuckingInVehicle = 359, ---- _0xF660E115 = 360, ---- _0xAB0E6DED = 361, +--- CPED_CONFIG_FLAG_PreventAutoShuffleToTurretSeat = 360, +--- CPED_CONFIG_FLAG_DisableEventInteriorStatusCheck = 361, --- CPED_CONFIG_FLAG_HasReserveParachute = 362, --- CPED_CONFIG_FLAG_UseReserveParachute = 363, ---- _0x5C5D9CD3 = 364, ---- _0x8F7701F3 = 365, ---- _0xBC4436AD = 366, ---- _0xD7E07D37 = 367, ---- _0x03C4FD24 = 368, ---- _0x7675789A = 369, ---- _0xB7288A88 = 370, ---- _0xC06B6291 = 371, ---- _0x95A4A805 = 372, ---- _0xA8E9A042 = 373, +--- CPED_CONFIG_FLAG_TreatDislikeAsHateWhenInCombat = 364, +--- CPED_CONFIG_FLAG_OnlyUpdateTargetWantedIfSeen = 365, +--- CPED_CONFIG_FLAG_AllowAutoShuffleToDriversSeat = 366, +--- CPED_CONFIG_FLAG_DontActivateRagdollFromSmokeGrenade = 367, +--- CPED_CONFIG_FLAG_LinkMBRToOwnerOnChain = 368, +--- CPED_CONFIG_FLAG_AmbientFriendBumpedByPlayer = 369, +--- CPED_CONFIG_FLAG_AmbientFriendBumpedByPlayerVehicle = 370, +--- CPED_CONFIG_FLAG_InFPSUnholsterTransition = 371, +--- CPED_CONFIG_FLAG_PreventReactingToSilencedCloneBullets = 372, +--- CPED_CONFIG_FLAG_DisableInjuredCryForHelpEvents = 373, --- CPED_CONFIG_FLAG_NeverLeaveTrain = 374, ---- _0xBAC674B3 = 375, ---- _0x147F1FFB = 376, ---- _0x4376DD79 = 377, ---- _0xCD3DB518 = 378, ---- _0xFE4BA4B6 = 379, ---- _0x5DF03A55 = 380, ---- _0xBCD816CD = 381, ---- _0xCF02DD69 = 382, ---- _0xF73AFA2E = 383, ---- _0x80B9A9D0 = 384, ---- _0xF601F7EE = 385, ---- _0xA91350FC = 386, ---- _0x3AB23B96 = 387, +--- CPED_CONFIG_FLAG_DontDropJetpackOnDeath = 375, +--- CPED_CONFIG_FLAG_UseFPSUnholsterTransitionDuringCombatRoll = 376, +--- CPED_CONFIG_FLAG_ExitingFPSCombatRoll = 377, +--- CPED_CONFIG_FLAG_ScriptHasControlOfPlayer = 378, +--- CPED_CONFIG_FLAG_PlayFPSIdleFidgetsForProjectile = 379, +--- CPED_CONFIG_FLAG_DisableAutoEquipHelmetsInBikes = 380, +--- CPED_CONFIG_FLAG_DisableAutoEquipHelmetsInAircraft = 381, +--- CPED_CONFIG_FLAG_WasPlayingFPSGetup = 382, +--- CPED_CONFIG_FLAG_WasPlayingFPSMeleeActionResult = 383, +--- CPED_CONFIG_FLAG_PreferNoPriorityRemoval = 384, +--- CPED_CONFIG_FLAG_FPSFidgetsAbortedOnFire = 385, +--- CPED_CONFIG_FLAG_ForceFPSIKWithUpperBodyAnim = 386, +--- CPED_CONFIG_FLAG_SwitchingCharactersInFirstPerson = 387, --- CPED_CONFIG_FLAG_IsClimbingLadder = 388, --- CPED_CONFIG_FLAG_HasBareFeet = 389, ---- _0xB4B1CD4C = 390, ---- _0x5459AFB8 = 391, ---- _0x54F27667 = 392, ---- _0xC11D3E8F = 393, ---- _0x5419EB3E = 394, ---- _0x82D8DBB4 = 395, ---- _0x33B02D2F = 396, ---- _0xAE66176D = 397, ---- _0xA2692593 = 398, ---- _0x714C7E31 = 399, ---- _0xEC488AC7 = 400, ---- _0xAE398504 = 401, ---- _0xABC58D72 = 402, ---- _0x5E5B9591 = 403, ---- _0x6BA1091E = 404, ---- _0x77840177 = 405, ---- _0x1C7ACAC4 = 406, ---- _0x124420E9 = 407, ---- _0x75A65587 = 408, ---- _0xDFD2D55B = 409, ---- _0xBDD39919 = 410, ---- _0x43DEC267 = 411, ---- _0xE42B7797 = 412, +--- CPED_CONFIG_FLAG_UNUSED_REPLACE_ME_2 = 390, +--- CPED_CONFIG_FLAG_GoOnWithoutVehicleIfItIsUnableToGetBackToRoad = 391, +--- CPED_CONFIG_FLAG_BlockDroppingHealthSnacksOnDeath = 392, +--- CPED_CONFIG_FLAG_ResetLastVehicleOnVehicleExit = 393, +--- CPED_CONFIG_FLAG_ForceThreatResponseToNonFriendToFriendMeleeActions = 394, +--- CPED_CONFIG_FLAG_DontRespondToRandomPedsDamage = 395, +--- CPED_CONFIG_FLAG_AllowContinuousThreatResponseWantedLevelUpdates = 396, +--- CPED_CONFIG_FLAG_KeepTargetLossResponseOnCleanup = 397, +--- CPED_CONFIG_FLAG_PlayersDontDragMeOutOfCar = 398, +--- CPED_CONFIG_FLAG_BroadcastRepondedToThreatWhenGoingToPointShooting = 399, +--- CPED_CONFIG_FLAG_IgnorePedTypeForIsFriendlyWith = 400, +--- CPED_CONFIG_FLAG_TreatNonFriendlyAsHateWhenInCombat = 401, +--- CPED_CONFIG_FLAG_DontLeaveVehicleIfLeaderNotInVehicle = 402, +--- CPED_CONFIG_FLAG_ChangeFromPermanentToAmbientPopTypeOnMigration = 403, +--- CPED_CONFIG_FLAG_AllowMeleeReactionIfMeleeProofIsOn = 404, +--- CPED_CONFIG_FLAG_UsingLowriderLeans = 405, +--- CPED_CONFIG_FLAG_UsingAlternateLowriderLeans = 406, +--- CPED_CONFIG_FLAG_UseNormalExplosionDamageWhenBlownUpInVehicle = 407, +--- CPED_CONFIG_FLAG_DisableHomingMissileLockForVehiclePedInside = 408, +--- CPED_CONFIG_FLAG_DisableTakeOffScubaGear = 409, +--- CPED_CONFIG_FLAG_IgnoreMeleeFistWeaponDamageMult = 410, +--- CPED_CONFIG_FLAG_LawPedsCanFleeFromNonWantedPlayer = 411, +--- CPED_CONFIG_FLAG_ForceBlipSecurityPedsIfPlayerIsWanted = 412, --- CPED_CONFIG_FLAG_IsHolsteringWeapon = 413, ---- _0x4F8149F5 = 414, ---- _0xDD9ECA7A = 415, ---- _0x9E7EF9D2 = 416, ---- _0x2C6ED942 = 417, +--- CPED_CONFIG_FLAG_UseGoToPointForScenarioNavigation = 414, +--- CPED_CONFIG_FLAG_DontClearLocalPassengersWantedLevel = 415, +--- CPED_CONFIG_FLAG_BlockAutoSwapOnWeaponPickups = 416, +--- CPED_CONFIG_FLAG_ThisPedIsATargetPriorityForAI = 417, --- CPED_CONFIG_FLAG_IsSwitchingHelmetVisor = 418, ---- _0xA488727D = 419, ---- _0xCFF5F6DE = 420, ---- _0x6D614599 = 421, +--- CPED_CONFIG_FLAG_ForceHelmetVisorSwitch = 419, +--- CPED_CONFIG_FLAG_IsPerformingVehicleMelee = 420, +--- CPED_CONFIG_FLAG_UseOverrideFootstepPtFx = 421, --- CPED_CONFIG_FLAG_DisableVehicleCombat = 422, ---- _0xFE401D26 = 423, ---- CPED_CONFIG_FLAG_FallsLikeAircraft = 424, ---- _0x2B42AE82 = 425, ---- _0x7A95734F = 426, ---- _0xDF4D8617 = 427, ---- _0x578F1F14 = 428, +--- CPED_CONFIG_FLAG_TreatAsFriendlyForTargetingAndDamage = 423, +--- CPED_CONFIG_FLAG_AllowBikeAlternateAnimations = 424, +--- CPED_CONFIG_FLAG_TreatAsFriendlyForTargetingAndDamageNonSynced = 425, +--- CPED_CONFIG_FLAG_UseLockpickVehicleEntryAnimations = 426, +--- CPED_CONFIG_FLAG_IgnoreInteriorCheckForSprinting = 427, +--- CPED_CONFIG_FLAG_SwatHeliSpawnWithinLastSpottedLocation = 428, --- CPED_CONFIG_FLAG_DisableStartEngine = 429, --- CPED_CONFIG_FLAG_IgnoreBeingOnFire = 430, ---- _0x153C9500 = 431, ---- _0xCB7A632E = 432, ---- _0xDE727981 = 433, +--- CPED_CONFIG_FLAG_DisableTurretOrRearSeatPreference = 431, +--- CPED_CONFIG_FLAG_DisableWantedHelicopterSpawning = 432, +--- CPED_CONFIG_FLAG_UseTargetPerceptionForCreatingAimedAtEvents = 433, --- CPED_CONFIG_FLAG_DisableHomingMissileLockon = 434, ---- _0x12BBB935 = 435, ---- _0xAD0A1277 = 436, ---- _0xEA6AA46A = 437, +--- CPED_CONFIG_FLAG_ForceIgnoreMaxMeleeActiveSupportCombatants = 435, +--- CPED_CONFIG_FLAG_StayInDefensiveAreaWhenInVehicle = 436, +--- CPED_CONFIG_FLAG_DontShoutTargetPosition = 437, --- CPED_CONFIG_FLAG_DisableHelmetArmor = 438, ---- _0xCB7F3A1E = 439, ---- _0x50178878 = 440, ---- _0x051B4F0D = 441, ---- _0x2FC3DECC = 442, ---- _0xC0030B0B = 443, ---- _0xBBDAF1E9 = 444, ---- _0x944FE59C = 445, ---- _0x506FBA39 = 446, ---- _0xDD45FE84 = 447, ---- _0xE698AE75 = 448, ---- _0x199633F8 = 449, +--- CPED_CONFIG_FLAG_CreatedByConcealedPlayer = 439, +--- CPED_CONFIG_FLAG_PermanentlyDisablePotentialToBeWalkedIntoResponse = 440, +--- CPED_CONFIG_FLAG_PreventVehExitDueToInvalidWeapon = 441, +--- CPED_CONFIG_FLAG_IgnoreNetSessionFriendlyFireCheckForAllowDamage = 442, +--- CPED_CONFIG_FLAG_DontLeaveCombatIfTargetPlayerIsAttackedByPolice = 443, +--- CPED_CONFIG_FLAG_CheckLockedBeforeWarp = 444, +--- CPED_CONFIG_FLAG_DontShuffleInVehicleToMakeRoom = 445, +--- CPED_CONFIG_FLAG_GiveWeaponOnGetup = 446, +--- CPED_CONFIG_FLAG_DontHitVehicleWithProjectiles = 447, +--- CPED_CONFIG_FLAG_DisableForcedEntryForOpenVehiclesFromTryLockedDoor = 448, +--- CPED_CONFIG_FLAG_FiresDummyRockets = 449, --- CPED_CONFIG_FLAG_PedIsArresting = 450, --- CPED_CONFIG_FLAG_IsDecoyPed = 451, ---- _0x3A251D83 = 452, ---- _0xA56F6986 = 453, ---- _0x1D19C622 = 454, ---- _0xB68D3EAB = 455, +--- CPED_CONFIG_FLAG_HasEstablishedDecoy = 452, +--- CPED_CONFIG_FLAG_BlockDispatchedHelicoptersFromLanding = 453, +--- CPED_CONFIG_FLAG_DontCryForHelpOnStun = 454, +--- CPED_CONFIG_FLAG_HitByTranqWeapon = 455, --- CPED_CONFIG_FLAG_CanBeIncapacitated = 456, ---- _0x4BD5EBAD = 457, +--- CPED_CONFIG_FLAG_ForcedAimFromArrest = 457, +--- CPED_CONFIG_FLAG_DontChangeTargetFromMelee = 458, +--- _0x4376ABF2 = 459, +--- CPED_CONFIG_FLAG_RagdollFloatsIndefinitely = 460, +--- CPED_CONFIG_FLAG_BlockElectricWeaponDamage = 461, +--- _0x262A3B8E = 462, +--- _0x1AA79A25 = 463, ---} ---``` ---@param ped integer @@ -5861,10 +5995,7 @@ function SetPedLodMultiplier(ped, multiplier) end ---**`PED` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xF5F6378C4F3419D3) ----``` ----sets the maximum health of a ped ----I think it's never been used in any script ----``` +---This native does not have an official description. ---@param ped integer ---@param value integer function SetPedMaxHealth(ped, value) end @@ -5892,12 +6023,14 @@ function SetPedMaxTimeUnderwater(ped, value) end ---**`PED` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xFA0675AB151073FA) ----``` ----Ped will stay on the ground after being stunned for at lest ms time. (in milliseconds) ----``` +---Overwrites the minimum time the ped will stay on the ground for after being stunned. Setting this while the ped is stunned will not alter the duration of the current stun but will still effect future stuns. +--- +---Passing -1 into the second parameter `minTimeInMs` will reset the modifier, making it use the weapons original `DamageTime` as the stun duration (see `update/update.rpf/common/data/ai/weapons.meta`) +--- +---**NOTE**: Unlike what the native name implies, this works on any weapon that has its `DamageType` in the `weapons.meta` set to `ELECTRIC`. ---@param ped integer ----@param ms integer -function SetPedMinGroundTimeForStungun(ped, ms) end +---@param minTimeInMs integer +function SetPedMinGroundTimeForStungun(ped, minTimeInMs) end ---**`PED` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x01A898D26E2333DD) @@ -6161,7 +6294,6 @@ function SetPedPrimaryLookat(ped, lookAt) end ---List of Prop IDs --- ---```cpp ----// Props ---enum eAnchorPoints ---{ --- ANCHOR_HEAD = 0, // "p_head" @@ -6763,6 +6895,14 @@ function SpawnpointsStartSearch(p0, p1, p2, p3, p4, interiorFlags, scale, durati ---@param duration integer function SpawnpointsStartSearchInAngledArea(x, y, z, p3, p4, p5, p6, interiorFlags, scale, duration) end +---**`PED` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0xF9ACF4A08098EA25) +---Kicks the ped from the current vehicle and keeps the rendering-focus on this ped (also disables its collision). If doing this for your player ped, you'll still be able to drive the vehicle.\ +---Only to be used in very specific situations where the ped needs to be inside the car still but not attached. +---@param ped integer +---@param noCollisionUntilClear boolean +function SpecialFunctionDoNotUse(ped, noCollisionUntilClear) end + ---**`PED` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xB47BD05FA66B40CF) ---This native does not have an official description. diff --git a/library/natives/GTAV/PHYSICS.lua b/library/natives/GTAV/PHYSICS.lua index 2e82e3e..de1d8b3 100644 --- a/library/natives/GTAV/PHYSICS.lua +++ b/library/natives/GTAV/PHYSICS.lua @@ -9,10 +9,25 @@ function ActivatePhysics(entity) end ---**`PHYSICS` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xE832D760399EB220) ---``` ----Creates a rope at the specific position, that extends in the specified direction when not attached to any entities. --- ----__ --- ----Rope does NOT interact with anything you attach it to, in some cases it make interact with the world AFTER it breaks (seems to occur if you set the type to -1). --- ----Rope will sometimes contract and fall to the ground like you'd expect it to, but since it doesn't interact with the world the effect is just jaring. +---Creates a rope at the specific position, that extends in the specified direction when not attached to any entities. --- +---__ --- +---Rope does NOT interact with anything you attach it to, in some cases it make interact with the world AFTER it breaks (seems to occur if you set the type to -1). --- +---Rope will sometimes contract and fall to the ground like you'd expect it to, but since it doesn't interact with the world the effect is just jaring. +---``` +--- +---There are 8 different rope types in the base game. Full rope data can be found in `ropedata.xml`. +--- +---```cpp +---enum ePhysicsRopeType { --- +--- RopeThin = 0, // Verticies: 1, Radius: 0.03, Textures: rope & rope_n --- +--- RopeWire6 = 1, // Verticies: 4, Radius: 0.015, Textures: steel_cable & steel_cable_n --- +--- RopeWire32 = 2, // Verticies: 32, Radius: 0.025, Textures: steel_cable & steel_cable_n --- +--- RopeMesh = 3, // Verticies: 6, Radius: 0.03, Textures: rope & rope_n --- +--- RopeThinWire32 = 4, // Verticies: 32, Radius: 0.01, Textures: rope & rope_n --- +--- RopeReins = 5, // Verticies: 32, Radius: 0.005, Textures: rope & rope_n --- +--- RopeThin4 = 6, // Verticies: 4, Radius: 0.03, Textures: rope & rope_n --- +--- RopeWire64 = 7 // Verticies: 64, Radius: 0.025, Textures: steel_cable & steel_cable_n --- +---} ---``` ---@param x number ---@param y number @@ -103,7 +118,11 @@ function DeleteChildRope(ropeId) end ---**`PHYSICS` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x52B4829281364649) ----This native does not have an official description. +---Deletes the rope with the specified handle. +--- +---You should check if the rope exists before trying to delete it, see [DOES_ROPE_EXIST](#\_0xFD5448BE3111ED96). +--- +---For an example on how to use this native please refer to [ADD_ROPE](#\_0xE832D760399EB220) ---@param ropeId integer function DeleteRope(ropeId) end @@ -123,7 +142,7 @@ function DoesRopeBelongToThisScript(ropeId) end ---**`PHYSICS` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xFD5448BE3111ED96) ----This native does not have an official description. +---For an example on how to use this native please refer to [ADD_ROPE](#\_0xE832D760399EB220) ---@param ropeId integer ---@return boolean function DoesRopeExist(ropeId) end diff --git a/library/natives/GTAV/PLAYER.lua b/library/natives/GTAV/PLAYER.lua index 846c518..902db3a 100644 --- a/library/natives/GTAV/PLAYER.lua +++ b/library/natives/GTAV/PLAYER.lua @@ -195,6 +195,13 @@ function GetCauseOfMostRecentForceCleanup() end ---@return boolean, integer function GetEntityPlayerIsFreeAimingAt(player) end +---**`PLAYER` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0x5FC472C501CCADB3) +---This native does not have an official description. +---@param playerId integer +---@return boolean +function GetIsPlayerDrivingOnHighway(playerId) end + ---**`PLAYER` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x462E0DB9B137DC5F) ---``` @@ -705,22 +712,18 @@ function IsPlayerDead(player) end ---**`PLAYER` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xF10B44FD479D69F3) ----Violation types: ---- ----``` +---```cpp ---enum eViolationType { +--- // Checks if the player is driving on pedestrians walk ways --- VT_PAVED_PEDESTRIAN_AREAS = 0, ---- VT_RUNNING_REDS, ---- VT_AGAINST_TRAFFIC +--- // Checks if the player is running through red lights +--- // This takes some time to return true. +--- VT_RUNNING_REDS = 1, +--- // checks if the player is driving on the wrong side of the road +--- VT_AGAINST_TRAFFIC = 2 ---}; ---``` --- ----Checks if a player is performing a certain type of traffic violation. ---- ----* Type 0: Checks if the player is driving outside designated road areas pedestrians would walk on (specifically paved sidewalks). ----* Type 1: Checks if the player is running through reds, takes some time to return true. ----* Type 2: Checks if the player is driving on the wrong side of the road (against traffic). ---- ---Used solely in "Al Di Napoli" with type 2 for a voiceline. ---@param player integer ---@param type integer @@ -970,15 +973,6 @@ function N_0x5501b7a5cdb79d37(player) end ---@param toggle boolean function N_0x55fcc0c390620314(player1, player2, toggle) end ----**`PLAYER` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0x5FC472C501CCADB3) ----``` ----Appears once in "re_dealgonewrong" ----``` ----@param player integer ----@return boolean -function N_0x5fc472c501ccadb3(player) end - ---**`PLAYER` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x690A61A6D13583F6) ---``` @@ -1466,12 +1460,6 @@ function SetPlayerCanBeHassledByGangs(player, toggle) end ---Sets whether the player is able to do drive-bys in vehicle (shooting & aiming in vehicles), this also includes middle finger taunts. --- ---This is a toggle, it does not have to be ran every frame. ---- ----Example: ---- ----```lua ----SetPlayerCanDoDriveBy(PlayerId(), false) ----``` ---@param player integer ---@param toggle boolean function SetPlayerCanDoDriveBy(player, toggle) end @@ -1581,7 +1569,7 @@ function SetPlayerHealthRechargeLimit(player, limit) end ---**`PLAYER` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x5DB660B38DD98A31) ----This native does not have an official description. +---This multiplier is reset to `1.0` every time the player ped is changed, often times via [`SET_PLAYER_MODEL`](#\_0x00A1CADD00108836) or [`CHANGE_PLAYER_PED`](#\_0x048189FAC643DEEE). ---@param player integer ---@param regenRate number function SetPlayerHealthRechargeMultiplier(player, regenRate) end diff --git a/library/natives/GTAV/SHAPETEST.lua b/library/natives/GTAV/SHAPETEST.lua index 17cf8c0..2459d2b 100644 --- a/library/natives/GTAV/SHAPETEST.lua +++ b/library/natives/GTAV/SHAPETEST.lua @@ -121,18 +121,19 @@ Cast_3dRayPointToPoint = StartShapeTestCapsule ---Asynchronously starts a line-of-sight (raycast) world probe shape test. --- ---```cpp ----enum TraceFlags +---enum eTraceFlags ---{ --- None = 0, --- IntersectWorld = 1, --- IntersectVehicles = 2, ---- IntersectPedsSimpleCollision = 4, ---- IntersectPeds = 8, +--- IntersectPeds = 4, +--- IntersectRagdolls = 8, --- IntersectObjects = 16, --- IntersectWater = 32, ---- Unknown = 128, +--- IntersectGlass = 64, +--- IntersectRiver = 128, --- IntersectFoliage = 256, ---- IntersectEverything = 4294967295 +--- IntersectEverything = -1 ---} ---``` --- @@ -145,11 +146,11 @@ Cast_3dRayPointToPoint = StartShapeTestCapsule ---@param x2 number ---@param y2 number ---@param z2 number ----@param flags integer +---@param traceFlags integer ---@param entity integer ----@param p8 integer +---@param options integer ---@return integer -function StartShapeTestLosProbe(x1, y1, z1, x2, y2, z2, flags, entity, p8) end +function StartShapeTestLosProbe(x1, y1, z1, x2, y2, z2, traceFlags, entity, options) end ---**`SHAPETEST` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xFF6BE494C7987F34) diff --git a/library/natives/GTAV/STATS.lua b/library/natives/GTAV/STATS.lua index 9081063..eed9382 100644 --- a/library/natives/GTAV/STATS.lua +++ b/library/natives/GTAV/STATS.lua @@ -2072,6 +2072,30 @@ function PlaystatsSpentPiCustomLoadout(amount) end ---``` function PlaystatsStartOfflineMode() end +---**`STATS` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0x928DBFB892638EF3) +---Allows stunts to be triggered and sent as a `CEventNetworkStuntPerformed` event. +--- +---Event types are shown below: +--- +---```cpp +---enum eTrackedStuntType +---{ +--- ST_FRONTFLIP = 0, +--- ST_BACKFLIP = 1, +--- ST_SPIN = 2, +--- ST_WHEELIE = 3, +--- ST_STOPPIE = 4, +--- ST_BOWLING_PIN = 5, +--- ST_FOOTBALL = 6, +--- ST_ROLL = 7 +---}; +---``` +function PlaystatsStartTrackingStunts() end + +---@deprecated +PlaystatsStuntPerformedEventAllowTrigger = PlaystatsStartTrackingStunts + ---**`STATS` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x35E39E5570358630) ---``` @@ -2080,19 +2104,13 @@ function PlaystatsStartOfflineMode() end ---@return any function PlaystatsStoneHatchetEnd() end ----**`STATS` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0x928DBFB892638EF3) ----``` ----Allows CEventNetworkStuntPerformed to be triggered. ----``` -function PlaystatsStuntPerformedEventAllowTrigger() end - ---**`STATS` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x8A800DACCC0DA55D) ----``` ----Disallows CEventNetworkStuntPerformed to be triggered. ----``` -function PlaystatsStuntPerformedEventDisallowTrigger() end +---Disallows CEventNetworkStuntPerformed to be triggered (Resets [`PLAYSTATS_START_TRACKING_STUNTS`](#\_0x928DBFB892638EF3)). +function PlaystatsStopTrackingStunts() end + +---@deprecated +PlaystatsStuntPerformedEventDisallowTrigger = PlaystatsStopTrackingStunts ---**`STATS` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xE95C8A1875A02CA4) diff --git a/library/natives/GTAV/STREAMING.lua b/library/natives/GTAV/STREAMING.lua index 2db2d55..dc75c03 100644 --- a/library/natives/GTAV/STREAMING.lua +++ b/library/natives/GTAV/STREAMING.lua @@ -836,25 +836,35 @@ function ShutdownCreatorBudget() end ---**`STREAMING` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xFAA23F2CBA159D67) ----``` ----// this enum comes directly from R* so don't edit this +---```cpp ---enum ePlayerSwitchType ---{ ---- SWITCH_TYPE_AUTO, ---- SWITCH_TYPE_LONG, ---- SWITCH_TYPE_MEDIUM, ---- SWITCH_TYPE_SHORT +--- SWITCH_TYPE_AUTO = 0, +--- SWITCH_TYPE_LONG = 1, +--- SWITCH_TYPE_MEDIUM = 2, +--- SWITCH_TYPE_SHORT = 3 ---}; ----Use GET_IDEAL_PLAYER_SWITCH_TYPE for the best switch type. Or just auto, because it calls the same function in executable. -------------------------------------------------------- ----Examples from the decompiled scripts: ----STREAMING::START_PLAYER_SWITCH(l_832._f3, PLAYER::PLAYER_PED_ID(), 0, 3); ----STREAMING::START_PLAYER_SWITCH(l_832._f3, PLAYER::PLAYER_PED_ID(), 2050, 3); ----STREAMING::START_PLAYER_SWITCH(PLAYER::PLAYER_PED_ID(), l_832._f3, 1024, 3); ----STREAMING::START_PLAYER_SWITCH(g_141F27, PLAYER::PLAYER_PED_ID(), 513, v_14); ----Note: DO NOT, use SWITCH_TYPE_LONG with flag 513. It leaves you stuck in the clouds. You'll have to call STOP_PLAYER_SWITCH() to return to your ped. ----Flag 8 w/ SWITCH_TYPE_LONG will zoom out 3 steps, then zoom in 2/3 steps and stop on the 3rd and just hang there. ----Flag 8 w/ SWITCH_TYPE_MEDIUM will zoom out 1 step, and just hang there. +---``` +--- +---```cpp +---enum eSwitchFlags { +--- SKIP_INTRO = 1, +--- SKIP_OUTRO = 2, +--- PAUSE_BEFORE_PAN = 4, +--- PAUSE_BEFORE_OUTRO = 8, +--- SKIP_PAN = 16, +--- UNKNOWN_DEST = 32, +--- DESCENT_ONLY = 64, +--- START_FROM_CAMPOS = 128, +--- PAUSE_BEFORE_ASCENT = 256, +--- PAUSE_BEFORE_DESCENT = 512, +--- ALLOW_SNIPER_AIM_INTRO = 1024, +--- ALLOW_SNIPER_AIM_OUTRO = 2048, +--- SKIP_TOP_DESCENT = 4096, +--- SUPPRESS_OUTRO_FX = 8192, +--- SUPPRESS_INTRO_FX = 16384, +--- DELAY_ASCENT_FX = 32768 +---} ---``` ---@param from integer ---@param to integer diff --git a/library/natives/GTAV/TASK.lua b/library/natives/GTAV/TASK.lua index bd01ae7..512e929 100644 --- a/library/natives/GTAV/TASK.lua +++ b/library/natives/GTAV/TASK.lua @@ -130,7 +130,11 @@ function ClearPedTasksImmediately(ped) end ---**`TASK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x3841422E9C488D8C) ----This native does not have an official description. +---For an example on how to use this please refer to [OPEN_SEQUENCE_TASK](#\_0xE8854A4326B9E12B) +--- +---#### NOTE +--- +---If you fail to call [`CLOSE_SEQUENCE_TASK`](#\_0x39E72BC99E6360CB) and `CLEAR_SEQUENCE_TASK` the sequence system can get stuck in a broken state until you restart your client. ---@param taskSequenceId integer function ClearSequenceTask(taskSequenceId) end @@ -151,7 +155,11 @@ function ClosePatrolRoute() end ---**`TASK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x39E72BC99E6360CB) ----This native does not have an official description. +---For an example on how to use this please refer to [OPEN_SEQUENCE_TASK](#\_0xE8854A4326B9E12B) +--- +---#### NOTE +--- +---If you fail to call `CLOSE_SEQUENCE_TASK` and [`CLEAR_SEQUENCE_TASK`](#\_0x3841422E9C488D8C) this can get stuck in a broken state until you restart your client. ---@param taskSequenceId integer function CloseSequenceTask(taskSequenceId) end @@ -485,7 +493,7 @@ function IsMoveBlendRatioWalking(ped) end ---**`TASK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xAA135F9482C82CC3) ----When passing a ped parameter, the function returns true if the ped is currently in any scenario. +---This is a stricter version of [`IS_PED_USING_ANY_SCENARIO`](#\_0x57AB4A3080F85143). It only returns true if the ped is playing the ambient animations associated with the scenario. ---@param ped integer ---@return boolean function IsPedActiveInScenario(ped) end @@ -833,7 +841,11 @@ function OpenPatrolRoute(patrolRoute) end ---**`TASK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xE8854A4326B9E12B) ----This native does not have an official description. +---### NOTE +--- +---If this returns 0 that means it failed to get a sequence id. +--- +---If you fail to call [`CLOSE_SEQUENCE_TASK`](#\_0x39E72BC99E6360CB) and [`CLEAR_SEQUENCE_TASK`](#\_0x3841422E9C488D8C) the sequence system can get stuck in a broken state until you restart your client. ---@return integer function OpenSequenceTask() end @@ -974,13 +986,54 @@ function SetDriveTaskCruiseSpeed(driver, cruiseSpeed) end ---**`TASK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xDACE1BE37D88AF67) ----``` ----This native is used to set the driving style for specific ped. ----Driving styles id seems to be: ----786468 ----262144 ----786469 ----http://gtaforums.com/topic/822314-guide-driving-styles/ +---Sets the driving style for a ped currently performing a driving task. +--- +---Each flag in the `eVehicleDrivingFlags` enum can be combined to create a driving style, with each enabling or disabling a specific driving behavior. The driving style can be set to one of the predefined driving styles, or a custom driving style can be created by combining the flags. This can be done by using the bitwise OR operator (`|`) to combine the flags or by adding the decimal values of the flags together. +--- +---```cpp +---enum eVehicleDrivingFlags +---{ +--- None = 0, +--- StopForVehicles = 1, +--- StopForPeds = 2, +--- SwerveAroundAllVehicles = 4, +--- SteerAroundStationaryVehicles = 8, +--- SteerAroundPeds = 16, +--- SteerAroundObjects = 32, +--- DontSteerAroundPlayerPed = 64, +--- StopAtTrafficLights = 128, +--- GoOffRoadWhenAvoiding = 256, +--- AllowGoingWrongWay = 512, +--- Reverse = 1024, +--- UseWanderFallbackInsteadOfStraightLine = 2048, +--- AvoidRestrictedAreas = 4096, +--- PreventBackgroundPathfinding = 8192, +--- AdjustCruiseSpeedBasedOnRoadSpeed = 16384, +--- UseShortCutLinks = 262144, +--- ChangeLanesAroundObstructions = 524288, +--- UseSwitchedOffNodes = 2097152, +--- PreferNavmeshRoute = 4194304, +--- PlaneTaxiMode = 8388608, +--- ForceStraightLine = 16777216, +--- UseStringPullingAtJunctions = 33554432, +--- TryToAvoidHighways = 536870912, +--- ForceJoinInRoadDirection = 1073741824, +--- StopAtDestination = 2147483648, +--- // StopForVehicles | StopForPeds | SteerAroundObjects | SteerAroundStationaryVehicles | StopAtTrafficLights | UseShortCutLinks | ChangeLanesAroundObstructions +--- DrivingModeStopForVehicles = 786603, +--- // StopForVehicles | StopForPeds | StopAtTrafficLights | UseShortCutLinks +--- DrivingModeStopForVehiclesStrict = 262275, +--- // SwerveAroundAllVehicles | SteerAroundObjects | UseShortCutLinks | ChangeLanesAroundObstructions | StopForVehicles +--- DrivingModeAvoidVehicles = 786469, +--- // SwerveAroundAllVehicles | SteerAroundObjects | UseShortCutLinks | ChangeLanesAroundObstructions +--- DrivingModeAvoidVehiclesReckless = 786468, +--- // StopForVehicles | SteerAroundStationaryVehicles | StopForPeds | SteerAroundObjects | UseShortCutLinks | ChangeLanesAroundObstructions +--- DrivingModeStopForVehiclesIgnoreLights = 786475, +--- // SwerveAroundAllVehicles | StopAtTrafficLights | SteerAroundObjects | UseShortCutLinks | ChangeLanesAroundObstructions | StopForVehicles +--- DrivingModeAvoidVehiclesObeyLights = 786597, +--- // SwerveAroundAllVehicles | StopAtTrafficLights | StopForPeds | SteerAroundObjects | UseShortCutLinks | ChangeLanesAroundObstructions | StopForVehicles +--- DrivingModeAvoidVehiclesStopForPedsObeyLights = 786599, +---} ---``` ---@param ped integer ---@param drivingStyle integer @@ -1069,9 +1122,9 @@ function SetParachuteTaskThrust(ped, thrust) end --- ---**Note:** This native must be called every frame. ---@param ped integer ----@param bDisableIdleAnims boolean ----@param bStopCurrentAnim boolean -function SetPedCanPlayAmbientIdles(ped, bDisableIdleAnims, bStopCurrentAnim) end +---@param bBlockIdleClips boolean +---@param bRemoveIdleClipIfPlaying boolean +function SetPedCanPlayAmbientIdles(ped, bBlockIdleClips, bRemoveIdleClipIfPlaying) end ---**`TASK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x1E982AC8716912C5) @@ -1305,9 +1358,9 @@ function TaskAgitatedAction(ped, ped2) end ---@param y number ---@param z number ---@param time integer ----@param p5 boolean ----@param p6 boolean -function TaskAimGunAtCoord(ped, x, y, z, time, p5, p6) end +---@param bInstantBlendToAim boolean +---@param bPlayAimIntro boolean +function TaskAimGunAtCoord(ped, x, y, z, time, bInstantBlendToAim, bPlayAimIntro) end ---**`TASK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x9B53BB6E8943AF53) @@ -1317,30 +1370,30 @@ function TaskAimGunAtCoord(ped, x, y, z, time, p5, p6) end ---@param ped integer ---@param entity integer ---@param duration integer ----@param p3 boolean -function TaskAimGunAtEntity(ped, entity, duration, p3) end +---@param bInstantBlendToAim boolean +function TaskAimGunAtEntity(ped, entity, duration, bInstantBlendToAim) end ---**`TASK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x7A192BE16D373D00) ---This native does not have an official description. ---@param ped integer ---@param scriptTask integer | string ----@param p2 boolean ----@param p3 boolean -function TaskAimGunScripted(ped, scriptTask, p2, p3) end +---@param bDisableBlockingClip boolean +---@param bInstantBlendToAim boolean +function TaskAimGunScripted(ped, scriptTask, bDisableBlockingClip, bInstantBlendToAim) end ---**`TASK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x8605AF0DE8B3A5AC) ---This native does not have an official description. ----@param p0 any ----@param p1 any ----@param p2 number ----@param p3 number ----@param p4 number ----@param p5 any ----@param p6 boolean ----@param p7 boolean -function TaskAimGunScriptedWithTarget(p0, p1, p2, p3, p4, p5, p6, p7) end +---@param ped integer +---@param targetPed integer +---@param x number +---@param y number +---@param z number +---@param iGunTaskType integer | string +---@param bDisableBlockingClip boolean +---@param bForceAim boolean +function TaskAimGunScriptedWithTarget(ped, targetPed, x, y, z, iGunTaskType, bDisableBlockingClip, bForceAim) end ---**`TASK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xF3B9A78A178572B1) @@ -1360,27 +1413,46 @@ function TaskArrestPed(ped, target) end ---**`TASK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x15C86013127CE63F) +---All parameters except ped and boat are optional, with `pedTarget`, `vehicleTarget`, `x`, `y`, `z` being dependent on `missionType` (ie. Attack/Flee mission types require a target ped/vehicle, whereas GoTo mission types require either `x`, `y`, `z` or a target ped/vehicle). +--- +---If you don't want to use a parameter; pass `0.0f` for `x`, `y` and `z`, `0` for `pedTarget`, `vehicleTarget` and other int parameters, and `-1.0f` for the remaining float parameters. +--- +---```cpp +---enum eBoatMissionFlags +---{ +--- None = 0, +--- StopAtEnd = 1, +--- StopAtShore = 2, +--- AvoidShore = 4, +--- PreferForward = 8, +--- NeverStop = 16, +--- NeverNavMesh = 32, +--- NeverRoute = 64, +--- ForceBeached = 128, +--- UseWanderRoute = 256, +--- UseFleeRoute = 512, +--- NeverPause = 1024, +--- // StopAtEnd | StopAtShore | AvoidShore +--- DefaultSettings = 7, +--- // StopAtEnd | StopAtShore | AvoidShore | PreferForward | NeverNavMesh | NeverRoute +--- OpenOceanSettings = 111, +--- // StopAtEnd | StopAtShore | AvoidShore | PreferForward | NeverNavMesh | NeverPause +--- BoatTaxiSettings = 1071, +---} ---``` ----You need to call PED::SET_BLOCKING_OF_NON_TEMPORARY_EVENTS after TASK_BOAT_MISSION in order for the task to execute. ----Working example ----float vehicleMaxSpeed = VEHICLE::_GET_VEHICLE_MAX_SPEED(ENTITY::GET_ENTITY_MODEL(pedVehicle)); ----TASK::TASK_BOAT_MISSION(pedDriver, pedVehicle, 0, 0, waypointCoord.x, waypointCoord.y, waypointCoord.z, 4, vehicleMaxSpeed, 786469, -1.0, 7); ----PED::SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(pedDriver, 1); ----P8 appears to be driving style flag - see gtaforums.com/topic/822314-guide-driving-styles/ for documentation ----``` ----@param pedDriver integer +---@param ped integer ---@param boat integer ----@param p2 any ----@param p3 any +---@param vehicleTarget integer +---@param pedTarget integer ---@param x number ---@param y number ---@param z number ----@param p7 any ----@param maxSpeed number +---@param missionType integer +---@param speed number ---@param drivingStyle integer ----@param p10 number ----@param p11 any -function TaskBoatMission(pedDriver, boat, p2, p3, x, y, z, p7, maxSpeed, drivingStyle, p10, p11) end +---@param radius number +---@param missionFlags integer +function TaskBoatMission(ped, boat, vehicleTarget, pedTarget, x, y, z, missionType, speed, drivingStyle, radius, missionFlags) end ---**`TASK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x8C338E0263E4FD19) @@ -1579,22 +1651,49 @@ function TaskFlushRoute() end --- ---```cpp ---enum eNavScriptFlags { ---- ENAV_DEFAULT = 0, // Default flag ---- ENAV_NO_STOPPING = 1, // Will ensure the ped continues to move whilst waiting for the path to be found, and will not slow down at the end of their route. ---- ENAV_ADV_SLIDE_TO_COORD_AND_ACHIEVE_HEADING_AT_END = 2, // Performs a slide-to-coord at the end of the task. This requires that the accompanying NAVDATA structure has the 'SlideToCoordHeading' member set correctly. ---- ENAV_GO_FAR_AS_POSSIBLE_IF_TARGET_NAVMESH_NOT_LOADED = 4, // If the navmesh is not loaded in under the target position, then this will cause the ped to get as close as is possible on whatever navmesh is loaded. The navmesh must still be loaded at the path start. ---- ENAV_ALLOW_SWIMMING_UNDERWATER = 8, // Will allow navigation underwater - by default this is not allowed. ---- ENAV_KEEP_TO_PAVEMENTS = 16, // Will only allow navigation on pavements. If the path starts or ends off the pavement, the command will fail. Likewise if no pavement-only route can be found even although the start and end are on pavement. ---- ENAV_NEVER_ENTER_WATER = 32, // Prevents the path from entering water at all. ---- ENAV_DONT_AVOID_OBJECTS = 64, // Disables object-avoidance for this path. The ped may still make minor steering adjustments to avoid objects, but will not pathfind around them. ---- ENAV_ADVANCED_USE_MAX_SLOPE_NAVIGABLE = 128, // Specifies that the navmesh route will only be able to traverse up slopes which are under the angle specified, in the MaxSlopeNavigable member of the accompanying NAVDATA structure. ---- ENAV_STOP_EXACTLY = 512, // Unused. ---- ENAV_ACCURATE_WALKRUN_START = 1024, // The entity will look ahead in its path for a longer distance to make the walk/run start go more in the right direction. ---- ENAV_DONT_AVOID_PEDS = 2048, // Disables ped-avoidance for this path while we move. ---- ENAV_DONT_ADJUST_TARGET_POSITION = 4096, // If target pos is inside the boundingbox of an object it will otherwise be pushed out. ---- ENAV_SUPPRESS_EXACT_STOP = 8192, // Turns off the default behaviour, which is to stop exactly at the target position. Occasionally this can cause footsliding/skating problems. ---- ENAV_ADVANCED_USE_CLAMP_MAX_SEARCH_DISTANCE = 16384, // Prevents the path-search from finding paths outside of this search distance. This can be used to prevent peds from finding long undesired routes. ---- ENAV_PULL_FROM_EDGE_EXTRA = 32768 // Pulls out the paths from edges at corners for a longer distance, to prevent peds walking into stuff. +--- // Default flag +--- ENAV_DEFAULT = 0, +--- // Will ensure the ped continues to move whilst waiting for the path +--- // to be found, and will not slow down at the end of their route. +--- ENAV_NO_STOPPING = 1, +--- // Performs a slide-to-coord at the end of the task. This requires that the +--- // accompanying NAVDATA structure has the 'SlideToCoordHeading' member set correctly. +--- ENAV_ADV_SLIDE_TO_COORD_AND_ACHIEVE_HEADING_AT_END = 2, +--- // If the navmesh is not loaded in under the target position, then this will +--- // cause the ped to get as close as is possible on whatever navmesh is loaded. +--- // The navmesh must still be loaded at the path start. +--- ENAV_GO_FAR_AS_POSSIBLE_IF_TARGET_NAVMESH_NOT_LOADED = 4, +--- // Will allow navigation underwater - by default this is not allowed. +--- ENAV_ALLOW_SWIMMING_UNDERWATER = 8, +--- // Will only allow navigation on pavements. If the path starts or ends off +--- // the pavement, the command will fail. Likewise if no pavement-only route +--- // can be found even although the start and end are on pavement. +--- ENAV_KEEP_TO_PAVEMENTS = 16, +--- // Prevents the path from entering water at all. +--- ENAV_NEVER_ENTER_WATER = 32, +--- // Disables object-avoidance for this path. The ped may still make minor +--- // steering adjustments to avoid objects, but will not pathfind around them. +--- ENAV_DONT_AVOID_OBJECTS = 64, +--- // Specifies that the navmesh route will only be able to traverse up slopes +--- // which are under the angle specified, in the MaxSlopeNavigable member of the accompanying NAVDATA structure. +--- ENAV_ADVANCED_USE_MAX_SLOPE_NAVIGABLE = 128, +--- // Unused. +--- ENAV_STOP_EXACTLY = 512, +--- // The entity will look ahead in its path for a longer distance to make the +--- // walk/run start go more in the right direction. +--- ENAV_ACCURATE_WALKRUN_START = 1024, +--- // Disables ped-avoidance for this path while we move. +--- ENAV_DONT_AVOID_PEDS = 2048, +--- // If target pos is inside the boundingbox of an object it will otherwise be pushed out. +--- ENAV_DONT_ADJUST_TARGET_POSITION = 4096, +--- // Turns off the default behaviour, which is to stop exactly at the target position. +--- // Occasionally this can cause footsliding/skating problems. +--- ENAV_SUPPRESS_EXACT_STOP = 8192, +--- // Prevents the path-search from finding paths outside of this search distance. +--- // This can be used to prevent peds from finding long undesired routes. +--- ENAV_ADVANCED_USE_CLAMP_MAX_SEARCH_DISTANCE = 16384, +--- // Pulls out the paths from edges at corners for a longer distance, to prevent peds walking into stuff. +--- ENAV_PULL_FROM_EDGE_EXTRA = 32768 ---}; ---``` ---@param ped integer @@ -1627,22 +1726,22 @@ function TaskFollowNavMeshToCoordAdvanced(ped, x, y, z, speed, timeout, unkFloat ---**`TASK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x595583281858626E) +---Makes the ped go on a point route. +--- +---```cpp +---enum eFollowPointRouteMode { +--- TICKET_SINGLE = 0, +--- TICKET_RETURN = 1, +--- TICKET_SEASON = 2, +--- TICKET_LOOP = 3 +---} ---``` ----MulleKD19: Makes the ped go on the created point route. ----ped: The ped to give the task to. ----speed: The speed to move at in m/s. ----int: Unknown. Can be 0, 1, 2 or 3. ----Example: ----TASK_FLUSH_ROUTE(); ----TASK_EXTEND_ROUTE(0f, 0f, 70f); ----TASK_EXTEND_ROUTE(10f, 0f, 70f); ----TASK_EXTEND_ROUTE(10f, 10f, 70f); ----TASK_FOLLOW_POINT_ROUTE(GET_PLAYER_PED(), 1f, 0); ----``` +--- +---This native is often times used with [`TASK_FLUSH_ROUTE`](#\_0x841142A1376E9006) and [`TASK_EXTEND_ROUTE`](#\_0x1E7889778264843A) ---@param ped integer ---@param speed number ----@param unknown integer -function TaskFollowPointRoute(ped, speed, unknown) end +---@param routeMode integer +function TaskFollowPointRoute(ped, speed, routeMode) end ---**`TASK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x304AE42E357B8C7E) @@ -1765,7 +1864,7 @@ function TaskGoToCoordAndAimAtHatedEntitiesNearCoord(pedHandle, goToLocationX, g --- DF_StopForCars = 1, --- DF_StopForPeds = 2, --- DF_SwerveAroundAllCars = 4, ---- DF_SteerAroundStationaryCars = 8, +--- DF_SteerAroundStationaryCars = 8, --- DF_SteerAroundPeds = 16, --- DF_SteerAroundObjects = 32, --- DF_DontSteerAroundPlayerPed = 64, @@ -1785,8 +1884,10 @@ function TaskGoToCoordAndAimAtHatedEntitiesNearCoord(pedHandle, goToLocationX, g --- --- DF_UseShortCutLinks = 262144, --- DF_ChangeLanesAroundObstructions = 524288, ---- DF_UseSwitchedOffNodes = 2097152, // cruise tasks ignore this anyway--only used for goto's ---- DF_PreferNavmeshRoute = 4194304, // if you're going to be primarily driving off road +--- // cruise tasks ignore this anyway--only used for goto's +--- DF_UseSwitchedOffNodes = 2097152, +--- // if you're going to be primarily driving off road +--- DF_PreferNavmeshRoute = 4194304, --- --- // Only works for planes using MISSION_GOTO, will cause them to drive along the ground instead of fly --- DF_PlaneTaxiMode = 8388608, @@ -1894,22 +1995,38 @@ function TaskGoToCoordWhileAimingAtCoord(ped, x, y, z, aimAtX, aimAtY, aimAtZ, m ---**`TASK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xB2A16444EAD9AE47) ----This native does not have an official description. ----@param p0 any ----@param p1 number ----@param p2 number ----@param p3 number ----@param p4 any ----@param p5 number ----@param p6 boolean ----@param p7 number ----@param p8 number ----@param p9 boolean ----@param p10 any ----@param p11 boolean ----@param p12 any ----@param p13 any -function TaskGoToCoordWhileAimingAtEntity(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13) end +---Will make the ped move to a coordinate while aiming (and optionally shooting) at the given entity. +--- +---```cpp +---enum eFiringPatternHashes { +--- FIRING_PATTERN_DEFAULT = 0, +--- FIRING_PATTERN_BURST_FIRE = -687903391, +--- FIRING_PATTERN_BURST_FIRE_DRIVEBY = -753768974, +--- FIRING_PATTERN_FULL_AUTO = -957453492, +--- FIRING_PATTERN_SINGLE_SHOT = 1566631136, +--- FIRING_PATTERN_DELAY_FIRE_BY_ONE_SEC = 2055493265, +--- FIRING_PATTERN_BURST_FIRE_HELI = -1857128337, +--- FIRING_PATTERN_SHORT_BURSTS = 445831135, +--- FIRING_PATTERN_BURST_FIRE_MICRO = 1122960381, +--- FIRING_PATTERN_SLOW_FIRE_TANK = -490063247, +--- FIRING_PATTERN_TAMPA_MORTAR = -1842093953 +---} +---``` +---@param ped integer +---@param x number +---@param y number +---@param z number +---@param entityToAimAt integer +---@param moveSpeed number +---@param shoot boolean +---@param targetRadius number +---@param slowDistance number +---@param useNavMesh boolean +---@param navFlags integer +---@param instantBlendAtAim boolean +---@param firingPattern integer | string +---@param time integer +function TaskGoToCoordWhileAimingAtEntity(ped, x, y, z, entityToAimAt, moveSpeed, shoot, targetRadius, slowDistance, useNavMesh, navFlags, instantBlendAtAim, firingPattern, time) end ---**`TASK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x6A071245EB0D1882) @@ -2097,41 +2214,49 @@ function TaskHeliEscortHeli(pilot, heli1, heli2, p3, p4, p5) end ---**`TASK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xDAD029E187A2BEB4) +---All parameters except ped, heli and speed are optional, with `pedTarget`, `vehicleTarget`, `x`, `y`, `z` being dependent on `missionType` (ie. Attack/Flee mission types require a target ped/vehicle, whereas GoTo mission types require either `x`, `y`, `z` or a target ped/vehicle). +--- +---If you don't want to use a parameter; pass `0.0f` for `x`, `y` and `z`, `0` for `pedTarget`, `vehicleTarget`, `0` for other int parameters, and `-1.0f` for the remaining float parameters. +--- +---```cpp +---enum eHeliMissionFlags +---{ +--- None = 0, +--- AttainRequestedOrientation = 1, +--- DontModifyOrientation = 2, +--- DontModifyPitch = 4, +--- DontModifyThrottle = 8, +--- DontModifyRoll = 16, +--- LandOnArrival = 32, +--- DontDoAvoidance = 64, +--- StartEngineImmediately = 128, +--- ForceHeightMapAvoidance = 256, +--- DontClampProbesToDestination = 512, +--- EnableTimeslicingWhenPossible = 1024, +--- CircleOppositeDirection = 2048, +--- MaintainHeightAboveTerrain = 4096, +--- IgnoreHiddenEntitiesDuringLand = 8192, +--- DisableAllHeightMapAvoidance = 16384, +--- // ForceHeightMapAvoidance | DontDoAvoidance +--- HeightMapOnlyAvoidance = 320, +---} ---``` ----Needs more research. ----Default value of p13 is -1.0 or 0xBF800000. ----Default value of p14 is 0. ----Modified examples from "fm_mission_controller.ysc", line ~203551: ----TASK::TASK_HELI_MISSION(ped, vehicle, 0, 0, posX, posY, posZ, 4, 1.0, -1.0, -1.0, 10, 10, 5.0, 0); ----TASK::TASK_HELI_MISSION(ped, vehicle, 0, 0, posX, posY, posZ, 4, 1.0, -1.0, -1.0, 0, ?, 5.0, 4096); ----int mode seams to set mission type 4 = coords target, 23 = ped target. ----int 14 set to 32 = ped will land at destination. ----My findings: ----mode 4 or 7 forces heli to snap to the heading set ----8 makes the heli flee from the ped. ----9 circles around ped with angle set ----10, 11 normal + imitate ped heading ----20 makes the heli land when he's near the ped. It won't resume chasing. ----21 emulates an helicopter crash ----23 makes the heli circle erratically around ped ----I change p2 to 'vehicleToFollow' as it seems to work like the task natives to set targets. In the heli_taxi script where as the merryweather heli takes you to your waypoint it has no need to follow a vehicle or a ped, so of course both have 0 set. ----``` ----@param pilot integer ----@param aircraft integer ----@param targetVehicle integer ----@param targetPed integer ----@param destinationX number ----@param destinationY number ----@param destinationZ number ----@param missionFlag integer ----@param maxSpeed number ----@param landingRadius number ----@param targetHeading number ----@param unk1 integer ----@param unk2 integer ----@param unk3 number ----@param landingFlags integer -function TaskHeliMission(pilot, aircraft, targetVehicle, targetPed, destinationX, destinationY, destinationZ, missionFlag, maxSpeed, landingRadius, targetHeading, unk1, unk2, unk3, landingFlags) end +---@param ped integer +---@param heli integer +---@param vehicleTarget integer +---@param pedTarget integer +---@param x number +---@param y number +---@param z number +---@param missionType integer +---@param speed number +---@param radius number +---@param heading number +---@param height number +---@param minHeight number +---@param slowDist number +---@param missionFlags integer +function TaskHeliMission(ped, heli, vehicleTarget, pedTarget, x, y, z, missionType, speed, radius, heading, height, minHeight, slowDist, missionFlags) end ---**`TASK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x0AE4086104E067B1) @@ -2364,7 +2489,7 @@ function TaskPedSlideToCoordHdgRate(ped, x, y, z, heading, p5, p6) end ---**`TASK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x5ABA3986D90D8A3B) ----This native does not have an official description. +---For an example on how to use this please refer to [OPEN_SEQUENCE_TASK](#\_0xE8854A4326B9E12B) ---@param ped integer ---@param taskSequenceId integer function TaskPerformSequence(ped, taskSequenceId) end @@ -2372,15 +2497,15 @@ function TaskPerformSequence(ped, taskSequenceId) end ---**`TASK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x89221B16730234F0) ---This native does not have an official description. ----@param p0 any ----@param p1 any ----@param p2 any ----@param p3 any -function TaskPerformSequenceFromProgress(p0, p1, p2, p3) end +---@param ped integer +---@param taskIndex integer +---@param progress1 integer +---@param progress2 integer +function TaskPerformSequenceFromProgress(ped, taskIndex, progress1, progress2) end ---**`TASK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x8C33220C8D78CA0D) ----This native does not have an official description. +---For an example on how to use this please refer to \[OPEN_SEQUENCE_TASK]\(#\_0xE8854A4326B9E12B ---@param ped integer ---@param taskSequenceId integer function TaskPerformSequenceLocally(ped, taskSequenceId) end @@ -2515,52 +2640,41 @@ function TaskPlantBomb(ped, x, y, z, heading) end ---[Native Documentation](https://docs.fivem.net/natives/?_0xEA47FE3719165B94) ---[Animations list](https://alexguirre.github.io/animations-list/) --- ----``` ----float blendInSpeed > normal speed is 8.0f -------------------------- ----float blendOutSpeed > normal speed is 8.0f -------------------------- ----int duration: time in millisecond -------------------------- -----1 _ _ _ _ _ _ _> Default (see flag) ----0 _ _ _ _ _ _ _ > Not play at all ----Small value _ _ > Slow down animation speed ----Other _ _ _ _ _ > freeze player control until specific time (ms) has ----_ _ _ _ _ _ _ _ _ passed. (No effect if flag is set to be ----_ _ _ _ _ _ _ _ _ controllable.) ----int flag: -------------------------- ----enum eAnimationFlags ----{ ---- ANIM_FLAG_NORMAL = 0, ---- ANIM_FLAG_REPEAT = 1, ---- ANIM_FLAG_STOP_LAST_FRAME = 2, ---- ANIM_FLAG_UPPERBODY = 16, ---- ANIM_FLAG_ENABLE_PLAYER_CONTROL = 32, ---- ANIM_FLAG_CANCELABLE = 120, ----}; ----Odd number : loop infinitely ----Even number : Freeze at last frame ----Multiple of 4: Freeze at last frame but controllable ----01 to 15 > Full body ----10 to 31 > Upper body ----32 to 47 > Full body > Controllable ----48 to 63 > Upper body > Controllable ----... ----001 to 255 > Normal ----256 to 511 > Garbled ----... ----playbackRate: ----values are between 0.0 and 1.0 ----lockX: ----0 in most cases 1 for rcmepsilonism8 and rcmpaparazzo_3 ----> 1 for mini@sprunk ----lockY: ----0 in most cases ----1 for missfam5_yoga, missfra1mcs_2_crew_react ----lockZ: ---- 0 for single player ---- Can be 1 but only for MP +---```cpp +---enum eScriptedAnimFlags +---{ +--- AF_LOOPING = 1, +--- AF_HOLD_LAST_FRAME = 2, +--- AF_REPOSITION_WHEN_FINISHED = 4, +--- AF_NOT_INTERRUPTABLE = 8, +--- AF_UPPERBODY = 16, +--- AF_SECONDARY = 32, +--- AF_REORIENT_WHEN_FINISHED = 64, +--- AF_ABORT_ON_PED_MOVEMENT = 128, +--- AF_ADDITIVE = 256, +--- AF_TURN_OFF_COLLISION = 512, +--- AF_OVERRIDE_PHYSICS = 1024, +--- AF_IGNORE_GRAVITY = 2048, +--- AF_EXTRACT_INITIAL_OFFSET = 4096, +--- AF_EXIT_AFTER_INTERRUPTED = 8192, +--- AF_TAG_SYNC_IN = 16384, +--- AF_TAG_SYNC_OUT = 32768, +--- AF_TAG_SYNC_CONTINUOUS = 65536, +--- AF_FORCE_START = 131072, +--- AF_USE_KINEMATIC_PHYSICS = 262144, +--- AF_USE_MOVER_EXTRACTION = 524288, +--- AF_HIDE_WEAPON = 1048576, +--- AF_ENDS_IN_DEAD_POSE = 2097152, +--- AF_ACTIVATE_RAGDOLL_ON_COLLISION = 4194304, +--- AF_DONT_EXIT_ON_DEATH = 8388608, +--- AF_ABORT_ON_WEAPON_DAMAGE = 16777216, +--- AF_DISABLE_FORCED_PHYSICS_UPDATE = 33554432, +--- AF_PROCESS_ATTACHMENTS_ON_START = 67108864, +--- AF_EXPAND_PED_CAPSULE_FROM_SKELETON = 134217728, +--- AF_USE_ALTERNATIVE_FP_ANIM = 268435456, +--- AF_BLENDOUT_WRT_LAST_FRAME = 536870912, +--- AF_USE_FULL_BLENDING = 1073741824 +---} ---``` ---@param ped integer ---@param animDictionary string @@ -2577,26 +2691,26 @@ function TaskPlayAnim(ped, animDictionary, animationName, blendInSpeed, blendOut ---**`TASK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x83CDB10EA29B370B) ----It's similar to the one above, except the first 6 floats let you specify the initial position and rotation of the task. (Ped gets teleported to the position). +---Similar in functionality to [`TASK_PLAY_ANIM`](#\_0xEA47FE3719165B94), except the position and rotation parameters let you specify the initial position and rotation of the task. The ped is teleported to the position specified. --- ---[Animations list](https://alexguirre.github.io/animations-list/) ---@param ped integer ----@param animDict string ----@param animName string +---@param animDictionary string +---@param animationName string ---@param posX number ---@param posY number ---@param posZ number ---@param rotX number ---@param rotY number ---@param rotZ number ----@param animEnterSpeed number ----@param animExitSpeed number +---@param blendInSpeed number +---@param blendOutSpeed number ---@param duration integer ---@param flag any ---@param animTime number ---@param p14 any ---@param p15 any -function TaskPlayAnimAdvanced(ped, animDict, animName, posX, posY, posZ, rotX, rotY, rotZ, animEnterSpeed, animExitSpeed, duration, flag, animTime, p14, p15) end +function TaskPlayAnimAdvanced(ped, animDictionary, animationName, posX, posY, posZ, rotX, rotY, rotZ, blendInSpeed, blendOutSpeed, duration, flag, animTime, p14, p15) end ---**`TASK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x8FBB6758B3B3E9EC) @@ -2949,64 +3063,26 @@ function TaskStandStill(ped, time) end ---**`TASK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xFA4EFC79F69D4F07) ----``` ----Also a few more listed at TASK::TASK_START_SCENARIO_IN_PLACE just above. ------------------- ----The first parameter in every scenario has always been a Ped of some sort. The second like TASK_START_SCENARIO_IN_PLACE is the name of the scenario. ----The next 4 parameters were harder to decipher. After viewing "hairdo_shop_mp.ysc.c4", and being confused from seeing the case in other scripts, they passed the first three of the arguments as one array from a function, and it looked like it was obviously x, y, and z. ----I haven't seen the sixth parameter go to or over 360, making me believe that it is rotation, but I really can't confirm anything. ----I have no idea what the last 3 parameters are, but I'll try to find out. -----going on the last 3 parameters, they appear to always be "0, 0, 1" ----p6 -1 also used in scrips ----p7 used for sitting scenarios ----p8 teleports ped to position ----``` +---The ped will move or warp to the position and heading given, then start the scenario passed. See [`TASK_START_SCENARIO_IN_PLACE`](#\_0x142A02425FF02BD9) for a list of scenarios. ---@param ped integer ---@param scenarioName string ---@param x number ---@param y number ---@param z number ---@param heading number ----@param duration integer ----@param sittingScenario boolean ----@param teleport boolean -function TaskStartScenarioAtPosition(ped, scenarioName, x, y, z, heading, duration, sittingScenario, teleport) end +---@param timeToLeave integer +---@param playIntro boolean +---@param warp boolean +function TaskStartScenarioAtPosition(ped, scenarioName, x, y, z, heading, timeToLeave, playIntro, warp) end ---**`TASK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x142A02425FF02BD9) ----``` ----Plays a scenario on a Ped at their current location. ----unkDelay - Usually 0 or -1, doesn't seem to have any effect. Might be a delay between sequences. ----playEnterAnim - Plays the "Enter" anim if true, otherwise plays the "Exit" anim. Scenarios that don't have any "Enter" anims won't play if this is set to true. ---- ----List of scenarioNames: pastebin.com/6mrYTdQv ---- ----Also these: ----WORLD_FISH_FLEE ----DRIVE ----WORLD_HUMAN_HIKER ----WORLD_VEHICLE_ATTRACTOR ----WORLD_VEHICLE_BICYCLE_MOUNTAIN ----WORLD_VEHICLE_BIKE_OFF_ROAD_RACE ----WORLD_VEHICLE_BIKER ----WORLD_VEHICLE_CONSTRUCTION_PASSENGERS ----WORLD_VEHICLE_CONSTRUCTION_SOLO ----WORLD_VEHICLE_DRIVE_PASSENGERS ----WORLD_VEHICLE_DRIVE_SOLO ----WORLD_VEHICLE_EMPTY ----WORLD_VEHICLE_PARK_PARALLEL ----WORLD_VEHICLE_PARK_PERPENDICULAR_NOSE_IN ----WORLD_VEHICLE_POLICE_BIKE ----WORLD_VEHICLE_POLICE_CAR ----WORLD_VEHICLE_POLICE_NEXT_TO_CAR ----WORLD_VEHICLE_SALTON_DIRT_BIKE ----WORLD_VEHICLE_TRUCK_LOGS ----``` +---Puts the ped into the given scenario immediately at their current location. [List of scenario names](https://pastebin.com/6mrYTdQv) or in `update/update.rpf/common/data/ai/scenarios.meta`. ---@param ped integer ---@param scenarioName string ----@param unkDelay integer ----@param playEnterAnim boolean -function TaskStartScenarioInPlace(ped, scenarioName, unkDelay, playEnterAnim) end +---@param timeToLeave integer +---@param playIntroClip boolean +function TaskStartScenarioInPlace(ped, scenarioName, timeToLeave, playIntroClip) end ---**`TASK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xE5DA8615A6180789) @@ -3301,15 +3377,44 @@ function TaskVehicleDriveToCoord(ped, vehicle, x, y, z, speed, p6, vehicleModel, ---**`TASK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x158BB33F920D360C) ---You can let your character drive to the destination at the speed and driving style you set. You can use map marks to set the destination. +--- +---```cpp +---enum eDriveBehaviorFlags { +--- DF_StopForCars = 1, +--- DF_StopForPeds = 2, +--- DF_SwerveAroundAllCars = 4, +--- DF_SteerAroundStationaryCars = 8, +--- DF_SteerAroundPeds = 16, +--- DF_SteerAroundObjects = 32, +--- DF_DontSteerAroundPlayerPed = 64, +--- DF_StopAtLights = 128, +--- DF_GoOffRoadWhenAvoiding = 256, +--- DF_DriveIntoOncomingTraffic = 512, +--- DF_DriveInReverse = 1024, +--- DF_UseWanderFallbackInsteadOfStraightLine = 2048, +--- DF_AvoidRestrictedAreas = 4096, +--- DF_PreventBackgroundPathfinding = 8192, // **These only work on MISSION_CRUISE** +--- DF_AdjustCruiseSpeedBasedOnRoadSpeed = 16384, +--- DF_UseShortCutLinks = 262144, +--- DF_ChangeLanesAroundObstructions = 524288, +--- DF_UseSwitchedOffNodes = 2097152, //cruise tasks ignore this anyway--only used for goto's +--- DF_PreferNavmeshRoute = 4194304, //if you're going to be primarily driving off road +--- DF_PlaneTaxiMode = 8388608, // Only works for planes using MISSION_GOTO, will cause them to drive along the ground instead of fly +--- DF_ForceStraightLine = 16777216, +--- DF_UseStringPullingAtJunctions = 33554432, +--- DF_AvoidHighways = 536870912, +--- DF_ForceJoinInRoadDirection = 1073741824 +---} +---``` ---@param ped integer ---@param vehicle integer ---@param x number ---@param y number ---@param z number ---@param speed number ----@param driveMode integer +---@param drivingStyle integer ---@param stopRange number -function TaskVehicleDriveToCoordLongrange(ped, vehicle, x, y, z, speed, driveMode, stopRange) end +function TaskVehicleDriveToCoordLongrange(ped, vehicle, x, y, z, speed, drivingStyle, stopRange) end ---**`TASK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x480142959D337D00) @@ -3433,49 +3538,78 @@ function TaskVehicleHeliProtect(pilot, vehicle, entityToFollow, targetSpeed, p4, ---**`TASK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x659427E0EF36BCDE) +---All parameters except ped, vehicle, vehicleTarget and speed are optional; with `missionType` being only those that require a target entity. +--- +---If you don't want to use a parameter; pass `0` for int parameters, and `-1.0f` for the remaining float parameters. +--- +---```cpp +---enum eVehicleMissionType +---{ +--- None = 0, +--- Cruise = 1, +--- Ram = 2, +--- Block = 3, +--- GoTo = 4, +--- Stop = 5, +--- Attack = 6, +--- Follow = 7, +--- Flee = 8, +--- Circle = 9, +--- Escort = 12, +--- GoToRacing = 14, +--- FollowRecording = 15, +--- PoliceBehaviour = 16, +--- Land = 19, +--- LandAndWait = 20, +--- Crash = 21, +--- PullOver = 22, +--- HeliProtect = 23 +---} ---``` ----missionType: https://alloc8or.re/gta5/doc/enums/eVehicleMissionType.txt ----``` ----@param driver integer +---@param ped integer ---@param vehicle integer ---@param vehicleTarget integer ---@param missionType integer ----@param p4 number ----@param p5 any ----@param p6 number ----@param p7 number +---@param speed number +---@param drivingStyle integer +---@param radius number +---@param straightLineDist number ---@param DriveAgainstTraffic boolean -function TaskVehicleMission(driver, vehicle, vehicleTarget, missionType, p4, p5, p6, p7, DriveAgainstTraffic) end +function TaskVehicleMission(ped, vehicle, vehicleTarget, missionType, speed, drivingStyle, radius, straightLineDist, DriveAgainstTraffic) end ---**`TASK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xF0AF20AA7731F8C3) ----See [`TASK_VEHICLE_MISSION`](#\_0x659427E0EF36BCDE). +---All parameters except ped, vehicle, x, y, z and speed are optional; with `missionType` being only those that don't require a target entity. +--- +---If you don't want to use a parameter; pass `0` for int parameters, and `-1.0f` for the remaining float parameters. ---@param ped integer ---@param vehicle integer ---@param x number ---@param y number ---@param z number ----@param p5 integer ----@param p6 integer ----@param p7 integer ----@param p8 number ----@param p9 number +---@param missionType integer +---@param speed number +---@param drivingStyle integer +---@param radius number +---@param straightLineDist number ---@param DriveAgainstTraffic boolean -function TaskVehicleMissionCoorsTarget(ped, vehicle, x, y, z, p5, p6, p7, p8, p9, DriveAgainstTraffic) end +function TaskVehicleMissionCoorsTarget(ped, vehicle, x, y, z, missionType, speed, drivingStyle, radius, straightLineDist, DriveAgainstTraffic) end ---**`TASK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x9454528DF15D657A) ----See [`TASK_VEHICLE_MISSION`](#\_0x659427E0EF36BCDE). +---All parameters except ped, vehicle, pedTarget and speed are optional; with `missionType` being only those that require a target entity. +--- +---If you don't want to use a parameter; pass `0` for int parameters, and `-1.0f` for the remaining float parameters. ---@param ped integer ---@param vehicle integer ---@param pedTarget integer ---@param missionType integer ----@param maxSpeed number +---@param speed number ---@param drivingStyle integer ----@param minDistance number ----@param p7 number +---@param radius number +---@param straightLineDist number ---@param DriveAgainstTraffic boolean -function TaskVehicleMissionPedTarget(ped, vehicle, pedTarget, missionType, maxSpeed, drivingStyle, minDistance, p7, DriveAgainstTraffic) end +function TaskVehicleMissionPedTarget(ped, vehicle, pedTarget, missionType, speed, drivingStyle, radius, straightLineDist, DriveAgainstTraffic) end ---**`TASK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x0F3E34E968EA374E) @@ -3532,37 +3666,47 @@ function TaskVehicleShootAtPed(ped, target, p2) end ---**`TASK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xC429DCEEB339E129) ----``` ----'1 - brake ----'3 - brake + reverse ----'4 - turn left 90 + braking ----'5 - turn right 90 + braking ----'6 - brake strong (handbrake?) until time ends ----'7 - turn left + accelerate ----'7 - turn right + accelerate ----'9 - weak acceleration ----'10 - turn left + restore wheel pos to center in the end ----'11 - turn right + restore wheel pos to center in the end ----'13 - turn left + go reverse ----'14 - turn left + go reverse ----'16 - crash the game after like 2 seconds :) ----'17 - keep actual state, game crashed after few tries ----'18 - game crash ----'19 - strong brake + turn left/right ----'20 - weak brake + turn left then turn right ----'21 - weak brake + turn right then turn left ----'22 - brake + reverse ----'23 - accelerate fast ----'24 - brake ----'25 - brake turning left then when almost stopping it turns left more ----'26 - brake turning right then when almost stopping it turns right more ----'27 - brake until car stop or until time ends ----'28 - brake + strong reverse acceleration ----'30 - performs a burnout (brake until stop + brake and accelerate) ----'31 - accelerate + handbrake ----'32 - accelerate very strong ----Seems to be this: ----Works on NPCs, but overrides their current task. If inside a task sequence (and not being the last task), "time" will work, otherwise the task will be performed forever until tasked with something else +---Gives the vehicle a temporary action. +--- +---**Note**: For migrating objects, a `CScriptEntityStateChangeEvent` will be sent over the network to let other clients know that this object is being given a temporary action. At the same time, temporary actions cannot be applied to clones/remote objects. +--- +---```cpp +---enum eTempAction { +--- TA_NONE = 0, +--- TA_WAIT = 1, +--- TA_UNUSED = 2, +--- TA_BRAKE_REVERSE = 3, +--- TA_HANDBRAKE_TURN_LEFT = 4, +--- TA_HANDBRAKE_TURN_RIGHT = 5, +--- TA_HANDBRAKE_UNTIL_TIME_ENDS = 6, +--- TA_TURN_LEFT = 7, +--- TA_TURN_RIGHT = 8, +--- TA_ACCELERATE = 9, +--- TA_TURN_LEFT = 10, +--- TA_TURN_RIGHT = 11, +--- TA_UNUSED_12 = 12, +--- TA_TURN_LEFT_GO_REVERSE = 13, +--- TA_TURN_RIGHT_GO_REVERSE = 14, +--- TA_PLANE_FLY_UP = 15, // (crashes game if not in plane) +--- TA_PLANE_FLY_STRAIGHT = 16, // (crashes game if not in plane) +--- TA_PLANE_SHARP_LEFT = 17, // (crashes game if not in plane) +--- TA_PLANE_SHARP_RIGHT = 18, // (crashes game if not in plane) +--- TA_STRONG_BRAKE = 19, +--- TA_TURN_LEFT_AND_STOP = 20, +--- TA_TURN_RIGHT_AND_STOP = 21, +--- TA_GO_IN_REVERSE = 22, +--- TA_ACCELERATE_FAST = 23, +--- TA_BRAKE_ACTION = 24, +--- TA_HANDBRAKE_TURN_LEFT_MORE = 25, +--- TA_HANDBRAKE_TURN_RIGHT_MORE = 26, +--- TA_HANDBRAKE_BRAKE_STRAIGHT = 27, +--- TA_BRAKE_STRONG_REVERSE_ACCELERATION = 28, +--- TA_UNUSED_29 = 29, +--- TA_PERFORMS_BURNOUT = 30, +--- TA_REV_ENGINE = 31, +--- TA_ACCELERATE_VERY_STRONG = 32, +--- TA_SURFACE_IN_SUBMARINE = 33 +---}; ---``` ---@param driver integer ---@param vehicle integer @@ -3608,9 +3752,30 @@ function TaskWanderSpecific(p0, p1, p2, p3) end ---@param p2 integer function TaskWanderStandard(ped, p1, p2) end +---**`TASK` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0x6E01E9E8D89F8276) +---This task warps a ped directly into a cover position closest to the specified point. This can be used to quickly place peds in strategic positions during gameplay. +--- +---``` +---NativeDB Introduced: 2545 +---``` +---@param ped integer +---@param time integer +---@param canPeekAndAim boolean +---@param forceInitialFacingDirection boolean +---@param forceFaceLeft boolean +---@param coverIndex integer +function TaskWarpPedDirectlyIntoCover(ped, time, canPeekAndAim, forceInitialFacingDirection, forceFaceLeft, coverIndex) end + ---**`TASK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x9A7D091411C5F684) ----This native does not have an official description. +---``` +---NativeDB Introduced: v323 +---``` +--- +---Warp a ped into a vehicle. +--- +---**Note**: It's better to use [`TASK_ENTER_VEHICLE`](#\_0xC20E50AA46D09CA8) with the flag "warp" flag instead of this native. ---@param ped integer ---@param vehicle integer ---@param seatIndex integer diff --git a/library/natives/GTAV/VEHICLE.lua b/library/natives/GTAV/VEHICLE.lua index abc9451..685c1f7 100644 --- a/library/natives/GTAV/VEHICLE.lua +++ b/library/natives/GTAV/VEHICLE.lua @@ -226,10 +226,14 @@ SetVehicleHalt = BringVehicleToHalt ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x26C10ECBDA5D043B) ----This native does not have an official description. ----@param vehicle integer +---Checks if a boat can be anchored at its present position without possibly intersecting collision later. +--- +---``` +---NativeDB Introduced: v323 +---``` +---@param boat integer ---@return boolean -function CanAnchorBoatHere(vehicle) end +function CanAnchorBoatHere(boat) end ---@deprecated GetBoatAnchor = CanAnchorBoatHere @@ -238,17 +242,19 @@ CanBoatBeAnchored = CanAnchorBoatHere ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x24F4121D07579880) ----``` ----Differs from 0x26C10ECBDA5D043B in that 0x140EFCC10 (1604 retail) is called with a2 = true. +---Checks if a boat can be anchored at its present position, ignoring any players standing on the boat. --- +---``` ---NativeDB Introduced: v678 ---``` ----@param vehicle integer +---@param boat integer ---@return boolean -function CanAnchorBoatHere_2(vehicle) end +function CanAnchorBoatHereIgnorePlayers(boat) end ---@deprecated -CanBoatBeAnchored_2 = CanAnchorBoatHere_2 +CanBoatBeAnchored_2 = CanAnchorBoatHereIgnorePlayers +---@deprecated +CanAnchorBoatHere_2 = CanAnchorBoatHereIgnorePlayers ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x2C1D8B3B19E517CC) @@ -271,6 +277,16 @@ function CanShuffleSeat(vehicle, seatIndex) end ---This native does not have an official description. function ClearLastDrivenVehicle() end +---**`VEHICLE` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0xC889AE921400E1ED) +---``` +---NativeDB Introduced: 3095 +---``` +--- +---Resets or clears the nitrous system for a specified vehicle. You can check if a vehicle has nitrous with [`IS_NITROUS_ACTIVE`](#\_0x491E822B2C464FE4) +---@param vehicle integer +function ClearNitrous(vehicle) end + ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x55E1D2758F34E437) ---This native does not have an official description. @@ -378,9 +394,9 @@ function CreateMissionTrain(variation, x, y, z, direction) end ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x7BEB0C7A235F6F3B) ----``` ----Drops the Hook/Magnet on a cargobob ----state +---Drops the Hook/Magnet on a cargobob +--- +---```cpp ---enum eCargobobHook ---{ --- CARGOBOB_HOOK = 0, @@ -662,7 +678,11 @@ GetVehicleHasLandingGear = DoesVehicleHaveLandingGear ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x8AC862B0B32C5B80) ----This native does not have an official description. +---Determines whether a specific vehicle is equipped with a roof. +--- +---``` +---NativeDB Introduced: v323 +---``` ---@param vehicle integer ---@return boolean function DoesVehicleHaveRoof(vehicle) end @@ -810,6 +830,16 @@ function ForceSubmarineNeurtalBuoyancy(submarine, time) end ---@param toggle boolean function ForceSubmarineSurfaceMode(vehicle, toggle) end +---**`VEHICLE` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0x1A2BCC8C636F9226) +---``` +---NativeDB Introduced: v3095 +---``` +--- +---Recharges the nitrous system of the specified vehicle to its maximum capacity. This action sets the nitrous charge duration to the maximum limit defined by previous settings applied through [`SET_OVERRIDE_NITROUS_LEVEL`](#\_0xC8E9B6B71B8E660D). +---@param vehicle integer +function FullyChargeNitrous(vehicle) end + ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x9B8E1BF04B51F2E8) ---This native does not have an official description. @@ -909,13 +939,15 @@ function GetClosestVehicle(x, y, z, radius, modelHash, flags) end ---Returns the convertible state of the specified vehicle. --- ---```cpp ----enum RoofState ----{ ---- ROOFSTATE_UP = 0, ---- ROOFSTATE_LOWERING = 1, ---- ROOFSTATE_DOWN = 2, ---- ROOFSTATE_RAISING = 3 ----}; +---enum eRoofState { +--- RAISED = 0, +--- LOWERING = 1, +--- LOWERED = 2, +--- RAISING = 3, +--- CLOSING_BOOT = 4, +--- ROOF_STUCK_RAISED = 5, +--- ROOF_STUCK_LOWERED = 6 +---} ---``` ---@param vehicle integer ---@return integer @@ -1025,12 +1057,11 @@ GetHeliEngineHealth = GetHeliTailBoomHealth ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xAE8CE82A4219AC8C) ---``` ----Max 1000. ----At 0 the tail rotor will stall. +---NativeDB Introduced: v323 ---``` ----@param vehicle integer +---@param heli integer ---@return number -function GetHeliTailRotorHealth(vehicle) end +function GetHeliTailRotorHealth(heli) end ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x0BB5CBDDD0F25AE3) @@ -1084,6 +1115,17 @@ function GetIsRightVehicleHeadlightDamaged(vehicle) end ---@deprecated IsHeadlightRBroken = GetIsRightVehicleHeadlightDamaged +---**`VEHICLE` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0x1FCB07FE230B6639) +---Checks if the vehicle is electric. +--- +---``` +---NativeDB Introduced: v3258 +---``` +---@param vehicleModel integer | string +---@return boolean +function GetIsVehicleElectric(vehicleModel) end + ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x0506ED94363AD905) ---``` @@ -1410,6 +1452,17 @@ function GetRandomVehicleInSphere(x, y, z, radius, modelHash, flags) end ---@return integer, integer function GetRandomVehicleModelInMemory(p0) end +---**`VEHICLE` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0xBEC4B8653462450E) +---``` +---NativeDB Introduced: 3095 +---``` +--- +---Retrieves the remaining duration of nitrous boost available for the specified vehicle. +---@param vehicle integer +---@return number +function GetRemainingNitrousDuration(vehicle) end + ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x2058206FBE79A8AD) ---This native does not have an official description. @@ -1759,18 +1812,7 @@ function GetVehicleDoorAngleRatio(vehicle, doorIndex) end ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x25BC98A59C2EA962) ----``` ----enum VehicleLockStatus = { ---- None = 0, ---- Unlocked = 1, ---- Locked = 2, ---- LockedForPlayer = 3, ---- StickPlayerInside = 4, -- Doesn't allow players to exit the vehicle with the exit vehicle key. ---- CanBeBrokenInto = 7, -- Can be broken into the car. If the glass is broken, the value will be set to 1 ---- CanBeBrokenIntoPersist = 8, -- Can be broken into persist ---- CannotBeTriedToEnter = 10, -- Cannot be tried to enter (Nothing happens when you press the vehicle enter key). ----} ----``` +---This native does not have an official description. ---@param vehicle integer ---@return integer function GetVehicleDoorLockStatus(vehicle) end @@ -1783,6 +1825,32 @@ function GetVehicleDoorLockStatus(vehicle) end ---@return boolean function GetVehicleDoorsLockedForPlayer(vehicle, player) end +---**`VEHICLE` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0x1423725069EE1D14) +---``` +---NativeDB Introduced: v3258 +---``` +--- +---**Note**: When using this native, the hash of the vehicle needs to be loaded into the client's memory. This can be done by requesting the model with [`REQUEST_MODEL`](#\_0x963D27A58DF860AC) or by simply having the vehicle spawned. +--- +---```cpp +--- --- +---enum eVehicleDrivetrainType --- +---{ --- +--- INVALID = 0, --- +--- FWD = 1, --- +--- RWD = 2, --- +--- AWD = 3 --- +---}; +---``` +--- +---``` +---NativeDB Introduced: v3258 +---``` +---@param vehicleModel integer | string +---@return integer +function GetVehicleDrivetrainType(vehicleModel) end + ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xC45D23BAF168AAB8) ---``` @@ -2216,14 +2284,23 @@ function GetVehicleNumberPlateText(vehicle) end ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xF11BC2DD9A3E7195) ----``` ----Returns the PlateType of a vehicle ----Blue_on_White_1 = 3, ----Blue_on_White_2 = 0, ----Blue_on_White_3 = 4, ----Yellow_on_Blue = 2, ----Yellow_on_Black = 1, ----North_Yankton = 5, +---```cpp +---enum eVehiclePlateIndicies { +--- SanAndreasCursive = 0, +--- SanAndreasBlack = 1, +--- SanAndreasBlue = 2, +--- SanAndreasPlain = 3, +--- SRExcept = 4, +--- NorthYankton = 5, +--- // All indicies below this require b3095 +--- ECola = 6, +--- LasVenturas = 7, +--- LiberyCity = 8, +--- LSCarMeet = 9, +--- LSPanic = 10, +--- LSPounders = 11, +--- Sprunk = 12, +---} ---``` ---@param vehicle integer ---@return integer @@ -2243,7 +2320,7 @@ function GetVehiclePetrolTankHealth(vehicle) end ---[Native Documentation](https://docs.fivem.net/natives/?_0x9CCC9525BF2408E0) ---Returns the plates a vehicle has. --- ----``` +---```cpp ---enum eVehiclePlateType ---{ --- VPT_FRONT_AND_BACK_PLATES = 0, @@ -2348,11 +2425,16 @@ function GetVehicleWeaponCapacity(vehicle, weaponIndex) end --- VWT_TUNER = 5, --- VWT_BIKE = 6, --- VWT_HIEND = 7, ---- VWT_SUPERMOD1 = 8, // Benny's Original ---- VWT_SUPERMOD2 = 9, // Benny's Bespoke ---- VWT_SUPERMOD3 = 10, // Open Wheel ---- VWT_SUPERMOD4 = 11, // Street ---- VWT_SUPERMOD5 = 12, // Track +--- // Benny's Original +--- VWT_SUPERMOD1 = 8, +--- // Benny's Bespoke +--- VWT_SUPERMOD2 = 9, +--- // Open Wheel +--- VWT_SUPERMOD3 = 10, +--- // Street +--- VWT_SUPERMOD4 = 11, +--- // Track +--- VWT_SUPERMOD5 = 12, ---}; ---``` ---@param vehicle integer @@ -2368,26 +2450,24 @@ function GetVehicleWindowTint(vehicle) end ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x3DFF319A831E0CDB) ----Returns the headlight color index from the vehicle. Value between 0, 12. ---Use [\_SET_VEHICLE_HEADLIGHTS_COLOUR](#\_0xE41033B25D003A07) to set the headlights color for the vehicle. ----Must enable xenon headlights before it'll take affect. --- ----List of colors and ids: +---You must enable xenon headlights for this native to work properly. --- ----``` ----enum headlightColors { ---- Default = -1, +---```cpp +---enum eHeadlightColors { +--- Default = 255, --- White = 0, --- Blue = 1, ---- Electric_Blue = 2, ---- Mint_Green = 3, ---- Lime_Green = 4, +--- ElectricBlue = 2, +--- MintGreen = 3, +--- LimeGreen = 4, --- Yellow = 5, ---- Golden_Shower = 6, +--- GoldenShower = 6, --- Orange = 7, --- Red = 8, ---- Pony_Pink = 9, ---- Hot_Pink = 10, +--- PonyPink = 9, +--- HotPink = 10, --- Purple = 11, --- Blacklight = 12 ---} @@ -2499,12 +2579,19 @@ function IsBigVehicle(vehicle) end ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xB0AD1238A709B1A2) +---Checks if a boat is currently anchored. +--- +---This native is a getter for [SET_BOAT_ANCHOR](#\_0x75DBEC174AEEAD10). +--- ---``` ----IS_* +---NativeDB Introduced: v573 ---``` ----@param vehicle integer +---@param boat integer ---@return boolean -function IsBoatAnchoredAndFrozen(vehicle) end +function IsBoatAnchored(boat) end + +---@deprecated +IsBoatAnchoredAndFrozen = IsBoatAnchored ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x7EEF65D5F153E26A) @@ -2571,6 +2658,17 @@ function IsHeliPartBroken(vehicle, p1, p2, p3) end ---@return boolean function IsMissionTrain(vehicle) end +---**`VEHICLE` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0x491E822B2C464FE4) +---``` +---NativeDB Introduced: 3095 +---``` +--- +---Determines if the nitrous is currently activated in the specified vehicle. +---@param vehicle integer +---@return boolean +function IsNitrousActive(vehicle) end + ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xB09D25E77C33EB3F) ---This native does not have an official description. @@ -2722,14 +2820,15 @@ function IsTurretSeat(vehicle, seatIndex) end ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x52F357A30698BCCE) +---Determines if a vehicle is a convertible with an animatable roof. This native checks if the specified vehicle model features a convertible roof that can be lowered or raised through an animation. +--- ---``` ----p1 is false almost always. ----However, in launcher_carwash/carwash1/carwash2 scripts, p1 is true and is accompanied by DOES_VEHICLE_HAVE_ROOF +---NativeDB Introduced: v323 ---``` ---@param vehicle integer ----@param p1 boolean +---@param checkRoofExtras boolean ---@return boolean -function IsVehicleAConvertible(vehicle, p1) end +function IsVehicleAConvertible(vehicle, checkRoofExtras) end ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x4319E335B71FFF34) @@ -3062,9 +3161,7 @@ function IsVehicleStopped(vehicle) end ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x2959F696AE390A99) ----``` ----Is this for red lights only? more testing required. ----``` +---This native checks if the given vehicle is stopped at a red or amber traffic light junction, provided the driver's personality is set to not run amber lights. ---@param vehicle integer ---@return boolean function IsVehicleStoppedAtTrafficLights(vehicle) end @@ -3089,23 +3186,25 @@ function IsVehicleStuckTimerUp(vehicle, p1, p2) end ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xBA291848A0815CA9) ----``` ----wheelID used for 4 wheelers seem to be (0, 1, 4, 5) ----completely - is to check if tire completely gone from rim. ----'0 = wheel_lf / bike, plane or jet front ----'1 = wheel_rf ----'2 = wheel_lm / in 6 wheels trailer, plane or jet is first one on left ----'3 = wheel_rm / in 6 wheels trailer, plane or jet is first one on right ----'4 = wheel_lr / bike rear / in 6 wheels trailer, plane or jet is last one on left ----'5 = wheel_rr / in 6 wheels trailer, plane or jet is last one on right ----'45 = 6 wheels trailer mid wheel left ----'47 = 6 wheels trailer mid wheel right +---```cpp +---enum eVehicleWheels +---{ +--- WHEEL_LF = 0, // Vehicle Left front +--- WHEEL_RF = 1, // Vehicle Right front +--- WHEEL_LM = 2, // Vehicle Left middle +--- WHEEL_RM = 3, // Vehicle Right middle +--- WHEEL_LR = 4, // Vehicle Left rear +--- WHEEL_RR = 5, // Vehicle Right rear +--- WHEEL_BF = 6, // Bike front +--- WHEEL_BR = 7, // Bike rear +--- MAX_WHEELS = 8 +---}; ---``` ---@param vehicle integer ---@param wheelID integer ----@param completely boolean +---@param isBurstToRim boolean ---@return boolean -function IsVehicleTyreBurst(vehicle, wheelID, completely) end +function IsVehicleTyreBurst(vehicle, wheelID, isBurstToRim) end ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xAA0A52D24FB98293) @@ -3144,7 +3243,13 @@ function IsVehicleWindowIntact(vehicle, windowIndex) end ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xDED51F703D0FA83D) ----This native does not have an official description. +---Lowers the roof on a convertible vehicle, utilizing any available animations for the action. This native is particularly useful for creating a realistic interaction with convertible vehicles by animating the process of lowering the roof. +--- +---You can check if the vehicle has an convertible roof using [`IS_VEHICLE_A_CONVERTIBLE`](#\_0x52F357A30698BCCE). +--- +---``` +---NativeDB Introduced: v323 +---``` ---@param vehicle integer ---@param instantlyLower boolean function LowerConvertibleRoof(vehicle, instantlyLower) end @@ -4098,7 +4203,15 @@ function PreloadVehicleMod(p0, modType, p2) end ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x8F5FB35D7E88FC70) ----This native does not have an official description. +---Raises the roof on a convertible vehicle, utilizing any available animations for the action. This native is particularly useful for creating a realistic interaction with convertible vehicles by animating the process of raising the roof. +--- +---You can check if the vehicle has an convertible roof using [`IS_VEHICLE_A_CONVERTIBLE`](#\_0x52F357A30698BCCE). +--- +---To lower the convertible roof, you can use [`LOWER_CONVERTIBLE_ROOF`](#\_0xDED51F703D0FA83D). +--- +---``` +---NativeDB Introduced: v323 +---``` ---@param vehicle integer ---@param instantlyRaise boolean function RaiseConvertibleRoof(vehicle, instantlyRaise) end @@ -4358,10 +4471,16 @@ SetBikeLeanAngle = SetBikeOnStand ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x75DBEC174AEEAD10) ----This native does not have an official description. ----@param vehicle integer +---Sets the anchor state for a boat. +--- +---``` +---NativeDB Introduced: v323 +---``` +--- +---**Note**: You might want to check if you can use your anchor before with [CAN_ANCHOR_BOAT_HERE](#\_0x26C10ECBDA5D043B). +---@param boat integer ---@param toggle boolean -function SetBoatAnchor(vehicle, toggle) end +function SetBoatAnchor(boat, toggle) end ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xF488C566413B4232) @@ -4381,13 +4500,6 @@ function SetBoatBoomPositionRatio(vehicle, ratio) end ---@param p1 boolean function SetBoatDisableAvoidance(vehicle, p1) end ----**`VEHICLE` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0xE3EBAAE484798530) ----This native does not have an official description. ----@param vehicle integer ----@param toggle boolean -function SetBoatFrozenWhenAnchored(vehicle, toggle) end - ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xBD32E46AA95C1DD2) ---This native does not have an official description. @@ -4399,13 +4511,35 @@ SetBoatSinking = SetBoatIsSinking ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xE842A9398079BD82) ----This native does not have an official description. ----@param vehicle integer +---Sets the distance from the player at which anchored boats switch between high and low LOD (Level of Detail) buoyancy mode. +--- +---``` +---NativeDB Introduced: v323 +---``` +---@param boat integer ---@param value number -function SetBoatMovementResistance(vehicle, value) end +function SetBoatLowLodAnchorDistance(boat, value) end + +---@deprecated +SetBoatAnchorBuoyancyCoefficient = SetBoatLowLodAnchorDistance +---@deprecated +SetBoatMovementResistance = SetBoatLowLodAnchorDistance + +---**`VEHICLE` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0xE3EBAAE484798530) +---Sets whether a boat should remain anchored even when a player is driving it. +--- +---**Note**: This native is always used with [SET_BOAT_ANCHOR](#\_0x75DBEC174AEEAD10). +--- +---``` +---NativeDB Introduced: v323 +---``` +---@param boat integer +---@param toggle boolean +function SetBoatRemainsAnchoredWhilePlayerIsDriver(boat, toggle) end ---@deprecated -SetBoatAnchorBuoyancyCoefficient = SetBoatMovementResistance +SetBoatFrozenWhenAnchored = SetBoatRemainsAnchoredWhilePlayerIsDriver ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x8F719973E1445BA2) @@ -4558,7 +4692,15 @@ function SetCarHighSpeedBumpSeverityMultiplier(multiplier) end ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xF39C4F538B5124C2) ----This allows for the vehicle's roof to be put on when set to true, and removed when set to false, provided that the vehicle has a version with a roof and a version without a roof. +---Enables or disables the convertible roof on vehicles that support old-style GTA IV roofs, which are not animated. Setting `toggle` to true will apply the roof to the vehicle, and setting it to false will remove the roof, assuming the vehicle has versions with and without a roof. +--- +---If you want to lock or unlock the roof mechanism, use [`SET_CONVERTIBLE_ROOF_LATCH_STATE`](#\_0x1A78AD3D8240536F). +--- +---You can check if the vehicle has a roof with [`DOES_VEHICLE_HAVE_ROOF`](#\_0x8AC862B0B32C5B80). +--- +---``` +---NativeDB Introduced: v323 +---``` --- ---#### Vehicles with both roofed and roofless versions (others may exist; this list is compiled from decompiled scripts). --- @@ -4576,10 +4718,14 @@ function SetConvertibleRoof(vehicle, toggle) end ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x1A78AD3D8240536F) ----This native does not have an official description. +---This native is used to latch or unlatch the convertible roof of a vehicle. It allows for direct control over the roof's mechanism without actually opening or closing the roof. This can be useful for scenarios where you need to prepare a vehicle's roof to be opened or closed by another action or to ensure it remains fixed in its current state regardless of other interactions. +--- +---``` +---NativeDB Introduced: v323 +---``` ---@param vehicle integer ----@param state boolean -function SetConvertibleRoofLatchState(vehicle, state) end +---@param bLatched boolean +function SetConvertibleRoofLatchState(vehicle, bLatched) end ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xB251E0B33E58B424) @@ -4618,7 +4764,7 @@ function SetDisableExplodeFromBodyDamageOnCollision(vehicle, disableExplode) end ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xEDBC8405B3895CC9) ----Prevents a helicopter from exploding due to relatively minor body damage. This native can be particularly useful in gameplay scenarios or missions where helicopters are subject to damage that would not realistically cause an explosion, ensuring they remain operational unless subjected to more significant damage. +---Prevents a helicopter from exploding due to relatively minor body damage. --- ---``` ---NativeDB Introduced: v1103 @@ -4766,16 +4912,6 @@ function SetEnableVehicleSlipstreaming(toggle) end ---@param toggle boolean function SetFarDrawVehicles(toggle) end ----**`VEHICLE` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0xB28B1FE5BFADD7F5) ----``` ----X,Y position of boat is frozen in place when anchored and its engine disabled, only the Z value changes. Requires 0xE3EBAAE484798530 to be set to true. ----SET_FORCED_ZENITH_QUADTREE? ----``` ----@param vehicle integer ----@param toggle boolean -function SetForcedBoatLocationWhenAnchored(vehicle, toggle) end - ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x97CE68CB032583F0) ---This native does not have an official description. @@ -4783,6 +4919,22 @@ function SetForcedBoatLocationWhenAnchored(vehicle, toggle) end ---@param toggle boolean function SetForceHdVehicle(vehicle, toggle) end +---**`VEHICLE` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0xB28B1FE5BFADD7F5) +---Sets whether a boat should remain in the non-physical, low LOD anchor mode even when a player is driving it. +--- +---**Note**: This native requires [SET_BOAT_REMAINS_ANCHORED_WHILE_PLAYER_IS_DRIVER](#\_0xE3EBAAE484798530) to be set to `true` to work properly. +--- +---``` +---NativeDB Introduced: v323 +---``` +---@param boat integer +---@param toggle boolean +function SetForceLowLodAnchorMode(boat, toggle) end + +---@deprecated +SetForcedBoatLocationWhenAnchored = SetForceLowLodAnchorMode + ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x37EBBF3117BD6A25) ---``` @@ -4847,15 +4999,32 @@ function SetHelicopterRollPitchYawMult(helicopter, multiplier) end ---@param health number function SetHeliMainRotorHealth(vehicle, health) end +---**`VEHICLE` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0x8074CC1886802912) +---Makes a helicopter resistant to multiple explosions. When enabled, helicopters can survive two or more explosions. +--- +---``` +---NativeDB Introduced: 2545 +---``` +---@param helicopter integer +---@param bResistToExplosion boolean +function SetHeliResistToExplosion(helicopter, bResistToExplosion) end + ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x3EC8BF18AA453FE9) ----This native does not have an official description. ----@param vehicle integer ----@param p1 boolean -function SetHeliTailExplodeThrowDashboard(vehicle, p1) end +---Enables or disables the ability for a helicopter's tail boom to break off. +--- +---``` +---NativeDB Introduced: v323 +---``` +---@param heli integer +---@param toggle boolean +function SetHeliTailBoomCanBreakOff(heli, toggle) end ---@deprecated -WasCounterActivated = SetHeliTailExplodeThrowDashboard +SetHeliTailExplodeThrowDashboard = SetHeliTailBoomCanBreakOff +---@deprecated +WasCounterActivated = SetHeliTailBoomCanBreakOff ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xFE205F38AAA58E5B) @@ -4953,6 +5122,18 @@ function SetMissionTrainAsNoLongerNeeded(train, p1) end ---@param z number function SetMissionTrainCoords(train, x, y, z) end +---**`VEHICLE` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0x465EEA70AF251045) +---``` +---NativeDB Introduced: 3095 +---``` +--- +---Activates or deactivates the nitrous system in the specified vehicle, based on the boolean value provided. +---You can clear the nitrous with [`CLEAR_NITROUS`](#\_0xC889AE921400E1ED), if you want to have more control on the nitrous and those settings, use [`SET_OVERRIDE_NITROUS_LEVEL`](#\_0xC8E9B6B71B8E660D) +---@param vehicle integer +---@param isActive boolean +function SetNitrousIsActive(vehicle, isActive) end + ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xCAA15F13EBD417FF) ---This native does not have an official description. @@ -4973,6 +5154,24 @@ function SetOpenRearDoorsOnExplosion(vehicle, toggle) end ---@param extend boolean function SetOppressorTransformState(vehicle, extend) end +---**`VEHICLE` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0xC8E9B6B71B8E660D) +---``` +---NativeDB Introduced: v1604 +---NativeDB Added Parameter 2 (2060): float durationMod : A multiplier applied to the default nitrous duration (default is 3 seconds). +---NativeDB Added Parameter 3 (2060): float power : A multiplier applied to the default nitrous power multiplier (default is 3). +---NativeDB Added Parameter 4 (2060): float rechargeTime : A multiplier applied to the default nitrous recharge rate. +---NativeDB Added Parameter 5 (2060): BOOL disableSound : A boolean to disable the default nitrous sound when the nitrous is active. +---``` +--- +---Overrides the default settings of a vehicle's nitrous system, allowing custom control over its performance characteristics. +---@param vehicle integer +---@param override boolean +function SetOverrideNitrousLevel(vehicle, override) end + +---@deprecated +SetVehicleNitroEnabled = SetOverrideNitrousLevel + ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xEAE6DCC7EEE3DB1D) ---This native does not have an official description. @@ -5286,6 +5485,30 @@ function SetTrainSpeed(train, speed) end ---@param frequency integer function SetTrainTrackSpawnFrequency(trackIndex, frequency) end +---**`VEHICLE` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0x498218259FB7C72D) +---Affects the playback speed of the submarine car conversion animations. Does not affect hardcoded animations such as the wheels being retracted. In decompiled scripts the only value used for transformRate is 2.5. +---@param vehicle integer +---@param transformRate number +function SetTransformRateForAnimation(vehicle, transformRate) end + +---@deprecated +SetUnkFloatN_0x104ForSubmarineVehicleTask = SetTransformRateForAnimation + +---**`VEHICLE` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0x41B9FB92EDED32A6) +---Changes the key used to transform a vehicle into submarine mode. When set to true, the transformation key switches from the default raise/lower convertible roof key (usually 'H') to the special vehicle transformation key (usually 'X'). +--- +---``` +---NativeDB Introduced: v1365 +---``` +---@param vehicle integer +---@param useAlternateInput boolean +function SetTransformToSubmarineUsesAlternateInput(vehicle, useAlternateInput) end + +---@deprecated +SetUnkBoolN_0x102ForSubmarineVehicleTask = SetTransformToSubmarineUsesAlternateInput + ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x74C68EF97645E79D) ---``` @@ -5356,24 +5579,6 @@ function SetTyreTractionLossMultiplier(vehicle, wheelIndex, multiplier) end ---@param multiplier number function SetTyreWearMultiplier(vehicle, wheelIndex, multiplier) end ----**`VEHICLE` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0x41B9FB92EDED32A6) ----``` ----NativeDB Introduced: v1365 ----``` ----@param vehicle integer ----@param value boolean -function SetUnkBoolN_0x102ForSubmarineVehicleTask(vehicle, value) end - ----**`VEHICLE` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0x498218259FB7C72D) ----``` ----NativeDB Introduced: v1365 ----``` ----@param vehicle integer ----@param value number -function SetUnkFloatN_0x104ForSubmarineVehicleTask(vehicle, value) end - ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xF06A16CA55D138D8) ---Allows vehicles with the FLAG_JUMPING_CAR flag to jump higher (i.e. Ruiner 2000). @@ -5802,17 +6007,28 @@ function SetVehicleDoorShut(vehicle, doorIndex, closeInstantly) end --- ---```cpp ---enum eVehicleLockState { ---- VEHICLELOCK_NONE = 0, // No specific lock state, vehicle behaves according to the game's default settings. ---- VEHICLELOCK_UNLOCKED = 1, // Vehicle is fully unlocked, allowing free entry by players and NPCs. ---- VEHICLELOCK_LOCKED = 2, // Vehicle is locked, preventing entry by players and NPCs. ---- VEHICLELOCK_LOCKOUT_PLAYER_ONLY = 3, // Vehicle locks out only players, allowing NPCs to enter. ---- VEHICLELOCK_LOCKED_PLAYER_INSIDE = 4, // Vehicle is locked once a player enters, preventing others from entering. ---- VEHICLELOCK_LOCKED_INITIALLY = 5, // Vehicle starts in a locked state, but may be unlocked through game events. ---- VEHICLELOCK_FORCE_SHUT_DOORS = 6, // Forces the vehicle's doors to shut and lock. ---- VEHICLELOCK_LOCKED_BUT_CAN_BE_DAMAGED = 7, // Vehicle is locked but can still be damaged. ---- VEHICLELOCK_LOCKED_BUT_BOOT_UNLOCKED = 8, // Vehicle is locked, but its trunk/boot remains unlocked. ---- VEHICLELOCK_LOCKED_NO_PASSENGERS = 9, // Vehicle is locked and does not allow passengers, except for the driver. ---- VEHICLELOCK_CANNOT_ENTER = 10 // Vehicle is completely locked, preventing entry entirely, even if previously inside. +--- // No specific lock state, vehicle behaves according to the game's default settings. +--- VEHICLELOCK_NONE = 0, +--- // Vehicle is fully unlocked, allowing free entry by players and NPCs. +--- VEHICLELOCK_UNLOCKED = 1, +--- // Vehicle is locked, preventing entry by players and NPCs. +--- VEHICLELOCK_LOCKED = 2, +--- // Vehicle locks out only players, allowing NPCs to enter. +--- VEHICLELOCK_LOCKOUT_PLAYER_ONLY = 3, +--- // Vehicle is locked once a player enters, preventing others from entering. +--- VEHICLELOCK_LOCKED_PLAYER_INSIDE = 4, +--- // Vehicle starts in a locked state, but may be unlocked through game events. +--- VEHICLELOCK_LOCKED_INITIALLY = 5, +--- // Forces the vehicle's doors to shut and lock. +--- VEHICLELOCK_FORCE_SHUT_DOORS = 6, +--- // Vehicle is locked but can still be damaged. +--- VEHICLELOCK_LOCKED_BUT_CAN_BE_DAMAGED = 7, +--- // Vehicle is locked, but its trunk/boot remains unlocked. +--- VEHICLELOCK_LOCKED_BUT_BOOT_UNLOCKED = 8, +--- // Vehicle is locked and does not allow passengers, except for the driver. +--- VEHICLELOCK_LOCKED_NO_PASSENGERS = 9, +--- // Vehicle is completely locked, preventing entry entirely, even if previously inside. +--- VEHICLELOCK_CANNOT_ENTER = 10 ---}; --- ---``` @@ -6149,14 +6365,44 @@ function SetVehicleHasStrongAxles(vehicle, toggle) end ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x1AA8A837D2169D94) ----This native does not have an official description. +---Sets whether the vehicle's lights can be broken. +--- +---``` +---NativeDB Introduced: v323 +---``` ---@param vehicle integer ----@param p1 boolean -function SetVehicleHasUnbreakableLights(vehicle, p1) end +---@param toggle boolean +function SetVehicleHasUnbreakableLights(vehicle, toggle) end ---@deprecated SetVehicleLightsCanBeVisiblyDamaged = SetVehicleHasUnbreakableLights +---**`VEHICLE` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0x1FD09E7390A74D54) +---Sets the vehicle headlight shadow flags. +--- +---``` +---NativeDB Introduced: v323 +---``` +--- +---```cpp +---enum eVehicleHeadlightShadowFlags { --- +--- // Default (Lights can be toggled between off, normal and high beams) --- +--- NO_HEADLIGHT_SHADOWS = 0, --- +--- // Lights Disabled (Lights are fully disabled, cannot be toggled) --- +--- HEADLIGHTS_CAST_DYNAMIC_SHADOWS = 1, --- +--- // Always On (Lights can be toggled between normal and high beams) --- +--- HEADLIGHTS_CAST_STATIC_SHADOWS = 2, --- +--- HEADLIGHTS_CAST_FULL_SHADOWS = 3 --- +---}; +---``` +---@param vehicle integer +---@param flag integer +function SetVehicleHeadlightShadows(vehicle, flag) end + +---@deprecated +SetVehicleLightsMode = SetVehicleHeadlightShadows + ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x06582AFF74894C75) ---This native does not have an official description. @@ -6273,46 +6519,40 @@ SetVehicleHudSpecialAbilityBarActive = SetVehicleKersAllowed ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xB385454F8791F57C) ----``` ----multiplier = brightness of head lights. ----this value isn't capped afaik. ----multiplier = 0.0 no lights ----multiplier = 1.0 default game value ----``` +---This multiplier has no limit, by default the game has this set to `1.0`. ---@param vehicle integer ---@param multiplier number function SetVehicleLightMultiplier(vehicle, multiplier) end ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x34E710FF01247C5A) +---Sets the vehicle lights state. Allowing for different lighting modes. +--- ---``` ----set's if the vehicle has lights or not. ----not an on off toggle. ----p1 = 0 ;vehicle normal lights, off then lowbeams, then highbeams ----p1 = 1 ;vehicle doesn't have lights, always off ----p1 = 2 ;vehicle has always on lights ----p1 = 3 ;or even larger like 4,5,... normal lights like =1 ----note1: when using =2 on day it's lowbeam,highbeam ----but at night it's lowbeam,lowbeam,highbeam ----note2: when using =0 it's affected by day or night for highbeams don't exist in daytime. +---NativeDB Introduced: v323 +---``` +--- +---```cpp +---enum eVehicleLightSetting { --- +--- // Normal light behavior. Lights cycle through off, then low beams, then high beams. --- +--- // Note: It's affected by day or night; high beams don't exist in daytime. --- +--- NO_VEHICLE_LIGHT_OVERRIDE = 0, --- +--- // Vehicle doesn't have lights, always off. --- +--- FORCE_VEHICLE_LIGHTS_OFF = 1, --- +--- // Vehicle has always-on lights. --- +--- // During day: Cycles between low beams and high beams. --- +--- // At night: Cycles between low beams, low beams, and high beams. --- +--- FORCE_VEHICLE_LIGHTS_ON = 2, --- +--- // Sets vehicle lights on. Behaves like normal lights (same as 0). --- +--- SET_VEHICLE_LIGHTS_ON = 3, --- +--- // Sets vehicle lights off. Behaves like normal lights (same as 0). --- +--- SET_VEHICLE_LIGHTS_OFF = 4 --- +---}; ---``` ---@param vehicle integer ---@param state integer function SetVehicleLights(vehicle, state) end ----**`VEHICLE` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0x1FD09E7390A74D54) ----``` ----p1 can be either 0, 1 or 2. ----Determines how vehicle lights behave when toggled. ----0 = Default (Lights can be toggled between off, normal and high beams) ----1 = Lights Disabled (Lights are fully disabled, cannot be toggled) ----2 = Always On (Lights can be toggled between normal and high beams) ----``` ----@param vehicle integer ----@param p1 integer -function SetVehicleLightsMode(vehicle, p1) end - ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x60BF608F1B8CD1B6) ---This native does not have an official description. @@ -6519,19 +6759,6 @@ function SetVehicleNeonLightsColor_2(vehicle, color) end ---@param b integer function SetVehicleNeonLightsColour(vehicle, r, g, b) end ----**`VEHICLE` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0xC8E9B6B71B8E660D) ----``` ----NativeDB Introduced: v1604 ----NativeDB Added Parameter 2 (2060): float level ----NativeDB Added Parameter 3 (2060): float power ----NativeDB Added Parameter 4 (2060): float rechargeTime ----NativeDB Added Parameter 5 (2060): BOOL disableSound ----``` ----@param vehicle integer ----@param toggle boolean -function SetVehicleNitroEnabled(vehicle, toggle) end - ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x95A88F0B409CDA47) ---This native does not have an official description. @@ -6541,15 +6768,7 @@ function SetVehicleNumberPlateText(vehicle, plateText) end ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x9088EB5A43FFB0A1) ----``` ----Plates: ----Blue/White - 0 ----Yellow/black - 1 ----Yellow/Blue - 2 ----Blue/White2 - 3 ----Blue/White3 - 4 ----Yankton - 5 ----``` +---Please refer to [`GET_VEHICLE_NUMBER_PLATE_TEXT_INDEX`](#\_0xF11BC2DD9A3E7195) for plate indicies. ---@param vehicle integer ---@param plateIndex integer function SetVehicleNumberPlateTextIndex(vehicle, plateIndex) end @@ -6968,6 +7187,17 @@ function SetVehicleUseCutsceneWheelCompression(p0, p1, p2, p3) end ---@deprecated SetAllVehiclesSpawn = SetVehicleUseCutsceneWheelCompression +---**`VEHICLE` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0x1980F68872CC2C3D) +---``` +---NativeDB Introduced: v3095 +---``` +--- +---Enables or disables the use of the vehicle's horn button for activating the nitrous system. +---@param vehicle integer +---@param bToggle boolean +function SetVehicleUseHornButtonForNitrous(vehicle, bToggle) end + ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xC45C27EF50F36ADC) ---This native does not have an official description. @@ -7038,16 +7268,16 @@ function SetVehicleWheelType(vehicle, wheelType) end ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x57C51E6BAD752696) ----``` +---```cpp ---enum WindowTints ---{ ---- WINDOWTINT_NONE, ---- WINDOWTINT_PURE_BLACK, ---- WINDOWTINT_DARKSMOKE, ---- WINDOWTINT_LIGHTSMOKE, ---- WINDOWTINT_STOCK, ---- WINDOWTINT_LIMO, ---- WINDOWTINT_GREEN +--- WINDOWTINT_NONE = 0, +--- WINDOWTINT_PURE_BLACK = 1, +--- WINDOWTINT_DARKSMOKE = 2, +--- WINDOWTINT_LIGHTSMOKE = 3, +--- WINDOWTINT_STOCK = 4, +--- WINDOWTINT_LIMO = 5, +--- WINDOWTINT_GREEN = 6 ---}; ---``` ---@param vehicle integer @@ -7197,7 +7427,9 @@ function SwitchTrainTrack(trackId, state) end ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x2A1F4F37F95BAD08) ----This native does not have an official description. +---Enables or disables a vehicle mod by index (`modType`) for a given vehicle. +--- +---`eVehicleModType` enum, used for `modType` index can be found under [`SET_VEHICLE_MOD`](#\_0x6AF0636DDEDCB6DD). ---@param vehicle integer ---@param modType integer ---@param toggle boolean diff --git a/library/natives/GTAV/WEAPON.lua b/library/natives/GTAV/WEAPON.lua index cf82a1b..4e66deb 100644 --- a/library/natives/GTAV/WEAPON.lua +++ b/library/natives/GTAV/WEAPON.lua @@ -159,13 +159,11 @@ function GetAmmoInPedWeapon(ped, weaponhash) end ---**`WEAPON` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x8483E98E8B888AE2) ----``` ----p1 is always 0 in the scripts. ----``` +---This native does not have an official description. ---@param ped integer ----@param p1 boolean +---@param ignoreAmmoCount boolean ---@return integer -function GetBestPedWeapon(ped, p1) end +function GetBestPedWeapon(ped, ignoreAmmoCount) end ---**`WEAPON` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x1017582BCD3832DC) @@ -513,7 +511,55 @@ function GiveDelayedWeaponToPed(ped, weaponHash, ammoCount, bForceInHand) end ---**`WEAPON` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x68F8BE6AF5CDF8A6) ----This native does not have an official description. +---List of all available loadouts: +--- +---``` +---LOADOUT_DEFAULT +---LOADOUT_ANIMAL +---LOADOUT_COUGAR +---LOADOUT_HILLBILLY +---LOADOUT_CULT +---LOADOUT_CHEAT_0 +---LOADOUT_CHEAT_1 +---LOADOUT_GUARD +---LOADOUT_NETWORK_BOT +---LOADOUT_LOST +---LOADOUT_LOST_L1 +---LOADOUT_LOST_L2 +---LOADOUT_LOST_L3 +---LOADOUT_MEXICAN +---LOADOUT_MEXICAN_L1 +---LOADOUT_MEXICAN_L2 +---LOADOUT_MEXICAN_L3 +---LOADOUT_FAMILY +---LOADOUT_ASIAN +---LOADOUT_SECUR +---LOADOUT_POLICE_GUARD +---LOADOUT_COP +---LOADOUT_COP_L1 +---LOADOUT_COP_L2 +---LOADOUT_COP_L3 +---LOADOUT_SWAT +---LOADOUT_SWAT_NO_LASER +---LOADOUT_COP_SHOTGUN +---LOADOUT_FIREMAN +---LOADOUT_COP_HELI +---LOADOUT_COP_BOAT +---LOADOUT_ARMY +---LOADOUT_ANIMAL_RETRIEVER +---LOADOUT_SMALL_DOG +---LOADOUT_TIGER_SHARK +---LOADOUT_HAMMERHEAD_SHARK +---LOADOUT_KILLER_WHALE +---LOADOUT_BOAR +---LOADOUT_PIG +---LOADOUT_COYOTE +---LOADOUT_DEER +---LOADOUT_HEN +---LOADOUT_RABBIT +---LOADOUT_CAT +---LOADOUT_COW +---``` ---@param ped integer ---@param loadoutHash integer | string function GiveLoadoutToPed(ped, loadoutHash) end @@ -1108,40 +1154,47 @@ function SetPlayerAirDefenseZoneFlag(player, zoneId, enable) end ---**`WEAPON` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x1055AC3A667F09D9) ----``` ----Changes the selected ped aiming animation style. ----Note : You must use GET_HASH_KEY! ----Strings to use with GET_HASH_KEY : ---- "Ballistic", ---- "Default", ---- "Fat", ---- "Female", ---- "FirstPerson", ---- "FirstPersonAiming", ---- "FirstPersonFranklin", ---- "FirstPersonFranklinAiming", ---- "FirstPersonFranklinRNG", ---- "FirstPersonFranklinScope", ---- "FirstPersonMPFemale", ---- "FirstPersonMichael", ---- "FirstPersonMichaelAiming", ---- "FirstPersonMichaelRNG", ---- "FirstPersonMichaelScope", ---- "FirstPersonRNG", ---- "FirstPersonScope", ---- "FirstPersonTrevor", ---- "FirstPersonTrevorAiming", ---- "FirstPersonTrevorRNG", ---- "FirstPersonTrevorScope", ---- "Franklin", ---- "Gang", ---- "Gang1H", ---- "GangFemale", ---- "Hillbilly", ---- "MP_F_Freemode", ---- "Michael", ---- "SuperFat", ---- "Trevor" +---Changes the selected ped aiming animation style, you can find the list of animations below. +--- +---These are stored in the `weaponanimations.meta` file located in `Grand Theft Auto V\update\update.rpf\common\data\ai\weaponanimations.meta`. +--- +---For Lua, it's best if you send the animation using [compile-time jenkins](https://cookbook.fivem.net/2019/06/23/lua-support-for-compile-time-jenkins-hashes/) hashes to avoid overhead. An example is shown down below. +--- +---### Animations +--- +---```cpp +---enum eWeaponAnimationOverrides { +--- Ballistic = 0x5534A626, +--- Default = 0xE4DF46D5, +--- Franklin = 0x44C24694, +--- Gang = 0xBC066B98, +--- Michael = 0x55932F38, +--- MP_F_Freemode = 0xACB10C83, +--- Trevor = 0x2737D5AC, +--- Hillbilly = 0x8503D409, +--- Gang1H = 0x724A7AB7, +--- FirstPerson = 0xEE38E8E0, +--- FirstPersonAiming = 0xC76297A3, +--- FirstPersonRNG = 0xA4FDD608, +--- FirstPersonScope = 0x28117C22, +--- FirstPersonMichael = 0xEAA2550B, +--- FirstPersonMichaelAiming = 0x3E6FF30F, +--- FirstPersonMichaelRNG = 0xB7A826C1, +--- FirstPersonMichaelScope = 0xC554CF97, +--- FirstPersonFranklin = 0xC407163A, +--- FirstPersonFranklinAiming = 0x3D4B7B03, +--- FirstPersonFranklinRNG = 0xBE79B0B4, +--- FirstPersonFranklinScope = 0xAFEA6593, +--- FirstPersonTrevor = 0xA65D5351, +--- FirstPersonTrevorAiming = 0xF9BE8ED9, +--- FirstPersonTrevorRNG = 0xD181ED09, +--- FirstPersonTrevorScope = 0x34A67D6D, +--- FirstPersonMPFemale = 0x8431583F, +--- Fat = 0xC531A409, +--- SuperFat = 0x529E5780, +--- Female = 0x6D155A1B, +--- GangFemale = 0x678ADF82, +---} ---``` ---@param ped integer ---@param animStyle integer | string