IsFirstPersonCamera

From Onset Developer Wiki
Revision as of 16:13, 20 October 2019 by BlueMountains (talk | contribs)
IsFirstPersonCamera

Type: Function
Context: Client
Introduced: v1.0

Description

Switches the player camera between 1st and 3rd person.

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