TasksClient

taskArrestPed

TASK_ARREST_PED0xF3B9A78A178572B1

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

SignatureJavaScript
taskArrestPed(ped: Ped, target: Ped): void
SignatureLua
taskArrestPed(ped: Ped, target: Ped)

Usage

JavaScript
taskArrestPed(ped, target);
Lua
taskArrestPed(ped, target)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger
targetPednumberinteger

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.

Example from "me_amanda1.ysc.c4":

taskArrestPed(l_19F /* This is a Ped */ , playerPedId());

Example from "armenian1.ysc.c4":

if (!isPedInjured(l_B18[0/*1*/])) {
    taskArrestPed(l_B18[0/*1*/], playerPedId());
}

I would love to have time to experiment to see if a player Ped can arrest another Ped. Might make for a good cop mod.

Looks like only the player can be arrested this way. Peds react and try to arrest you if you task them, but the player charater doesn't do anything if tasked to arrest another ped.

Reference

Namespace
Tasks TASK
In the game
void TASK_ARREST_PED(Ped ped, Ped target)
Hash
0xF3B9A78A178572B1

Open in the interactive natives reference