Skip to content

SAPD, FDSA and faction configuration ​

Starter factions ​

SQL IDFactionTypeGeneric squads
1SAPDFACTION_TYPE_LEO, value 010 SWAT; 11 Traffic; 12 Detectives
2FDSAFACTION_TYPE_EMS, value 320 Fire; 21 EMS; 22 Rescue

The exact Pawn name of the law-enforcement type is defined in gamemodes/gamemode.pwn; use its existing constant rather than inventing another numeric code. FDSA owns the starter fire/medical role. Other faction types remain available, including NEWS for a community-created news faction; no other squads are prepopulated.

Types, capabilities and identity ​

A faction’s SQL ID identifies the organisation. Its type determines its family. Capability flags determine access to reusable actions. Do not substitute one for another when extending the code.

Use Faction_Can(playerid, FAC_CAP_...) and the existing faction helpers where appropriate. Avoid adding checks such as “SQL ID equals SAPD” to generic emergency-service features unless the behaviour really is SAPD-specific.

Ranks and tiers ​

Faction membership belongs to a character, while staff rank belongs to an account. Tiers are numerically inverted compared with staff levels:

TierMeaning
1Owner
2Command
3Member
4Restricted

Armory tier limits usually admit members whose tier number is at most the configured limit. A limit of 0 means no tier restriction in the equipment selection check. Check the exact system before reusing that meaning elsewhere.

Make the starter factions usable ​

Place faction spawns, configure starter leaders, create emergency vehicles and place lockers/armories. Add stock uniforms and test with members from each relevant tier/squad.

Faction data is loaded into game arrays. A web database edit is not a universal live push into every running module; use a documented reload command or plan a clean game restart.

Add a new faction or squad ​

Use the faction administration tools to create a faction of a supported type. Set its name, abbreviation, colour, spawn and capabilities. For new squads, add unique IDs in gamemodes/faction/squads.pwn and the corresponding definitions in web-platform/web/lib/constants.ts.

The web squad map is keyed by faction abbreviation. If you rename an abbreviation, update the mapping so dropdowns still show the intended squads. Keep other factions’ lists empty until you intentionally configure them. Recompile/rebuild both applications after changing shared constants.

See ACP faction management for staff workflows and the developer guide for integration points.

Open-source roleplay foundations for open.mp. Bring your own world.