IS_PROJECTILE_TYPE_IN_AREA
Determines whether there is a projectile of a specific type within the specified coordinates.
Hash
0x04965FB9E14235C7Runtime name
IsProjectileTypeInAreaNamespaceMISC
SideClient
NameOfficial
Docs
Since build1207
GTA V hash
0x2E0DC353342C4A6DSignature
BOOL IS_PROJECTILE_TYPE_IN_AREA(float xMin, float yMin, float zMin, float xMax, float yMax, float zMax, Hash weaponType, BOOL isPlayer);Parameters
| Name | Type | Description |
|---|---|---|
xMin | float | — |
yMin | float | — |
zMin | float | — |
xMax | float | — |
yMax | float | — |
zMax | float | — |
weaponType | Hash | — |
isPlayer | BOOL | — |
Returns BOOL
Description
Determines whether there is a projectile of a specific type within the specified coordinates. The coordinates form a rectangle.
Usage
local retval = IsProjectileTypeInArea(xMin, yMin, zMin, xMax, yMax, zMax, weaponType, isPlayer)
-- always works, by hash
local retval = Citizen.InvokeNative(0x04965FB9E14235C7, xMin, yMin, zMin, xMax, yMax, zMax, weaponType, isPlayer, Citizen.ReturnResultAnyway())JavaScript and C#
const retval = IsProjectileTypeInArea(xMin, yMin, zMin, xMax, yMax, zMax, weaponType, isPlayer);
// by hash
const retval = Citizen.invokeNative('0x04965FB9E14235C7', xMin + 0.0000001, yMin + 0.0000001, zMin + 0.0000001, xMax + 0.0000001, yMax + 0.0000001, zMax + 0.0000001, weaponType, isPlayer, Citizen.returnResultAnyway());bool retval = Function.Call<bool>((Hash)0x04965FB9E14235C7, xMin, yMin, zMin, xMax, yMax, zMax, weaponType, isPlayer);- Hash parameters: the named function also accepts a string and hashes it for you;
Citizen.InvokeNativeneeds the number — passjoaat("name")or a backtick literal like`name`. - Float parameters: Lua integers (
10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write10.0orvalue + 0.0. The generated JS wrappers add0.0000001to non-zero floats for the same reason.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.