createAirDefenceSphere
CREATE_AIR_DEFENCE_SPHERE0x91EF34584710BE99The GTA V native CREATE_AIR_DEFENCE_SPHERE of the WEAPON namespace, as LS:MP client scripts call it: the global function createAirDefenceSphere, in JavaScript and in Lua.
createAirDefenceSphere(
x: number,
y: number,
z: number,
radius: number,
p4: number,
p5: number,
p6: number,
weaponHash: Hash
): numbercreateAirDefenceSphere(
x: number,
y: number,
z: number,
radius: number,
p4: number,
p5: number,
p6: number,
weaponHash: Hash
): integerUsage
JavaScript
const result = createAirDefenceSphere(x, y, z, radius, p4, p5, p6, weaponHash);Lua
local result = createAirDefenceSphere(x, y, z, radius, p4, p5, p6, weaponHash)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 result = createAirDefenceSphere(pos, radius, p4, p5, p6, weaponHash);Lua · with vectors
local result = createAirDefenceSphere(pos, radius, p4, p5, p6, weaponHash)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
x | float | number | number |
y | float | number | number |
z | float | number | number |
radius | float | number | number |
p4 | float | number | number |
p5 | float | number | number |
p6 | float | number | number |
weaponHash | Hash | number | integer |
Returns
int JavaScript number, Lua integerNotes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Both coordinates are from objects in the decompiled scripts. The only weapon hash used in the decompiled scripts is weapon_air_defence_gun. These two natives are used by the yacht script, decompiled scripts suggest it and the weapon hash used (valkyrie's rockets) are also used by yachts.
Reference
- Namespace
- Weapon WEAPON
- In the game
int CREATE_AIR_DEFENCE_SPHERE(float x, float y, float z, float radius, float p4, float p5, float p6, Hash weaponHash)- Hash
0x91EF34584710BE99- Introduced
- Game build 573 legacy numbering
- Formerly
_CREATE_AIR_DEFENSE_SPHERE