CREATE_INCIDENT
Hash
0x3F892CAF67444AE7Runtime name
CreateIncidentNamespaceMISC
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0x3F892CAF67444AE7Signature
BOOL CREATE_INCIDENT(int dispatchService, float x, float y, float z, int numUnits, float radius, int* outIncidentID, Any p7, Any p8);Parameters
| Name | Type | Description |
|---|---|---|
dispatchService | int | — |
x | float | — |
y | float | — |
z | float | — |
numUnits | int | — |
radius | float | — |
outIncidentID | int* | — |
p7 | Any | — |
p8 | Any | — |
Returns BOOL
Description
dispatchService: see ENABLE_DISPATCH_SERVICE
Usage
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#
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());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. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to 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
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.