This is a simple yet practical base script designed for anyone looking to develop gamemodes for open.mp or SA:MP. Whether you're a beginner starting from scratch or a returning developer familiar with the platform, this script offers a clean foundation to build on.
It uses MySQL for handling data and BCrypt for secure password hashing. While the script itself is straightforward, it does assume you have at least a basic understanding of Pawn scripting and SQL. If you're willing to learn and explore how each part works, this base will be a solid starting point for your own projects.
This section provides a step-by-step guide to get the gamemode running properly on your setup.
Download the following files before proceeding:
- open.mp server (latest version)
- YSI includes (latest version)
- MySQL plugin (R41-4)
- BCrypt plugin (v0.4.1)
1. open.mp server
- Extract the open.mp server files into the root folder of your server.
2. YSI Library
- Extract the contents of the archive into
qawno/include/
.
3. MySQL and BCrypt Plugins
- Place the plugin files (
.dll
for Windows or.so
for Linux) inside theplugins/
directory. - Move the corresponding
.inc
include files toqawno/include/
.
4. MySQL Dependencies
- Files like
libmariadb.dll
,log-core.dll
, or any additional libraries should be placed directly in the server's root folder.
Note
Ensure that all plugin names are correctly listed in your config.json
file under the plugins
setting.
This gamemode uses mysql_connect_file
to connect to the database through an INI-style configuration file. This file contains all the necessary credentials and settings needed to establish a connection.
Example configuration file: mysql.ini
Please refer to the MySQL plugin documentation for details on all available fields and options.
Download the database structure: database_structure.sql
Note
Make sure to import the .sql
structure into your database before launching the server, otherwise account registration and login features will not function properly.
This gamemode follows a modular structure to keep the codebase clean, organized, and easy to maintain. If you're not familiar with modular programming, check out this tutorial before making any changes. It's highly recommended to stick with this approach, as it makes development, debugging, and future updates much easier.
Everyone is welcome to contribute - whether it's advice, pull requests, or suggestions.
If you notice any bugs, issues, or have ideas to make things better, feel free to open an issue or join the discussion on our Discord.
- SA:MP and open.mp teams (past, present, and future).
- Myself for developing this gamemode.
- BlueG and maddinat0r for the MySQL plugin.
- Sys for the bcrypt plugin.
- Y_Less for the YSI library.
- Kevin for his highly constructive suggestions and insights.
- itsneufox for testing this script.