diff --git a/docs-gen/native-entity.def.lua b/docs-gen/native-entity.def.lua index d4870fc..3122f92 100644 --- a/docs-gen/native-entity.def.lua +++ b/docs-gen/native-entity.def.lua @@ -1832,8 +1832,19 @@ function SetEntityAlwaysPrerender(entity, toggle) end function SetEntityAsMissionEntity(entity, p1, p2) end ---- Deletes the specified entity, and invalidates the passed handle (i.e. in/out argument). ---- +--- Delete the specified entity, and invalidate the passed handle (i.e., the in/out argument). +--- You might want to check if the entity exists before with [DOES_ENTITY_EXIST](https://docs.fivem.net/natives/?_0x7239B21A38F536BA). +--- @usage -- Retrieve the vehicle the player is currently in. +--- local vehicle = GetVehiclePedIsIn(PlayerPedId(), false) +--- +--- -- Check if the vehicle exists in the game world. +--- if not DoesEntityExist(vehicle) then +--- -- If the vehicle does not exist, end the execution of the code here. +--- return +--- end +--- +--- -- If the vehicle does exist, delete the vehicle entity from the game world. +--- DeleteEntity(vehicle --- @hash [0xAE3CBE5BF394C9C9](https://docs.fivem.net/natives/?_0xAE3CBE5BF394C9C9) --- @param entity Entity (Entity*) --- @return void diff --git a/docs-gen/native-hud.def.lua b/docs-gen/native-hud.def.lua index 24e57d2..edbbd96 100644 --- a/docs-gen/native-hud.def.lua +++ b/docs-gen/native-hud.def.lua @@ -5882,24 +5882,33 @@ function ShowHeightOnBlip(blip, toggle) end function N_0x75a16c3da34f1245(blip, toggle) end ---- This native is used to colorize certain map components like the army base at the top of the map. ---- ---- An incomplete list of components ID: ---- ---- 0: Los Santos' air port yellow lift-off markers. ---- 1: Sandy Shore's air port yellow lift-off markers. ---- 2: Trevor's air port yellow lift-off markers. ---- 6: Vespucci Beach lifeguard building. ---- 15: Army base. ---- ---- [List of hud colors](https://docs.fivem.net/docs/game-references/hud-colors/) ---- +--- This native is used to colorize/toggle certain map components like the army base. +--- +--- Component IDs 6 through 14 are used by the freemode event King of the Castle in GTA Online. +--- +--- ### An incomplete list of component IDs: +--- +--- * **0**: Los Santos International Airport yellow runway markers +--- * **1**: Sandy Shores Airfield yellow runway markers +--- * **2**: McKenzie Field yellow runway markers +--- * **6**: Vespucci Beach lifeguard building +--- * **7**: Top level zone of Alien Camp (Hippy Camp) +--- * **8**: Paleto Bay fire station drill tower +--- * **9** Land Act Dam tower +--- * **10** Pala Springs Aerial Tramway +--- * **11** Galileo Observatory power unit +--- * **12** Small zone (empty "interior") near Central Los Santos Medical Center +--- * **13** Richman Mansion grotto +--- * **14** 2 Alien Camp (Hippy Camp) circles +--- * **15** Fort Zancudo +--- @usage -- Enables Fort Zancudo on the map +--- SetMinimapComponent(15, true, 0 --- @hash [0x75A9A10948D1DEA6](https://docs.fivem.net/natives/?_0x75A9A10948D1DEA6) --- @param componentID number (int) --- @param toggle boolean --- @param hudColor number (int) ---- @return any ---- @overload fun(componentID: number, toggle: boolean, hudColor: number): any +--- @return number +--- @overload fun(componentID: number, toggle: boolean, hudColor: number): number function SetMinimapComponent(componentID, toggle, hudColor) end diff --git a/docs-gen/native-interior.def.lua b/docs-gen/native-interior.def.lua index b512033..9888871 100644 --- a/docs-gen/native-interior.def.lua +++ b/docs-gen/native-interior.def.lua @@ -805,8 +805,6 @@ function UnkGetInteriorAtCoords(x, y, z, typeHash) end --- ``` ---- GET_INTERIOR_* ---- --- NativeDB Introduced: v1493 --- ``` --- @@ -816,4 +814,17 @@ function UnkGetInteriorAtCoords(x, y, z, typeHash) end --- @overload fun(interior: number): number function GetInteriorHeading(interior) end + +--- # New Name: GetInteriorHeading +--- ``` +--- NativeDB Introduced: v1493 +--- ``` +--- +--- @hash [0xF49B58631D9E22D9](https://docs.fivem.net/natives/?_0xF49B58631D9E22D9) +--- @param interior number (int) +--- @return number +--- @overload fun(interior: number): number +--- @deprecated +function GetInteriorHeading(interior) end + \ No newline at end of file diff --git a/docs-gen/native-misc.def.lua b/docs-gen/native-misc.def.lua index ee17cbe..6d4a58a 100644 --- a/docs-gen/native-misc.def.lua +++ b/docs-gen/native-misc.def.lua @@ -274,18 +274,40 @@ function AreStringsEqual(string1, string2) end function UpdateOnscreenKeyboard() end ---- ``` ---- 0 as param = weird black and green screen ---- 0.1 - 0.99 = Prevent rain effect from falling (still sound and effects on puddles) and prevent puddles from increase/decrease, seems than it prevent any weather change too ---- 1 and more = "Unfreeze" rain puddles but clear weather too ---- When 'freezing' is enabled, it seem to also freeze value getted with GetRainLevel ---- ``` ---- +--- Clears the active weather type after a specific amount of time determined by `transitionTimeInMs`. +--- @usage RegisterCommand('weathertransition', function(source, args) +--- -- Set the weather type to foggy so we can see the change +--- SetWeatherTypeNowPersist("FOGGY") +--- -- Clear the weather and run the transition +--- local transitionTimeInMs = tonumber(args[1]) or 5000 +--- if transitionTimeInMs > 0 then +--- ClearWeatherTypeNowPersistNetwork(transitionTimeInMs) +--- end +--- end, false --- @hash [0x0CF97F497FE7D048](https://docs.fivem.net/natives/?_0x0CF97F497FE7D048) ---- @param p0 number (float) +--- @param transitionTimeInMs number (int) --- @return void ---- @overload fun(p0: number): void -function N_0x0cf97f497fe7d048(p0) end +--- @overload fun(transitionTimeInMs: number): void +function ClearWeatherTypeNowPersistNetwork(transitionTimeInMs) end + + +--- # New Name: ClearWeatherTypeNowPersistNetwork +--- Clears the active weather type after a specific amount of time determined by `transitionTimeInMs`. +--- @usage RegisterCommand('weathertransition', function(source, args) +--- -- Set the weather type to foggy so we can see the change +--- SetWeatherTypeNowPersist("FOGGY") +--- -- Clear the weather and run the transition +--- local transitionTimeInMs = tonumber(args[1]) or 5000 +--- if transitionTimeInMs > 0 then +--- ClearWeatherTypeNowPersistNetwork(transitionTimeInMs) +--- end +--- end, false +--- @hash [0x0CF97F497FE7D048](https://docs.fivem.net/natives/?_0x0CF97F497FE7D048) +--- @param transitionTimeInMs number (int) +--- @return void +--- @overload fun(transitionTimeInMs: number): void +--- @deprecated +function N_0x0cf97f497fe7d048(transitionTimeInMs) end --- RegisterEnumToSave @@ -5573,18 +5595,26 @@ function SlerpNearQuaternion(t, x, y, z, w, x1, y1, z1, w1) end function N_0xf2f6a2fa49278625(t, x, y, z, w, x1, y1, z1, w1) end ---- SetCloudHatOpacity ---- +--- Allows modification of the cloud opacity. It can also be used in other contexts, such as when the player is in a switch state [`IS_PLAYER_SWITCH_IN_PROGRESS`](https://docs.fivem.net/natives/?_0xD9D2CFFF49FAB35F). +--- @usage -- Check if the player is in a Switch "state" +--- if IsPlayerSwitchInProgress() then +--- -- If the player is in a Switch state, set the clouds opacity to 1.0 +--- SetCloudsAlpha(1.0) +--- en --- @hash [0xF36199225D6D8C86](https://docs.fivem.net/natives/?_0xF36199225D6D8C86) --- @param opacity number (float) --- @return void --- @overload fun(opacity: number): void -function SetCloudHatOpacity(opacity) end +function SetCloudsAlpha(opacity) end ---- # New Name: SetCloudHatOpacity ---- SetCloudHatOpacity ---- +--- # New Name: SetCloudsAlpha +--- Allows modification of the cloud opacity. It can also be used in other contexts, such as when the player is in a switch state [`IS_PLAYER_SWITCH_IN_PROGRESS`](https://docs.fivem.net/natives/?_0xD9D2CFFF49FAB35F). +--- @usage -- Check if the player is in a Switch "state" +--- if IsPlayerSwitchInProgress() then +--- -- If the player is in a Switch state, set the clouds opacity to 1.0 +--- SetCloudsAlpha(1.0) +--- en --- @hash [0xF36199225D6D8C86](https://docs.fivem.net/natives/?_0xF36199225D6D8C86) --- @param opacity number (float) --- @return void @@ -5593,6 +5623,21 @@ function SetCloudHatOpacity(opacity) end function N_0xf36199225d6d8c86(opacity) end +--- # New Name: SetCloudsAlpha +--- Allows modification of the cloud opacity. It can also be used in other contexts, such as when the player is in a switch state [`IS_PLAYER_SWITCH_IN_PROGRESS`](https://docs.fivem.net/natives/?_0xD9D2CFFF49FAB35F). +--- @usage -- Check if the player is in a Switch "state" +--- if IsPlayerSwitchInProgress() then +--- -- If the player is in a Switch state, set the clouds opacity to 1.0 +--- SetCloudsAlpha(1.0) +--- en +--- @hash [0xF36199225D6D8C86](https://docs.fivem.net/natives/?_0xF36199225D6D8C86) +--- @param opacity number (float) +--- @return void +--- @overload fun(opacity: number): void +--- @deprecated +function SetCloudHatOpacity(opacity) end + + --- Refer to [`SET_WEATHER_TYPE_NOW_PERSIST`](https://docs.fivem.net/natives/?_0xED712CA327900C8A) for weather types. --- --- @hash [0xF3BBE884A14BB413](https://docs.fivem.net/natives/?_0xF3BBE884A14BB413) diff --git a/docs-gen/native-player.def.lua b/docs-gen/native-player.def.lua index 3994a79..cdf12f0 100644 --- a/docs-gen/native-player.def.lua +++ b/docs-gen/native-player.def.lua @@ -3263,16 +3263,58 @@ function N_0xefd79fa81dfba9cb(player, distance) end function ClearPlayerHasDamagedAtLeastOnePed(player) end +--- Violation types: +--- --- ``` ---- Only 1 occurrence. p1 was 2. +--- enum eViolationType { +--- VT_PAVED_PEDESTRIAN_AREAS = 0, +--- VT_RUNNING_REDS, +--- VT_AGAINST_TRAFFIC +--- }; --- ``` +--- +--- 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. --- --- @hash [0xF10B44FD479D69F3](https://docs.fivem.net/natives/?_0xF10B44FD479D69F3) --- @param player Player ---- @param p1 number (int) +--- @param type number (int) --- @return boolean ---- @overload fun(player: Player, p1: number): boolean -function N_0xf10b44fd479d69f3(player, p1) end +--- @overload fun(player: Player, type: number): boolean +function IsPlayerDrivingDangerously(player, type) end + + +--- # New Name: IsPlayerDrivingDangerously +--- Violation types: +--- +--- ``` +--- enum eViolationType { +--- VT_PAVED_PEDESTRIAN_AREAS = 0, +--- VT_RUNNING_REDS, +--- VT_AGAINST_TRAFFIC +--- }; +--- ``` +--- +--- 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. +--- +--- @hash [0xF10B44FD479D69F3](https://docs.fivem.net/natives/?_0xF10B44FD479D69F3) +--- @param player Player +--- @param type number (int) +--- @return boolean +--- @overload fun(player: Player, type: number): boolean +--- @deprecated +function N_0xf10b44fd479d69f3(player, type) end --- ``` diff --git a/docs-gen/native-streaming.def.lua b/docs-gen/native-streaming.def.lua index 432c1ed..04a9560 100644 --- a/docs-gen/native-streaming.def.lua +++ b/docs-gen/native-streaming.def.lua @@ -620,7 +620,12 @@ function LoadScene(x, y, z) end --- GetPlayerSwitchState ---- +--- @usage local stateSwitch = GetPlayerSwitchState() +--- if stateSwitch == 5 then +--- -- Player is in the air +--- elseif stateSwitch == 12 then +--- -- Player is not in the air or switch is completed +--- en --- @hash [0x470555300D10B2A5](https://docs.fivem.net/natives/?_0x470555300D10B2A5) --- --- @return number @@ -1170,50 +1175,34 @@ function OverrideLodscaleThisFrame(scaling) end function N_0xa76359fc80b2438e(scaling) end ---- ``` ---- doesn't act normally when used on mount chilliad ---- ---- flags: ---- ---- 0: normal ---- 1: no transition ---- 255: switch IN ---- ---- switchType: 0 - 3 +--- You can check if the player is in a Switch state with [`IS_PLAYER_SWITCH_IN_PROGRESS`](https://docs.fivem.net/natives/?_0xD9D2CFFF49FAB35F). --- ---- 0: 1 step towards ped ---- 1: 3 steps out from ped ---- 2: 1 step out from ped ---- 3: 1 step towards ped ---- ``` ---- +--- ***Note:** Doesn't act normally when used on Mount Chiliad.* +--- @usage -- Check if the player is in a Switch "state" +--- if not IsPlayerSwitchInProgress() then +--- -- If the player is not already in a Switch state, initiate a Switch +--- SwitchToMultiFirstPart(PlayerPedId(), 0, 1) +--- -- In this case, switchType is set to 1, which means "3 steps out from ped" +--- en --- @hash [0xAAB3200ED59016BC](https://docs.fivem.net/natives/?_0xAAB3200ED59016BC) --- @param ped Ped --- @param flags number (int) --- @param switchType number (int) --- @return void --- @overload fun(ped: Ped, flags: number, switchType: number): void -function SwitchOutPlayer(ped, flags, switchType) end +function SwitchToMultiFirstpart(ped, flags, switchType) end ---- # New Name: SwitchOutPlayer ---- ``` ---- doesn't act normally when used on mount chilliad +--- # New Name: SwitchToMultiFirstpart +--- You can check if the player is in a Switch state with [`IS_PLAYER_SWITCH_IN_PROGRESS`](https://docs.fivem.net/natives/?_0xD9D2CFFF49FAB35F). --- ---- flags: ---- ---- 0: normal ---- 1: no transition ---- 255: switch IN ---- ---- switchType: 0 - 3 ---- ---- 0: 1 step towards ped ---- 1: 3 steps out from ped ---- 2: 1 step out from ped ---- 3: 1 step towards ped ---- ``` ---- +--- ***Note:** Doesn't act normally when used on Mount Chiliad.* +--- @usage -- Check if the player is in a Switch "state" +--- if not IsPlayerSwitchInProgress() then +--- -- If the player is not already in a Switch state, initiate a Switch +--- SwitchToMultiFirstPart(PlayerPedId(), 0, 1) +--- -- In this case, switchType is set to 1, which means "3 steps out from ped" +--- en --- @hash [0xAAB3200ED59016BC](https://docs.fivem.net/natives/?_0xAAB3200ED59016BC) --- @param ped Ped --- @param flags number (int) @@ -1224,6 +1213,26 @@ function SwitchOutPlayer(ped, flags, switchType) end function N_0xaab3200ed59016bc(ped, flags, switchType) end +--- # New Name: SwitchToMultiFirstpart +--- You can check if the player is in a Switch state with [`IS_PLAYER_SWITCH_IN_PROGRESS`](https://docs.fivem.net/natives/?_0xD9D2CFFF49FAB35F). +--- +--- ***Note:** Doesn't act normally when used on Mount Chiliad.* +--- @usage -- Check if the player is in a Switch "state" +--- if not IsPlayerSwitchInProgress() then +--- -- If the player is not already in a Switch state, initiate a Switch +--- SwitchToMultiFirstPart(PlayerPedId(), 0, 1) +--- -- In this case, switchType is set to 1, which means "3 steps out from ped" +--- en +--- @hash [0xAAB3200ED59016BC](https://docs.fivem.net/natives/?_0xAAB3200ED59016BC) +--- @param ped Ped +--- @param flags number (int) +--- @param switchType number (int) +--- @return void +--- @overload fun(ped: Ped, flags: number, switchType: number): void +--- @deprecated +function SwitchOutPlayer(ped, flags, switchType) end + + --- ``` --- if (!sub_8f12("START LOAD SCENE SAFE")) { --- if (CUTSCENE::GET_CUTSCENE_TIME() > 4178) { @@ -1710,24 +1719,53 @@ function EnableSwitchPauseBeforeDescent() end function N_0xd4793dff3af2abcd() end ---- Use after using \_SWITCH_OUT_PLAYER to swoop the camera back down to the player's ped. ---- +--- After using [`SWITCH_TO_MULTI_FIRSTPART`](https://docs.fivem.net/natives/?_0xAAB3200ED59016BC) , use this native to smoothly return the camera to the player's character. +--- @usage RegisterCommand("switchPlayer", function() +--- if IsPlayerSwitchInProgress() then return end +--- local ped = PlayerPedId() +--- SwitchToMultiFirstPart(ped, 0, 1) +--- Citizen.Wait(5000) +--- SwitchToMultiSecondPart(ped) +--- end, false --- @hash [0xD8295AF639FD9CB8](https://docs.fivem.net/natives/?_0xD8295AF639FD9CB8) --- @param ped Ped --- @return void --- @overload fun(ped: Ped): void -function SwitchInPlayer(ped) end +function SwitchToMultiSecondpart(ped) end + + +--- # New Name: SwitchToMultiSecondpart +--- After using [`SWITCH_TO_MULTI_FIRSTPART`](https://docs.fivem.net/natives/?_0xAAB3200ED59016BC) , use this native to smoothly return the camera to the player's character. +--- @usage RegisterCommand("switchPlayer", function() +--- if IsPlayerSwitchInProgress() then return end +--- local ped = PlayerPedId() +--- SwitchToMultiFirstPart(ped, 0, 1) +--- Citizen.Wait(5000) +--- SwitchToMultiSecondPart(ped) +--- end, false +--- @hash [0xD8295AF639FD9CB8](https://docs.fivem.net/natives/?_0xD8295AF639FD9CB8) +--- @param ped Ped +--- @return void +--- @overload fun(ped: Ped): void +--- @deprecated +function N_0xd8295af639fd9cb8(ped) end ---- # New Name: SwitchInPlayer ---- Use after using \_SWITCH_OUT_PLAYER to swoop the camera back down to the player's ped. ---- +--- # New Name: SwitchToMultiSecondpart +--- After using [`SWITCH_TO_MULTI_FIRSTPART`](https://docs.fivem.net/natives/?_0xAAB3200ED59016BC) , use this native to smoothly return the camera to the player's character. +--- @usage RegisterCommand("switchPlayer", function() +--- if IsPlayerSwitchInProgress() then return end +--- local ped = PlayerPedId() +--- SwitchToMultiFirstPart(ped, 0, 1) +--- Citizen.Wait(5000) +--- SwitchToMultiSecondPart(ped) +--- end, false --- @hash [0xD8295AF639FD9CB8](https://docs.fivem.net/natives/?_0xD8295AF639FD9CB8) --- @param ped Ped --- @return void --- @overload fun(ped: Ped): void --- @deprecated -function N_0xd8295af639fd9cb8(ped) end +function SwitchInPlayer(ped) end --- ``` diff --git a/docs-gen/native-vehicle.def.lua b/docs-gen/native-vehicle.def.lua index a8725e2..fd8ffe3 100644 --- a/docs-gen/native-vehicle.def.lua +++ b/docs-gen/native-vehicle.def.lua @@ -11229,21 +11229,17 @@ function N_0xc970d0e0fc31d768(vehicle, wheelIndex, multiplier) end --- See eDoorId declared in [`SET_VEHICLE_DOOR_SHUT`](https://docs.fivem.net/natives/?_0x93D9BD300D7789E5) ---- ---- Returns vehicle door destroy type previously set with \_SET_VEHICLE_DOOR_DESTROY_TYPE --- --- @hash [0xCA4AC3EAAE46EC7B](https://docs.fivem.net/natives/?_0xCA4AC3EAAE46EC7B) --- @param vehicle Vehicle --- @param doorIndex number (int) --- @return number --- @overload fun(vehicle: Vehicle, doorIndex: number): number -function GetVehicleDoorDestroyType(vehicle, doorIndex) end +function GetVehicleIndividualDoorLockStatus(vehicle, doorIndex) end ---- # New Name: GetVehicleDoorDestroyType +--- # New Name: GetVehicleIndividualDoorLockStatus --- See eDoorId declared in [`SET_VEHICLE_DOOR_SHUT`](https://docs.fivem.net/natives/?_0x93D9BD300D7789E5) ---- ---- Returns vehicle door destroy type previously set with \_SET_VEHICLE_DOOR_DESTROY_TYPE --- --- @hash [0xCA4AC3EAAE46EC7B](https://docs.fivem.net/natives/?_0xCA4AC3EAAE46EC7B) --- @param vehicle Vehicle @@ -11254,6 +11250,18 @@ function GetVehicleDoorDestroyType(vehicle, doorIndex) end function N_0xca4ac3eaae46ec7b(vehicle, doorIndex) end +--- # New Name: GetVehicleIndividualDoorLockStatus +--- See eDoorId declared in [`SET_VEHICLE_DOOR_SHUT`](https://docs.fivem.net/natives/?_0x93D9BD300D7789E5) +--- +--- @hash [0xCA4AC3EAAE46EC7B](https://docs.fivem.net/natives/?_0xCA4AC3EAAE46EC7B) +--- @param vehicle Vehicle +--- @param doorIndex number (int) +--- @return number +--- @overload fun(vehicle: Vehicle, doorIndex: number): number +--- @deprecated +function GetVehicleDoorDestroyType(vehicle, doorIndex) end + + --- SetNumberOfParkedVehicles --- --- @hash [0xCAA15F13EBD417FF](https://docs.fivem.net/natives/?_0xCAA15F13EBD417FF)