HU/getCameraGoggleEffect

From Multi Theft Auto: Wiki
Revision as of 22:22, 21 August 2018 by Surge (talk | contribs) (→‎Returns)
Jump to navigation Jump to search

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

Syntax

string getCameraGoggleEffect (  )

OOP Syntax Help! I don't understand this!

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


Returns

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

Example

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)

See Also