# GRAPHICS::ADD_VEG_MODIFIER_SPHERE

- **Hash:** `0xFA50F79257745E74`
- **Namespace:** GRAPHICS
- **Runtime name (Lua/JS):** `AddVegModifierSphere`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** described
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/GRAPHICS/ADD_VEG_MODIFIER_SPHERE

## Signature

```c
int ADD_VEG_MODIFIER_SPHERE(float x, float y, float z, float radius, int modType, int flags, int p6);
```

## Parameters

- `x` (`float`)
- `y` (`float`)
- `z` (`float`)
- `radius` (`float`)
- `modType` (`int`)
- `flags` (`int`)
- `p6` (`int`)

## Returns

`int`

## Description

Returns veg modifier handle

## Usage

### Lua

```lua
local retval = AddVegModifierSphere(x, y, z, radius, modType, flags, p6)

-- always available, by hash
local retval = Citizen.InvokeNative(0xFA50F79257745E74, x, y, z, radius, modType, flags, p6, Citizen.ResultAsInteger())
```

### JavaScript

```js
const retval = AddVegModifierSphere(x, y, z, radius, modType, flags, p6);

// by hash
const retval = Citizen.invokeNative('0xFA50F79257745E74', x + 0.0000001, y + 0.0000001, z + 0.0000001, radius + 0.0000001, modType, flags, p6, Citizen.returnResultAnyway(), Citizen.resultAsInteger());
```

### C#

```csharp
int retval = Function.Call<int>((Hash)0xFA50F79257745E74, x, y, z, radius, modType, flags, p6);
```

- Float parameters: Lua integers (`10`, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write `10.0` or `value + 0.0`. The generated JS wrappers add `0.0000001` to non-zero floats for the same reason.

## See also

- [GRAPHICS::REMOVE_VEG_MODIFIER_SPHERE](https://natives.borderlinerp.com/natives/GRAPHICS/REMOVE_VEG_MODIFIER_SPHERE.md) — only works by invoking and passing as pointer value Citizen.InvokeNative(0x9CF1836C03FB67A2, Citizen.PointerValueIntInitialized(vegModifierId),1) p1 is 1 or 0

*Sources: alloc8or RDR3 NativeDB.*
