Gameplay Camera
Gameplay Cam Configuration
This document explains what the settings in the script's config.lua and locales.lua files do and how to edit them.
📁 config.lua
config.luaThe config.lua file is the main configuration file that controls all the core functions and user experience of the script. The settings are divided into categories.
👁️ Visual Settings
This section contains settings related to camera transitions and visual effects.
Config.UseHiDof
If set to true, it removes the depth of field (blur) effect when zooming in with the freecam.
true / false
Config.EaseDuration
Determines the duration of the camera transition animation in milliseconds (ms) when entering and exiting the freecam.
1000
Config.InteriorControl
If true, ensures the camera operates more stably and controllably inside buildings (interiors).
true / false
📸 Camera Settings (Config.Camera)
Config.Camera)The movement, sensitivity, FOV (Field of View), and other core mechanics of the freecam are adjusted in this section.
General Camera Mechanics
MaxDistance
Defines the maximum distance the camera can travel from the player character.
10.0
DefaultSpeed
The default movement speed of the camera.
1.0
MinSpeed
The minimum movement speed the camera can reach.
0.1
MaxSpeed
The maximum movement speed the camera can reach.
3.0
SpeedStep
The amount by which the speed increases or decreases when adjusted.
0.1
LookSensitivityX
The camera's turning sensitivity on the horizontal (X-axis) with the mouse.
5.0
LookSensitivityY
The camera's turning sensitivity on the vertical (Y-axis) with the mouse.
5.0
FastMultiplier
Multiplies the current speed by this value when the fast move key (SHIFT) is pressed.
2.0
SlowMultiplier
Multiplies the current speed by this value when the slow move key (CTRL) is pressed.
0.5
MaxRotateAngle
Sets the maximum angle in degrees that the camera can look up and down (between 0.0 and 90.0).
35.0
FOV (Zoom) Settings
DefaultFov
The camera's default Field of View (FOV).
50.0
MinFov
The lowest FOV value that can be reached when zooming in.
10.0
MaxFov
The highest FOV value that can be reached when zooming out.
120.0
ZoomSpeed
The speed of the zoom animation. A low value like 0.03 is smooth, while 1.0 is instant.
0.03
ZoomStep
The amount the FOV changes with each step of the mouse wheel.
5.0
Rotation Settings
RotationResetSpeed
The animation speed for resetting the camera's rotation to its default state.
0.05
⚙️ Speed Settings
These settings define the dynamic speed ranges for different camera actions. The script uses these values to smoothly interpolate between minimum and maximum speeds based on factors like distance.
Config.TransitionSpeed
The minimum and maximum transition speeds for camera movements.
{0.025, 0.1}
Config.RotateSpeed
The minimum and maximum rotation speeds.
{0.25, 1.2}
Config.ZoomSpeed
The minimum and maximum zoom speeds.
{2.5, 16.0}
⚠️ Warning System
This section controls the behavior of the warning system, which can be used to prevent spamming actions.
Config.MaxWarning
The maximum number of warnings a player can receive per second before an action is blocked.
5
Config.WarningSound
Defines the sound to be played when a warning is triggered. You can change Name and Ref to any valid game sound.
{ Name = "NO", Ref = "HUD_FRONTEND_DEFAULT_SOUNDSET" }
⌨️ V Key Settings
This configures the behavior of using the 'V' key (or the default 'change camera' key) to activate the freecam.
HoldDuration
The time in milliseconds (ms) the key must be held down to activate the freecam.
1300
EnableCooldown
A cooldown period (ms) after opening the freecam to prevent it from being closed immediately by accident.
500
DisableOnShortPress
If true, a short press of the key will close the freecam after it has been activated.
true
🖥️ UI Settings (Config.UI)
Config.UI)This section controls the appearance and behavior of the on-screen User Interface (UI).
ShowOnStart
If true, the UI will be visible by default when the freecam is activated.
true
Position
Sets the position of the UI on the screen.
'middle-right'
FadeAnimation
If true, enables a smooth fade-in/fade-out animation for the UI.
true
Theme
Sets the color theme for the UI. Available options are 'dark' and 'light'.
'dark'
🎮 Controls (Config.Controls)
Config.Controls)This is a critical section for defining all keybinds and commands for the script.
Note: The
indexvalues correspond to the game's internal control indexes. You can find a list of these controls here. Thelabelis what's displayed in the UI.
ToggleFreecam
The chat command to toggle the freecam on and off.
'cam'
ExitFreecam
The chat command to exit the freecam.
'exitcam'
ToggleUI
The control index to toggle the UI visibility. (Default: 19 - Left Alt)
19
Exit
An array of control indexes that can be used to exit the freecam. (Default: 322 - ESC, 73 - X)
{322, 73}
FORWARD
Movement control for going forward.
{index = 32, label = "W"}
BACKWARD
Movement control for going backward.
{index = 33, label = "S"}
LEFT
Movement control for strafing left.
{index = 34, label = "A"}
RIGHT
Movement control for strafing right.
{index = 35, label = "D"}
UP
Movement control for going up.
{index = 45, label = "R"}
DOWN
Movement control for going down.
{index = 23, label = "F"}
ROTATE_LEFT
Rotation control for turning left.
{index = 38, label = "E"}
ROTATE_RIGHT
Rotation control for turning right.
{index = 44, label = "Q"}
ROTATE_RESET
Control to reset the camera's rotation.
{index = 22, label = "SPACE"}
SPEED_UP
Control to activate the fast movement multiplier.
{index = 21, label = "SHIFT"}
ZOOM_IN
Control for zooming in.
{index = 15, label = "SCROLL UP"}
ZOOM_OUT
Control for zooming out.
{index = 14, label = "SCROLL DOWN"}
📁 locales.lua
locales.luaThis file contains the text strings and notifications used within the script. This allows you to easily translate the script into multiple languages.
How it works:
In
config.lua, you setConfig.DefaultLocaleto your desired language (e.g.,'en').The script will then load the corresponding
locales.luafile.All text shown to the user (like UI elements and notifications) will be taken from this file.
To add a new language, simply:
Copy an existing file (like
en.lua).Rename it (e.g.,
de.luafor German).Translate the text strings inside the new file.
Set
Config.DefaultLocale = 'de'inconfig.luato use your new language.
Example en.lua:
Last updated