RedM Natives

START_NEW_SCRIPT

Hash0xE81651AD79516E48
Runtime nameStartNewScript
NamespaceSCRIPT
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0xE81651AD79516E48

Signature

int START_NEW_SCRIPT(const char* scriptName, int stackSize);

Parameters

NameTypeDescription
scriptNameconst char*—
stackSizeint—

Returns int

Usage

Lua
local retval = StartNewScript(scriptName, stackSize)

-- always works, by hash
local retval = Citizen.InvokeNative(0xE81651AD79516E48, scriptName, stackSize, Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const retval = StartNewScript(scriptName, stackSize);

// by hash
const retval = Citizen.invokeNative('0xE81651AD79516E48', scriptName, stackSize, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
int retval = Function.Call<int>((Hash)0xE81651AD79516E48, scriptName, stackSize);

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.