diff --git a/library/natives/GTAV/AUDIO.lua b/library/natives/GTAV/AUDIO.lua index 3307ef9..8a94fe6 100644 --- a/library/natives/GTAV/AUDIO.lua +++ b/library/natives/GTAV/AUDIO.lua @@ -434,12 +434,16 @@ function GetSoundIdFromNetworkId(netId) end ---@return integer function GetStreamPlayTime() end +---**`AUDIO` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0xAA19F5572C38B564) +---This native does not have an official description. +---@param textLabel string +---@return integer +function GetVariationChosenForScriptedLine(textLabel) end + ---**`AUDIO` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x02165D55000219AC) ----``` ----Returns hash of default vehicle horn ----Hash is stored in audVehicleAudioEntity ----``` +---This native does not have an official description. ---@param vehicle integer ---@return integer function GetVehicleDefaultHorn(vehicle) end @@ -461,23 +465,28 @@ GetVehicleHornHash = GetVehicleDefaultHornIgnoreMods ---``` ---@param vehicle integer ---@return integer -function GetVehicleDefaultHornVariation(vehicle) end +function GetVehicleHornSoundIndex(vehicle) end + +---@deprecated +GetVehicleDefaultHornVariation = GetVehicleHornSoundIndex ---**`AUDIO` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x544810ED9DB6BBE6) ----``` ----HAS_* ----``` +---This native does not have an official description. ---@return boolean -function HasMultiplayerAudioDataLoaded() end +function HasLoadedMpDataSet() end + +---@deprecated +HasMultiplayerAudioDataLoaded = HasLoadedMpDataSet ---**`AUDIO` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x5B50ABB1FE3746F4) ----``` ----HAS_* ----``` +---This native does not have an official description. ---@return boolean -function HasMultiplayerAudioDataUnloaded() end +function HasLoadedSpDataSet() end + +---@deprecated +HasMultiplayerAudioDataUnloaded = HasLoadedSpDataSet ---**`AUDIO` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xFCBDCE714A7C88E5) @@ -488,58 +497,79 @@ function HasSoundFinished(soundId) end ---**`AUDIO` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x8F8C0E370AE62F5C) ----``` ----NativeDB Added Parameter 3: Any p2 ----``` ----@param p0 any ----@param p1 any ----@return any -function HintAmbientAudioBank(p0, p1) end +---This native is marked as a deprecated native internally, use [HINT_SCRIPT_AUDIO_BANK](#\_0xFB380A29641EC31A) instead +---@param bankName string +---@param bOverNetwork boolean +---@return boolean +function HintAmbientAudioBank(bankName, bOverNetwork) end + +---**`AUDIO` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0x40763EA7B9B783E7) +---This is marked as a deprecated function internally, please use [HINT_SCRIPT_AUDIO_BANK](#\_0xFB380A29641EC31A) instead. +---@param bankName string +---@param bOverNetwork boolean +---@param playerBits integer +---@return boolean +function HintMissionAudioBank(bankName, bOverNetwork, playerBits) end ---**`AUDIO` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xFB380A29641EC31A) ----``` ----NativeDB Added Parameter 3: Any p2 ----``` ----@param p0 any ----@param p1 integer ----@return any -function HintScriptAudioBank(p0, p1) end +---Hints that this bank would be good to load if there are free slots. +---Does not guarentee loading of the bank, [REQUEST_SCRIPT_AUDIO_BANK](#\_0xFE02FFBED8CA9D99) MUST be used as normal before triggering sounds" +--- +---This native has a new argument on newer game builds: +--- +---* **playerBits**: likely used to specifiy players to sync to as a bit mask (1 << (0-128)) +---@param bankName string +---@param bOverNetwork boolean +---@return boolean +function HintScriptAudioBank(bankName, bOverNetwork) end ---**`AUDIO` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0xA018A12E5C5C2FA6) +---[Native Documentation](https://docs.fivem.net/natives/?_0x950A154B8DAB6185) ---This native does not have an official description. ----@param p0 any ----@return any, any -function InterruptConversation(p0) end +---@param audioName string +---@param entity integer +function InitSynchSceneAudioWithEntity(audioName, entity) end + +---@deprecated +SetSynchronizedAudioEventPositionThisFrame = InitSynchSceneAudioWithEntity + +---**`AUDIO` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0xC8EDE9BDBCCBA6D4) +---This native does not have an official description. +---@param audioName string +---@param x number +---@param y number +---@param z number +function InitSynchSceneAudioWithPosition(audioName, x, y, z) end + +---**`AUDIO` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0xA018A12E5C5C2FA6) +---Handles conversation interrupts, using the code-side system for improved timing and to minimize unfriendly logic interactions. +---@param interrupterPed integer +---@param context string +---@param voiceName string +function InterruptConversation(interrupterPed, context, voiceName) end ---**`AUDIO` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x8A694D7A68F8DC38) ----``` ----One call found in the b617d scripts: ----AUDIO::_8A694D7A68F8DC38(NETWORK::NET_TO_PED(l_3989._f26F[0/*1*/]), "CONV_INTERRUPT_QUIT_IT", "LESTER"); ----``` ----@param ped integer ----@param p1 string ----@param p2 string -function InterruptConversationAndPause(ped, p1, p2) end +---Handles conversation interrupts and pauses, using the code-side system for improved timing and to minimize unfriendly logic interactions. +---@param interrupterPed integer +---@param context string +---@param voiceName string +function InterruptConversationAndPause(interrupterPed, context, voiceName) end ---**`AUDIO` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x226435CB96CCFC8C) ----``` ----Example: ----bool playing = AUDIO::IS_ALARM_PLAYING("PORT_OF_LS_HEIST_FORT_ZANCUDO_ALARMS"); ----``` +---This native does not have an official description. ---@param alarmName string ---@return boolean function IsAlarmPlaying(alarmName) end ---**`AUDIO` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x932C2D096A2C3FFF) ----``` ----Common in the scripts: ----AUDIO::IS_AMBIENT_SPEECH_DISABLED(PLAYER::PLAYER_PED_ID()); ----``` +---This native does not have an official description. ---@param ped integer ---@return boolean function IsAmbientSpeechDisabled(ped) end @@ -565,6 +595,14 @@ function IsAmbientZoneEnabled(ambientZone) end ---@return boolean function IsAnimalVocalizationPlaying(pedHandle) end +---**`AUDIO` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0x30CA2EF91D15ADF8) +---``` +---NativeDB Introduced: v2189 +---``` +---@return boolean +function IsAnyPositionalSpeechPlaying() end + ---**`AUDIO` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x729072355FA39EC9) ---This native does not have an official description. @@ -828,23 +866,6 @@ function N_0x2acabed337622df2(p0) end ---@return any function N_0x2dd39bf3e2f9c47f() end ----**`AUDIO` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0x30CA2EF91D15ADF8) ----``` ----NativeDB Introduced: v2189 ----``` ----@return any -function N_0x30ca2ef91d15adf8() end - ----**`AUDIO` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0x40763EA7B9B783E7) ----This native does not have an official description. ----@param p0 string ----@param p1 integer ----@param p2 integer ----@return any -function N_0x40763ea7b9b783e7(p0, p1, p2) end - ---**`AUDIO` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x43FA0DFC5DF87815) ---This native does not have an official description. @@ -937,12 +958,6 @@ function N_0x9bd7bd55e4533183(p0, p1, p2) end ---@param p1 number function N_0x9d3af56e94c9ae98(vehicle, p1) end ----**`AUDIO` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0xAA19F5572C38B564) ----This native does not have an official description. ----@return any, any -function N_0xaa19f5572c38b564() end - ---**`AUDIO` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xB542DE8C3D1CB210) ---This native does not have an official description. @@ -971,15 +986,6 @@ function N_0xbf4dc1784be94dfa(ped, p1, hash) end ---@param vehicle integer function N_0xc1805d05e6d4fe10(vehicle) end ----**`AUDIO` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0xC8EDE9BDBCCBA6D4) ----This native does not have an official description. ----@param p1 number ----@param p2 number ----@param p3 number ----@return any -function N_0xc8ede9bdbccba6d4(p1, p2, p3) end - ---**`AUDIO` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xD2DCCD8E16E20997) ---This native does not have an official description. @@ -2197,34 +2203,6 @@ function SetSirenWithNoDriver(vehicle, toggle) end ---@param toggle boolean function SetStaticEmitterEnabled(emitterName, toggle) end ----**`AUDIO` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0x950A154B8DAB6185) ----``` ----Sets the position of the audio event to the entity's position for one frame(?) ----if (l_8C3 == 0) { ---- sub_27fd1(0, -1, 1); ---- if (PED::IS_SYNCHRONIZED_SCENE_RUNNING(l_87D)) { ---- AUDIO::STOP_SYNCHRONIZED_AUDIO_EVENT(l_87D); ---- } ---- if (sub_7dd(l_A00)) { ---- AUDIO::_950A154B8DAB6185("PAP2_IG1_POPPYSEX", l_A00); ---- } ---- sub_91c("TK************ SETTING SYNCH SCENE AUDIO POSITION THIS FRAME ************TK"); ---- l_8C3 = 1; ----} ------ ----Found in the b617d scripts, duplicates removed: ----AUDIO::_950A154B8DAB6185("CAR_5_IG_6", l_7FE[1/*1*/]); ----AUDIO::_950A154B8DAB6185("EX03_TRAIN_BIKE_LAND", PLAYER::PLAYER_PED_ID()); ----AUDIO::_950A154B8DAB6185("FBI_2_MCS_1_LeadIn", l_40[2/*1*/]); ----AUDIO::_950A154B8DAB6185("FIN_C2_MCS_1", l_24C[0/*1*/]); ----AUDIO::_950A154B8DAB6185("MNT_DNC", l_5F); ----AUDIO::_950A154B8DAB6185("PAP2_IG1_POPPYSEX", l_A00); ----``` ----@param p0 string ----@param p1 integer -function SetSynchronizedAudioEventPositionThisFrame(p0, p1) end - ---**`AUDIO` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x19F21E63AE6EAE4E) ---This native does not have an official description. diff --git a/library/natives/GTAV/CAM.lua b/library/natives/GTAV/CAM.lua index 4c5da95..e49281a 100644 --- a/library/natives/GTAV/CAM.lua +++ b/library/natives/GTAV/CAM.lua @@ -848,11 +848,10 @@ function IsScreenFadingOut() end ---**`CAM` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xC912AF078AF19212) +---Determines if a global camera shake is currently active. You can stop the currently active global camera shake using [STOP_SCRIPT_GLOBAL_SHAKING](#\_0x1C9D7949FA533490). +--- ---``` ----In drunk_controller.c4, sub_309 ----if (CAM::IS_SCRIPT_GLOBAL_SHAKING()) { ---- CAM::STOP_SCRIPT_GLOBAL_SHAKING(0); ----} +---NativeDB Introduced: v323 ---``` ---@return boolean function IsScriptGlobalShaking() end @@ -1466,11 +1465,10 @@ function SetCamFarDof(cam, farDOF) end ---**`CAM` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xB13C14F66A00D047) +---Adjusts the field of view (FOV) for a specified camera, allowing for a wider or narrower perspective of the game world. The field of view is measured in degrees and affects how much of the game world is visible at any given moment through the camera. +--- ---``` ----Sets the field of view of the cam. ------------------------------------------------- ----Min: 1.0f ----Max: 130.0f +---NativeDB Introduced: v323 ---``` ---@param cam integer ---@param fieldOfView number @@ -2144,40 +2142,90 @@ function StopGameplayCamShaking(bStopImmediately) end ---**`CAM` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xF46C581C61718916) ----This native does not have an official description. ----@param p0 boolean -function StopGameplayHint(p0) end +---Terminates the current gameplay hint camera, with an option for immediate cessation or a gradual fade out. +--- +---``` +---NativeDB Introduced: v323 +---``` +---@param bStopImmediately boolean +function StopGameplayHint(bStopImmediately) end ---**`CAM` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xC819F3CBB62BF692) +---Instructs the game engine to stop rendering scripted cameras and transition back to the gameplay camera, optionally applying custom blending and rendering options. +--- +---```cpp +---enum eRenderingOptionFlags { +--- RO_NO_OPTIONS = 0, +--- RO_STOP_RENDERING_OPTION_WHEN_PLAYER_EXITS_INTO_COVER = 1 +---}; +---``` +--- +---```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 +---}; +---``` +--- ---``` ----This native makes the gameplay camera zoom into first person/third person with a special effect. +---NativeDB Added Parameter 4: int renderingOptions : An integer bitmask of eRenderingOptionFlags to apply specific rendering behaviors during the transition. RO_NO_OPTIONS signifies no special options are applied. ---``` --- ---``` ----NativeDB Added Parameter 4: Any p3 +---NativeDB Introduced: v323 ---``` ----@param render boolean ----@param p1 number ----@param p2 integer -function StopRenderingScriptCamsUsingCatchUp(render, p1, p2) end +---@param bShouldApplyAcrossAllThreads boolean +---@param distanceToBlend number +---@param blendType integer +function StopRenderingScriptCamsUsingCatchUp(bShouldApplyAcrossAllThreads, distanceToBlend, blendType) end ---@deprecated RenderFirstPersonCam = StopRenderingScriptCamsUsingCatchUp ---**`CAM` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x1C9D7949FA533490) +---Stops the currently active global camera shake that was initiated by a script. You can check if a global camera shake is active using [IS_SCRIPT_GLOBAL_SHAKING](#\_0xC912AF078AF19212). +--- ---``` ----In drunk_controller.c4, sub_309 ----if (CAM::IS_SCRIPT_GLOBAL_SHAKING()) { ---- CAM::STOP_SCRIPT_GLOBAL_SHAKING(0); ----} +---NativeDB Introduced: v323 ---``` ----@param p0 boolean -function StopScriptGlobalShaking(p0) end +---@param bStopImmediately boolean +function StopScriptGlobalShaking(bStopImmediately) end ---**`CAM` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x6493CF69859B116A) ----This native does not have an official description. -function UseStuntCameraThisFrame() end +---Applies a predefined set of vehicle camera settings optimized for capturing stunts, effective for the current game update/frame. +--- +---``` +---NativeDB Introduced: v791 +---``` +function UseVehicleCamStuntSettingsThisUpdate() end + +---@deprecated +UseStuntCameraThisFrame = UseVehicleCamStuntSettingsThisUpdate diff --git a/library/natives/GTAV/GRAPHICS.lua b/library/natives/GTAV/GRAPHICS.lua index 8b26842..5f8c603 100644 --- a/library/natives/GTAV/GRAPHICS.lua +++ b/library/natives/GTAV/GRAPHICS.lua @@ -2,8 +2,9 @@ ---**`GRAPHICS` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xB302244A1839BDAD) ----``` ----decal types: +---Places a decal into the world +--- +---```cs ---public enum DecalTypes ---{ --- splatters_blood = 1010, @@ -64,12 +65,12 @@ ---@param posX number ---@param posY number ---@param posZ number ----@param p4 number ----@param p5 number ----@param p6 number ----@param p7 number ----@param p8 number ----@param p9 number +---@param dirX number +---@param dirY number +---@param dirZ number +---@param sideX number +---@param sideY number +---@param sideZ number ---@param width number ---@param height number ---@param rCoef number @@ -77,11 +78,11 @@ ---@param bCoef number ---@param opacity number ---@param timeout number ----@param p17 boolean ----@param p18 boolean ----@param p19 boolean +---@param isLongRange boolean +---@param isDynamic boolean +---@param useComplexColn boolean ---@return integer -function AddDecal(decalType, posX, posY, posZ, p4, p5, p6, p7, p8, p9, width, height, rCoef, gCoef, bCoef, opacity, timeout, p17, p18, p19) end +function AddDecal(decalType, posX, posY, posZ, dirX, dirY, dirZ, sideX, sideY, sideZ, width, height, rCoef, gCoef, bCoef, opacity, timeout, isLongRange, isDynamic, useComplexColn) end ---**`GRAPHICS` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x9CD43EEE12BF4DD0) diff --git a/library/natives/GTAV/HUD.lua b/library/natives/GTAV/HUD.lua index 1d5a1ba..9c24062 100644 --- a/library/natives/GTAV/HUD.lua +++ b/library/natives/GTAV/HUD.lua @@ -669,22 +669,11 @@ function DisplayCash(display) end ---**`HUD` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x960C9FF8F616E41C) ----``` ----The messages are localized strings. ----Examples: ----"No_bus_money" ----"Enter_bus" ----"Tour_help" ----"LETTERS_HELP2" ----"Dummy" ----**The bool appears to always be false (if it even is a bool, as it's represented by a zero)** ------------ ----p1 doesn't seem to make a difference, regardless of the state it's in. ----picture of where on the screen this is displayed? ----``` ----@param message string ----@param p1 boolean -function DisplayHelpTextThisFrame(message, p1) end +---Shows a help message for one frame. +---Do note that this message doesn't get added to the Pause Menu info section. +---@param pTextLabel string +---@param bCurvedWindow boolean +function DisplayHelpTextThisFrame(pTextLabel, bCurvedWindow) end ---**`HUD` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xA6294919E56FF02A) diff --git a/library/natives/GTAV/MISC.lua b/library/natives/GTAV/MISC.lua index 63c6a9e..e441ce7 100644 --- a/library/natives/GTAV/MISC.lua +++ b/library/natives/GTAV/MISC.lua @@ -1006,6 +1006,28 @@ function GetIsAutoSaveOff() end ---@return boolean function GetIsPlayerInAnimalForm() end +---**`MISC` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0xF56DFB7B61BE7276) +---Determines whether a line segment intersects a plane and, if so, returns the parameter value at which this intersection occurs. +--- +---``` +---NativeDB Introduced: v323 +---``` +---@param x1 number +---@param y1 number +---@param z1 number +---@param x2 number +---@param y2 number +---@param z2 number +---@param planeX number +---@param planeY number +---@param planeZ number +---@param planeNormalX number +---@param planeNormalY number +---@param planeNormalZ number +---@return boolean, number +function GetLinePlaneIntersection(x1, y1, z1, x2, y2, z2, planeX, planeY, planeZ, planeNormalX, planeNormalY, planeNormalZ) end + ---**`MISC` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xA33CDCCDA663159E) ---This native does not have an official description. @@ -2031,24 +2053,6 @@ function N_0xeb2104e905c6f2e9() end ---@return any function N_0xebd3205a207939ed() end ----**`MISC` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0xF56DFB7B61BE7276) ----This native does not have an official description. ----@param p0 number ----@param p1 number ----@param p2 number ----@param p3 number ----@param p4 number ----@param p5 number ----@param p6 number ----@param p7 number ----@param p8 number ----@param p9 number ----@param p10 number ----@param p11 number ----@return boolean, number -function N_0xf56dfb7b61be7276(p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11) end - ---**`MISC` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xFA3FFB0EEBC288A3) ---``` @@ -2081,14 +2085,6 @@ function N_0xfaa457ef263e8763(name) end ---This native does not have an official description. function N_0xfb00ca71da386228() end ----**`MISC` `client`** ----[Native Documentation](https://docs.fivem.net/natives/?_0xFB80AB299D2EE1BD) ----``` ----Toggles some stunt jump stuff. ----``` ----@param toggle boolean -function N_0xfb80ab299d2ee1bd(toggle) end - ---**`MISC` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x9243BAC96D64C050) ---This native does not have an official description. @@ -3003,6 +2999,16 @@ function Tan(p0) end ---@param scriptName string function TerminateAllScriptsWithThisName(scriptName) end +---**`MISC` `client`** +---[Native Documentation](https://docs.fivem.net/natives/?_0xFB80AB299D2EE1BD) +---Enable/disable optional stunt camera. +--- +---``` +---NativeDB Introduced: v757 +---``` +---@param toggle boolean +function ToggleShowOptionalStuntJumpCamera(toggle) end + ---**`MISC` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xEA2F2061875EED90) ---``` diff --git a/library/natives/GTAV/PATHFIND.lua b/library/natives/GTAV/PATHFIND.lua index 89feacd..f1e5daf 100644 --- a/library/natives/GTAV/PATHFIND.lua +++ b/library/natives/GTAV/PATHFIND.lua @@ -4,7 +4,17 @@ ---[Native Documentation](https://docs.fivem.net/natives/?_0xFCD5C8E06E502F5A) ---Creates a navmesh blocking object, vehicles will avoid driving through this area. --- ----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/) +---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/) +--- +---``` +---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 +---} +---``` ---@param x number ---@param y number ---@param z number @@ -12,10 +22,10 @@ ---@param length number ---@param height number ---@param heading number ----@param p7 boolean ----@param p8 any +---@param bPermanent boolean +---@param flags integer ---@return any -function AddNavmeshBlockingObject(x, y, z, width, length, height, heading, p7, p8) end +function AddNavmeshBlockingObject(x, y, z, width, length, height, heading, bPermanent, flags) end ---**`PATHFIND` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x387EAD7EE42F6685) @@ -67,15 +77,16 @@ function ClearGpsDisabledZoneAtIndex(index) end ---**`PATHFIND` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x4C8872D8CDBE1B8B) ----This native does not have an official description. ----@param p0 any ----@param p1 any ----@param p2 any ----@param p3 any ----@param p4 any ----@param p5 any ----@param p6 any -function DisableNavmeshInArea(p0, p1, p2, p3, p4, p5, p6) end +---Use this if you want to completely disable a large area of navmesh. +---For smaller areas, use [`ADD_NAVMESH_BLOCKING_OBJECT`](#\_0xFCD5C8E06E502F5A) instead. +---@param posMinX number +---@param posMinY number +---@param posMinZ number +---@param posMaxX number +---@param posMaxY number +---@param posMaxZ number +---@param bDisable boolean +function DisableNavmeshInArea(posMinX, posMinY, posMinZ, posMaxX, posMaxY, posMaxZ, bDisable) end ---**`PATHFIND` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x0EAEB0DB4B132399) @@ -349,14 +360,14 @@ function GetNthClosestVehicleNodeWithHeading(x, y, z, nthClosest, unknown2, unkn ---**`PATHFIND` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x01708E8DD3FF8C65) ---This native does not have an official description. ----@param p0 number ----@param p1 number ----@param p2 number ----@param p3 number ----@param p4 number ----@param p5 number +---@param posMinX number +---@param posMinY number +---@param posMinZ number +---@param posMaxX number +---@param posMaxY number +---@param posMaxZ number ---@return integer -function GetNumNavmeshesExistingInArea(p0, p1, p2, p3, p4, p5) end +function GetNumNavmeshesExistingInArea(posMinX, posMinY, posMinZ, posMaxX, posMaxY, posMaxZ) end ---**`PATHFIND` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x16F46FB18C8009E4) @@ -741,14 +752,14 @@ function SetRoadsInArea(x1, y1, z1, x2, y2, z2, nodeEnabled, unknown2) end ---**`PATHFIND` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x109E99373F290687) ---This native does not have an official description. ----@param p0 any ----@param p1 number ----@param p2 number ----@param p3 number ----@param p4 number ----@param p5 number ----@param p6 number ----@param p7 number ----@param p8 any -function UpdateNavmeshBlockingObject(p0, p1, p2, p3, p4, p5, p6, p7, p8) end +---@param object integer +---@param posX number +---@param posY number +---@param posZ number +---@param scaleX number +---@param scaleY number +---@param scaleZ number +---@param heading number +---@param flags integer +function UpdateNavmeshBlockingObject(object, posX, posY, posZ, scaleX, scaleY, scaleZ, heading, flags) end diff --git a/library/natives/GTAV/PED.lua b/library/natives/GTAV/PED.lua index 4e690d1..510d48b 100644 --- a/library/natives/GTAV/PED.lua +++ b/library/natives/GTAV/PED.lua @@ -67,19 +67,19 @@ function AddRelationshipGroup(name) end ---**`PED` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x1B5C85C612E5256E) ----This native does not have an official description. ----@param x1 number ----@param y1 number ----@param z1 number ----@param x2 number ----@param y2 number ----@param z2 number ----@param p6 boolean ----@param p7 boolean ----@param p8 boolean ----@param p9 boolean +---Sets an area where scenarios are blocked +---@param posMinX number +---@param posMinY number +---@param posMinZ number +---@param posMaxX number +---@param posMaxY number +---@param posMaxZ number +---@param network boolean +---@param cancelActive boolean +---@param blockPeds boolean +---@param blockVehicles boolean ---@return integer -function AddScenarioBlockingArea(x1, y1, z1, x2, y2, z2, p6, p7, p8, p9) end +function AddScenarioBlockingArea(posMinX, posMinY, posMinZ, posMaxX, posMaxY, posMaxZ, network, cancelActive, blockPeds, blockVehicles) end ---**`PED` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x697157CED63F18D4) @@ -3825,9 +3825,9 @@ function RemoveRelationshipGroup(groupHash) end ---**`PED` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x31D16B74C6E29D66) ---This native does not have an official description. ----@param p0 any ----@param p1 boolean -function RemoveScenarioBlockingArea(p0, p1) end +---@param scenarioBlockingIndex integer +---@param bNetwork boolean +function RemoveScenarioBlockingArea(scenarioBlockingIndex, bNetwork) end ---**`PED` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xD37401D78A929A49) @@ -6259,13 +6259,16 @@ function SetPedShootsAtCoord(ped, x, y, z, toggle) end ---**`PED` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xEC6935EBE0847B90) ----This native does not have an official description. ----@param p0 any ----@param p1 any ----@param p2 any ----@param p3 any ----@return any -function SetPedShouldPlayDirectedScenarioExit(p0, p1, p2, p3) end +---When this ped receives its next script task, they will exit from their scenario using the normal scenario exit. +---Exiting the scenario may take several frames while the ped is playing the exit animation. +---If the ped is not currently using a scenario at the time of the command or 0,0,0 is specified as the reaction position, +---then the ped will by default attempt to direct their exit forwards. +---@param ped integer +---@param x number +---@param y number +---@param z number +---@return boolean +function SetPedShouldPlayDirectedScenarioExit(ped, x, y, z) end ---**`PED` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xEEED8FAFEC331A70) @@ -6586,10 +6589,10 @@ function SetRelationshipGroupDontAffectWantedLevel(group, p1) end ---**`PED` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x7A556143A1C03898) ----This native does not have an official description. ----@param p0 number ----@param p1 number -function SetScenarioPedDensityMultiplierThisFrame(p0, p1) end +---Set the number of scenario peds on the entire map +---@param interiorMult number +---@param exteriorMult number +function SetScenarioPedDensityMultiplierThisFrame(interiorMult, exteriorMult) end ---**`PED` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x28157D43CF600981) diff --git a/library/natives/GTAV/TASK.lua b/library/natives/GTAV/TASK.lua index d5a36e7..a517c61 100644 --- a/library/natives/GTAV/TASK.lua +++ b/library/natives/GTAV/TASK.lua @@ -1576,19 +1576,40 @@ function TaskFlushRoute() end ---**`TASK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x15D3A79D4E44B913) ----``` ----If no timeout, set timeout to -1. +---Sometimes a path may not be able to be found. This could happen because there simply isn't any way to get there, or maybe a bunch of dynamic objects have blocked the way, +---or maybe the destination is too far away. In this case the ped will simply stand still. +---To identify when this has happened, you can use GET_NAVMESH_ROUTE_RESULT. This will help you find situations where peds cannot get to their target. +--- +---```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. +---}; ---``` ---@param ped integer ---@param x number ---@param y number ---@param z number ----@param speed number ----@param timeout integer ----@param stoppingRange number ----@param persistFollowing boolean ----@param unk number -function TaskFollowNavMeshToCoord(ped, x, y, z, speed, timeout, stoppingRange, persistFollowing, unk) end +---@param moveBlendRatio number +---@param time integer +---@param radius number +---@param flags integer +---@param finalHeading number +function TaskFollowNavMeshToCoord(ped, x, y, z, moveBlendRatio, time, radius, flags, finalHeading) end ---**`TASK` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0x17F58B88D085DBAC) diff --git a/library/natives/GTAV/VEHICLE.lua b/library/natives/GTAV/VEHICLE.lua index c1e289c..ee5dc7d 100644 --- a/library/natives/GTAV/VEHICLE.lua +++ b/library/natives/GTAV/VEHICLE.lua @@ -5770,19 +5770,27 @@ function SetVehicleDoorShut(vehicle, doorIndex, closeInstantly) end ---**`VEHICLE` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xB664292EAECF7FA6) +---Locks the doors of a specified vehicle to a defined lock state, affecting how players and NPCs can interact with the vehicle. +--- +---``` +---NativeDB Introduced: v323 ---``` ----// Source GTA VC miss2 leak, matching constants for 0/2/4, testing ----// They use 10 in am_mp_property_int, don't know what it does atm. ----enum eCarLock { ---- CARLOCK_NONE = 0, ---- CARLOCK_UNLOCKED = 1, ---- CARLOCK_LOCKED = 2, ---- CARLOCK_LOCKOUT_PLAYER_ONLY = 3, ---- CARLOCK_LOCKED_PLAYER_INSIDE = 4, ---- CARLOCK_LOCKED_INITIALLY = 5, ---- CARLOCK_FORCE_SHUT_DOORS = 6, ---- CARLOCK_LOCKED_BUT_CAN_BE_DAMAGED = 7 +--- +---```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. ---}; +--- ---``` ---@param vehicle integer ---@param doorLockStatus integer diff --git a/library/natives/GTAV/WEAPON.lua b/library/natives/GTAV/WEAPON.lua index 956d301..cf82a1b 100644 --- a/library/natives/GTAV/WEAPON.lua +++ b/library/natives/GTAV/WEAPON.lua @@ -475,7 +475,8 @@ function GetWeaponTintCount(weaponHash) end ---**`WEAPON` `client`** ---[Native Documentation](https://docs.fivem.net/natives/?_0xC3287EE3050FB74C) ----This native does not have an official description. +---Gets and returns the hash of the group of the specified weapon (group names can be found/changed under "Group" in the weapons' meta file). +---Note that the group is **not** the same as the location on the weapon wheel. ---@param weaponHash integer | string ---@return integer function GetWeapontypeGroup(weaponHash) end