# Configuration

`Green Zone System` is configured mainly through the in-game UI.

Each zone has its own individual settings, allowing you to fully customize how it behaves.

### Creating a Zone

Zones are created directly in-game.

#### Steps

1. Use `/greenzones`
2. Click **New zone**
3. Enter the zone name and configure its settings
4. Click **Select points** to open noclip mode
5. Use **Left Mouse Button** to add points
6. Use **Right Mouse Button** to remove the last point
7. Use the **mouse wheel** to adjust height
8. Hold **Shift** to move faster in noclip
9. Add at least **3 points**
10. Click **Save**

***

### Per-Zone Settings

Each zone can be configured individually in the UI.

#### Heal on enter

Fully heals the player when entering the zone.

#### Display zone

Shows the zone boundary in the world.

#### Enter message

Notification shown when the player enters the zone.

#### Exit message

Notification shown when the player leaves the zone.

#### Separate session

Places players inside the zone into a separate routing bucket.

This can be used to isolate players inside the zone from players outside of it.

#### Speed limit

Defines the maximum vehicle speed allowed inside the zone in km/h.

* `0` = disabled

#### Bypass jobs

List of jobs that are allowed to use weapons inside the zone.

#### Allowed weapons

List of specific weapon hashes that can be used inside the zone.

#### Map blip

Controls the zone blip shown on the map.

Supported blip settings include:

* enabled or disabled state
* blip name
* sprite ID
* color
* scale
* position

***

### State Bag

This resource exposes the following local state bag:

```lua
LocalPlayer.state.IsGreenZone
```

#### Behavior

* `true` — player is inside a green zone
* `nil` — player is not inside a green zone

#### Example

```lua
if LocalPlayer.state.IsGreenZone then
    -- player is in a green zone
end
```

You can use this in other resources to check whether the player is currently inside a green zone.

***

### Notes

* `BlockAiming = true` blocks aiming even for weapons listed in **Allowed weapons**
* Set `BlockAiming = false` if bypass weapons should be fully usable
* `OnZoneTick` runs every frame, so it should remain empty or extremely lightweight
* `Separate session` uses FiveM routing buckets
* Players inside a session-based zone are isolated from players outside


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mskscripts.gitbook.io/mskscripts/scripts/green-zone-system/configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
