HU/getCameraInterior: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
Line 24: Line 24:
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.


===Example===
===Példa===
<section name="Server" class="server" show="true">
<section name="Server" class="server" show="true">
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
Line 37: Line 37:


{{New items|3.0140|1.4|
{{New items|3.0140|1.4|
==Object-oriented==
==Objektum orientált==
===Syntax===
===Szintaxis===
<section name="Server" class="server" show="true">
<section name="Server" class="server" show="true">
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
Line 54: Line 54:
</section>
</section>


Returns an ''integer'' indicating the camera's interior, ''false'' if the argument is invalid.
Visszatérési értéke egy ''integer'' mely a kamera belsejét mutatja, ''false'' ha az argumentum érvénytelen.


===Example===
===Példa===
<section name="Client" class="client" show="true">
<section name="Client" class="client" show="true">
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">

Revision as of 21:05, 28 August 2018

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 an integer indicating the camera's interior, false if the argument is invalid.

Példa

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 )


Objektum orientált

Szintaxis

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 ( )

Visszatérési értéke egy integer mely a kamera belsejét mutatja, false ha az argumentum érvénytelen.

Példa

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