Civilian Registration makes character creation from in-game simple.
For standalone (menu) based servers, a registration window with your custom character record form is shown with a single button to generate a character selfie.
For framework servers with DB sync, this submodule syncs in-game selfies/mugshots to the existing automatic character records.
Activation Guide
Download and Install the Resource
This submodule is already enabled by default when installing the Sonoran CAD FiveM resource.
Configure the Submodule
Open Admin > Integrations > FiveM, select the server, then open Civilian Registration (CivReg). Enable the plugin with the header toggle and review the settings below. Changes save automatically. When saved, runexec @sonorancad/sonorancad.cfg in your server console to apply them.
See Submodule Configuration for requirements, reset, and migration details.
Optional: Configure Database Sync Mode
If both Database Sync and its Character mapping are enabled in CAD, CivReg uses database mode automatically. Run the database sync AI configuration tool after starting the civilian registration submodule. This will automatically map anyimage field in your character record to the newly generated sonoran_mugshot database column.
Advanced: SQL Information
Advanced: SQL Information
On every start in database mode, CivReg runs
ADD COLUMN IF NOT EXISTS to add a nullable sonoran_mugshot MEDIUMTEXT column. MEDIUMTEXT is required because a base64 portrait can exceed the 65,535-byte capacity of MySQL TEXT.The standard database targets are:If your framework uses a customized table or character ID column, select QBCore or ESX in Character data, then update Table name and Character ID column. Keep the portrait column named
sonoran_mugshot, then use that column in the CAD field mapping.(Optional) Customize Your Character Template
In CAD, open Admin > Records and Codes > Custom Records and review the civilian character template. See Creating Custom Record and Report Types for editing fields and sections. Add an editable Image field if players should attach a selfie, and make that field required if a portrait is mandatory. In your database sync mapping configuration, the image field must be mapped to thesonoran_mugshot column that the CivReg plugin will automatically add to your players table. The database sync AI configuration tool will set this up for you automatically.
In standalone mode, templates are cached for 60 seconds by default. After saving a template change, allow the cache to expire, then close and reopen /civreg to load the updated form. An already-open form does not refresh automatically.
(Optional) Configure Optional Autofill and Portrait Uploads
For identity autofill, follow Framework Autofill. For templates with image fields, review Portrait Uploads and the image size limit.Player Guide
Standalone Mode
Register a Character in Standalone Mode
Register a Character in Standalone Mode
- Run
/civreg, or your server’s configured registration command. - Fill out the character record form. Click on any image fields to take an automatic selfie.
- Select Register Character to create the record. Users can optionally use
/linkin-game to assign the character to their CAD account in the civilian panel.
Take a Character Selfie
Take a Character Selfie
In standalone mode, finish loading your character and any appearance changes, then click an image field to take a fresh selfie. Avoid changing characters or clothing while the photo is being taken. If the capture fails, wait until your appearance has finished loading and click the image field again.The portrait shows your character without masks, hats, glasses, ear accessories, or neck accessories. Those items stay on your in-game character; you do not need to remove or re-equip them for the photo.
Scroll to an image field and select Click to take a selfie to capture your current in-game character.
Scroll to an image field and select Click to take a selfie to capture your current in-game character.Framework Autofill
Configure Framework Autofill
Configure Framework Autofill
Autofill is optional. Players can complete the registration form without a framework. To prefill supported identity values:
- Configure and enable Framework Support and choose the framework running on your server.
- In Civilian Registration (CivReg) > Autofill, select each row, then click its destination field on the civilian record preview.
- Map First, Last, DOB, Sex, Height, Phone, and Nationality as needed.
- Changes save automatically. When saved, run
exec @sonorancad/sonorancad.cfgin your server console, then open a new form while playing a loaded framework character.
M or F. Height units are not converted.Only values supplied by the framework and mapped to an existing template field are prefilled. Missing values leave the template’s default or an empty field for the player to complete. Prefilled fields remain editable unless marked read-only in CAD. These autofill settings apply to the API-mode form. Database mode updates only the sonoran_mugshot column; your existing CAD DB Sync mappings supply the remaining character fields.Database Sync Mode
Update a Character Portrait in Database Sync Mode
Update a Character Portrait in Database Sync Mode
If your community has database sync enabled for civilian records, the CivReg submodule will automatically switch into database sync mode on startup.
- Select the character you want to play in QBCore or ESX and finish spawning into the server.
- Allow the character’s face, clothing, and accessories to finish loading. CivReg waits for 10 seconds with no appearance changes before taking a fresh portrait. Clothing changes during this wait restart it, so the photo may take longer than 10 seconds after joining.
- The portrait is saved to that framework character’s database record for CAD to display through your existing DB Sync image mapping.
/civreg in this mode; it displays a reminder that registration and portraits are automatic. Selecting a character on the CAD civilian page does not take a new portrait. To retry an automatic capture, reselect the character in your server’s character menu and let it fully load again.Portrait Uploads
Portraits are saved directly with the character data. You do not need to set up a public image address or host the photos separately. The default maximum photo size is 1 MiB; if a photo is rejected, retake it and review the displayed error with your server administrator.Configuration Reference
Character data selects the QBCore or ESX database mapping to edit. Set Table name and Character ID column to match your database. This selector does not enable Database Sync or require a framework for standalone registration. Autofill uses the record-field picker described above. The civilian template, cache duration, and upload size limit are managed by the resource and are not editable controls in this panel.Registration form
Registration form
Language
Language
Expand Language at the bottom of the plugin to edit its in-game messages. Keep substitution tokens such as
%s or {0} intact.Troubleshooting
Troubleshooting
Troubleshooting

