RJRYT/NewCityRP
A full-featured SA-MP (San Andreas Multiplayer) roleplay gamemode written in Pawn. Features inventory with weight limits, jobs, businesses & factions, phone system with apps, voice chat, anti-cheat, Discord integration, and more. Licensed under GNU AGPL v3.0.
README.md
New City Roleplay (NCRP)
SA-MP (San Andreas Multiplayer) Roleplay Server — Gamemode Source
Branch:main| Version: V6.4
Developers: RJRYT, BO$$, LOKO | Codroid Developers
Website: https://ncrpsamp.xyz
Table of Contents
- About
- Project Structure
- Prerequisites
- Installation
- Building (Compiling)
- Running the Server
- Server Configuration
- Runtime Configuration
- Architecture & Code Organization
- Includes & Dependencies
- Plugins
- Filterscripts
- Testing
- Development Workflow
- Security & Secrets
- Troubleshooting
- License
- Version History
About
New City Roleplay (NCRP) is a full-featured SA-MP roleplay gamemode written in Pawn. It runs on the SA-MP multiplayer modification for Grand Theft Auto: San Andreas (v1.0).
This branch (main) represents the V6.x stable line of the project. Key gameplay systems include:
- Player registration, login, and spawn selection
- Inventory system with weight and slot limits
- Jobs (fuel, meatchop, mining, harvesting, etc.)
- Businesses and factions with private garages and vehicles
- Phone system with apps (GPS, Instagram, G Pay, True Caller, Wallet, Store, Sim Manager, messages, contacts, calls)
- Dynamic stock system for job items
- Housing, gang houses, and faction bases
- ATM and banking system
- Voice chat (SampVoice)
- Anti-cheat (nex-ac, crashdetect)
- Discord integration (discord-connector)
- Emotes system (/emote or Press H)
- Auto vehicle respawn/despawn system
- Speed cameras and turf wars
The script is reported to work on both mobile and PC SA-MP clients.
Project Structure
NewCityRP/
├── samp-server.exe # SA-MP server binary (Windows)
├── samp-server # SA-MP server binary (Linux)
├── samp-npc.exe # SA-MP NPC binary (Windows)
├── samp-npc # SA-MP NPC binary (Linux)
├── server.cfg # Main server configuration
├── server.windows.cfg # Windows-specific server config
├── server.linux.cfg # Linux-specific server config
├── LICENSE # GNU AGPL v3.0 license
├── README.md # This file
├── CHANGELOG.md # Detailed version history (V6.04.1 to V6.05.5)
├── .gitignore # Git ignore rules
├── .vscode/
│ ├── tasks.json # VS Code build & run tasks
│ └── settings.json # VS Code settings
├── gamemodes/
│ ├── NewCityRP.pwn # Main gamemode source (Pawn)
│ ├── NewCityRP.amx # Compiled gamemode bytecode
│ └── module/
│ ├── Server/
│ │ ├── includes.inc # Master include aggregator
│ │ ├── defines.inc # Global constants/macros
│ │ ├── consts.inc # Constant values
│ │ ├── enum.inc # Player/enum definitions
│ │ ├── vars.inc # Global variables
│ │ ├── colors.inc # Color definitions
│ │ ├── attach.inc # Object attachment helpers
│ │ ├── thread.inc # Threading helpers
│ │ ├── mysql.inc # MySQL database setup
│ │ ├── dccmd.inc # Discord commands
│ │ └── ...
│ ├── TextDraw/
│ │ ├── Phone/
│ │ │ ├── G Pay/
│ │ │ ├── Instagram/
│ │ │ ├── GPS/
│ │ │ ├── Wallet/
│ │ │ ├── True Caller/
│ │ │ ├── Theme/
│ │ │ ├── Store/
│ │ │ ├── Sim Manager/
│ │ │ ├── Settings/
│ │ │ └── Radio/
│ │ ├── speedo.inc
│ │ ├── refuel.inc
│ │ ├── dmv.inc
│ │ ├── bank.inc
│ │ ├── atm.inc
│ │ ├── login.inc
│ │ ├── intro.inc
│ │ ├── notify.inc
│ │ ├── alert.inc
│ │ ├── centerlock.inc
│ │ ├── blood.inc
│ │ ├── ChatBot.inc
│ │ ├── PhoneHome.inc
│ │ └── ... (see gamemodes/module/TextDraw/)
│ ├── Map/
│ │ ├── mining.inc
│ │ ├── mechanic.inc
│ │ ├── meatchop.inc
│ │ ├── hospital.inc
│ │ ├── muthuk.inc
│ │ ├── xmasncrp.inc
│ │ ├── garage.inc
│ │ ├── foodcourt.inc
│ │ ├── RemoveBuilding/
│ │ └── ... (see gamemodes/module/Map/)
│ ├── Vehicle/
│ │ ├── rjr.inc
│ │ ├── raju.inc
│ │ └── cruz.inc
│ ├── intro.inc
│ └── anims.inc
├── filterscripts/ # Auxiliary SA-MP filterscripts
│ ├── clientcheck.pwn # Client version checking
│ ├── map.pwn # Map utilities
│ ├── ChatBotV1.pwn
│ ├── ChatBotV2.pwn
│ ├── cameditor.pwn
│ ├── holdWeapon.pwn
│ ├── DCLogger.pwn
│ ├── npc.pwn
│ └── ...
├── pawno/
│ ├── pawncc.exe # Pawn compiler (Windows)
│ ├── pawnc.dll
│ ├── pawn.json
│ ├── settings.ini
│ └── include/ # Third-party & custom includes
│ ├── a_samp.inc # Core SA-MP natives
│ ├── streamer.inc
│ ├── textdraw-streamer.inc
│ ├── sscanf2.inc
│ ├── mysql.inc / a_mysql.inc
│ ├── FCNPC.inc
│ ├── nex-ac.inc
│ ├── crashdetect.inc
│ ├── GPS.inc
│ ├── sampvoice.inc
│ ├── Pawn.CMD.inc
│ └── ... (see pawno/include/)
├── plugins/ # SA-MP server plugins (.dll / .so)
│ ├── crashdetect.dll/.so
│ ├── sampvoice.dll/.so
│ ├── pawncmd.dll/.so
│ ├── textdraw-streamer.dll/.so
│ ├── sscanf.dll/.so
│ ├── FCNPC.dll/.so
│ ├── mysql.dll/.so / mysql_static.dll/.so
│ ├── Whirlpool.dll/.so
│ ├── SKY.dll/.so
│ ├── streamer.dll/.so
│ ├── bscrashfix.dll/.so
│ ├── discord-connector.dll/.so
│ ├── nativechecker.dll/.so
│ └── ...
├── scriptfiles/
│ ├── server.ini # Runtime stock & feature toggles
│ ├── README.md
│ ├── nex-ac_settings.cfg
│ └── ...
├── logs/
│ ├── errors.log # Runtime error log
│ └── plugins/ # Plugin-specific logs
│ └── discord-connector.log
├── server_log.txt # Console output log
├── samp.ban # Ban list
├── mysql_log.txt # MySQL query log
└── log-core.dll/.so # Core logging library
Prerequisites
| Component | Requirement |
|---|---|
| Operating System | Windows or Linux (binaries included for both) |
| GTA: San Andreas | Version 1.0 (US or EU) |
| SA-MP Client | 0.3.7 or compatible |
| Pawn Compiler | Included at pawno/pawncc.exe |
| Database | MySQL or MariaDB (required by the gamemode) |
Installation
- Clone or download this repository to your server machine.
- Ensure GTA: SA v1.0 is installed and the SA-MP client is available for testing.
- Set up a MySQL/MariaDB database and update connection details in
gamemodes/module/Server/mysql.inc. - Place the server files in your SA-MP server directory alongside
samp-server.exe(orsamp-serveron Linux). - Compile the gamemode (see Building).
- Configure
server.cfgwith your desired settings (see Server Configuration). - Configure
scriptfiles/server.inifor runtime stock levels and toggles. - Start the server (see Running the Server).
Building (Compiling)
The gamemode source is gamemodes/NewCityRP.pwn. It compiles to gamemodes/NewCityRP.amx using the included Pawn compiler.
Option 1: VS Code (Recommended)
Open the project in Visual Studio Code and run the default build task:
- Press
Ctrl+Shift+B - Select Compile Script (it is already set as the default build task)
This executes:
pawno/pawncc.exe <file> --% -Dgamemodes -;+ -(+ -d3
Option 2: Command Line
Windows:
pawno\pawncc.exe gamemodes\NewCityRP.pwn --% -Dgamemodes -;+ -(+ -d3
Linux:
./pawno/pawncc gamemodes/NewCityRP.pwn -Dgamemodes -;+ -(+ -d3
Compiler Flags Used
| Flag | Meaning |
|---|---|
-Dgamemodes | Defines the gamemodes preprocessor constant |
-;+ | Enables compact include mode |
-(+ | Enables debug information |
-d3 | Sets debug level to 3 |
On successful compilation, NewCityRP.amx is generated in gamemodes/.
Running the Server
Option 1: VS Code
Run the "start samp" task:
- Press
Ctrl+Shift+P - Type "Tasks: Run Task"
- Select start samp
This executes ./samp-server.exe.
Option 2: Command Line
Windows:
samp-server.exe
Linux:
./samp-server
Connecting In-Game
Launch GTA: SA with the SA-MP client and connect to:
localhost:7777
(or replace localhost with your server's public IP if connecting remotely)
The server will load gamemode0 NewCityRP as defined in server.cfg.
Server Configuration
server.cfg is the primary server configuration file. Key settings:
echo Executing Server Config...
rcon_password 2255
maxplayers 502
port 7777
hostname NEW CITY ROLEPLAY [NCRP]
gamemode0 NewCityRP
filterscripts map clientcheck
plugins crashdetect sampvoice pawncmd textdraw-streamer sscanf FCNPC mysql Whirlpool SKY streamer bscrashfix discord-connector nativechecker
mapname Kerala
discord_bot_token ODYyNTM3MjI5MTAwNjQ2NDMy.G4Kabfx.hgqVIqHfxl9n9_nQI-CVcgHDQI_jcQ-3kvKSEM
discord_bot_intents 131071
announce 0
chatlogging 1
weburl https://ncrpsamp.xyz
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
maxnpc 10
logtimeformat [%H:%M:%S]
language English
ackslimit 10000
profile_gamemode 1
profile_format html
useartwork 1
query 1
password
output 1
long_call_time 0
Important Fields
| Setting | Default | Description |
|---|---|---|
rcon_password | 2255 | Remote console password — change this before production |
maxplayers | 502 | Maximum player slots |
port | 7777 | UDP game port |
hostname | NEW CITY ROLEPLAY [NCRP] | Server name shown in server browser |
gamemode0 | NewCityRP | Gamemode to load on startup |
filterscripts | map clientcheck | Filterscripts to load alongside the gamemode |
plugins | (list) | SA-MP plugins to load (must match .dll/.so files in plugins/) |
announce | 0 | Whether to announce to SA-MP master list |
discord_bot_token | (set) | Discord bot token for the connector plugin — treat as secret |
weburl | https://ncrpsamp.xyz | Server website URL |
Security Warning:
server.cfgcontains a Discord bot token and RCON password. Do not commit these to public version control. Use environment variables or a secrets manager in production.
Runtime Configuration
scriptfiles/server.ini controls runtime stock levels and feature toggles:
SeedsStock = 1000
CrackStock = 500
EphedrineStock = 500
MeatsStock = 850
CropsStock = 840
FishStock = 1000
DoubleXP = 0
AutoNameChange = 0
CustomName = 0
CustomServerName =
| Key | Default | Description |
|---|---|---|
SeedsStock | 1000 | Seed item stock for farming jobs |
CrackStock | 500 | Crack item stock |
EphedrineStock | 500 | Ephedrine stock |
MeatsStock | 850 | Meat item stock |
CropsStock | 840 | Crop item stock |
FishStock | 1000 | Fish item stock |
DoubleXP | 0 | Double experience toggle (0 = off) |
AutoNameChange | 0 | Automatic server name changer |
CustomName | 0 | Custom server name toggle |
CustomServerName | (empty) | Custom server name string |
Edit this file to adjust job economy and server behavior without recompiling.
Architecture & Code Organization
Language
Pawn — a C-like scripting language used by SA-MP.
Source files use the .pwn extension; compiled bytecode uses .amx.
Main Entry Point
gamemodes/NewCityRP.pwn is the primary gamemode. It includes modular definitions from gamemodes/module/.
Master Include
gamemodes/module/Server/includes.inc aggregates all core includes:
#include <a_samp>
#include <nex-ac>
#include <crashdetect>
#include <a_actor>
#include <BustAim>
#include <a_http>
#include <a_mysql>
#include <a_objects>
#include <foreach>
#include <selection>
#include <memory>
#include <sscanf2>
#include <streamer>
#include <Pawn.CMD>
#include <sampvoice>
#include <progress2>
#include <eSelection>
#include <callbacks>
#include <SKY>
#include <colandreas>
#include <mapandreas>
#include <weapon-config>
#include <tp>
#include <FCNPC>
#include <textdraw-streamer>
#include <mxINI>
#include <crashdetecter>
#include <OnPlayerFakeKill>
#pragma warning disable 239
#pragma warning disable 214
Server Module (gamemodes/module/Server/)
| File | Purpose |
|---|---|
defines.inc | Global constants and macros |
consts.inc | Constant values |
enum.inc | Player data enums and structures |
vars.inc | Global variables |
colors.inc | Color definitions for UI and chat |
attach.inc | Object attachment helpers |
thread.inc | Threading / asynchronous helpers |
mysql.inc | MySQL database connection and queries |
dccmd.inc | Discord bot command definitions |
includes.inc | Master include aggregator |
TextDraw Module (gamemodes/module/TextDraw/)
Contains UI definitions for:
- Phone apps (Home, G Pay, Instagram, GPS, True Caller, Wallet, Theme, Store, Sim Manager, Settings, Radio, Olx)
- Login, intro, bank, ATM, DMV, hacking, influence, ID card
- Speedometer, refuel, blood, notify, alert, centerlock
- ChatBot, bottom bar (player/global), PhoneHome
Map Module (gamemodes/module/Map/)
Contains object placement and RemoveBuilding definitions for:
- 24/7 stores, airports, ammo-nations, ATMs, banks, black markets
- City hall, hospitals, police stations, garages, mechanic shops
- Faction bases, gang houses, businesses, and custom mappings (Muthuk, Glass Bridge, Food Court, Xmas, etc.)
- Mining, harvest, meatchop, mechanic bank locations
Vehicle Module (gamemodes/module/Vehicle/)
| File | Purpose |
|---|---|
rjr.inc | Vehicle definitions |
raju.inc | Vehicle definitions |
cruz.inc | Vehicle definitions |
Includes & Dependencies
Third-party Pawn includes located in pawno/include/:
| Include | Purpose |
|---|---|
a_samp.inc | Core SA-MP natives |
streamer.inc | Enhanced object/player streaming |
textdraw-streamer.inc | Advanced textdraw streaming |
sscanf2.inc | String parsing and command arguments |
mysql.inc / a_mysql.inc | MySQL database integration |
FCNPC.inc | NPC (footbot) control |
nex-ac.inc | Anti-cheat system |
crashdetect.inc | Crash detection and reporting |
GPS.inc | GPS navigation |
sampvoice.inc | Voice chat integration |
Pawn.CMD.inc | Command processor |
colandreas.inc | Collision detection |
mapandreas.inc | Map object management |
SKY.inc | Skybox / weather effects |
mxINI.inc | INI file parsing |
a_actor.inc | Actor handling |
a_http.inc | HTTP requests |
a_objects.inc | Object management |
foreach.inc | Loop helpers |
selection.inc | Selection dialogs |
memory.inc | Memory utilities |
progress2.inc | Progress bars |
eSelection.inc | Enhanced selection |
callbacks.inc | Callback management |
weapon-config.inc | Weapon configuration |
tp.inc | Teleport helpers |
crashdetecter.inc | Crash detection |
OnPlayerFakeKill.inc | Fake kill detection |
BustAim.inc | Anti-aimbot |
Plugins
Plugins listed in server.cfg and located in plugins/:
| Plugin | Purpose |
|---|---|
crashdetect | Detects and reports Pawn crashes |
sampvoice | In-game voice chat |
pawncmd | Pawn command processing |
textdraw-streamer | Enhanced textdraw rendering |
sscanf | String formatting/parsing |
FCNPC | NPC pedestrians/bots |
mysql / mysql_static | MySQL database client |
Whirlpool | Cryptographic hashing |
SKY | Sky rendering |
streamer | Object/streamer plugin |
bscrashfix | Crash fix for specific bugs |
discord-connector | Discord bot integration |
nativechecker | Native function validation |
Ensure the correct plugin extension (
.dllon Windows,.soon Linux) matches your server OS.
Filterscripts
Filterscripts listed in server.cfg (map clientcheck) and located in filterscripts/:
| Filterscript | Purpose |
|---|---|
clientcheck.pwn | SA-MP client version verification |
map.pwn | Map utilities |
ChatBotV1.pwn / ChatBotV2.pwn | In-game chat bots |
cameditor.pwn | Camera editor tool |
holdWeapon.pwn | Weapon hold animation |
DCLogger.pwn | Discord logging |
npc.pwn | NPC management |
Testing
There is no automated test suite (no package.json, Jest, Pytest, etc.) in this project. Testing is performed manually:
- Compile the gamemode (see Building).
- Start the server (see Running the Server).
- Connect with an SA-MP client to
localhost:7777. - Verify gameplay systems: login/register, jobs, inventory, phone, businesses, factions, etc.
Logs
logs/errors.log— Runtime error log (crashdetect output)logs/plugins/discord-connector.log— Discord connector logsserver_log.txt— Server console outputmysql_log.txt— MySQL query log
Development Workflow
- Edit a
.pwnor.incfile undergamemodes/module/,gamemodes/NewCityRP.pwn, orfilterscripts/. - Compile with
Ctrl+Shift+B(VS Code) or runpawnccmanually. - Verify
NewCityRP.amxis regenerated without errors. - Restart the server to load the compiled bytecode.
- Connect in-game and test the changes.
- Check
logs/errors.logandserver_log.txtfor any runtime issues.
Common Workflow Commands
| Action | Windows Command | Linux Command |
|---|---|---|
| Compile gamemode | pawno\pawncc.exe gamemodes\NewCityRP.pwn --% -Dgamemodes -;+ -(+ -d3 | ./pawno/pawncc gamemodes/NewCityRP.pwn -Dgamemodes -;+ -(+ -d3 |
| Start server | samp-server.exe | ./samp-server |
Security & Secrets
The following sensitive values are present in the repository and must be protected:
| File | Secret | Recommendation |
|---|---|---|
server.cfg | rcon_password 2255 | Change to a strong password |
server.cfg | discord_bot_token ... | Do not expose publicly; rotate if leaked |
Never commit server.cfg with real secrets to a public repository. Use .gitignore or environment-specific configuration files.
Troubleshooting
| Issue | Likely Cause | Fix |
|---|---|---|
| Compile errors | Missing .inc files or syntax errors | Verify all includes exist in pawno/include/ and gamemodes/module/; check Pawn syntax |
| Server won't start | Wrong plugin architecture (.dll vs .so) | Use .dll on Windows, .so on Linux; verify plugins/ list matches files present |
| Can't connect in-game | Server not running or port blocked | Confirm samp-server is running; ensure UDP port 7777 is open |
| Database connection fails | MySQL not running or wrong credentials | Check gamemodes/module/Server/mysql.inc and confirm MySQL/MariaDB is accessible |
| Crashes at runtime | Pawn script error or plugin incompatibility | Check logs/errors.log; crashdetect is enabled to generate crash reports |
| Discord bot not connecting | Invalid or expired bot token | Verify discord_bot_token in server.cfg |
License
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).
codroidgamemodegta-san-andreasncrpnew-city-roleplaypawnroleplaysa-mpsampsan-andreas-multiplayer
Ta strona jest zbudowana z tego, co GitHub publikuje o repozytorium. samp.directory nie hostuje kodu. Zgłoś problem z tym wpisem