Appearance
Architecture and source map
This is a guide to the framework’s conventions, not a Pawn tutorial. Start with gamemodes/ARCHITECTURE.md in the framework checkout, then read the relevant module headers and functions.
Runtime boundaries
| Component | Language | State |
|---|---|---|
| Gamemode | Pawn | Cached entity/character arrays plus MySQL |
| Community web | TypeScript / Next.js | Shared database, authenticated requests and web sessions |
| Agent | Node.js | Owned child process, runtime/model files and console stream |
| Optional API | TypeScript / Fastify | Health endpoint scaffold |
| Project docs/site | VitePress plus static site | Separately maintained documentation and marketing assets |
Web database writes are not automatically pushed into all game arrays. Reload/reconnect/restart semantics are part of each feature’s design.
Include and startup order
gamemodes/gamemode.pwn is the compiler entry. It defines core constants, includes configuration and module headers, then the final wrappers/hooks. A module typically has header.pwn that includes its files in dependency order.
main() connects MySQL, initializes collision data, performs model/startup callbacks and loads persistent entities. Missing MySQL/ColAndreas initialization is fatal. Optional custom character models load after database connection and before players join.
Use YSI hook callbacks in modules rather than adding conflicting public handlers. Search for existing ORP_ custom hooks before choosing where a feature should join character load/spawn/logout.
Data arrays and IDs
Account[] contains account state; Character[] contains persistent character state; PlayerVar[] contains temporary session state. Vehicles similarly separate persistent Vehicle[] from temporary VehicleVar[].
A SQL ID identifies a persistent record. An enum/array index locates that record in memory. A game engine ID identifies a currently spawned object/player/vehicle. Use the appropriate lookup helper when crossing those boundaries.
Framework wrappers
Use ORP_ movement/vehicle wrappers where the existing system expects them, so tracking and cleanup stay in sync. Use GivePlayerCash / TakePlayerCash for money and supply an audit reason. Use AddLogEntry for relevant gameplay events.
Faction logic should use types/capabilities where the behaviour is generic, rather than hardcoding a single agency SQL ID. Staff guards use the existing admin constants; web guards use the mirrored constants and DAL.
Folder guide
Core folders include player, admin, faction, police, vehicle, property, jobs, money, injury, phone, message, attachments, furniture, gates, visuals and optional systems such as gangzones/emmet.
Command handlers use CMD:. The source-derived inventory provides file/line locations across all these areas, including creator commands outside admin/.