GetCameraInterior: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (OOP syntax added) |
||
Line 38: | Line 38: | ||
===Syntax=== | ===Syntax=== | ||
<section name="Server" class="server" show="true"> | <section name="Server" class="server" show="true"> | ||
<syntaxhighlight lang="lua"> | |||
int player:getCameraInterior ( ) | |||
-- or | |||
int player.cameraInterior -- to get the camera interior value | |||
player.cameraInterior = int someValue -- to set the camera interior value | |||
</syntaxhighlight> | |||
</section> | </section> | ||
Revision as of 05:39, 15 July 2014
Returns the interior of the local camera (independent of the interior of the local player).
Procedural
Syntax
Click to collapse [-]
Serverint getCameraInterior ( player thePlayer )
Required Arguments
thePlayer: The player whose camera interior you want to get.
Click to collapse [-]
Clientint getCameraInterior ( )
Returns an integer indicating the camera's interior, false if the argument is invalid.
Example
Click to collapse [-]
Serverfunction 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 [-]
Serverint 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 [-]
Clientint Camera.getInterior ( )
Returns an integer indicating the camera's interior, false if the argument is invalid.
Example
Click to collapse [-]
Clientfunction outputCameraInterior ( command ) local interior = Camera.getInterior ( ) outputChatBox ( "The camera is in the interior " .. interior, localPlayer, 255, 255, 0 ) end addCommandHandler ( "camera", outputCameraInterior )
See Also
- fadeCamera
- getCameraInterior
- getCameraMatrix
- getCameraTarget
- setCameraInterior
- setCameraMatrix
- setCameraTarget