TasksClient

taskSetBlockingOfNonTemporaryEvents

TASK_SET_BLOCKING_OF_NON_TEMPORARY_EVENTS0x90D2156198831D69

The GTA V native TASK_SET_BLOCKING_OF_NON_TEMPORARY_EVENTS of the TASK namespace, as LS:MP client scripts call it: the global function taskSetBlockingOfNonTemporaryEvents, in JavaScript and in Lua.

SignatureJavaScript
taskSetBlockingOfNonTemporaryEvents(ped: Ped, toggle: boolean): void
SignatureLua
taskSetBlockingOfNonTemporaryEvents(ped: Ped, toggle: boolean)

Usage

JavaScript
taskSetBlockingOfNonTemporaryEvents(ped, toggle);
Lua
taskSetBlockingOfNonTemporaryEvents(ped, toggle)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger
toggleBOOLbooleanboolean

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

I cant believe I have to define this, this is one of the best natives.

It makes the ped ignore basically all shocking events around it. Occasionally the ped may comment or gesture, but other than that they just continue their daily activities. This includes shooting and wounding the ped. And - most importantly - they do not flee.

Since it is a task, every time the native is called the ped will stop for a moment.

Reference

Namespace
Tasks TASK
In the game
void TASK_SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(Ped ped, BOOL toggle)
Hash
0x90D2156198831D69

Open in the interactive natives reference