class Cam
package fivem.client.natives
Static methods
staticActivateCamWithInterpAndFovCurve(camTo:Dynamic, camFrom:Dynamic, duration:Int, easeLocation:Int, easeRotation:Int, easeFove:Int):Dynamic
NativeDB Introduced: v3258staticAnimateGameplayCamZoom(p0:Float, distance:Float):Dynamic
Seems to animate the gameplay camera zoom.
Eg. _ANIMATE_GAMEPLAY_CAM_ZOOM(1f, 1000f);
will animate the camera zooming in from 1000 meters away.
Game scripts use it like this:
// Setting this to 1 prevents V key from changing zoom
PLAYER::SET_PLAYER_FORCED_ZOOM(PLAYER::PLAYER_ID(), 1);
// These restrict how far you can move cam up/down left/right
CAM::_CLAMP_GAMEPLAY_CAM_YAW(-20f, 50f);
CAM::_CLAMP_GAMEPLAY_CAM_PITCH(-60f, 0f);
CAM::_ANIMATE_GAMEPLAY_CAM_ZOOM(1f, 1f); staticAttachCamToVehicleBone(cam:Dynamic, vehicle:Dynamic, boneIndex:Int, relativeRotation:Bool, rotX:Float, rotY:Float, rotZ:Float, offX:Float, offY:Float, offZ:Float, fixedDirection:Bool):Dynamic
This native works with vehicles only. Bone indexes are usually given by this native GET_ENTITY_BONE_INDEX_BY_NAME.
staticClampGameplayCamPitch(minimum:Float, maximum:Float):Dynamic
minimum: Degrees between -90f and 90f.
maximum: Degrees between -90f and 90f.
Clamps the gameplay camera's current pitch.
Eg. _CLAMP_GAMEPLAY_CAM_PITCH(0.0f, 0.0f) will set the vertical angle directly behind the player.staticClampGameplayCamYaw(minimum:Float, maximum:Float):Dynamic
minimum: Degrees between -180f and 180f.
maximum: Degrees between -180f and 180f.
Clamps the gameplay camera's current yaw.
Eg. _CLAMP_GAMEPLAY_CAM_YAW(0.0f, 0.0f) will set the horizontal angle directly behind the player.staticDisableCamCollisionForEntity(entity:Dynamic):Dynamic
staticDisableFirstPersonCamThisFrame():Dynamic
Disables first person camera for the current frame.
Found in decompiled scripts:
GRAPHICS::DRAW_DEBUG_TEXT_2D("Disabling First Person Cam", 0.5, 0.8, 0.0, 0, 0, 255, 255);
CAM::_DE2EF5DA284CC8DF(); staticDisableVehicleFirstPersonCamThisFrame():Dynamic
staticEnableCrosshairThisFrame():Dynamic
Shows the crosshair even if it wouldn't show normally. Only works for one frame, so make sure to call it repeatedly. staticGetCamActiveViewModeContext():Int
Enumerated type defined in camControlHelperMetadataViewModes:
enum eContext {
ON_FOOT = 0, // [G|S]ET_FOLLOW_PED_CAM_*
IN_VEHICLE = 1, // [G|S]ET_FOLLOW_VEHICLE_CAM_*
ON_BIKE = 2,
IN_BOAT = 3,
IN_AIRCRAFT = 4,
IN_SUBMARINE = 5,
IN_HELI = 6,
IN_TURRET = 7,
}staticInterpolateCamWithParams(camera:Dynamic, camPosX:Float, camPosY:Float, camPosZ:Float, camRotX:Float, camRotY:Float, camRotZ:Float, fov:Float, duration:Int, posCurveType:Int, rotCurveType:Int, rotOrder:Int, fovCurveType:Int):Dynamic
Interpolates the camera to specified parameters over a set duration using various curve types for position, rotation, and fov.
NativeDB Introduced: v3258staticInvalidateVehicleIdleCam():Dynamic
Resets the vehicle idle camera timer. Calling this in a loop will disable the idle camera.
staticIsInVehicleCamDisabled():Bool
staticReplayFreeCamGetMaxRange():Float
staticSetCamDofFnumberOfLens(camera:Dynamic, p1:Float):Dynamic
This native has its name defined inside its codE staticSetCamDofFocalLengthMultiplier(camera:Dynamic, multiplier:Float):Dynamic
Native name labeled within its codestaticSetCamDofFocusDistanceBias(camera:Dynamic, p1:Float):Dynamic
This native has a name defined inside its code staticSetCamDofMaxNearInFocusDistance(camera:Dynamic, p1:Float):Dynamic
This native has a name defined inside its code staticSetCamDofMaxNearInFocusDistanceBlendLevel(camera:Dynamic, p1:Float):Dynamic
This native has a name defined inside its code staticSetCamEffect(p0:Int):Dynamic
if p0 is 0, effect is cancelled
if p0 is 1, effect zooms in, gradually tilts cam clockwise apx 30 degrees, wobbles slowly. Motion blur is active until cancelled.
if p0 is 2, effect immediately tilts cam clockwise apx 30 degrees, begins to wobble slowly, then gradually tilts cam back to normal. The wobbling will continue until the effect is cancelled. staticSetFirstPersonCamPitchRange(minAngle:Float, maxAngle:Float):Dynamic
staticSetFlyCamVerticalSpeedMultiplier(cam:Dynamic, p1:Float, p2:Float, p3:Float):Dynamic
staticSetGameplayCamHash(camName:String):Dynamic
Sets gameplay camera to hash
NativeDB Introduced: v1180staticSetGameplayCamRawPitch(pitch:Float):Dynamic
staticSetGameplayCamRelativeRotation(roll:Float, pitch:Float, yaw:Float):Dynamic
staticSetGameplayCamVehicleCamera(vehicleName:String):Dynamic
From b617 scripts:
CAM::_21E253A7F8DA5DFB("DINGHY");
CAM::_21E253A7F8DA5DFB("ISSI2");
CAM::_21E253A7F8DA5DFB("SPEEDO");staticSetGameplayCamVehicleCameraName(vehicleModel:Int):Dynamic
staticSetGameplayHintAnimCloseup(toggle:Bool):Dynamic
staticSetGameplayHintAnimOffsetx(xOffset:Float):Dynamic
staticSetGameplayHintAnimOffsety(yOffset:Float):Dynamic
staticSetUseHiDofInCutscene():Dynamic
Only used in R* Script fm_mission_controller_2020
NativeDB Introduced: v2699staticaddCamSplineNode(camera:Dynamic, x:Float, y:Float, z:Float, xRot:Float, yRot:Float, zRot:Float, length:Int, p8:Int, transitionType:Int):Dynamic
I filled p1-p6 (the floats) as they are as other natives with 6 floats in a row are similar and I see no other method. So if a test from anyone proves them wrong please correct.
p7 (length) determines the length of the spline, affects camera path and duration of transition between previous node and this one
p8 big values ~100 will slow down the camera movement before reaching this node
p9 != 0 seems to override the rotation/pitch (bool?) staticaddCamSplineNodeUsingCamera(cam:Dynamic, cam2:Dynamic, length:Int, p3:Int):Dynamic
Takes a camera and uses the information from it as a camera spline node.
staticaddCamSplineNodeUsingCameraFrame(cam:Dynamic, cam2:Dynamic, p2:Int, p3:Int):Dynamic
staticaddCamSplineNodeUsingGameplayFrame(cam:Dynamic, p1:Int, p2:Int):Dynamic
staticanimatedShakeCam(cam:Dynamic, p1:String, p2:String, p3:String, amplitude:Float):Dynamic
Example from michael2 script.
CAM::ANIMATED_SHAKE_CAM(l_5069, "shake_cam_all@", "light", "", 1f); staticanimatedShakeScriptGlobal(p0:String, p1:String, p2:String, p3:Float):Dynamic
CAM::ANIMATED_SHAKE_SCRIPT_GLOBAL("SHAKE_CAM_medium", "medium", "", 0.5f);staticattachCamToEntity(cam:Dynamic, entity:Dynamic, xOffset:Float, yOffset:Float, zOffset:Float, isRelative:Bool):Dynamic
Last param determines if its relative to the Entity staticattachCamToPedBone(cam:Dynamic, ped:Dynamic, boneIndex:Int, xOffset:Float, yOffset:Float, zOffset:Float, isRelative:Bool):Dynamic
This native works with peds only.
staticcreateCam(camName:String, active:Bool):Dynamic
Creates a camera with the specified cam name, You can use SET_CAM_ natives to manipulate the camera.\
Make sure to call RENDER_SCRIPT_CAMS once the camera is created, or this won't have any visible effect.
Camera names:
- DEFAULT_SCRIPTED_CAMERA
- DEFAULT_ANIMATED_CAMERA
- DEFAULT_SPLINE_CAMERA
- DEFAULT_SCRIPTED_FLY_CAMERA
- TIMED_SPLINE_CAMERA
- CUSTOM_TIMED_SPLINE_CAMERA
- ROUNDED_SPLINE_CAMERA
- SMOOTHED_SPLINE_CAMERA
staticcreateCamWithParams(camName:String, posX:Float, posY:Float, posZ:Float, rotX:Float, rotY:Float, rotZ:Float, fov:Float, active:Bool, rotationOrder:Int):Dynamic
Create a camera with the specified cam name/type, You can use SET_CAM_ natives to manipulate the camera.
Take a look at CREATE_CAM if you would like to see the available camera names.
staticcreateCamera(camHash:Int, active:Bool):Dynamic
Creates a camera with the specified camera hash, You can use SET_CAM_ natives to manipulate the camera.
Make sure to call RENDER_SCRIPT_CAMS once the camera is created, or this won't have any visible effect.
Take a look at CREATE_CAM if you would like to see the available camera names.
NativeDB Introduced: v323staticcreateCameraWithParams(camHash:Int, posX:Float, posY:Float, posZ:Float, rotX:Float, rotY:Float, rotZ:Float, fov:Float, active:Bool, rotationOrder:Int):Dynamic
Create a camera with the specified camera hash, You can use SET_CAM_ natives to manipulate the camera.
Make sure to call RENDER_SCRIPT_CAMS once the camera is created, or this won't have any visible effect.
Take a look at CREATE_CAM if you would like to see the available camera names.
NativeDB Introduced: v323staticcreateCinematicShot(p0:Dynamic, p1:Int, p2:Dynamic, entity:Dynamic):Dynamic
staticcustomMenuCoordinates(p0:Float):Dynamic
some camera effect that is used in the drunk-cheat, and turned off (by setting it to 0.0) along with the shaking effects once the drunk cheat is disabled. staticdestroyAllCams(bScriptHostCam:Bool):Dynamic
BOOL param indicates whether the cam should be destroyed if it belongs to the calling script. staticdestroyCam(cam:Dynamic, bScriptHostCam:Bool):Dynamic
BOOL param indicates whether the cam should be destroyed if it belongs to the calling script. staticdetachCam(cam:Dynamic):Dynamic
staticdisableAimCamThisUpdate():Dynamic
staticdisableCamCollisionForObject(entity:Dynamic):Dynamic
staticdoScreenFadeIn(duration:Int):Dynamic
Fades the screen in.
duration: The time the fade should take, in milliseconds. staticdoScreenFadeOut(duration:Int):Dynamic
Fades the screen out.
duration: The time the fade should take, in milliseconds. staticdoesCamExist(cam:Dynamic):Bool
Looks up a camera handle in the current camera pool and returns true if the handle is found, otherwise it returns false.
staticforceCinematicRenderingThisUpdate(p0:Bool):Dynamic
staticgetCamAnimCurrentPhase(cam:Dynamic):Float
staticgetCamCoord(cam:Dynamic):Dynamic
staticgetCamFarClip(cam:Dynamic):Float
staticgetCamFarDof(cam:Dynamic):Float
staticgetCamFov(cam:Dynamic):Float
staticgetCamNearClip(cam:Dynamic):Float
staticgetCamRot(cam:Dynamic, rotationOrder:Int):Dynamic
Gets a camera's rotation by handle (cam) lookup, outputs a Vector3 in degrees.
staticgetCamSplineNodeIndex(cam:Dynamic):Int
staticgetCamSplineNodePhase(cam:Dynamic):Float
I'm pretty sure the parameter is the camera as usual, but I am not certain so I'm going to leave it as is. staticgetCamSplinePhase(cam:Dynamic):Float
Can use this with SET_CAM_SPLINE_PHASE to set the float it this native returns.
(returns 1.0f when no nodes has been added, reached end of non existing spline) staticgetCamViewModeForContext(context:Int):Int
See GET_FOLLOW_PED_CAM_VIEW_MODE for the view mode enum.
staticgetFinalRenderedCamCoord():Dynamic
staticgetFinalRenderedCamFarClip():Float
staticgetFinalRenderedCamFarDof():Float
staticgetFinalRenderedCamFov():Float
staticgetFinalRenderedCamMotionBlurStrength():Float
staticgetFinalRenderedCamNearClip():Float
staticgetFinalRenderedCamNearDof():Float
staticgetFinalRenderedCamRot(rotationOrder:Int):Dynamic
staticgetFinalRenderedInWhenFriendlyFov(player:Dynamic):Float
staticgetFinalRenderedInWhenFriendlyRot(player:Dynamic, rotationOrder:Int):Dynamic
staticgetFirstPersonAimCamZoomFactor():Float
staticgetFocusPedOnScreen(p0:Float, p1:Int, p2:Float, p3:Float, p4:Float, p5:Float, p6:Float, p7:Int, p8:Int):Dynamic
staticgetFollowPedCamViewMode():Int
// view mode enumeration
enum eCamViewMode
{
THIRD_PERSON_NEAR = 0,
THIRD_PERSON_MEDIUM = 1,
THIRD_PERSON_FAR = 2,
CINEMATIC = 3,
FIRST_PERSON = 4,
};staticgetGameplayCamCoord():Dynamic
staticgetGameplayCamFov():Float
staticgetGameplayCamRelativeHeading():Float
staticgetGameplayCamRelativePitch():Float
staticgetGameplayCamRot(rotationOrder:Int):Dynamic
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.
staticgetRenderingCam():Dynamic
statichardAttachCamToEntity(cam:Dynamic, entity:Dynamic, xRot:Float, yRot:Float, zRot:Float, xOffset:Float, yOffset:Float, zOffset:Float, isRelative:Bool):Dynamic
Attaches a camera to an entity, including full matrix transformations for both rotation and position offsets.
NativeDB Introduced: v2189statichardAttachCamToPedBone(cam:Dynamic, ped:Dynamic, boneIndex:Int, xRot:Float, yRot:Float, zRot:Float, xOffset:Float, yOffset:Float, zOffset:Float, isRelative:Bool):Dynamic
Attaches a camera to a specific bone of a Ped, including full matrix transformations for both rotation and position offsets. This native works with peds only.
NativeDB Introduced: v1180staticinvalidateIdleCam():Dynamic
Resets the idle camera timer. Calling that in a loop once every few seconds is enough to disable the idle cinematic camera.
staticisAimCamActive():Bool
staticisBonnetCinematicCamRendering():Bool
staticisCamInterpolating(cam:Dynamic):Bool
staticisCamRendering(cam:Dynamic):Bool
staticisCamShaking(cam:Dynamic):Bool
staticisCamSplinePaused(p0:Dynamic):Bool
staticisCinematicCamRendering():Bool
staticisCinematicCamShaking():Bool
staticisCinematicIdleCamRendering():Bool
staticisCinematicShotActive(p0:Dynamic):Bool
staticisFirstPersonAimCamActive():Bool
staticisFollowPedCamActive():Bool
staticisFollowVehicleCamActive():Bool
staticisGameplayCamLookingBehind():Bool
staticisGameplayCamRendering():Bool
Examples when this function will return 0 are:
- During busted screen.
- When player is coming out from a hospital.
- When player is coming out from a police station.
- When player is buying gun from AmmuNation.staticisGameplayCamShaking():Bool
staticisGameplayHintActive():Bool
staticisScreenFadedIn():Bool
staticisScreenFadedOut():Bool
staticisScreenFadingIn():Bool
staticisScreenFadingOut():Bool
staticisScriptGlobalShaking():Bool
Determines if a global camera shake is currently active. You can stop the currently active global camera shake using STOP_SCRIPT_GLOBAL_SHAKING.
NativeDB Introduced: v323staticisSphereVisible(x:Float, y:Float, z:Float, radius:Float):Bool
staticoverrideCamSplineMotionBlur(cam:Dynamic, p1:Int, p2:Float, p3:Float):Dynamic
Max value for p1 is 15. staticoverrideCamSplineVelocity(cam:Dynamic, p1:Int, p2:Float, p3:Float):Dynamic
staticplayCamAnim(cam:Dynamic, animName:String, animDictionary:String, x:Float, y:Float, z:Float, xRot:Float, yRot:Float, zRot:Float, p9:Bool, p10:Int):Bool
Atleast one time in a script for the zRot Rockstar uses GET_ENTITY_HEADING to help fill the parameter.
p9 is unknown at this time.
p10 throughout all the X360 Scripts is always 2.
staticplaySynchronizedCamAnim(camera:Dynamic, scene:Int, animName:String, animDictionary:String):Bool
Examples:
CAM::PLAY_SYNCHRONIZED_CAM_ANIM(l_2734, NETWORK::_02C40BF885C567B6(l_2739), "PLAYER_EXIT_L_CAM", "mp_doorbell");
CAM::PLAY_SYNCHRONIZED_CAM_ANIM(l_F0D[7/ *1* /], l_F4D[15/ *1* /], "ah3b_attackheli_cam2", "missheistfbi3b_helicrash");
staticpointCamAtCoord(cam:Dynamic, x:Float, y:Float, z:Float):Dynamic
staticpointCamAtEntity(cam:Dynamic, entity:Dynamic, offsetX:Float, offsetY:Float, offsetZ:Float, p5:Bool):Dynamic
Points the camera at the specified entity.
Offset works like GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS.
staticpointCamAtPedBone(cam:Dynamic, ped:Dynamic, boneIndex:Int, x:Float, y:Float, z:Float, p6:Bool):Dynamic
Parameters p0-p5 seems correct. The bool p6 is unknown, but through every X360 script it's always 1. Please correct p0-p5 if any prove to be wrong. staticrenderScriptCams(render:Bool, ease:Bool, easeTime:Int, easeCoordsAnim:Bool, p4:Bool):Dynamic
Renders the camera previously created with CREATE_CAM or CREATE_CAMERA
NativeDB Added Parameter 6: Any p5staticsetCamActiveWithInterp(camTo:Dynamic, camFrom:Dynamic, duration:Int, easeLocation:Int, easeRotation:Int):Dynamic
Previous declaration void SET_CAM_ACTIVE_WITH_INTERP(Cam camTo, Cam camFrom, int duration, BOOL easeLocation, BOOL easeRotation) is completely wrong. The last two params are integers not BOOLs... staticsetCamAffectsAiming(cam:Dynamic, toggle:Bool):Dynamic
Allows you to aim and shoot at the direction the camera is facing. staticsetCamAnimCurrentPhase(cam:Dynamic, phase:Float):Dynamic
staticsetCamControlsMiniMapHeading(cam:Dynamic, toggle:Bool):Dynamic
Makes the minimap follow a scripted camera's rotation instead of the gameplay cam.
staticsetCamCoord(cam:Dynamic, posX:Float, posY:Float, posZ:Float):Dynamic
Sets the position of the cam. staticsetCamDebugName(camera:Dynamic, name:String):Dynamic
NOTE: Debugging functions are not present in the retail version of the game. staticsetCamDofPlanes(cam:Dynamic, p1:Float, p2:Float, p3:Float, p4:Float):Dynamic
staticsetCamDofStrength(cam:Dynamic, dofStrength:Float):Dynamic
Specifies how much the DoF effect should be applied (Set using SET_CAM_NEAR_DOF, SET_CAM_FAR_DOF, etc.)
staticsetCamFarClip(cam:Dynamic, farClip:Float):Dynamic
staticsetCamFarDof(cam:Dynamic, farDOF:Float):Dynamic
Specifies when the camera should stop being in focus. Can be used together with SET_USE_HI_DOF, SET_CAM_NEAR_DOF, SET_CAM_USE_SHALLOW_DOF_MODE, SET_CAM_DOF_STRENGTH and other DoF related natives.
Usage Example
A usage example for this native can be found in the following native documentation: SET_CAM_DOF_STRENGTH.
staticsetCamFov(cam:Dynamic, fieldOfView:Float):Dynamic
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.
NativeDB Introduced: v323staticsetCamInheritRollVehicle(cam:Dynamic, p1:Bool):Dynamic
The native seems to only be called once.
The native is used as so,
CAM::SET_CAM_INHERIT_ROLL_VEHICLE(l_544, getElem(2, &l_525, 4));
In the exile1 script. staticsetCamMotionBlurStrength(cam:Dynamic, strength:Float):Dynamic
staticsetCamNearClip(cam:Dynamic, nearClip:Float):Dynamic
staticsetCamNearDof(cam:Dynamic, nearDOF:Float):Dynamic
Specifies when the camera should start being in focus. Can be used together with SET_USE_HI_DOF, SET_CAM_FAR_DOF, SET_CAM_USE_SHALLOW_DOF_MODE, SET_CAM_DOF_STRENGTH and other DoF related natives.
Usage Example
A usage example for this native can be found in the following native documentation: SET_CAM_DOF_STRENGTH.
staticsetCamParams(cam:Dynamic, posX:Float, posY:Float, posZ:Float, rotX:Float, rotY:Float, rotZ:Float, fieldOfView:Float, transitionSpeed:Int, p9:Int, p10:Int, rotationOrder:Int):Dynamic
staticsetCamRot(cam:Dynamic, rotX:Float, rotY:Float, rotZ:Float, rotationOrder:Int):Dynamic
Sets the rotation of the camera.
staticsetCamShakeAmplitude(cam:Dynamic, amplitude:Float):Dynamic
staticsetCamSplineDuration(cam:Dynamic, timeDuration:Int):Dynamic
I named p1 as timeDuration as it is obvious. I'm assuming tho it is ran in ms(Milliseconds) as usual. staticsetCamSplineNodeEase(cam:Dynamic, p1:Int, p2:Int, p3:Float):Dynamic
staticsetCamSplineNodeExtraFlags(cam:Dynamic, p1:Int, flags:Int):Dynamic
staticsetCamSplineNodeVelocityScale(cam:Dynamic, p1:Int, scale:Float):Dynamic
staticsetCamSplinePhase(cam:Dynamic, p1:Float):Dynamic
staticsetCamSplineSmoothingStyle(cam:Dynamic, smoothingStyle:Int):Dynamic
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.

