Photos & Screenshots
On this page9
Two separate questions:
- How is a picture taken? →
Config.ScreenshotSystem(inconfig.lua). - Where is it stored? →
ServerConfig.PhotoHost(inconfig_server.lua).
Pictures are used for two things: the photo on a hidden-camera report, and the picture test that clothing Auto-scan runs in its hidden studio.
Taking the picture
| Key | Default | Allowed |
|---|---|---|
Config.ScreenshotSystem | 'auto' | auto · builtin · screencapture · screenshot-basic · none |
'auto' tries builtin first, then screencapture, then screenshot-basic.
| Option | Needs | Notes |
|---|---|---|
builtin | nothing | Our own NUI game view. Self-tested before first use. The default, and the one to keep unless you already run something else. |
screencapture | the screencapture resource | Used through its exports only — we never bundle it. |
screenshot-basic | the screenshot-basic resource | Unmaintained, and it costs GPU while running. |
none | — | No photos at all. Camera reports still work, without a picture. |
Storing the picture
| Key | Default | Allowed |
|---|---|---|
ServerConfig.PhotoHost | 'local' | 'local' · 'fivemanage' · 'discord' · 'custom' · 'none' |
| Option | Where the picture lives | Trade-off |
|---|---|---|
local | your own database, recognition_photos, as data-URI text | Nothing extra to set up, nothing leaves your server. Costs database space. |
fivemanage | Fivemanage storage | Needs an API key. Off-site. |
discord | a Discord webhook | Links expire, so they are refreshed when a photo is viewed. Off-site. |
custom | your own code in bridge/screenshot_server.lua | Anything you like. |
none | nowhere | Reports print without a photo. |
Photo quality and size
ServerConfig.Photo = {
Encoding = 'webp',
Quality = 0.75,
MaxWidth = 640,
MaxBytes = 200000,
}| Key | Default | Allowed | What it does |
|---|---|---|---|
Encoding | 'webp' | 'webp' · 'png' | Image format. |
Quality | 0.75 | 0.1–1.0 | Compression quality. |
MaxWidth | 640 | pixels | Pictures are scaled down to this width. |
MaxBytes | 200000 | bytes (decoded) | Largest photo accepted. |
There is a matching transport limit in ServerConfig.Security.MaxPayloadBytes.
Raising MaxBytes without raising that too means large photos are dropped on the way
— ask support before you raise either.
Fivemanage
ServerConfig.Fivemanage = {
ApiKey = '', -- convar: recognition_fivemanage_key
Path = '5code-recognition', -- folder in your Fivemanage storage
}set recognition_fivemanage_key "YOUR_KEY_HERE"Discord photo hosting
ServerConfig.PhotoDiscord = {
Webhook = '', -- convar: recognition_photo_webhook
}A separate webhook, just for photos — not one of the seven log channels. Discord attachment links expire, so a photo is re-fetched when it is actually viewed.
Custom hosting
Set ServerConfig.PhotoHost = 'custom' and fill the 'custom' branch in
bridge/screenshot_server.lua. You get the encoded picture and return a URL or a
storage key; the script stores whatever you return and asks you for it again when a
report is viewed.
Photos on camera reports
| Key | Default | Allowed | What it does |
|---|---|---|---|
Config.HiddenCamera.Photo | true | true / false | Try to add a photo of the target to the report. |
Config.HiddenCamera.PhotoWindowSeconds | 5 | seconds | How long to wait for the target to be on screen. |
Config.Report.ShowPhoto | true | true / false | Show the photo on the paper when one exists. |
If no picture could be taken in the window, the report is printed without one. A report never fails because of a photo.
How often photos are taken
Photos are limited per player by the anti-spam limits in config_server.lua
(ServerConfig.RateLimits). An image upload is the most expensive thing a player's
game can send to the server, so leave that limit as it is.
Pictures for Auto-scan
The clothing classifier uses the same screenshot path to photograph its studio ped. It runs on the admin's own game, in a private routing bucket under the map, and nothing it photographs is stored as a picture — only the measurements it takes from them.
Settings for the run itself (framings, thresholds, batch pauses) are in
Config.Classifier; see Features → Clothing Classifier & Auto-scan.