GetCameraInterior: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 33: Line 33:
</section>
</section>


{{New items|3.0140|1.4|
==Object-oriented==
==Object-oriented==
===Syntax===
===Syntax===
Line 57: Line 59:
</syntaxhighlight>
</syntaxhighlight>
</section>
</section>
}}


==See Also==
==See Also==
{{Camera functions}}
{{Camera functions}}

Revision as of 07:59, 20 February 2014

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 )

Required Arguments

thePlayer: The player whose camera interior you want to get.

Click to collapse [-]
Client
int getCameraInterior ( )

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

The server-side OOP is not implemented yet.

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