IsFirstPersonCamera

From Onset Developer Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
IsFirstPersonCamera

Type: Function
Context: Client
Introduced: v1.0

Description

Check if the first person camera is enabled from EnableFirstPersonCamera.

Syntax

IsFirstPersonCamera()

Parameters

  • This function has no parameters.

Return Value

  • Returns true if the 1st person mode/camera is enabled.

Example

function OnKeyPress(key)
	if key == "P" then
		local bEnable = not IsFirstPersonCamera()
		EnableFirstPersonCamera(bEnable)
	end
end
AddEvent("OnKeyPress", OnKeyPress)

See also

EnableFirstPersonCamera