MiscClient

setRandomEventFlag

SET_RANDOM_EVENT_FLAG0x971927086CFD2158

The GTA V native SET_RANDOM_EVENT_FLAG of the MISC namespace, as LS:MP client scripts call it: the global function setRandomEventFlag, in JavaScript and in Lua.

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

Usage

JavaScript
setRandomEventFlag(toggle);
Lua
setRandomEventFlag(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.

If the parameter is true, sets the random event flag to true, if the parameter is false, the function does nothing at all.
Does nothing if the mission flag is set.

Reference

Namespace
Misc MISC
In the game
void SET_RANDOM_EVENT_FLAG(BOOL toggle)
Hash
0x971927086CFD2158

Open in the interactive natives reference