GraphicsClient

setNightvision

SET_NIGHTVISION0x18F621F7A5B1F85D

The GTA V native SET_NIGHTVISION of the GRAPHICS namespace, as LS:MP client scripts call it: the global function setNightvision, in JavaScript and in Lua.

SignatureJavaScript
setNightvision(toggle: boolean): void
SignatureLua
setNightvision(toggle: boolean)

Usage

JavaScript
setNightvision(toggle);
Lua
setNightvision(toggle)

Parameters

ParameterTypeJavaScriptLua
toggleBOOLbooleanboolean

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Enables Night Vision.

Example:

C#: Function.Call(Hash.SET_NIGHTVISION, true);
C++: setNightvision(true);

BOOL toggle:
true = turns night vision on for your player.
false = turns night vision off for your player.

Reference

Namespace
Graphics GRAPHICS
In the game
void SET_NIGHTVISION(BOOL toggle)
Hash
0x18F621F7A5B1F85D

Open in the interactive natives reference