DOJ:RP Documentation (SA-MP)
A modern light-roleplay gamemode written in PAWN for SA-MP.
Installation
After installing the prerequisites on Github, download the .zip
file and extract the folders/files into the root directory of your server.
Configuration
Change any (optional) settings in the gamemodes/DOJRP/core/config.inc
file and then compile the main.pwn
file located in the gamemodes
folder.
Add gamemode0 main 1
and plugins samp_bcrypt sscanf streamer
(add .so
for Linux) to your server.cfg
file located in your server's root directory and then run the server.
Database
The script uses a SQLite-based include called sqlitei.inc
. An existing database (server.db
) is located in the scriptfiles/DOJRP
folder and only contains some houses, businesses, bus stops, and sprunk machines. Unless you want to use these existing houses, businesses, bus stops, and sprunk machines the database file can be deleted and a brand new one will be automatically created upon launching your server.
Setting Up Admin
Login as RCON admin using /rcon login [password]
and then use /setlevel
and set yourself as an "Owner". You can then hire Managers, Admins etc. using the same command.
Module System
The script uses y_hooks
which is a callback hooking system allowing you to modularize your script into multiple .inc
files. The script's module files are located in the gamemodes/DOJRP
folder broken down into three folders including core
, player
, and server
.
Hierarchy Structure
The modules work in a hierarchy fashion. This means code in the core
folder can be used by modules in the player
and server
folders. The same goes for the player
folder's code which can be used in the server
folder and so on. It's important to note that the gamemodes/DOJRP/player/accounts.inc
file acts as base for almost all of the modules located below it in the main.pwn
file, as account functions are needed in most systems. The gamemodes/DOJRP/player/misc.inc
file acts as a base for anything else 'non-account' related so if you cannot find a function in a specific system module, it should be in one of those files.
Adding Items
The item system is located in the gamemodes/DOJRP/player/inventory.inc
file and can be easily added upon by searching for one of the model id definitions and duplicating the code for another model id/item.
Adding Vehicles
Vehicle files for each island can be located in the scriptfiles/DOJRP/vehicles
folder. You can easily add new vehicles without having to compile the script by following the parameter format in each of the files.
Adding Objects
Objects files for each island (and interiors) can be located in the scriptfiles/DOJRP/objects
folder. You can easily add new objects without having to compile the script by following the parameter format in each of the files.
Creating Properties
Houses and businesses are dynamically created using /createhouse
and /createbusiness
while set as an "Owner" admin level. The scriptfiles/DOJRP/server.db
file contains some existing houses and businesses, but if you choose not to use them, you can delete the HOUSES
and/or BUSINESSES
table(s) in the database using SQLite browsing software.
Creating Bus Stops
Bus stops are dynamically created using /createstop
while set as an "Owner" admin level. The scriptfiles/DOJRP/server.db
file contains some existing bus stops, but if you choose not to use them, you can delete the LSBUS
, SFBUS
, and LVBUS
tables in the database using SQLite browsing software.
Creating Sprunk Machines
Sprunk machines are dynamically created using /createsprunk
while set as an "Owner" admin level and can be created inside interiors. The scriptfiles/DOJRP/server.db
file contains some existing sprunk machines, but if you choose not to use them, you can delete the SPRUNKS
table in the database using SQLite browsing software.
Last updated