samp.directory
← Betikler ve kütüphaneler

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.

Gamemode★ 0dün güncellendiAGPL-3.0Pawn
GitHub’da aç

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

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

ComponentRequirement
Operating SystemWindows or Linux (binaries included for both)
GTA: San AndreasVersion 1.0 (US or EU)
SA-MP Client0.3.7 or compatible
Pawn CompilerIncluded at pawno/pawncc.exe
DatabaseMySQL or MariaDB (required by the gamemode)

Installation

  1. Clone or download this repository to your server machine.
  2. Ensure GTA: SA v1.0 is installed and the SA-MP client is available for testing.
  3. Set up a MySQL/MariaDB database and update connection details in gamemodes/module/Server/mysql.inc.
  4. Place the server files in your SA-MP server directory alongside samp-server.exe (or samp-server on Linux).
  5. Compile the gamemode (see Building).
  6. Configure server.cfg with your desired settings (see Server Configuration).
  7. Configure scriptfiles/server.ini for runtime stock levels and toggles.
  8. 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:

  1. Press Ctrl+Shift+B
  2. 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

FlagMeaning
-DgamemodesDefines the gamemodes preprocessor constant
-;+Enables compact include mode
-(+Enables debug information
-d3Sets 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:

  1. Press Ctrl+Shift+P
  2. Type "Tasks: Run Task"
  3. 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

SettingDefaultDescription
rcon_password2255Remote console password — change this before production
maxplayers502Maximum player slots
port7777UDP game port
hostnameNEW CITY ROLEPLAY [NCRP]Server name shown in server browser
gamemode0NewCityRPGamemode to load on startup
filterscriptsmap clientcheckFilterscripts to load alongside the gamemode
plugins(list)SA-MP plugins to load (must match .dll/.so files in plugins/)
announce0Whether to announce to SA-MP master list
discord_bot_token(set)Discord bot token for the connector plugin — treat as secret
weburlhttps://ncrpsamp.xyzServer website URL

Security Warning: server.cfg contains 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 =
KeyDefaultDescription
SeedsStock1000Seed item stock for farming jobs
CrackStock500Crack item stock
EphedrineStock500Ephedrine stock
MeatsStock850Meat item stock
CropsStock840Crop item stock
FishStock1000Fish item stock
DoubleXP0Double experience toggle (0 = off)
AutoNameChange0Automatic server name changer
CustomName0Custom 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/)

FilePurpose
defines.incGlobal constants and macros
consts.incConstant values
enum.incPlayer data enums and structures
vars.incGlobal variables
colors.incColor definitions for UI and chat
attach.incObject attachment helpers
thread.incThreading / asynchronous helpers
mysql.incMySQL database connection and queries
dccmd.incDiscord bot command definitions
includes.incMaster 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/)

FilePurpose
rjr.incVehicle definitions
raju.incVehicle definitions
cruz.incVehicle definitions

Includes & Dependencies

Third-party Pawn includes located in pawno/include/:

IncludePurpose
a_samp.incCore SA-MP natives
streamer.incEnhanced object/player streaming
textdraw-streamer.incAdvanced textdraw streaming
sscanf2.incString parsing and command arguments
mysql.inc / a_mysql.incMySQL database integration
FCNPC.incNPC (footbot) control
nex-ac.incAnti-cheat system
crashdetect.incCrash detection and reporting
GPS.incGPS navigation
sampvoice.incVoice chat integration
Pawn.CMD.incCommand processor
colandreas.incCollision detection
mapandreas.incMap object management
SKY.incSkybox / weather effects
mxINI.incINI file parsing
a_actor.incActor handling
a_http.incHTTP requests
a_objects.incObject management
foreach.incLoop helpers
selection.incSelection dialogs
memory.incMemory utilities
progress2.incProgress bars
eSelection.incEnhanced selection
callbacks.incCallback management
weapon-config.incWeapon configuration
tp.incTeleport helpers
crashdetecter.incCrash detection
OnPlayerFakeKill.incFake kill detection
BustAim.incAnti-aimbot

Plugins

Plugins listed in server.cfg and located in plugins/:

PluginPurpose
crashdetectDetects and reports Pawn crashes
sampvoiceIn-game voice chat
pawncmdPawn command processing
textdraw-streamerEnhanced textdraw rendering
sscanfString formatting/parsing
FCNPCNPC pedestrians/bots
mysql / mysql_staticMySQL database client
WhirlpoolCryptographic hashing
SKYSky rendering
streamerObject/streamer plugin
bscrashfixCrash fix for specific bugs
discord-connectorDiscord bot integration
nativecheckerNative function validation

Ensure the correct plugin extension (.dll on Windows, .so on Linux) matches your server OS.


Filterscripts

Filterscripts listed in server.cfg (map clientcheck) and located in filterscripts/:

FilterscriptPurpose
clientcheck.pwnSA-MP client version verification
map.pwnMap utilities
ChatBotV1.pwn / ChatBotV2.pwnIn-game chat bots
cameditor.pwnCamera editor tool
holdWeapon.pwnWeapon hold animation
DCLogger.pwnDiscord logging
npc.pwnNPC management

Testing

There is no automated test suite (no package.json, Jest, Pytest, etc.) in this project. Testing is performed manually:

  1. Compile the gamemode (see Building).
  2. Start the server (see Running the Server).
  3. Connect with an SA-MP client to localhost:7777.
  4. 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 logs
  • server_log.txt — Server console output
  • mysql_log.txt — MySQL query log

Development Workflow

  1. Edit a .pwn or .inc file under gamemodes/module/, gamemodes/NewCityRP.pwn, or filterscripts/.
  2. Compile with Ctrl+Shift+B (VS Code) or run pawncc manually.
  3. Verify NewCityRP.amx is regenerated without errors.
  4. Restart the server to load the compiled bytecode.
  5. Connect in-game and test the changes.
  6. Check logs/errors.log and server_log.txt for any runtime issues.

Common Workflow Commands

ActionWindows CommandLinux Command
Compile gamemodepawno\pawncc.exe gamemodes\NewCityRP.pwn --% -Dgamemodes -;+ -(+ -d3./pawno/pawncc gamemodes/NewCityRP.pwn -Dgamemodes -;+ -(+ -d3
Start serversamp-server.exe./samp-server

Security & Secrets

The following sensitive values are present in the repository and must be protected:

FileSecretRecommendation
server.cfgrcon_password 2255Change to a strong password
server.cfgdiscord_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

IssueLikely CauseFix
Compile errorsMissing .inc files or syntax errorsVerify all includes exist in pawno/include/ and gamemodes/module/; check Pawn syntax
Server won't startWrong plugin architecture (.dll vs .so)Use .dll on Windows, .so on Linux; verify plugins/ list matches files present
Can't connect in-gameServer not running or port blockedConfirm samp-server is running; ensure UDP port 7777 is open
Database connection failsMySQL not running or wrong credentialsCheck gamemodes/module/Server/mysql.inc and confirm MySQL/MariaDB is accessible
Crashes at runtimePawn script error or plugin incompatibilityCheck logs/errors.log; crashdetect is enabled to generate crash reports
Discord bot not connectingInvalid or expired bot tokenVerify discord_bot_token in server.cfg

License

This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).

Gerisini GitHub’da oku

codroidgamemodegta-san-andreasncrpnew-city-roleplaypawnroleplaysa-mpsampsan-andreas-multiplayer

Bu sayfa GitHub’ın depo hakkında yayımladıklarından oluşturulur. samp.directory kodu barındırmaz. Bu ilanla ilgili bir sorun bildir

RJRYT/NewCityRP: SA-MP Gamemode | samp.directory