getPedLastWeaponImpactCoord
GET_PED_LAST_WEAPON_IMPACT_COORD0x6C4D0409BA1A2BC2The 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.
getPedLastWeaponImpactCoord(ped: Ped): [
ok: boolean,
coords: { x: number, y: number, z: number }
]getPedLastWeaponImpactCoord(ped: Ped): boolean, Vector3Usage
JavaScript
const [ok, coords] = getPedLastWeaponImpactCoord(ped);Lua
local ok, coords = getPedLastWeaponImpactCoord(ped)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
Returns
2 values, in this order: an array in JavaScript, multiple return values in Lua.
| # | Value | Type | JavaScript | Lua | Description |
|---|---|---|---|---|---|
| 1 | ok | BOOL | boolean | boolean | The native’s own return value. |
| 2 | coords | Vector3 | { x: number, y: number, z: number } | Vector3 | output |
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