Skip to content

Commit 0a21edc

Browse files
Release 2023-07-10
1 parent be2a5af commit 0a21edc

12 files changed

+546
-371
lines changed

docs-gen/native-audio.def.lua

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -635,9 +635,7 @@ function N_0x1b7abe26cbcbf8c7(ped, p1, p2) end
635635
function BlipSiren(vehicle) end
636636

637637

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

38053803

3806-
--- ```
3807-
--- For a full list, see here: pastebin.com/Kj9t38KF
3808-
--- ```
3804+
--- Find the radio station list [here](https://gist.github.com/4mmonium/b47d6512a2d992cbf4eea15d9038b581)
38093805
---
38103806
--- @hash [0xC69EDA28699D5107](https://docs.fivem.net/natives/?_0xC69EDA28699D5107)
38113807
--- @param stationName string (char*)

docs-gen/native-cam.def.lua

Lines changed: 28 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1388,13 +1388,13 @@ function N_0x609278246a29ca34(cam, p1, p2) end
13881388
--- @param cam Cam
13891389
--- @param ped Ped
13901390
--- @param boneIndex number (int)
1391-
--- @param x number (float)
1392-
--- @param y number (float)
1393-
--- @param z number (float)
1394-
--- @param heading boolean
1391+
--- @param xOffset number (float)
1392+
--- @param yOffset number (float)
1393+
--- @param zOffset number (float)
1394+
--- @param isRelative boolean
13951395
--- @return void
1396-
--- @overload fun(cam: Cam, ped: Ped, boneIndex: number, x: number, y: number, z: number, heading: boolean): void
1397-
function AttachCamToPedBone(cam, ped, boneIndex, x, y, z, heading) end
1396+
--- @overload fun(cam: Cam, ped: Ped, boneIndex: number, xOffset: number, yOffset: number, zOffset: number, isRelative: boolean): void
1397+
function AttachCamToPedBone(cam, ped, boneIndex, xOffset, yOffset, zOffset, isRelative) end
13981398

13991399

14001400
--- N_0x62374889a4d59f72
@@ -1508,7 +1508,7 @@ function ShakeCam(cam, type, amplitude) end
15081508

15091509
--- CAM::\_GET_GAMEPLAY_CAM_COORDS can be used instead of posX,Y,Z\
15101510
--- CAM::\_GET_GAMEPLAY_CAM_ROT can be used instead of rotX,Y,Z\
1511-
--- CAM::\_80EC114669DAEFF4() can be used instead of p7 (Possible p7 is FOV parameter. )\
1511+
--- CAM::\_GET_FINAL_RENDERED_CAM_FOV can be used instead of p7 (Possible p7 is FOV parameter. )\
15121512
--- rotationOrder is 2 usually
15131513
---
15141514
--- @hash [0x6ABFA3E16460F22D](https://docs.fivem.net/natives/?_0x6ABFA3E16460F22D)
@@ -1766,10 +1766,16 @@ function SetCamSplineNodeExtraFlags(cam, p1, flags) end
17661766
function N_0x7bf1a54ae67ac070(cam, p1, flags) end
17671767

17681768

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

18731879

1874-
--- ```
1875-
--- p0 dosen't seem to change much, I tried it with 0, 1, 2:
1876-
--- 0-Pitch(X): -70.000092
1877-
--- 0-Roll(Y): -0.000001
1878-
--- 0-Yaw(Z): -43.886459
1879-
--- 1-Pitch(X): -70.000092
1880-
--- 1-Roll(Y): -0.000001
1881-
--- 1-Yaw(Z): -43.886463
1882-
--- 2-Pitch(X): -70.000092
1883-
--- 2-Roll(Y): -0.000002
1884-
--- 2-Yaw(Z): -43.886467
1885-
--- ```
1886-
---
1880+
--- This function takes a rotation order and outputs a `Vector3` in degrees.
1881+
---
1882+
--- 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.
1883+
--- @usage local camRot = GetGameplayCamRot(0) -- vector3(-14.74518, 0.05254443, 95.24616)
1884+
--- Citizen.Trace(string.format("Cam Rotation is x: %f, y: %f, z: %f", camRot.x, camRot.y, camRot.z)
18871885
--- @hash [0x837765A25378F0BB](https://docs.fivem.net/natives/?_0x837765A25378F0BB)
18881886
--- @param rotationOrder number (int)
18891887
--- @return Vector3
@@ -1933,12 +1931,10 @@ function N_0x83b8201ed82a9a2d(cam, p1, p2, p3) end
19331931
function SetGameplayObjectHint(p0, p1, p2, p3, p4, p5, p6, p7) end
19341932

19351933

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

25242520

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

26522646
--- Create a camera with the specified cam name/type, You can use `SET_CAM_` natives to manipulate the camera.
26532647
---
2654-
--- Camera names found in the b617d scripts:
2655-
---
2656-
--- ```
2657-
--- "DEFAULT_ANIMATED_CAMERA"
2658-
--- "DEFAULT_SCRIPTED_CAMERA"
2659-
--- "DEFAULT_SCRIPTED_FLY_CAMERA"
2660-
--- "DEFAULT_SPLINE_CAMERA"
2661-
--- ```
2648+
--- Take a look at [CREATE_CAM](https://docs.fivem.net/natives/?_0xC3981DCE61D9E13F) if you would like to see the available camera names.
26622649
--- @usage local cam = CreateCamWithParams("DEFAULT_SCRIPTED_CAMERA", 561.3, 301.3, 63.0, 0.0, 0.0, 0.0, 90.0
26632650
--- @hash [0xB51194800B257161](https://docs.fivem.net/natives/?_0xB51194800B257161)
26642651
--- @param camName string (char*)

docs-gen/native-entity.def.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,10 +1263,10 @@ function SetEntityHealth(entity, health) end
12631263
--- @param collision boolean
12641264
--- @param isPed boolean
12651265
--- @param rotationOrder number (int)
1266-
--- @param fixedRot boolean
1266+
--- @param syncRot boolean
12671267
--- @return void
1268-
--- @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
1269-
function AttachEntityToEntity(entity1, entity2, boneIndex, xPos, yPos, zPos, xRot, yRot, zRot, p9, useSoftPinning, collision, isPed, rotationOrder, fixedRot) end
1268+
--- @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
1269+
function AttachEntityToEntity(entity1, entity2, boneIndex, xPos, yPos, zPos, xRot, yRot, zRot, p9, useSoftPinning, collision, isPed, rotationOrder, syncRot) end
12701270

12711271

12721272
--- ```

docs-gen/native-graphics.def.lua

Lines changed: 87 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -453,12 +453,9 @@ function SeethroughSetMaxThickness(thickness) end
453453
function N_0x0c8fac83902a62df(thickness) end
454454

455455

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

469466

470467
--- # New Name: SetBinkMovieTime
471-
--- ```
472-
--- In percentage: 0.0 - 100.0
473-
---
474-
--- NativeDB Introduced: v1290
475-
--- ```
476-
---
468+
--- Seeks a BINK movie to a specified position.
469+
--- @usage -- Movie drawn prior
470+
--- SetBinkMovieTime(1, 50.0) -- Seeks to 50% in
477471
--- @hash [0x0CB6B3446855B57A](https://docs.fivem.net/natives/?_0x0CB6B3446855B57A)
478472
--- @param binkMovie number (int)
479473
--- @param progress number (float)
@@ -1988,10 +1982,19 @@ function GetDecalWashLevel(decal) end
19881982
function N_0x32f34ff7f617643b(p0, p1) end
19891983

19901984

1991-
--- ```
1992-
--- NativeDB Introduced: v1290
1993-
--- ```
1994-
---
1985+
--- Creates an integer (usually 1) for a BINK movie to be called with other natives.
1986+
--- [List of all BINK movies (alphabetically ordered) as of b2802](https://gist.github.com/ItsJunction/8046f28c29ea8ff2821e9e4f933f595f)
1987+
--- @usage Citizen.CreateThread(function()
1988+
--- local binkint = SetBinkMovie("casino_trailer")
1989+
--- SetBinkMovieTime(binkint, 0.0) -- Seeks to 0%
1990+
---
1991+
--- while (GetBinkMovieTime(binkint) < 100.0) do -- Very Basic Idea That Works?
1992+
--- print(math.floor(GetBinkMovieTime(binkint) * 100)/100 .. "%") -- Prints current playtime (as percentage).
1993+
--- PlayBinkMovie(binkint)
1994+
--- 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).
1995+
--- Citizen.Wait(0)
1996+
--- end
1997+
--- end
19951998
--- @hash [0x338D9F609FD632DB](https://docs.fivem.net/natives/?_0x338D9F609FD632DB)
19961999
--- @param name string (char*)
19972000
--- @return number
@@ -2000,10 +2003,19 @@ function SetBinkMovie(name) end
20002003

20012004

20022005
--- # New Name: SetBinkMovie
2003-
--- ```
2004-
--- NativeDB Introduced: v1290
2005-
--- ```
2006-
---
2006+
--- Creates an integer (usually 1) for a BINK movie to be called with other natives.
2007+
--- [List of all BINK movies (alphabetically ordered) as of b2802](https://gist.github.com/ItsJunction/8046f28c29ea8ff2821e9e4f933f595f)
2008+
--- @usage Citizen.CreateThread(function()
2009+
--- local binkint = SetBinkMovie("casino_trailer")
2010+
--- SetBinkMovieTime(binkint, 0.0) -- Seeks to 0%
2011+
---
2012+
--- while (GetBinkMovieTime(binkint) < 100.0) do -- Very Basic Idea That Works?
2013+
--- print(math.floor(GetBinkMovieTime(binkint) * 100)/100 .. "%") -- Prints current playtime (as percentage).
2014+
--- PlayBinkMovie(binkint)
2015+
--- 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).
2016+
--- Citizen.Wait(0)
2017+
--- end
2018+
--- end
20072019
--- @hash [0x338D9F609FD632DB](https://docs.fivem.net/natives/?_0x338D9F609FD632DB)
20082020
--- @param name string (char*)
20092021
--- @return number
@@ -3447,24 +3459,32 @@ function SeethroughReset() end
34473459
function PlayBinkMovie(binkMovie) end
34483460

34493461

3450-
--- ```
3451-
--- NativeDB Introduced: v1290
3452-
--- ```
3453-
---
3462+
--- Must be called each frame, will play at specified position on screen when called with [`_PLAY_BINK_MOVIE`](https://docs.fivem.net/natives/?_0x70D2CC8A542A973C)
3463+
--- @usage Citizen.CreateThread(function()
3464+
--- local binkint = SetBinkMovie("casino_trailer") -- BINK movie, list can be found at https://gist.github.com/ItsJunction/8046f28c29ea8ff2821e9e4f933f595f
3465+
--- SetBinkMovieTime(binkint, 0.0) -- Seeks to 0%, just incase of errors.
3466+
---
3467+
--- while (GetBinkMovieTime(binkint) < 100.0) do
3468+
--- print(math.floor(GetBinkMovieTime(binkint) * 100)/100 .. "%") -- Prints current playtime (as percentage).
3469+
--- PlayBinkMovie(binkint)
3470+
--- 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).
3471+
--- Citizen.Wait(0)
3472+
--- end
3473+
--- end
34543474
--- @hash [0x7118E83EEB9F7238](https://docs.fivem.net/natives/?_0x7118E83EEB9F7238)
34553475
--- @param binkMovie number (int)
3456-
--- @param p1 number (float)
3457-
--- @param p2 number (float)
3458-
--- @param p3 number (float)
3459-
--- @param p4 number (float)
3460-
--- @param p5 number (float)
3476+
--- @param posX number (float)
3477+
--- @param posY number (float)
3478+
--- @param scaleX number (float)
3479+
--- @param scaleY number (float)
3480+
--- @param rotation number (float)
34613481
--- @param r number (int)
34623482
--- @param g number (int)
34633483
--- @param b number (int)
34643484
--- @param a number (int)
34653485
--- @return void
3466-
--- @overload fun(binkMovie: number, p1: number, p2: number, p3: number, p4: number, p5: number, r: number, g: number, b: number, a: number): void
3467-
function DrawBinkMovie(binkMovie, p1, p2, p3, p4, p5, r, g, b, a) end
3486+
--- @overload fun(binkMovie: number, posX: number, posY: number, scaleX: number, scaleY: number, rotation: number, r: number, g: number, b: number, a: number): void
3487+
function DrawBinkMovie(binkMovie, posX, posY, scaleX, scaleY, rotation, r, g, b, a) end
34683488

34693489

34703490
--- ```
@@ -6881,10 +6901,26 @@ function GetScaleformMovieMethodReturnValueBool(methodReturn) end
68816901
function N_0xd80a80346a45d761(methodReturn) end
68826902

68836903

6904+
--- 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".
6905+
---
6906+
--- 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**.
6907+
---
6908+
--- Excerpt from fm_content_drug_lab_work.c:
6909+
---
68846910
--- ```
6885-
--- Creates cartoon effect when Michel smokes the weed
6911+
--- STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_rcbarry2");
6912+
--- if (STREAMING::HAS_NAMED_PTFX_ASSET_LOADED("scr_rcbarry2"))
6913+
--- {
6914+
--- GRAPHICS::ENABLE_CLOWN_BLOOD_VFX(true);
6915+
--- AUDIO::START_AUDIO_SCENE("DLC_CM2022_DRUG_TRIP_SPRINKLERS_SCENE");
6916+
--- func_720(26);
6917+
--- }
68866918
--- ```
6887-
---
6919+
--- @usage RequestNamedPtfxAsset("scr_rcbarry2") -- Request the PTFX
6920+
--- while not HasNamedPtfxAssetLoaded("scr_rcbarry2") do
6921+
--- Citizen.Wait(0)
6922+
--- end
6923+
--- EnableClownBloodVfx(true) -- Enable the clown PTF
68886924
--- @hash [0xD821490579791273](https://docs.fivem.net/natives/?_0xD821490579791273)
68896925
--- @param toggle boolean
68906926
--- @return void
@@ -6893,10 +6929,26 @@ function EnableClownBloodVfx(toggle) end
68936929

68946930

68956931
--- # New Name: EnableClownBloodVfx
6932+
--- 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".
6933+
---
6934+
--- 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**.
6935+
---
6936+
--- Excerpt from fm_content_drug_lab_work.c:
6937+
---
68966938
--- ```
6897-
--- Creates cartoon effect when Michel smokes the weed
6939+
--- STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_rcbarry2");
6940+
--- if (STREAMING::HAS_NAMED_PTFX_ASSET_LOADED("scr_rcbarry2"))
6941+
--- {
6942+
--- GRAPHICS::ENABLE_CLOWN_BLOOD_VFX(true);
6943+
--- AUDIO::START_AUDIO_SCENE("DLC_CM2022_DRUG_TRIP_SPRINKLERS_SCENE");
6944+
--- func_720(26);
6945+
--- }
68986946
--- ```
6899-
---
6947+
--- @usage RequestNamedPtfxAsset("scr_rcbarry2") -- Request the PTFX
6948+
--- while not HasNamedPtfxAssetLoaded("scr_rcbarry2") do
6949+
--- Citizen.Wait(0)
6950+
--- end
6951+
--- EnableClownBloodVfx(true) -- Enable the clown PTF
69006952
--- @hash [0xD821490579791273](https://docs.fivem.net/natives/?_0xD821490579791273)
69016953
--- @param toggle boolean
69026954
--- @return void

0 commit comments

Comments
 (0)