## 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-outstaticsetCamUseShallowDofMode(cam:Dynamic, toggle:Bool):Dynamic
Enables or disables the usage of a shallow DOF. Needs to be set to true to use SET_CAM_NEAR_DOF, SET_CAM_FAR_DOF, etc. Doesn't need to be called every tick.
Usage Example
A usage example for this native can be found in the following native documentation: SET_CAM_DOF_STRENGTH.
staticsetCamViewModeForContext(context:Int, viewMode:Int):Dynamic
staticsetCinematicButtonActive(p0:Bool):Dynamic
staticsetCinematicCamShakeAmplitude(p0:Float):Dynamic
staticsetCinematicModeActive(toggle:Bool):Dynamic
Toggles the vehicle cinematic cam; requires the player ped to be in a vehicle to work.staticsetCinematicNewsChannelActiveThisUpdate():Dynamic
staticsetFirstPersonAimCamNearClipThisUpdate(distance:Float):Dynamic
staticsetFirstPersonAimCamZoomFactor(zoomFactor:Float):Dynamic
staticsetFlyCamCoordAndConstrain(cam:Dynamic, x:Float, y:Float, z:Float):Dynamic
staticsetFlyCamHorizontalResponse(cam:Dynamic, p1:Float, p2:Float, p3:Float):Dynamic
staticsetFlyCamMaxHeight(cam:Dynamic, height:Float):Dynamic
staticsetFollowPedCamThisUpdate(camName:String, easeTime:Int):Bool
Overrides the ped follow camera (not first person camera) with the specified camera. The game loads all camera metadata from update/update.rpf/x64/data/metadata/cameras.ymt and x64a.rpf/data/metadata/cameras.ymt with the ped follow cameras being of type camFollowPedCameraMetadata.
| Follow Camera Names | |----------------------------------------------| | DEFAULT_FOLLOW_PED_CAMERA | | FOLLOW_PED_ATTACHED_TO_ROPE_CAMERA | | FOLLOW_PED_ON_EXILE1_LADDER_CAMERA | | FOLLOW_PED_SKY_DIVING_CAMERA | | FOLLOW_PED_SKY_DIVING_FAMILY5_CAMERA | | NIGHTCLUB_FOLLOW_PED_CAMERA | | FOLLOW_PED_INTIMIDATION_CAMERA | | FOLLOW_PED_IN_WATER_CAMERA | | FOLLOW_PED_PRONE_CAMERA | | FOLLOW_PED_ON_SEAT_CAMERA | | FOLLOW_PED_HANGING_UPSIDE_DOWN_CAMERA | | FOLLOW_PED_ATTACHED_TO_ROPE_CAMERA | | CUSTOM_TRANSITION_AFTER_WARP_SKY_DIVE_CAMERA | | FOLLOW_PED_ON_HORSE_CAMERA | | FOLLOW_PED_ON_LOUNGER_CAMERA |
Other camera hashes (names not found yet)
// 0x5DBBFB6E
// 0xA38DB056
// 0x16B702A3
// 0x41D72A2EstaticsetFollowPedCamViewMode(viewMode:Int):Dynamic
See GET_FOLLOW_PED_CAM_VIEW_MODE for the follow mode enum.
staticsetFollowVehicleCamViewMode(viewMode:Int):Dynamic
See GET_FOLLOW_PED_CAM_VIEW_MODE for the follow mode enum.
staticsetFollowVehicleCamZoomLevel(zoomLevel:Int):Dynamic
See GET_FOLLOW_PED_CAM_VIEW_MODE for the follow mode enum.
staticsetGameplayCamFollowPedThisUpdate(ped:Dynamic):Dynamic
staticsetGameplayCamRelativeHeading(heading:Float):Dynamic
Sets the camera position relative to heading in float from -360 to +360.
Heading is alwyas 0 in aiming camera. staticsetGameplayCamRelativePitch(angle:Float, scalingFactor:Float):Dynamic
This native sets the camera's pitch (rotation on the x-axis).
staticsetGameplayCamShakeAmplitude(amplitude:Float):Dynamic
Sets the amplitude for the gameplay (i.e. 3rd or 1st) camera to shake. Used in script "drunk_controller.ysc.c4" to simulate making the player drunk. staticsetGameplayCoordHint(x:Float, y:Float, z:Float, duration:Int, blendOutDuration:Int, blendInDuration:Int, unk:Int):Dynamic
staticsetGameplayEntityHint(entity:Dynamic, xOffset:Float, yOffset:Float, zOffset:Float, p4:Bool, p5:Int, p6:Int, p7:Int, p8:Dynamic):Dynamic
p6 & p7 - possibly length or time staticsetGameplayHintBaseOrbitPitchOffset(value:Float):Dynamic
staticsetGameplayHintFollowDistanceScalar(value:Float):Dynamic
staticsetGameplayHintFov(FOV:Float):Dynamic
staticsetGameplayObjectHint(p0:Dynamic, p1:Float, p2:Float, p3:Float, p4:Bool, p5:Dynamic, p6:Dynamic, p7:Dynamic):Dynamic
staticsetGameplayPedHint(p0:Dynamic, x1:Float, y1:Float, z1:Float, p4:Bool, duration:Int, blendOutDuration:Int, blendInDuration:Int):Dynamic
staticsetGameplayVehicleHint(vehicle:Dynamic, offsetX:Float, offsetY:Float, offsetZ:Float, p4:Bool, time:Int, easeInTime:Int, easeOutTime:Int):Dynamic
Focuses the camera on the specified vehicle.
staticsetInVehicleCamStateThisUpdate(p0:Dynamic, p1:Int):Dynamic
staticsetTableGamesCameraThisUpdate(hash:Int):Bool
Override the camera work of the third-person camera to table game for current frame only.
| HashKey | Hash | Game |
|---|---|---|
CASINO_LUCKY_WHEEL_CAMERA | 5891389 | Lucky Wheel |
CASINO_SLOT_MACHINE_CAMERA | 518572876 | Slots |
CASINO_ROULETTE_CAMERA | 71681063 | Roulette |
CASINO_BLACKJACK_CAMERA | -2124244681 | Blackjack |
CASINO_POKER_CAMERA | -1938411241 | Three Cards |
CASINO_INSIDE_TRACK_CAMERA | 1929822423 | Inside Track |
ARCADE_LOVE_PROFESSOR_P1_CAMERA | 545868034 | LoveProfessorP1 |
ARCADE_LOVE_PROFESSOR_P2_CAMERA | 935304251 | LoveProfessorP2 |
staticsetThirdPersonAimCamNearClipThisUpdate(distance:Float):Dynamic
staticsetUseHiDof():Dynamic
Needs to be called every tick to make the active camera use a high depth of field.\
The DoF can be customized using SET_CAM_NEAR_DOF, SET_CAM_FAR_DOF, SET_CAM_USE_SHALLOW_DOF_MODE, SET_CAM_DOF_STRENGTH and other DoF related natives.
Usage Example
A usage example for this native can be found in the following native documentation: SET_CAM_DOF_STRENGTH.
staticsetWidescreenBorders(p0:Bool, p1:Int):Dynamic
staticshakeCam(cam:Dynamic, type:String, amplitude:Float):Dynamic
Possible shake types (updated b617d):
DEATH_FAIL_IN_EFFECT_SHAKE
DRUNK_SHAKE
FAMILY5_DRUG_TRIP_SHAKE
HAND_SHAKE
JOLT_SHAKE
LARGE_EXPLOSION_SHAKE
MEDIUM_EXPLOSION_SHAKE
SMALL_EXPLOSION_SHAKE
ROAD_VIBRATION_SHAKE
SKY_DIVING_SHAKE
VIBRATE_SHAKE staticshakeCinematicCam(p0:String, p1:Float):Dynamic
p0 argument found in the b617d scripts: "DRUNK_SHAKE" staticshakeGameplayCam(shakeName:String, intensity:Float):Dynamic
Possible shake types (updated b617d):
DEATH_FAIL_IN_EFFECT_SHAKE
DRUNK_SHAKE
FAMILY5_DRUG_TRIP_SHAKE
HAND_SHAKE
JOLT_SHAKE
LARGE_EXPLOSION_SHAKE
MEDIUM_EXPLOSION_SHAKE
SMALL_EXPLOSION_SHAKE
ROAD_VIBRATION_SHAKE
SKY_DIVING_SHAKE
VIBRATE_SHAKE staticstopCamPointing(cam:Dynamic):Dynamic
staticstopCamShaking(cam:Dynamic, p1:Bool):Dynamic
staticstopCinematicCamShaking(p0:Bool):Dynamic
staticstopCinematicShot(p0:Int):Dynamic
staticstopCutsceneCamShaking():Dynamic
staticstopGameplayCamShaking(bStopImmediately:Bool):Dynamic
staticstopGameplayHint(bStopImmediately:Bool):Dynamic
Terminates the current gameplay hint camera, with an option for immediate cessation or a gradual fade out.
NativeDB Introduced: v323staticstopRenderingScriptCamsUsingCatchUp(bShouldApplyAcrossAllThreads:Bool, distanceToBlend:Float, blendType:Int):Dynamic
Instructs the game engine to stop rendering scripted cameras and transition back to the gameplay camera, optionally applying custom blending and rendering options.
enum eRenderingOptionFlags {
RO_NO_OPTIONS = 0,
RO_STOP_RENDERING_OPTION_WHEN_PLAYER_EXITS_INTO_COVER = 1
};
enum eCamSplineSmoothingFlags {
// No smoothing just moves at a constant rate
CAM_SPLINE_NO_SMOOTH = 0,
// Decelerates when approaching a node
CAM_SPLINE_SLOW_IN_SMOOTH = 1,
// Accelerates slowly when leaving a node
CAM_SPLINE_SLOW_OUT_SMOOTH = 2,
// Decelerates when approaching a node and accelerates slowly when leaving a node
CAM_SPLINE_SLOW_IN_OUT_SMOOTH = 3,
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
};
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 Introduced: v323staticstopScriptGlobalShaking(bStopImmediately:Bool):Dynamic
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.
NativeDB Introduced: v323staticuseScriptCamForAmbientPopulationOriginThisFrame(vehicles:Bool, peds:Bool):Dynamic
Sets the ambient ped & vehicle population spawning origin to be based around the active scripted camera for this frame This will prevent vehicles from being created close to the camera and/or on-screen
staticuseVehicleCamStuntSettingsThisUpdate():Dynamic
Applies a predefined set of vehicle camera settings optimized for capturing stunts, effective for the current game update/frame.
NativeDB Introduced: v791