Skip to the content
Docs

Photos & Screenshots

On this page9

Two separate questions:

  1. How is a picture taken? → Config.ScreenshotSystem (in config.lua).
  2. Where is it stored? → ServerConfig.PhotoHost (in config_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

KeyDefaultAllowed
Config.ScreenshotSystem'auto'auto · builtin · screencapture · screenshot-basic · none

'auto' tries builtin first, then screencapture, then screenshot-basic.

OptionNeedsNotes
builtinnothingOur own NUI game view. Self-tested before first use. The default, and the one to keep unless you already run something else.
screencapturethe screencapture resourceUsed through its exports only — we never bundle it.
screenshot-basicthe screenshot-basic resourceUnmaintained, and it costs GPU while running.
none—No photos at all. Camera reports still work, without a picture.

Storing the picture

KeyDefaultAllowed
ServerConfig.PhotoHost'local''local' · 'fivemanage' · 'discord' · 'custom' · 'none'
OptionWhere the picture livesTrade-off
localyour own database, recognition_photos, as data-URI textNothing extra to set up, nothing leaves your server. Costs database space.
fivemanageFivemanage storageNeeds an API key. Off-site.
discorda Discord webhookLinks expire, so they are refreshed when a photo is viewed. Off-site.
customyour own code in bridge/screenshot_server.luaAnything you like.
nonenowhereReports print without a photo.

Photo quality and size

lua
ServerConfig.Photo = {
    Encoding = 'webp',
    Quality  = 0.75,
    MaxWidth = 640,
    MaxBytes = 200000,
}
KeyDefaultAllowedWhat it does
Encoding'webp''webp' · 'png'Image format.
Quality0.750.1–1.0Compression quality.
MaxWidth640pixelsPictures are scaled down to this width.
MaxBytes200000bytes (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

lua
ServerConfig.Fivemanage = {
    ApiKey = '',                  -- convar: recognition_fivemanage_key
    Path   = '5code-recognition', -- folder in your Fivemanage storage
}
cfg
set recognition_fivemanage_key "YOUR_KEY_HERE"

Discord photo hosting

lua
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.

See Writing a Custom Adapter.

Photos on camera reports

KeyDefaultAllowedWhat it does
Config.HiddenCamera.Phototruetrue / falseTry to add a photo of the target to the report.
Config.HiddenCamera.PhotoWindowSeconds5secondsHow long to wait for the target to be on screen.
Config.Report.ShowPhototruetrue / falseShow 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.