PedClient

getMeleeTargetForPed

GET_MELEE_TARGET_FOR_PED0x18A3E9EE1297FD39

The GTA V native GET_MELEE_TARGET_FOR_PED of the PED namespace, as LS:MP client scripts call it: the global function getMeleeTargetForPed, in JavaScript and in Lua.

SignatureJavaScript
getMeleeTargetForPed(ped: Ped): Ped
SignatureLua
getMeleeTargetForPed(ped: Ped): Ped

Usage

JavaScript
const result = getMeleeTargetForPed(ped);
Lua
local result = getMeleeTargetForPed(ped)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger

Returns

Ped JavaScript number, Lua integer

Game handle of a ped. Not an LS:MP netId. Convert one with lsmp.getEntityFromNetId.

Reference

Namespace
Ped PED
In the game
Ped GET_MELEE_TARGET_FOR_PED(Ped ped)
Hash
0x18A3E9EE1297FD39

Open in the interactive natives reference