The Lab
PED native

GET_MELEE_TARGET_FOR_PED

returns Ped1 parambuild 1207

Returns the ped that ped is targeting in melee.

Signature

C
Ped GET_MELEE_TARGET_FOR_PED(Ped ped); // 0x18A3E9EE1297FD39 b1207

Parameters

#NameType
1pedPed

Facts

Facts about GET_MELEE_TARGET_FOR_PED
Name
GET_MELEE_TARGET_FOR_PED
Hash
0x18A3E9EE1297FD39
Namespace
Returns
Ped
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local ped = Citizen.InvokeNative(0x18A3E9EE1297FD39, -- GET_MELEE_TARGET_FOR_PED
  PlayerPedId(), -- Ped ped
  Citizen.ResultAsInteger()
)
print(ped)
JavaScript
const ped = Citizen.invokeNative("0x18A3E9EE1297FD39", // GET_MELEE_TARGET_FOR_PED
  PlayerPedId(), // Ped ped
  Citizen.resultAsInteger()
);
console.log(ped)
C#
int ped = Function.Call<int>((Hash)0x18A3E9EE1297FD39, // GET_MELEE_TARGET_FOR_PED
  API.PlayerPedId() // Ped ped
);
All PED natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.