NativeHub
All NativesModelsArtifactsCFXVehicle

Not affiliated with Rockstar Games or Take-Two Interactive. FiveM and Cfx.re are trademarks of their respective owners. cfxnatives.dev is an independent community project.

Maintained by uz-scripts

© 2026 cfxnatives.dev

contact@cfxnatives.dev
CAMClient
Artifact25963
Data sourced from jgscripts artifact-db

SetCamSplineSmoothingStyle

Docs
SetCamSplineSmoothingStyle(cam, smoothingStyle)

Description

Sets the smoothing style for a DEFAULT_SPLINE_CAMERA
Ranges from 0 to 3 in rockstar scripts although there are actually 26

0: No lead-in or lead-out smoothing
1: Smooth lead-in
2: Smooth lead-out
3: Both lead-in and lead-out are smoothed
4-6: Longer speed up, lead-in, lead-out, and both in order as above.
6: see above, but missed a node in testing(?)
7: Smoothed lead-in, longer smoothed lead-out
8: Longer lead-in and lead-out than 6, didn't drop node
9: Constant acceleration
10: Constant deceleration. Dropped 2 nodes in testing.
11: Same as 0
12: 10 but slower lead-in, reaches end node less early
13: Extremely close to 3, slightly longer lead-in/lead-out
14: Constant acceleration, dropped last 2 nodes in testing and halted (?)
15: Very similar to 10, did not drop any nodes.
16: Long lead-in, dropped 2 nodes in testing, very long leadout.
17: Constant acceleration, slower speed-up than 9
18: Same as 17 is to 9, slightly longer lead-out, lingers at end node
19: Very long lead in and out
20: Very long, gradual lead-in acceleration at start, gets extremely fast
21: Same as 20 but for constant deceleration
22: 20 and 21 combined, long linger at end node. Dropped 2 nodes in testing
23: Constant acceleration, doesn't complete path before it stops
24: Same as 23 but with constant deceleration, but completes path
25: 23 and 24 combined, insanely fast at middle.
26: No noticable lead-in, misses last 2 nodes in testing
27+: Alternates between 0 and 26

The above is documented and graphed at Spline Cam Interp Graphs

Using 1-3 will result in misalignment from the passed durations for the spline nodes, the overall duration will remain but other nodes will be shortened if smoothing anything.

Graph below demonstrates interpolation between 0-1000 and back 10 times.

![](https://i.imgur.com/cixWh7m.png)

## Parameters
cam: The DEFAULT_SPLINE_CAMERA to apply the smoothing to
smoothingStyle: 0 to 3, 0 no additional smoothing, 1 smooth lead-in, 2 smooth lead-out, 3 smooth lead-in & lead-out

Parameters

NameTypeDescription
camCam—
smoothingStyleint—
🎥Quick Snippet: Scripted Camera
cam

Use this to create and control a scripted camera for this native.

-- Create a scripted camera at the player's position
local coords = GetEntityCoords(PlayerPedId())
local cam = CreateCam("DEFAULT_SCRIPTED_CAMERA", true)

SetCamCoord(cam, coords.x, coords.y, coords.z + 2.0)
SetCamRot(cam, -15.0, 0.0, GetEntityHeading(PlayerPedId()))
SetCamFov(cam, 70.0)
SetCamActive(cam, true)
RenderScriptCams(true, true, 500, true, true)

-- Restore gameplay camera:
-- RenderScriptCams(false, true, 500, true, true)
-- DestroyCam(cam, true)

Returns

void

This native does not return a value.

Server Artifacts

Data sourced from jgscripts artifact-db
Recommended25963
Known Issues24
25987-25988Node.js sandboxing seems to be causing issues for people - best to avoid for now
21547Multiple (unconfirmed) reports of server-sided natives throwing errors or causing crashes; best to avoid
17462Failed build, ignore
16276Multiple reports of issues loading JS within resources
14583-14716Crash when using the new onEntityBucketChange
14583-14862Timeouts due to latency units being in nanoseconds
13759-13890Mumble (voice) external connections blocked by default
13380-13458Server crashing due to integer encoding (PR#3235)
13079Failed Linux build (works OK if using Windows!)
12933-13045Still crashes (sometimes) when restarting resources due to Node.js 22
12913-12932Causes a crash when restarting Node.js 22
12767os.date() appends null terminator; can break Lua scripts
12651Failed Linux build, ignore
12509Failed build, ignore
12255Unconfirmed, but several reports of server-side issues that don't persist when downgrading; best to avoid
12160-12165Cannot use entity native calls in entityRemoved
12151Crashing if using newest title update (TU)
12092-12135SetPlayerModel may cause SIGSEGV crashes on some clients due to changes in player handling. 12031 and below works fine.
12078-12083Some clients will fail to connect with 'ReadBulk of header failed' error
10930Failed build, ignore
10268-10309sv_experimentalNetGameEventHandler enabled by default; can cause server crashing and reports of issues downgrading after upgrading
10191GetVehicleNumberPlateText server native broken, will cause issues with scripts involving vehicles
10072Crashing when players join
8509State bags not replicated to clients

CommunitySnippets

No snippets yet. Be the first to contribute!