Skip to content

Commit

Permalink
Release 2023-07-10
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jul 10, 2023
1 parent be2a5af commit 0a21edc
Show file tree
Hide file tree
Showing 12 changed files with 546 additions and 371 deletions.
8 changes: 2 additions & 6 deletions docs-gen/native-audio.def.lua
Original file line number Diff line number Diff line change
Expand Up @@ -635,9 +635,7 @@ function N_0x1b7abe26cbcbf8c7(ped, p1, p2) end
function BlipSiren(vehicle) end


--- ```
--- For a full list, see here: pastebin.com/Kj9t38KF
--- ```
--- Find the radio station list [here](https://gist.github.com/4mmonium/b47d6512a2d992cbf4eea15d9038b581)
---
--- @hash [0x1B9C0099CB942AC6](https://docs.fivem.net/natives/?_0x1B9C0099CB942AC6)
--- @param vehicle Vehicle
Expand Down Expand Up @@ -3803,9 +3801,7 @@ function PlayPedAmbientSpeechAndCloneNative(ped, speechName, speechParam) end
function PlayAmbientSpeech2(ped, speechName, speechParam) end


--- ```
--- For a full list, see here: pastebin.com/Kj9t38KF
--- ```
--- Find the radio station list [here](https://gist.github.com/4mmonium/b47d6512a2d992cbf4eea15d9038b581)
---
--- @hash [0xC69EDA28699D5107](https://docs.fivem.net/natives/?_0xC69EDA28699D5107)
--- @param stationName string (char*)
Expand Down
69 changes: 28 additions & 41 deletions docs-gen/native-cam.def.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1388,13 +1388,13 @@ function N_0x609278246a29ca34(cam, p1, p2) end
--- @param cam Cam
--- @param ped Ped
--- @param boneIndex number (int)
--- @param x number (float)
--- @param y number (float)
--- @param z number (float)
--- @param heading boolean
--- @param xOffset number (float)
--- @param yOffset number (float)
--- @param zOffset number (float)
--- @param isRelative boolean
--- @return void
--- @overload fun(cam: Cam, ped: Ped, boneIndex: number, x: number, y: number, z: number, heading: boolean): void
function AttachCamToPedBone(cam, ped, boneIndex, x, y, z, heading) end
--- @overload fun(cam: Cam, ped: Ped, boneIndex: number, xOffset: number, yOffset: number, zOffset: number, isRelative: boolean): void
function AttachCamToPedBone(cam, ped, boneIndex, xOffset, yOffset, zOffset, isRelative) end


--- N_0x62374889a4d59f72
Expand Down Expand Up @@ -1508,7 +1508,7 @@ function ShakeCam(cam, type, amplitude) end

--- 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::\_80EC114669DAEFF4() can be used instead of p7 (Possible p7 is FOV parameter. )\
--- CAM::\_GET_FINAL_RENDERED_CAM_FOV can be used instead of p7 (Possible p7 is FOV parameter. )\
--- rotationOrder is 2 usually
---
--- @hash [0x6ABFA3E16460F22D](https://docs.fivem.net/natives/?_0x6ABFA3E16460F22D)
Expand Down Expand Up @@ -1766,10 +1766,16 @@ function SetCamSplineNodeExtraFlags(cam, p1, flags) end
function N_0x7bf1a54ae67ac070(cam, p1, flags) end


--- ```
--- The last parameter, as in other "ROT" methods, is usually 2.
--- ```
---
--- Gets a camera's rotation by handle (`cam`) lookup, outputs a `Vector3` in degrees.
--- @usage -- We need a valid camera handle for this to work.
--- local theCamHandle = CreateCam("DEFAULT_SCRIPTED_CAMERA", true)
---
--- -- Let's set the camera rotation for illustrative purposes
--- SetCamRot(theCamHandle, 0.1, 0.2, 0.3, 0)
---
--- -- We are now able to get the camera rotation.
--- local camRot = GetCamRot(theCamHandle, 0) -- vector3(0.100000, 0.200000, 0.300000)
--- Citizen.Trace(string.format("Cam Rotation is x: %f, y: %f, z: %f", camRot.x, camRot.y, camRot.z)
--- @hash [0x7D304C1C955E3E12](https://docs.fivem.net/natives/?_0x7D304C1C955E3E12)
--- @param cam Cam
--- @param rotationOrder number (int)
Expand Down Expand Up @@ -1871,19 +1877,11 @@ function GetFinalRenderedCamFov() end
function N_0x80ec114669daeff4() end


--- ```
--- p0 dosen't seem to change much, I tried it with 0, 1, 2:
--- 0-Pitch(X): -70.000092
--- 0-Roll(Y): -0.000001
--- 0-Yaw(Z): -43.886459
--- 1-Pitch(X): -70.000092
--- 1-Roll(Y): -0.000001
--- 1-Yaw(Z): -43.886463
--- 2-Pitch(X): -70.000092
--- 2-Roll(Y): -0.000002
--- 2-Yaw(Z): -43.886467
--- ```
---
--- This function takes a rotation order and outputs a `Vector3` in degrees.
---
--- It first calls a game function to calculate these values given the rotation order and effectively multiplies those values by `180/PI`, hence degrees since the function it calls outputs radians which are then converted to degrees.
--- @usage local camRot = GetGameplayCamRot(0) -- vector3(-14.74518, 0.05254443, 95.24616)
--- Citizen.Trace(string.format("Cam Rotation is x: %f, y: %f, z: %f", camRot.x, camRot.y, camRot.z)
--- @hash [0x837765A25378F0BB](https://docs.fivem.net/natives/?_0x837765A25378F0BB)
--- @param rotationOrder number (int)
--- @return Vector3
Expand Down Expand Up @@ -1933,12 +1931,10 @@ function N_0x83b8201ed82a9a2d(cam, p1, p2, p3) end
function SetGameplayObjectHint(p0, p1, p2, p3, p4, p5, p6, p7) end


--- ```
--- Sets the rotation of the cam.
--- Last parameter unknown.
--- Last parameter seems to always be set to 2.
--- ```
---
--- Sets the rotation of the camera.
--- @usage -- We need a valid camera handle for this to work.
--- local theCamHandle = CreateCam("DEFAULT_SCRIPTED_CAMERA", true)
--- SetCamRot(theCamHandle, 0.1, 0.2, 0.3, 0
--- @hash [0x85973643155D0B07](https://docs.fivem.net/natives/?_0x85973643155D0B07)
--- @param cam Cam
--- @param rotX number (float)
Expand Down Expand Up @@ -2522,9 +2518,7 @@ function N_0xa6385deb180f319f(cam, p1, scale) end
function N_0xa7092afe81944852() end


--- ```
--- Returns whether or not the passed camera handle exists.
--- ```
--- Looks up a camera handle in the current camera pool and returns `true` if the handle is found, otherwise it returns `false`.
---
--- @hash [0xA7A932170592B50E](https://docs.fivem.net/natives/?_0xA7A932170592B50E)
--- @param cam Cam
Expand Down Expand Up @@ -2651,14 +2645,7 @@ function SetGameplayCamRelativeHeading(heading) end

--- Create a camera with the specified cam name/type, You can use `SET_CAM_` natives to manipulate the camera.
---
--- Camera names found in the b617d scripts:
---
--- ```
--- "DEFAULT_ANIMATED_CAMERA"
--- "DEFAULT_SCRIPTED_CAMERA"
--- "DEFAULT_SCRIPTED_FLY_CAMERA"
--- "DEFAULT_SPLINE_CAMERA"
--- ```
--- Take a look at [CREATE_CAM](https://docs.fivem.net/natives/?_0xC3981DCE61D9E13F) if you would like to see the available camera names.
--- @usage local cam = CreateCamWithParams("DEFAULT_SCRIPTED_CAMERA", 561.3, 301.3, 63.0, 0.0, 0.0, 0.0, 90.0
--- @hash [0xB51194800B257161](https://docs.fivem.net/natives/?_0xB51194800B257161)
--- @param camName string (char*)
Expand Down
6 changes: 3 additions & 3 deletions docs-gen/native-entity.def.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1263,10 +1263,10 @@ function SetEntityHealth(entity, health) end
--- @param collision boolean
--- @param isPed boolean
--- @param rotationOrder number (int)
--- @param fixedRot boolean
--- @param syncRot boolean
--- @return void
--- @overload fun(entity1: Entity, entity2: Entity, boneIndex: number, xPos: number, yPos: number, zPos: number, xRot: number, yRot: number, zRot: number, p9: boolean, useSoftPinning: boolean, collision: boolean, isPed: boolean, rotationOrder: number, fixedRot: boolean): void
function AttachEntityToEntity(entity1, entity2, boneIndex, xPos, yPos, zPos, xRot, yRot, zRot, p9, useSoftPinning, collision, isPed, rotationOrder, fixedRot) end
--- @overload fun(entity1: Entity, entity2: Entity, boneIndex: number, xPos: number, yPos: number, zPos: number, xRot: number, yRot: number, zRot: number, p9: boolean, useSoftPinning: boolean, collision: boolean, isPed: boolean, rotationOrder: number, syncRot: boolean): void
function AttachEntityToEntity(entity1, entity2, boneIndex, xPos, yPos, zPos, xRot, yRot, zRot, p9, useSoftPinning, collision, isPed, rotationOrder, syncRot) end


--- ```
Expand Down
122 changes: 87 additions & 35 deletions docs-gen/native-graphics.def.lua
Original file line number Diff line number Diff line change
Expand Up @@ -453,12 +453,9 @@ function SeethroughSetMaxThickness(thickness) end
function N_0x0c8fac83902a62df(thickness) end


--- ```
--- In percentage: 0.0 - 100.0
---
--- NativeDB Introduced: v1290
--- ```
---
--- Seeks a BINK movie to a specified position.
--- @usage -- Movie drawn prior
--- SetBinkMovieTime(1, 50.0) -- Seeks to 50% in
--- @hash [0x0CB6B3446855B57A](https://docs.fivem.net/natives/?_0x0CB6B3446855B57A)
--- @param binkMovie number (int)
--- @param progress number (float)
Expand All @@ -468,12 +465,9 @@ function SetBinkMovieTime(binkMovie, progress) end


--- # New Name: SetBinkMovieTime
--- ```
--- In percentage: 0.0 - 100.0
---
--- NativeDB Introduced: v1290
--- ```
---
--- Seeks a BINK movie to a specified position.
--- @usage -- Movie drawn prior
--- SetBinkMovieTime(1, 50.0) -- Seeks to 50% in
--- @hash [0x0CB6B3446855B57A](https://docs.fivem.net/natives/?_0x0CB6B3446855B57A)
--- @param binkMovie number (int)
--- @param progress number (float)
Expand Down Expand Up @@ -1988,10 +1982,19 @@ function GetDecalWashLevel(decal) end
function N_0x32f34ff7f617643b(p0, p1) end


--- ```
--- NativeDB Introduced: v1290
--- ```
---
--- Creates an integer (usually 1) for a BINK movie to be called with other natives.
--- [List of all BINK movies (alphabetically ordered) as of b2802](https://gist.github.com/ItsJunction/8046f28c29ea8ff2821e9e4f933f595f)
--- @usage Citizen.CreateThread(function()
--- local binkint = SetBinkMovie("casino_trailer")
--- SetBinkMovieTime(binkint, 0.0) -- Seeks to 0%
---
--- while (GetBinkMovieTime(binkint) < 100.0) do -- Very Basic Idea That Works?
--- print(math.floor(GetBinkMovieTime(binkint) * 100)/100 .. "%") -- Prints current playtime (as percentage).
--- PlayBinkMovie(binkint)
--- DrawBinkMovie(binkint, 0.5, 0.5, 1.0, 1.0, 0.0, 255, 255, 255, 255) -- This example draws and plays in Fullscreen and in the center of screen (no matter the resolution).
--- Citizen.Wait(0)
--- end
--- end
--- @hash [0x338D9F609FD632DB](https://docs.fivem.net/natives/?_0x338D9F609FD632DB)
--- @param name string (char*)
--- @return number
Expand All @@ -2000,10 +2003,19 @@ function SetBinkMovie(name) end


--- # New Name: SetBinkMovie
--- ```
--- NativeDB Introduced: v1290
--- ```
---
--- Creates an integer (usually 1) for a BINK movie to be called with other natives.
--- [List of all BINK movies (alphabetically ordered) as of b2802](https://gist.github.com/ItsJunction/8046f28c29ea8ff2821e9e4f933f595f)
--- @usage Citizen.CreateThread(function()
--- local binkint = SetBinkMovie("casino_trailer")
--- SetBinkMovieTime(binkint, 0.0) -- Seeks to 0%
---
--- while (GetBinkMovieTime(binkint) < 100.0) do -- Very Basic Idea That Works?
--- print(math.floor(GetBinkMovieTime(binkint) * 100)/100 .. "%") -- Prints current playtime (as percentage).
--- PlayBinkMovie(binkint)
--- DrawBinkMovie(binkint, 0.5, 0.5, 1.0, 1.0, 0.0, 255, 255, 255, 255) -- This example draws and plays in Fullscreen and in the center of screen (no matter the resolution).
--- Citizen.Wait(0)
--- end
--- end
--- @hash [0x338D9F609FD632DB](https://docs.fivem.net/natives/?_0x338D9F609FD632DB)
--- @param name string (char*)
--- @return number
Expand Down Expand Up @@ -3447,24 +3459,32 @@ function SeethroughReset() end
function PlayBinkMovie(binkMovie) end


--- ```
--- NativeDB Introduced: v1290
--- ```
---
--- Must be called each frame, will play at specified position on screen when called with [`_PLAY_BINK_MOVIE`](https://docs.fivem.net/natives/?_0x70D2CC8A542A973C)
--- @usage Citizen.CreateThread(function()
--- local binkint = SetBinkMovie("casino_trailer") -- BINK movie, list can be found at https://gist.github.com/ItsJunction/8046f28c29ea8ff2821e9e4f933f595f
--- SetBinkMovieTime(binkint, 0.0) -- Seeks to 0%, just incase of errors.
---
--- while (GetBinkMovieTime(binkint) < 100.0) do
--- print(math.floor(GetBinkMovieTime(binkint) * 100)/100 .. "%") -- Prints current playtime (as percentage).
--- PlayBinkMovie(binkint)
--- DrawBinkMovie(binkint, 0.5, 0.5, 1.0, 1.0, 0.0, 255, 255, 255, 255) -- This example draws and plays in fullscreen in the center (no matter the resolution).
--- Citizen.Wait(0)
--- end
--- end
--- @hash [0x7118E83EEB9F7238](https://docs.fivem.net/natives/?_0x7118E83EEB9F7238)
--- @param binkMovie number (int)
--- @param p1 number (float)
--- @param p2 number (float)
--- @param p3 number (float)
--- @param p4 number (float)
--- @param p5 number (float)
--- @param posX number (float)
--- @param posY number (float)
--- @param scaleX number (float)
--- @param scaleY number (float)
--- @param rotation number (float)
--- @param r number (int)
--- @param g number (int)
--- @param b number (int)
--- @param a number (int)
--- @return void
--- @overload fun(binkMovie: number, p1: number, p2: number, p3: number, p4: number, p5: number, r: number, g: number, b: number, a: number): void
function DrawBinkMovie(binkMovie, p1, p2, p3, p4, p5, r, g, b, a) end
--- @overload fun(binkMovie: number, posX: number, posY: number, scaleX: number, scaleY: number, rotation: number, r: number, g: number, b: number, a: number): void
function DrawBinkMovie(binkMovie, posX, posY, scaleX, scaleY, rotation, r, g, b, a) end


--- ```
Expand Down Expand Up @@ -6881,10 +6901,26 @@ function GetScaleformMovieMethodReturnValueBool(methodReturn) end
function N_0xd80a80346a45d761(methodReturn) end


--- If true, this native will create purple explosions upon projectile impact, add comic-like PTFX when firing a weapon, create a sound on bullet impact and have its own "blood effect".
---
--- If the PTFX asset "scr_rcbarry2" is not requested using ([`RequestNamedPtfxAsset`](https://docs.fivem.net/natives/?_0xD821490579791273)) then this native **will not work as intended**.
---
--- Excerpt from fm_content_drug_lab_work.c:
---
--- ```
--- Creates cartoon effect when Michel smokes the weed
--- STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_rcbarry2");
--- if (STREAMING::HAS_NAMED_PTFX_ASSET_LOADED("scr_rcbarry2"))
--- {
--- GRAPHICS::ENABLE_CLOWN_BLOOD_VFX(true);
--- AUDIO::START_AUDIO_SCENE("DLC_CM2022_DRUG_TRIP_SPRINKLERS_SCENE");
--- func_720(26);
--- }
--- ```
---
--- @usage RequestNamedPtfxAsset("scr_rcbarry2") -- Request the PTFX
--- while not HasNamedPtfxAssetLoaded("scr_rcbarry2") do
--- Citizen.Wait(0)
--- end
--- EnableClownBloodVfx(true) -- Enable the clown PTF
--- @hash [0xD821490579791273](https://docs.fivem.net/natives/?_0xD821490579791273)
--- @param toggle boolean
--- @return void
Expand All @@ -6893,10 +6929,26 @@ function EnableClownBloodVfx(toggle) end


--- # New Name: EnableClownBloodVfx
--- If true, this native will create purple explosions upon projectile impact, add comic-like PTFX when firing a weapon, create a sound on bullet impact and have its own "blood effect".
---
--- If the PTFX asset "scr_rcbarry2" is not requested using ([`RequestNamedPtfxAsset`](https://docs.fivem.net/natives/?_0xD821490579791273)) then this native **will not work as intended**.
---
--- Excerpt from fm_content_drug_lab_work.c:
---
--- ```
--- Creates cartoon effect when Michel smokes the weed
--- STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_rcbarry2");
--- if (STREAMING::HAS_NAMED_PTFX_ASSET_LOADED("scr_rcbarry2"))
--- {
--- GRAPHICS::ENABLE_CLOWN_BLOOD_VFX(true);
--- AUDIO::START_AUDIO_SCENE("DLC_CM2022_DRUG_TRIP_SPRINKLERS_SCENE");
--- func_720(26);
--- }
--- ```
---
--- @usage RequestNamedPtfxAsset("scr_rcbarry2") -- Request the PTFX
--- while not HasNamedPtfxAssetLoaded("scr_rcbarry2") do
--- Citizen.Wait(0)
--- end
--- EnableClownBloodVfx(true) -- Enable the clown PTF
--- @hash [0xD821490579791273](https://docs.fivem.net/natives/?_0xD821490579791273)
--- @param toggle boolean
--- @return void
Expand Down
Loading

0 comments on commit 0a21edc

Please sign in to comment.