GetCameraGoggleEffect: Difference between revisions
Jump to navigation
Jump to search
m (Wrong returning variable, fixed.) |
|||
Line 5: | Line 5: | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
string getCameraGoggleEffect ( ) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 16:02, 6 February 2011
This function returns what goggle effect is currently affecting the camera.
Syntax
string getCameraGoggleEffect ( )
Returns
Returns a 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
function nightvision() if(getCameraGoggleEffect == "normal") then setCameraGoggleEffect("nightvision") else if(getCameraGoggleEffect == "nightvision") then setCameraGoggleEffect("normal") end end addCommandHandler("nightvision", nightvision)