MiscClient1 output

getCoordsOfProjectileTypeWithinDistance

GET_COORDS_OF_PROJECTILE_TYPE_WITHIN_DISTANCE0xDFB4138EEFED7B81

The 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.

SignatureJavaScript
getCoordsOfProjectileTypeWithinDistance(
  ped: Ped,
  weaponHash: Hash,
  distance: number,
  p4: boolean
): [ok: boolean, outCoords: { x: number, y: number, z: number }]
SignatureLua
getCoordsOfProjectileTypeWithinDistance(
  ped: Ped,
  weaponHash: Hash,
  distance: number,
  p4: boolean
): boolean, Vector3

Usage

JavaScript
const [ok, outCoords] = getCoordsOfProjectileTypeWithinDistance(ped, weaponHash, distance, p4);
Lua
local ok, outCoords = getCoordsOfProjectileTypeWithinDistance(ped, weaponHash, distance, p4)

Parameters

ParameterTypeJavaScriptLua
pedPednumberinteger
weaponHashHashnumberinteger
distancefloatnumbernumber
p4BOOLbooleanboolean

Returns

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

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

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

Open in the interactive natives reference