HU/getCameraGoggleEffect: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
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|String]] indicating the current camera goggle effect. Their meanings can be seen below.
* [[HU/String|String]] indicating the current camera goggle effect. Their meanings can be seen below.


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


==Example==
==Példa==
This example adds a command to enable or disable the nightvision effect.
This example adds a command to enable or disable the nightvision effect.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
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]'''''

Revision as of 20:51, 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

  • String indicating the current camera goggle effect. Their meanings can be seen below.
  • normal: No camera goggle effect
  • nightvision: Nightvision camera
  • thermalvision: Infrared camera

Példa

This example adds a command to enable or disable the nightvision effect.

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