AR/getCameraInterior: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
Line 7: Line 7:
{{OOP||[[player]]:getCameraInterior|cameraInterior|setCameraInterior}}
{{OOP||[[player]]:getCameraInterior|cameraInterior|setCameraInterior}}


===Required Arguments===
===الحجج المطلوبة===
'' ' thePlayer ' '' : اللاعب الذي كنت ترغب في الحصول الداخلية الكاميرا.
'' ' thePlayer ' '' : اللاعب الذي كنت ترغب في الحصول الداخلية الكاميرا.
</section>
</section>
Line 20: Line 20:
بإرجاع ' ' صحيح ' ' مشيرا إلى الداخل الكاميرا، ' ' كاذبة ' ' إذا كانت الوسيطة غير صالحة.
بإرجاع ' ' صحيح ' ' مشيرا إلى الداخل الكاميرا، ' ' كاذبة ' ' إذا كانت الوسيطة غير صالحة.


===Example===
===مثال===
<section name="Server" class="server" show="true">
<section name="Server" class="server" show="true">
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
Line 52: Line 52:
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===
===مثال===
<section name="Client" class="client" show="true">
<section name="Client" class="client" show="true">
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
Line 63: Line 63:
</section>
</section>
}}
}}


==See Also==
==See Also==
{{AR/Camera functions}}
{{AR/Camera functions}}

Revision as of 18:47, 25 July 2015

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


الحجج المطلوبة

' thePlayer '  : اللاعب الذي كنت ترغب في الحصول الداخلية الكاميرا.

Click to collapse [-]
Client
int getCameraInterior ( )

OOP Syntax Help! I don't understand this!

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


بإرجاع ' ' صحيح ' ' مشيرا إلى الداخل الكاميرا، ' ' كاذبة ' ' إذا كانت الوسيطة غير صالحة.

مثال

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.

مثال

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