Database
The Eleven Police MDT database on FiveM: it installs itself through oxmysql, columns added to players, table groups, sample catalogs and what to edit in SQL.
It installs itself
There is no .sql to run. On start, the tablet checks your database and creates what is missing: around 65 tables of its own and the columns it needs in players. It is idempotent: on a running server it changes nothing. On update, new tables and columns are added on the first start.
All it needs is oxmysql configured and started before it.
What it touches outside its own tables
In players (from your framework) it adds these columns, only if they do not exist:
| Column | Used for |
|---|---|
wanted | Active wanted entry |
dangerous | Dangerous person warning |
photo, photo2 | Mugshots |
puntos | Licence points (starts at 12) |
With Config.LicensesType = 'columns' it also adds one column per licence. It deletes or rewrites nothing else: vehicles, money and licences are read through your systems.
Table groups
Almost all of them start with eleven_police_. The shop tables keep older names (police_shop_orders, police_shop_logs, police_shop_catalog).
| Area | Main tables |
|---|---|
| Staff | officers, onduty, duty_log, divisions, divisions_catalog, licenses, licenses_catalog, badge_pending |
| Citizens | wanted_citizens, citizen_locks, citizen_relations, relation_types, notes, weapons, stolen_reports |
| Fines | bills, penalcode_chapters, penalcode_articles, penalcode_favorites |
| Incidents | incidents and its child tables (charges, people, narrative, evidence, photos, vehicles, weapons, money, links, audit, prints) |
| Vehicles | wanted_vehicles |
| Operations | dispatch_alerts_archive, cells, gallery |
| Department | convenios, convenio_benefits, officer_of_month, briefings, awards, awards_catalog, diplomas, diploma_templates, contracts, contract_templates |
| System | permissions, permissions_init, penalcode_meta |
Example catalogues
They are seeded only when their table is empty, so they never overwrite data:
| Catalogue | What it includes |
|---|---|
| Penal code | 2 chapters and 6 generic articles |
| Decorations | 11 generic distinctions, in the server language |
| Divisions | Four generic divisions in the pd department (patrol, traffic, investigations and canine unit) |
Edit or delete them from the tablet.
What you can edit through SQL
Anything that is a catalogue can be loaded or fixed through SQL, and the tablet reads it on the next query without a restart: penal code, relation types, incident link types and the shop catalogue. For the penal code, the CSV importer is easier: see Penal code.
Do not edit the permission tables by hand: the Permissions screen writes there in a specific format.
Collations
If the tablet's tables and your players use different collations, MySQL throws "Illegal mix of collations". With Config.AlignCollation = true (default) the tablet aligns its tables to your players on start, empty tables only. See Troubleshooting.
Backups
Before updating, take a mysqldump of the eleven_police_% tables. The tablet never deletes data on update, but a backup takes a minute.