WeaponClient1 output

getPedLastWeaponImpactCoord

GET_PED_LAST_WEAPON_IMPACT_COORD0x6C4D0409BA1A2BC2

The GTA V native GET_PED_LAST_WEAPON_IMPACT_COORD of the WEAPON namespace, as LS:MP client scripts call it: the global function getPedLastWeaponImpactCoord, in JavaScript and in Lua.

SignatureJavaScript
getPedLastWeaponImpactCoord(ped: Ped): [
  ok: boolean,
  coords: { x: number, y: number, z: number }
]
SignatureLua
getPedLastWeaponImpactCoord(ped: Ped): boolean, Vector3

Usage

JavaScript
const [ok, coords] = getPedLastWeaponImpactCoord(ped);
Lua
local ok, coords = getPedLastWeaponImpactCoord(ped)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger

Returns

2 values, in this order: an array in JavaScript, multiple return values in Lua.

#ValueTypeJavaScriptLuaDescription
1okBOOLbooleanbooleanThe native’s own return value.
2coordsVector3{ x: number, y: number, z: number }Vector3output

Notes

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

Pass ped. Pass address of Vector3.
The coord will be put into the Vector3.
The return will determine whether there was a coord found or not.

Reference

Namespace
Weapon WEAPON
In the game
BOOL GET_PED_LAST_WEAPON_IMPACT_COORD(Ped ped, Vector3* coords)
Hash
0x6C4D0409BA1A2BC2

Open in the interactive natives reference