ScriptClient

scriptThreadIteratorGetNextThreadId

SCRIPT_THREAD_ITERATOR_GET_NEXT_THREAD_ID0x30B4FA1C82DD4B9F

The GTA V native SCRIPT_THREAD_ITERATOR_GET_NEXT_THREAD_ID of the SCRIPT namespace, as LS:MP client scripts call it: the global function scriptThreadIteratorGetNextThreadId, in JavaScript and in Lua.

SignatureJavaScript
scriptThreadIteratorGetNextThreadId(): number
SignatureLua
scriptThreadIteratorGetNextThreadId(): integer

Usage

JavaScript
const result = scriptThreadIteratorGetNextThreadId();
Lua
local result = scriptThreadIteratorGetNextThreadId()

Parameters

None.

Returns

int JavaScript number, Lua integer

Notes

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

If the function returns 0, the end of the iteration has been reached.

Reference

Namespace
Script SCRIPT
In the game
int SCRIPT_THREAD_ITERATOR_GET_NEXT_THREAD_ID()
Hash
0x30B4FA1C82DD4B9F
Formerly
_GET_ID_OF_NEXT_THREAD_IN_ENUMERATION

Open in the interactive natives reference