GetCameraInterior: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (OOP syntax added)
m (Format fix)
 
(6 intermediate revisions by 4 users not shown)
Line 9: Line 9:
int getCameraInterior ( player thePlayer )
int getCameraInterior ( player thePlayer )
</syntaxhighlight>
</syntaxhighlight>
{{OOP||[[player]]:getCameraInterior|cameraInterior|setCameraInterior}}


===Required Arguments===
===Required Arguments===
'''thePlayer''': The player whose camera interior you want to get.
*'''thePlayer''': The player whose camera interior you want to get.
</section>
</section>


Line 18: Line 19:
int getCameraInterior ( )
int getCameraInterior ( )
</syntaxhighlight>
</syntaxhighlight>
{{OOP||Camera.getInterior|interior|setCameraInterior}}
</section>
</section>


===Returns===
Returns an ''integer'' indicating the camera's interior, ''false'' if the argument is invalid.
Returns an ''integer'' indicating the camera's interior, ''false'' if the argument is invalid.


Line 68: Line 71:
==See Also==
==See Also==
{{Camera functions}}
{{Camera functions}}
[[hu:getCameraInterior]]
[[RO:getCameraInterior]]

Latest revision as of 17:54, 12 February 2021

Returns the interior of the local camera (independent of the interior of the local player).

Procedural

Syntax

Click to collapse [-]
Server
int getCameraInterior ( player thePlayer )

OOP Syntax Help! I don't understand this!

Method: player:getCameraInterior(...)
Variable: .cameraInterior
Counterpart: setCameraInterior


Required Arguments

  • thePlayer: The player whose camera interior you want to get.
Click to collapse [-]
Client
int getCameraInterior ( )

OOP Syntax Help! I don't understand this!

Method: Camera.getInterior(...)
Variable: .interior
Counterpart: setCameraInterior


Returns

Returns an integer indicating the camera's interior, false if the argument is invalid.

Example

Click to collapse [-]
Server
function outputCameraInterior ( player, command )
	local interior = getCameraInterior ( player )
	outputChatBox ( "The camera is in the interior " .. interior, player, 255, 255, 0 )
end
addCommandHandler ( "camera", outputCameraInterior )


Object-oriented

Syntax

Click to collapse [-]
Server
int player:getCameraInterior ( )
-- or
int player.cameraInterior -- to get the camera interior value
player.cameraInterior = int someValue -- to set the camera interior value
Click to collapse [-]
Client
int Camera.getInterior ( )

Returns an integer indicating the camera's interior, false if the argument is invalid.

Example

Click to collapse [-]
Client
function outputCameraInterior ( command )
	local interior = Camera.getInterior ( )
	outputChatBox ( "The camera is in the interior " .. interior, localPlayer, 255, 255, 0 )
end
addCommandHandler ( "camera", outputCameraInterior )

See Also