About Capture The Flag
Capture The Flag
Classic Capture The Flag game mode event where Red and Blue teams compete to capture each others flag and reach the score limit first.
Dependencies
The following plugins are required for Capture The Flag.
- ImageLibrary by k1lly0u - Required (Free)
- Rust Kits by k1lly0u - Required (Free)
If you want to use the two demo arenas that come with the plugin as seen in the images you will also need:
- Copy Paste by misticos (https://umod.org/plugins/copy-paste)
It is recommended that when you create your Kits for the game you skin one red and one blue. This plugin does not include pre-configured kits. You can choose what to give as a kit. Full metal AK with tactical gloves, with MP5 and ammo + meds is just an idea!
Features
How Capture The Flag works:
- Each team spawns on the opposite side of the map. You could make the spawns anywhere but this is ideal for Capture The Flag.
- Red team players get a red kit and Blue team players get a blue kit. Make sure you set your kit skins.
- Each team must work their way to the opposite side of the map and retrieve the Flag item from the other team's flag box (which is a wearable backpack flag that makes a giant flag stick out from your player).
- Once the enemies flag is picked up you must return it safely to your team's flag box to score a point. Remember it is in your backpack slot and must be placed in your box to score a point.
- When you kill an enemy who has your flag and they drop it, you can press 'e' or interact with it to return it to your flag spawn automatically.
- When you don't return your own flag once it's been dropped by an enemy the other team can pick it up again in the same spot it was dropped.
- The game ends when one team reaches the score limit first.
Two demo arenas included. As seen in images (small stone and large sheet metal arenas). These are Copy Paste files.
Build your own custom arena: You can build a custom arena in-game or use an arena prefab and set the location where the game starts with commands.
Use the commands /redflag, /blueflag, /redspawn, /bluespawn, and /ctfspectate to set the teleport locations for the game to your arena.
Lots of configurable options and an editable language file for in-game message customization.
Customize your game settings including:
- Time limit for event registration
- Time limit for game (or disable by setting to 0).
- Number of flag captures (points) required to win.
- Minimum number of players required to start event.
- Choose if players get instant full health when they get a kill.
- Respawn Cooldown in seconds to delay a player respawning after they die.
- Respawn Protection period to prevent spawn killing.
- Increase or decrease randomized distance from spawn point to teleport players.
- Optional temporary Team UI with save and restore original team UI after the game. Works with vanilla teams only.
- Block teleportation with NTeleportation for players participating in the event.
- Choose kit name for Red and Blue teams to spawn with. Make sure you skin your kits red and blue!
- Choose kit for ammo and med restock when a player gets a kill.
- Choose skin ID for Red and Blue Flag boxes. Required.
- Choose background images for Red and Blue Flag Banners.
More Features:
- Command for players to join event when registration opens.
- Chat command and console command to start event registration.
- Visible flag on player's back. (Color can not be changed).
- No friendly fire (no team damage).
- Scoreboard (sorted by kills) in chat at the end of the event with player names, kills, and captures.
- If you knock a player and they f1 kill it will count as a kill for the person who knocked them.
- Developer API hook OnGameWin to notify you when a game has been won along with the statistics. Good for rewards and score keeping.
- Optional temporary Team UI for players on the same team during the event. They will be returned to their original team after the event (vanilla teams only).
- Restore player items after the game. (Players are teleported to the event naked).
- After the event teleport players back to original location from when they joined the event.
- Player disconnection handling in case anyone leaves during the event.
- Flag boxes and banners are unbreakable.
- There are two commands /redflagbox and /blueflagbox for admins to force respawn a flag in it's box if it can't be accessed or glitches through the map.
- You can't hide the flag in your inventory so player's don't know you have it. It won't let you.
- Players can't pick up their own team's flag (except automatically returning it to spawn when they interact with it if it's dropped on the ground).
- Admin team change commands to change players teams with a configurable amount of time for team changing before game.
Permissions
- capturetheflag.join - Required to use /ctf command to join event.
- capturetheflag.admin - Required to use /startctf command to start event and for event management commands like setting flag and teleport locations.
Chat Commands
- /ctf - Command for players to join event during registration. Requires permission capturetheflag.join.
- /startctf - Command for admins to start the event registation. Requires permission capturetheflag.admin.
- /stopctf - Command for admins to stop the event in progress. Requires permission capturetheflag.admin.
- /redflag - Set location for Red Flag Spawn to where you are standing and which direction you are facing. Requires permission capturetheflag.admin.
- /blueflag - Set location for Blue Flag Spawn to where you are standing and which direction you are facing. Requires permission capturetheflag.admin.
- /redspawn - Set location for Red Team Player Spawn to where you are standing. Requires permission capturetheflag.admin.
- /bluespawn - Set location for Blue Team Player Spawn to where you are standing. Requires permission capturetheflag.admin.
- /ctfspectate - Set location for pre-game lobby and spectator zone to where you are standing. Requires permission capturetheflag.admin.
- /redflagbox - Force add a Red Flag to the Red Team's flag box. Requires permission capturetheflag.admin.
- /blueflagbox - Force add a Blue Flag to the Red Team's flag box. Requires permission capturetheflag.admin.
- /swapteam <player1> <player2> - Swap two players teams during the team swapping period. Requires permission capturetheflag.admin.
- /redteam <player> - Force blue team player to join red team during team swapping period. Requires permission capturetheflag.admin.
- /blueteam <player> - Force red team player to join blue team during team swapping period. Requires permission capturetheflag.admin.
Console Commands
- startctf - Command for admins to start the event registration.
Configuration
{ "Amount of time in seconds for event registration": 180, "Amount of time in seconds before game ends for taking too long (0 to disable)": 1800, "Number of flag captures a team must get to win the game": 3, "Minimum number of players required to start the game": 2, "Cooldown in seconds for respawning during game": 10, "Amount of time in seconds player will be invincible after spawning": 3, "Maximum distance from team spawn point player can spawn within": 4.0, "Grant player instant full health when they get a kill": true, "Amount of time in seconds between registration end and event start (for admin team swapping)": 15, "Create a temporary Team UI for players and restore vanilla teams after the game": false, "Block teleporting with NTeleportation plugin during game": true, "Red Team kit name": "red team", "Blue Team kit name": "blue team", "Ammo Restock on kill kit name": "restock ammo", "Red Flag Box Skin ID": 2133043744, "Blue Flag Box Skin ID": 2918303257, "Red Team Banner Flag background image link": "https://i.ibb.co/zhvx1xHZ/flagred.jpg", "Blue Team Banner Flag background image link": "https://i.ibb.co/dJKxLjZ5/flagblue.jpg", "Position to teleport players on pre-game lobby and spectate (X)": 0.0, "Position to teleport players on pre-game lobby and spectate (Y)": 0.0, "Position to teleport players on pre-game lobby and spectate (Z)": 0.0, "Red flag position (X)": 0.0, "Red flag position (Y)": 0.0, "Red flag position (Z)": 0.0, "Blue flag position (X)": 0.0, "Blue flag position (Y)": 0.0, "Blue flag position (Z)": 0.0, "Red flag facing position (X)": 0.0, "Red flag facing position (Y)": 0.0, "Red flag facing position (Z)": 0.0, "Blue flag facing position (X)": 0.0, "Blue flag facing position (Y)": 0.0, "Blue flag facing position (Z)": 0.0, "Red team spawn position (X)": 0.0, "Red team spawn position (Y)": 0.0, "Red team spawn position (Z)": 0.0, "Blue team spawn position (X)": 0.0, "Blue team spawn position (Y)": 0.0, "Blue team spawn position (Z)": 0.0 }
Developer API
Hooks
- void OnGameWin(string winningTeam, List<ulong> redTeamPlayers, List<ulong> blueTeamPlayers, Dictionary<ulong, int> playerKills, Dictionary<ulong, int> playerCaptures) - Called when a game is won. Good for rewards and score keeping.
Support Discord