MBT King of the Flag
MBT King of the Flag (KTF) is a competitive multiplayer minigame for FiveM. Players gather at a pregame area, select their opponents, and compete to hold a single flag for as long as possible. The player who accumulates the most flag-holding time when the timer expires wins a configurable reward.
Combat is melee-only — only allowed weapons deal damage. Enemy NPCs roam the arena to keep pressure on everyone.
Features
- Custom NUI — live leaderboard, personal score, and animated SVG countdown timer
- Capture & hold mechanic — hold the flag to accumulate score; highest total time wins
- Inventory stashing — player inventories are saved and cleared for the match, then returned at the end
- Melee-only combat — configurable allowed-weapon list; unallowed weapons auto-kick
- Enemy NPCs — hostile AI spawns inside the arena to pressure players
- Weapon pickups — 9 weapon types spawn across the map and refresh periodically
- Routing bucket isolation — the match runs in a dedicated bucket (default 400), invisible to other players
- Area boundary — players kicked if they wander too far from the game zone
- Cinematic cameras — panning intro and winner celebration sequences
- Configurable rewards — give money, items or a mix to the winner
- Player selection UI — the host picks opponents with a keyboard-driven menu before the match starts
- Multi-framework — ESX, QBCore and OX Core (auto-detected)
Supported Frameworks
| Framework | Supported |
|---|---|
| ESX Legacy | ✅ |
| ESX (old) | ✅ |
| QBCore | ✅ |
| OX Core | ✅ |
How it works
- A player approaches the KTF NPC and presses
Eto open the player-selection UI - The host selects at least one other player to include in the match
- After a countdown, all participants are teleported to the game area and their inventories are stashed
- A flag spawns at the configured location — the first player to press
Enear it starts the capture progress bar - Once captured, the flag attaches to the player's back; their score increases every second they hold it
- On death the flag drops; a 7-second respawn timer plays before the player re-enters the arena
- Enemy NPCs and weapon pickups refresh throughout the match
- When the timer reaches zero the player with the highest score wins a random reward, a winner camera plays, and all players return to the pregame area with their inventories restored
The resource name must remain mbt_ktf exactly. The script verifies its own name on startup and stops itself if renamed.