FireClient

getOwnerOfExplosionInSphere

GET_OWNER_OF_EXPLOSION_IN_SPHERE0xB3CD51E3DB86F176

The GTA V native GET_OWNER_OF_EXPLOSION_IN_SPHERE of the FIRE namespace, as LS:MP client scripts call it: the global function getOwnerOfExplosionInSphere, in JavaScript and in Lua.

SignatureJavaScript
getOwnerOfExplosionInSphere(
  explosionType: number,
  x: number,
  y: number,
  z: number,
  radius: number
): Entity
SignatureLua
getOwnerOfExplosionInSphere(
  explosionType: integer,
  x: number,
  y: number,
  z: number,
  radius: number
): Entity

Usage

JavaScript
const entity = getOwnerOfExplosionInSphere(explosionType, x, y, z, radius);
Lua
local entity = getOwnerOfExplosionInSphere(explosionType, x, y, z, radius)

Three consecutive numbers can be given as one vector: { x, y, z } (or [x, y, z]) in JavaScript, a Vector3 in Lua.

JavaScript · with vectors
const entity = getOwnerOfExplosionInSphere(explosionType, pos, radius);
Lua · with vectors
local entity = getOwnerOfExplosionInSphere(explosionType, pos, radius)

Parameters

ParameterTypeJavaScriptLuaDescription
explosionTypeintnumberintegerSee addExplosion.
xfloatnumbernumber
yfloatnumbernumber
zfloatnumbernumber
radiusfloatnumbernumber

Returns

Entity JavaScript number, Lua integer

Game handle of an entity: a ped, a vehicle or an object. Not an LS:MP netId. Convert one with lsmp.getEntityFromNetId.

Reference

Namespace
Fire FIRE
In the game
Entity GET_OWNER_OF_EXPLOSION_IN_SPHERE(int explosionType, float x, float y, float z, float radius)
Hash
0xB3CD51E3DB86F176
Introduced
Game build 1290 legacy numbering
Formerly
_GET_ENTITY_INSIDE_EXPLOSION_SPHERE

Open in the interactive natives reference