ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Client functions
  3. setCameraFieldOfView

Function

setCameraFieldOfView

Stores the camera field of view (10-120 degrees).

Syntax

bool setCameraFieldOfView(float fieldOfView [, string cameraMode = nil])

Arguments

cameraModestring, optional = nil
Camera mode (for compatibility with existing scripts).
fieldOfViewfloat
Angle 10-120.

Differences from MTA:SA

  • These MTA:SA arguments are not here: bool instant = false

In MTA:SA

setCameraFieldOfView(string cameraMode, float fieldOfView, bool instant = false)

Returns

true on success.

Example

setCameraFieldOfView("player", 90)

Notes

Definitive Edition does not allow changing the field of view. The function only stores the value and writes a warning on first use. Set the field of view of a scripted camera in setCameraMatrix.

See also