RedM Natives

WAS_EVENT_CANCELED

Returns whether or not the currently executing event was canceled.

Hash0x58382A19
Runtime nameWasEventCanceled
NamespaceCFX
SideClient + server
NameOfficial
Docs

Signature

BOOL WAS_EVENT_CANCELED();

Returns BOOL — A boolean.

Description

Cfx.re native reference

Returns whether or not the currently executing event was canceled.

Usage

Lua
local retval = WasEventCanceled()

-- always works, by hash
local retval = Citizen.InvokeNative(0x58382a19, Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const retval = WasEventCanceled();

// by hash
const retval = Citizen.invokeNative('0x58382a19', Citizen.returnResultAnyway());
C#
bool retval = Function.Call<bool>((Hash)0x58382a19);

Sources

Cfx.re native reference

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