HU/getCameraGoggleEffect: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 3: Line 3:
This function returns what goggle effect is currently affecting the camera.
This function returns what goggle effect is currently affecting the camera.


==Syntax==
==Szintaxis==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
string getCameraGoggleEffect (  )
string getCameraGoggleEffect (  )
</syntaxhighlight>
</syntaxhighlight>
{{OOP||Camera.getGoggleEffect|goggleEffect|setCameraGoggleEffect}}
{{OOP||Camera.getGoggleEffect|goggleEffect|setCameraGoggleEffect}}
===Returns===
===Visszatérési érték===
* [[HU/String]] indicating the current camera goggle effect. Their meanings can be seen below.
* Egy [[HU/String|string]], mely jelzi a pillanatnyi kamera effectjét. Ezek jelentését lentebb láthatja.


{{Camera goggle modes}}
{{Camera goggle modes}}


==Example==
==Példa==
This example adds a command to enable or disable the nightvision effect.
Ez a pálda egy parancsot ad az éjjellátó effect engedélyezéséhez, vagy letiltásához.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
function nightvision()
function nightvision()
Line 27: Line 27:
</syntaxhighlight>
</syntaxhighlight>


==See Also==
==Lásd még==
{{Client camera functions hu}}
{{Client camera functions hu}}


[[en:getCameraGoggleEffect]]
[[en:getCameraGoggleEffect]]
==Fordította==
* '''''[https://wiki.multitheftauto.com/wiki/User:Surge Surge]'''''

Latest revision as of 20:59, 28 August 2018

This function returns what goggle effect is currently affecting the camera.

Szintaxis

string getCameraGoggleEffect (  )

OOP Syntax Help! I don't understand this!

Method: Camera.getGoggleEffect(...)
Variable: .goggleEffect
Counterpart: setCameraGoggleEffect


Visszatérési érték

  • Egy string, mely jelzi a pillanatnyi kamera effectjét. Ezek jelentését lentebb láthatja.
  • normal: No camera goggle effect
  • nightvision: Nightvision camera
  • thermalvision: Infrared camera

Példa

Ez a pálda egy parancsot ad az éjjellátó effect engedélyezéséhez, vagy letiltásához.

function nightvision()
    if (getCameraGoggleEffect() == "normal") then
        setCameraGoggleEffect("nightvision")
    elseif (getCameraGoggleEffect() == "nightvision") then
        setCameraGoggleEffect("normal")
    end
end

addCommandHandler("nightvision", nightvision)

Lásd még

Fordította