RedM Natives

CREATE_INCIDENT

Hash0x3F892CAF67444AE7
Runtime nameCreateIncident
NamespaceMISC
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x3F892CAF67444AE7

Signature

BOOL CREATE_INCIDENT(int dispatchService, float x, float y, float z, int numUnits, float radius, int* outIncidentID, Any p7, Any p8);

Parameters

NameTypeDescription
dispatchServiceint—
xfloat—
yfloat—
zfloat—
numUnitsint—
radiusfloat—
outIncidentIDint*—
p7Any—
p8Any—

Returns BOOL

Description

dispatchService: see ENABLE_DISPATCH_SERVICE

Usage

Lua
local retval, outIncidentID = CreateIncident(dispatchService, x, y, z, numUnits, radius, p7, p8)

-- always works, by hash
local retval, outIncidentID = Citizen.InvokeNative(0x3F892CAF67444AE7, dispatchService, x, y, z, numUnits, radius, Citizen.PointerValueInt(), p7, p8, Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const [retval, outIncidentID] = CreateIncident(dispatchService, x, y, z, numUnits, radius, p7, p8);

// by hash
const [retval, outIncidentID] = Citizen.invokeNative('0x3F892CAF67444AE7', dispatchService, x + 0.0000001, y + 0.0000001, z + 0.0000001, numUnits, radius + 0.0000001, Citizen.pointerValueInt(), p7, p8, Citizen.returnResultAnyway());
C#
var outIncidentID = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0x3F892CAF67444AE7, dispatchService, x, y, z, numUnits, radius, outIncidentID, p7, p8);
// outIncidentID.GetResult<int>()
  • Float parameters: Lua integers (10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write 10.0 or value + 0.0. The generated JS wrappers add 0.0000001 to non-zero floats for the same reason.
  • Pointer (out) arguments are not passed in Lua/JS: their values are returned after the result, in order.

Sources

alloc8or RDR3 NativeDB

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