> For the complete documentation index, see [llms.txt](https://code-after-sex.gitbook.io/script-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://code-after-sex.gitbook.io/script-documentation/cas-police/faq.md).

# FAQ

CAS Advanced Police & Law System FAQ: mugshots, languages, F6 and photo mode, moving points, offline prisoners, search with CAS Advanced Inventory, syn\_society, RSG law jobs and common fixes.

[Back to the guide](/script-documentation/cas-police/cas-advanced-police-and-law-system.md)

### Why is there no mugshot camera?

RedM gives scripts no way to turn a game camera shot into a picture the book can show. So a citizen's photograph is a picture link. Take a screenshot, upload it to Discord or Imgur, open the citizen's file in the book, click "Add a photograph", paste the link and press ENTER.

Only links that start with `https://` and come from a host in `Config.Book.photoHosts` are accepted (by default `cdn.discordapp.com`, `media.discordapp.net`, `i.imgur.com` and `imgur.com`). Add your own host to that list if you use another one. The photograph also shows on the public wanted notice. A rank needs the `mugshot` permission to add one.

### How do I add a language?

The script ships with English, Turkish, German, French, Spanish and Brazilian Portuguese (`locales/`). To add one:

1. Copy `locales/en.lua` to a new file, for example `locales/it.lua`.
2. Change the table name on the fourth line from `Locales.en = {` to `Locales.it = {`. A name with a dash needs brackets, like `Locales['pt-br'] = {`.
3. Translate the text on the right of each `=`. Keep every `%s`, they are filled in by the script in order.
4. Set `Config.Locale = 'it'` and restart cas-police.

Every file in `locales/` loads by itself. A line you do not translate falls back to English, so you can translate a bit at a time. The prompt texts (the lines starting with `pr_`) must stay plain letters, because the game's prompt font cannot draw special signs.

### Why does F6 not open photo mode any more?

While you can use the cuffs, cas-police takes F6 (cuff) and L (drag) so photo mode and the player menu do not open in the middle of an arrest. That is a lawman on duty (any lawman when `Config.Duty.requireForCuffs = false`), a bounty hunter when `Config.Cuff.hunterCanCuff = true`, and admins. Off duty, F6 and L work as normal again. The one exception: when an off-duty lawman faces a player close enough to cuff, F6 tells him he is off duty instead of opening photo mode.

Admins include framework admins (VORP group admin, superadmin or god; RSG admin or god), so on an admin's character the keys are always taken. To use other keys, change `Config.Keys.cuff` and `Config.Keys.drag` to other RedM control hashes.

### How do I move a duty station, a cell or any other point?

Stand where the point should be and type `/lawcoords` (admins only). It prints `vector4(x, y, z, heading)` in the chat and in the F8 console. Paste it into the config: a `vector4` field takes it as it is, a `vector3` field takes the first three numbers. Restart cas-police.

Stations, desks and lockers are in `config/offices.lua`. Cells, release points, the release guard, the jail yard, work spots, transport points and the escape guards are in `config/jails.lua`. For a polygon (a region or a jail yard), walk the border and paste the points in order around it.

### What happens when a prisoner logs out?

His sentence is saved in the database, so it survives a logout and a server restart.

* With `Config.Jail.timeCountsOffline = true` the clock keeps running while he is away. If his time runs out while he is gone, he is released when he comes back (in release mode `'guard'`, he goes to the release guard).
* With `false` the clock pauses until he returns.

When he returns he is put back in a cell. If he logged out after an escape stood, the `addTimeMinutes` (15) are added first. A player who logs out in cuffs comes back in cuffs, as long as neither the server nor cas-police restarted in between.

### Does search work with the CAS Advanced Inventory?

Yes. On VORP, cas-police opens the target through the vorp\_inventory exports, which the CAS Advanced Inventory provides in its place. The `Config.Search.blockedItems` list is handed to the inventory as its blacklist, and cas-police also returns any blocked item that leaves the target during the search. The same goes for the stock vorp\_inventory. On RSG the search opens rsg-inventory.

Money is never reachable in a search. VORP and RSG keep the framework cash outside the inventory, and with `Config.Search.blockMoney = true` the money items of both frameworks (cash, dollars, cents, gold, gold bars, blood money, money clips) are blocked as well. Put any other item that must stay with the player in `blockedItems`.

### We use syn\_society. What changes?

Set `Config.Society.mode = 'syn'` in `config/offices.lua`. Then:

* The marshal's desk is off. Use syn\_society's own boss menu to hire, fire and pay.
* Fines and bounty payouts go into and out of syn\_society's ledger table (`Config.Society.syn.ledgerTable`, by default `society_ledger`), on the row of the office's `hireJob` (or its first job).
* cas-police pays nothing on its own pay roll.
* Duty, stations, ranks, the records book, the jail and the office lockers work as before.

### How do I run one statewide office on RSG with vallaw, rholaw, blklaw, strlaw and stdenlaw?

The default `config/offices.lua` already does this. Its one office `marshal` lists `vallaw`, `rholaw`, `blklaw`, `strlaw` and `stdenlaw` among its jobs, and in statewide mode any rsg-core job of type `leo` belongs to it as well. It has duty stations in all eight towns, so a lawman of any of those jobs can go on duty at any sheriff's office.

Two things to know:

* **Ranks.** The office sets no `ranks`, so on RSG it uses the grades of its first job that exists in `rsg-core/shared/jobs.lua` (with the stock jobs that is `vallaw`), with pay 0, because rsg-core pays its own wages. If you want cas-police to pay per day on duty, give the office its own `ranks` with pay.
* **Swearing in.** The desk gives new men `hireJob`. The default `'sheriff'` is not a stock RSG job, so the desk falls back to the first job of the list that exists (`vallaw`). Set `hireJob` to the job you want new men to get.

If each town's job should only work its own town, use regional mode instead, with one office per job and a region for each.

### A lawman cannot go on duty. Why?

* His job is not in the `jobs` of any office (the names are compared without letter case).
* `stationsEnabled = true` and he is not within a station of his own office (6 meters by default). `/onduty` needs the station too.
* He is cuffed or in jail (the duty prompt does not show then).

### A hunter cannot file a capture and is told "The ledger cannot cover that."

The bounty is paid out of the ledger of the lawman's office, and with `emptyBehavior = 'stop'` a ledger never goes below zero. Feed the ledger (fines, or a deposit at the marshal's desk), set `emptyBehavior = 'overdraft'`, or set `Config.BountyHunter.paidFromLedger = false` to pay hunters without touching the ledger. The hunter keeps his claim and can file again.

### The public wanted notices do not show, or do not go away.

* `Config.Warrants.publicFeed.enabled` must be `true`.
* A notice posts to the `publicWarrant` or `publicBounty` URL in `Config.Webhooks`, else to `Config.Warrants.publicFeed.url`, else to `Config.Webhooks.master`. Set `publicFeed.url` (or the two action URLs) to your public channel, or the notices land in your master channel. The `publicWarrant` and `publicBounty` actions must also be `enabled`.
* A notice is deleted through the same webhook that posted it. If you changed those URLs while warrants were open, the old notices stay; delete them by hand.

### Can I change a charge without a restart?

Yes. Add the player's steam hex to `Config.Book.penalCodeEditors` (admins can already). He opens the Penal code page of the book, changes or adds charges and saves. Every office gets the new code at once. Changes made in the book win over `config/penalcode.lua` for those charges; see [Configuration](/script-documentation/cas-police/configuration.md#editing-the-code-inside-the-book).
