RedM Natives

TASK_KNOCKED_OUT

Puts the ped into a knocked out state for a specified duration.

Hash0xF90427F00A495A28
Runtime nameTaskKnockedOut
NamespaceTASK
SideClient
NameOfficial
Docs
Since build1207

Signature

void TASK_KNOCKED_OUT(Ped ped, float p1, BOOL permanently);

Parameters

NameTypeDescription
pedPed—
p1float—
permanentlyBOOL—

Returns void

Description

VORPCORE RDR3natives

Puts the ped into a knocked out state for a specified duration. If 'permanently' is set to true, the ped will remain knocked out until mainually reset. Duration in seconds.

Usage

Lua
TaskKnockedOut(ped, p1, permanently)

-- always works, by hash
Citizen.InvokeNative(0xF90427F00A495A28, ped, p1, permanently)
JavaScript and C#
JavaScript
TaskKnockedOut(ped, p1, permanently);

// by hash
Citizen.invokeNative('0xF90427F00A495A28', ped, p1 + 0.0000001, permanently);
C#
Function.Call((Hash)0xF90427F00A495A28, ped, p1, permanently);
  • 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.

Sources

alloc8or RDR3 NativeDB · VORPCORE RDR3natives

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