getProjectileOfProjectileTypeWithinDistance
GET_PROJECTILE_OF_PROJECTILE_TYPE_WITHIN_DISTANCE0x82FDE6A57EE4EE44The GTA V native GET_PROJECTILE_OF_PROJECTILE_TYPE_WITHIN_DISTANCE of the MISC namespace, as LS:MP client scripts call it: the global function getProjectileOfProjectileTypeWithinDistance, in JavaScript and in Lua.
getProjectileOfProjectileTypeWithinDistance(
ped: Ped,
weaponHash: Hash,
distance: number,
p5: boolean
): [
ok: boolean,
outCoords: { x: number, y: number, z: number },
outProjectile: Object
]getProjectileOfProjectileTypeWithinDistance(
ped: Ped,
weaponHash: Hash,
distance: number,
p5: boolean
): boolean, Vector3, ObjectUsage
JavaScript
const [ok, outCoords, outProjectile] =
getProjectileOfProjectileTypeWithinDistance(ped, weaponHash, distance, p5);Lua
local ok, outCoords, outProjectile =
getProjectileOfProjectileTypeWithinDistance(ped, weaponHash, distance, p5)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped | Ped | number | integer |
weaponHash | Hash | number | integer |
distance | float | number | number |
p5 | BOOL | boolean | boolean |
Returns
3 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 |
| 3 | outProjectile | Object | number | integer | output |
Reference
- Namespace
- Misc MISC
- In the game
BOOL GET_PROJECTILE_OF_PROJECTILE_TYPE_WITHIN_DISTANCE(Ped ped, Hash weaponHash, float distance, Vector3* outCoords, Object* outProjectile, BOOL p5)- Hash
0x82FDE6A57EE4EE44- Formerly
_GET_PROJECTILE_NEAR_PED