MiscClient

isIncidentValid

IS_INCIDENT_VALID0xC8BC6461E629BEAA

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

SignatureJavaScript
isIncidentValid(incidentId: number): boolean
SignatureLua
isIncidentValid(incidentId: integer): boolean

Usage

JavaScript
const result = isIncidentValid(incidentId);
Lua
local result = isIncidentValid(incidentId)

Parameters

ParameterTypeJavaScriptLua
incidentIdintnumberinteger

Returns

BOOL JavaScript boolean, Lua boolean

Notes

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

Correction, I have change this to int, instead of int*
as it doesn't use a pointer to the createdIncident.
If you try it you will crash (or) freeze.

Reference

Namespace
Misc MISC
In the game
BOOL IS_INCIDENT_VALID(int incidentId)
Hash
0xC8BC6461E629BEAA

Open in the interactive natives reference