getCoordsOfProjectileTypeWithinDistance
GET_COORDS_OF_PROJECTILE_TYPE_WITHIN_DISTANCE0xDFB4138EEFED7B81The GTA V native GET_COORDS_OF_PROJECTILE_TYPE_WITHIN_DISTANCE of the MISC namespace, as LS:MP client scripts call it: the global function getCoordsOfProjectileTypeWithinDistance, in JavaScript and in Lua.
getCoordsOfProjectileTypeWithinDistance(
ped: Ped,
weaponHash: Hash,
distance: number,
p4: boolean
): [ok: boolean, outCoords: { x: number, y: number, z: number }]getCoordsOfProjectileTypeWithinDistance(
ped: Ped,
weaponHash: Hash,
distance: number,
p4: boolean
): boolean, Vector3Usage
JavaScript
const [ok, outCoords] = getCoordsOfProjectileTypeWithinDistance(ped, weaponHash, distance, p4);Lua
local ok, outCoords = getCoordsOfProjectileTypeWithinDistance(ped, weaponHash, distance, p4)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
weaponHash | Hash | number | integer |
distance | float | number | number |
p4 | BOOL | boolean | boolean |
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 | outCoords | Vector3 | { x: number, y: number, z: number } | Vector3 | output |
Reference
- Namespace
- Misc MISC
- In the game
BOOL GET_COORDS_OF_PROJECTILE_TYPE_WITHIN_DISTANCE(Ped ped, Hash weaponHash, float distance, Vector3* outCoords, BOOL p4)- Hash
0xDFB4138EEFED7B81- Formerly
_GET_PROJECTILE_NEAR_PED_COORDS