# Usage

### Opening the menu

* Go to `Config.Entry.coords`
* Stand inside `Config.Entry.radius`
* Press **E** to open the Wargames NUI

### Joining a match (player flow)

1. Select **Mode** (FFA / TDM / S\&D)
2. (TDM/S\&D) select **Team**
3. Select **Loadout**
4. Press **READY**

The client will trigger the corresponding server join:

* FFA: `TriggerServerEvent('nasty_ffa:server:join')`
* TDM: `TriggerServerEvent('nasty_tdm:server:join', team)`
* S\&D: `TriggerServerEvent('nasty_snd:server:join', team)`

### Leaving a match

You can leave at any time with:

* `/quitlobby`

The script calls the correct leave event for your current mode.

On leave, Wargames:

* restores inventory snapshot (if enabled + ox\_inventory)
* restores appearance (if clothing system enabled)
* returns you to the main world bucket (if instances enabled)
* hides HUD

### Commands

#### `/loadout`

Re-opens loadout selection **during a match**.

#### `/quitlobby`

Leaves current lobby/match (FFA/TDM/S\&D).

#### `/wgleaderboard`

Fetches and opens the **Top 10** leaderboard per mode from MySQL (`wargames_stats`).

#### Killfeed toggle (configurable)

If `Config.KillFeed.enable = true`, players can toggle killfeed with:

* `/{Config.KillFeed.command}` (default: `/killovi`)

### Mode rules (default config)

#### FFA

* Max players: `Config.FFAMaxPlayers`
* First to: `Config.KillTarget` kills wins
* Respawn: fast / automatic
* Zone: polygon from `Config.Zone`

#### TDM

* Teams: SAS vs WARCOM
* Team size: `Config.TDM.TeamMax`
* Win condition: `Config.TDM.TargetKills`

#### S\&D

* Teams: Operators vs Terrorists
* Rounds: `Config.SND.Rounds`
* Round time: `Config.SND.RoundTime`
* Plant/Defuse: hold **E** for `PlantTimeMs` / `DefuseTimeMs`
* Bomb timer after plant: `Config.SND.BombTimer`
* Halftime swap after: `Config.SND.SwapAfter`

> Everything above is configurable in `config.lua`.
