Skip to content

Current version (2025) of the famous AAD Bulletproof Gamemode

License

Notifications You must be signed in to change notification settings

ZantetsukenGT/AttDef

Repository files navigation

AttDef

If you just want to run the server, you're looking for the latest release, you may also want to read the Runtime prerrequisites and Actually running the server sections

Table of Contents

Build prerrequisites

Install the following in order to compile the gamemode:

Runtime prerrequisites

Linux

If you're planning to run the server on a Linux machine, keep in mind that samp-server is still a 32bit process as of now.

You may need to install the i386 architecture and install the 32bit version of the C++ Standard Library runtime, the installation procedure may vary depending on your distro:

If your package manager is APT (Debian, Ubuntu, etc), you can achieve this by running:

dpkg --add-architecture i386 && apt-get update && apt-get install libstdc++6:i386

If your package manager is pacman (Arch Linux), you can achieve this by running:

pacman -Syu lib32-gcc-libs

If you're unsure, research how to do this on your machine!

Windows

If you're planning to run the server on a Windows machine, you may or may not need to install the MVSC runtimes.

How to build

Clone the project or download the project in a zip archive:

git clone https://github.com/ZantetsukenGT/AttDef attdef
#linux
cd ./attdef
#windows
cd .\attdef

Fetch the needed libraries/dependencies, the following command will fetch plugins as well:

sampctl ensure

Compile the gamemode to generate the attdef.amx file needed to run the server:

#Will build with debug symbols -d3 flag (debug symbols included, development and for crashdetect to output useful info)
sampctl build
#or
sampctl build dev
#Will build with optimizations and no debug symbols, mainly for release builds
sampctl build release

Just before running the server

Delete server.cfg

Since we are using open.mp, you need to delete the server.cfg file and run the following command to generate a config.json file:

#linux
./samp03svr --default-config

#windows
.\samp-server.exe --default-config

Plugins and components

In the plugins/ folder:

  1. Delete the streamer plugin, its unused.
  2. Delete the SKY plugin, having it present will prevent the gamemode from working at all.
  3. Move pawnraket and sscanf to the components/ folder.

Scriptfiles

In the scriptfiles/ folder:

  1. Make a copy of the AttDefDatabase.db.example file and rename it to AttDefDatabase.db or the server won't start properly.

config.json

In the config.json file:

  1. In the "pawn"."legacy_plugins" array, add "samp_bcrypt" if you're in windows or "samp_bcrypt" if you're in linux.
  2. In the "pawn"."main_scripts" array, remove "test 1" and add "attdef".
  3. In the "rcon"."password" property, change it from the default changeme.

It is recommended to use the config.json customizations from the latest release

Actually running the server

Use your preferred way to start the server:

#On Windows
.\samp-server.exe

#On Linux
./samp-server

This works fine until you need to log off, on Windows, the process will stay alive as long as the machine is turned on and in Linux the process will be terminated.

Setting up the server to automatically start

So, on Linux, using pm2 is recommended, it will help you in restarting the server upon crashes and start it automatically when you reboot your machine.

Just casually follow these steps:

  1. Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
  1. Log off and log in again to complete the nvm installation

  2. Install the latest version of NodeJS

nvm install node # "node" is an alias for the latest version
nvm use node
  1. Install pm2
npm install pm2 -g
  1. Tell pm2 to run on boot
#Run as root or use sudo
pm2 startup
  1. Start your server with pm2
# very important to be inside the correct folder
cd path/to/server
pm2 start "./samp-server" --name myAttdef
pm2 save

You're done!

Other useful pm2 commands:

pm2 list
pm2 log myAttdef
pm2 stop myAttdef
pm2 restart myAttdef
pm2 delete myAttdef
pm2 describe myAttdef

Collaboration

This project is open for collaboration, create a fork, start from How to build and make a pull request!

About

Current version (2025) of the famous AAD Bulletproof Gamemode

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages