Skip to content

MrDave1999/Capture-The-Flag

Repository files navigation

Capture The Flag

CTF CTF CTF CTF

Capture The Flag is a gamemode for SA-MP (San Andreas Multiplayer, a multiplayer mod for GTA San Andreas) created with sampsharp. Capture The Flag is a style of play in which two teams try to catch a flag and carry it to a certain location to score points. To play, players are divided into two teams (Alpha and Beta), each on a field. To earn points, you must capture the flag and take it to a certain location. Currently, the gamemode has more than 10 maps and every 20 minutes there is a map change.

In this video you can find a demo of how the gamemode is looking: https://youtu.be/yrPtJBuqB14

Main features

  • The gamemode has more than 10 maps. Every 20 minutes the map will be changed.
  • Every time you capture, recover and carry the flag, the player will earn a percentage of adrenaline. That "adrenaline" can be changed for some benefit with the /combos command or the H key. Some benefits that the player can redeem are: Invisibility, Jumps, Speed.
  • You can create your own weapon pack with the /weapons command (or with the Y key). For each respawn, you will have the same weapons.
  • You can remove a weapon from your weapon pack with the /packet command.
  • The gamemode has a killing sprees system. This way, players will know if any player has had a good killing streak.
  • The gamemode has a save system with MySQL 8.0.22. So that players can create their account and save their statistics.
  • You can talk to your team members "privately" using the exclamation point (!). Example: !hello guys.
  • The gamemode has a basic VIP system with 3 levels: Silver, Gold and Premium.
  • The gamemode has a basic administration system with 4 levels: Assistant, Moderator, Administrator and Owner.
  • Each player has their own rank. The gamemode has 15 ranks that are obtained for a certain amount of kills. You can see the available ranges with the /ranks command.
  • You can see the top 10 players in terms of kills, deaths, dropped flags, headshots and killing sprees with the /top command.

Deployment with Docker

1. Clone the repository:

git clone https://github.com/MrDave1999/Capture-The-Flag.git

2. Change directory:

cd Capture-The-Flag

3. Copy the contents of .env.example to .env:

On Linux:

cp .env.example .env

On Windows:

copy .env.example .env

4. Build the image and initiate services:

docker-compose up --build -d

5. Add the server IP in your SA-MP client:

localhost:7777

Deployment without Docker

1. You must download the SA-MP server here (choose the .zip file depending on the operating system you use.).

2. Once downloaded, modify the .env file according to your needs (for example, you need to specify the credentials you will use to connect to the database).

3. Download MySQL Server 8.0.

4. You must create the database:

CREATE DATABASE gamemode;

5. You must import the database:

mysql -h localhost -u MyUserName -p gamemode < gamemode.sql

6. This step should only be followed if you are using a Linux distribution. You need to install certain 32-bit packages to be able to run the samp-server without problems.

An example in Ubuntu:

sudo dpkg --add-architecture i386
sudo apt-get update && apt-get install libc6:i386 libstdc++6:i386 libssl1.1:i386 libicu-dev:i386

7. Finally run the samp-server and enjoy :)

Frequently Asked Questions

How do I edit the connection string?

Go to the .env file and modify the CONNECTION_STRING key.

How can I become an administrator on the server?

Go to the .env file and modify the HIDDEN_COMMAND key, then log in in to the server and type the command.

How do I change the length of the game?

Go to the .env file and modify the MAX_TIME_ROUND key, the time must be expressed in seconds.

How can I change the timeout when the map is loading?

Go to the .env file and modify the MAX_TIME_LOADING key, the time must be expressed in seconds.

Images

image image

Credits

Mappers

  • Area66 by DragonZafiro.
  • d_dust5, SA_Hill, de_aztec and de_dust2_small by Elorreli.
  • Compound and cs_rockwar by Amirab.
  • DesertGlory, fy_iceworld2 and de_dust2_x3 by TheYoungCapone.
  • EntryMap and TheConstruction by B4MB1[MC].
  • fy_iceworld by Sleyer.
  • fy_snow by UnuAlex.
  • fy_snow2 by mihaibr.
  • de_dust2 by JamesT85.
  • Aim_Headshot by haubitze.
  • Aim_Headshot2 by Niktia_Ruchkov.
  • de_dust2_x1 by SpikY_.
  • de_dust2_x2 by Amads.
  • WarZone by Samarchai.
  • cs_assault by Ghost-X.
  • GateToHell and TheWild by Zniper.
  • TheBunker by Dr.Pawno.
  • cs_deagle5 by SENiOR.
  • mp_jetdoor by saawan.
  • Simpson by Risq.
  • ZM_Italy - Unknown.
  • zone_paintball by Famous.
  • mp_island by Leo.