UZ Scripts
uz_AutoShot

Introduction

All-in-one screenshot studio for FiveM. Captures clothing, props, tattoos, vehicles, objects, and appearance overlays with transparent backgrounds.

Free & Open Source | Dependencies: screenshot-basic, yarn | License: Apache 2.0

GitHubuz-scripts/uz_AutoShot

129


Overview

uz_AutoShot is a free, open-source screenshot studio for FiveM. It teleports your ped to an underground void with chroma key walls and studio lighting, goes through every drawable and texture, captures each one, and removes the background server-side to produce transparent PNGs. It covers clothing components, props, head overlays (facial hair, makeup, etc.), tattoos, vehicles with color selection, and world objects, on both the male and the female freemode ped.

A built-in wardrobe lets you browse the results, try items on your ped, and re-shoot broken thumbnails. Captures reach the server as latent events, and photos are served from the resource folder over FiveM's cfx-nui protocol, so any other script can show them with a plain <img src="...">. No HTTP server, no port forwarding.


Features


Installation

Download

Download uz_AutoShot.zip from the latest release and put the uz_AutoShot folder in your resources directory.

The folder must be named exactly uz_AutoShot (case-sensitive on Linux). The resource refuses to start under any other name. GitHub's Download ZIP button unpacks as uz_AutoShot-main; rename it or use the release zip.

Update server.cfg

ensure screenshot-basic
ensure uz_AutoShot

screencapture works as a replacement for screenshot-basic.

Start the Server

Node dependencies (pngjs) install automatically on first start through FiveM's built-in yarn. The UI is pre-built, no build step required.

Optional: with illenium-appearance or fivem-appearance running, your full appearance (tattoos included) is restored through that resource when the studio closes, and the tattoo list is read from illenium-appearance automatically.


Commands

CommandDescription
/shotmakerOpen capture studio. Select categories, adjust camera, start batch capture
/wardrobeOpen the wardrobe. Browse thumbnails, apply items, re-capture broken shots
/shotcar <model>Quick-capture a single vehicle by model name
/shotprop <model>Quick-capture a single world prop by model name

The names of /shotmaker and /wardrobe can be changed with Customize.Command and Customize.MenuCommand.

Permissions

Commands support FiveM's ACE permission system. Set Customize.AceRestricted = true in Customize.lua, then add to your server.cfg:

## Per player
add_ace identifier.license:YOUR_LICENSE command.shotmaker allow
add_ace identifier.license:YOUR_LICENSE command.wardrobe allow
add_ace identifier.license:YOUR_LICENSE command.shotcar allow
add_ace identifier.license:YOUR_LICENSE command.shotprop allow

## Or use a group
add_ace group.admin command allow
add_principal identifier.license:YOUR_LICENSE group.admin

With AceRestricted = true the server also rejects capture uploads from players without command.shotmaker.

Works with any FiveM identifier: license, steam, discord, fivem, etc.


Camera Controls

KeyAction
Left MouseRotate around subject
Right MouseRoll camera
Scroll WheelZoom in / out
W / SAdjust camera height
Q / EAdjust field of view
RReset camera to the category's default
CCopy the current camera values to the clipboard in Lua format

To save the framing for a category, click the camera icon on its row in the preview. On a row that is not active, the first click selects the category and moves the camera there; click again to save. Saved angles last for the session and are applied automatically when the batch reaches that category. Ped angles are saved per gender; a category without a saved angle for the current gender uses the one saved for the other gender.


Male & Female Ped

The Male / Female toggle in the preview header swaps the studio ped. Photos go to shots/male/ or shots/female/ accordingly. Turn on Capture both genders in the footer to shoot the selected ped categories for the current gender first, then the other gender, in one run. Vehicles and objects are captured once.


Tattoos

The Tattoos tab in the capture preview lists one category per body zone (Customize.TattooCategories), with the number of tattoos in each for the current gender. The tab only appears when a tattoo list is available:

  1. Customize.Tattoos, if you fill it in (same format as illenium-appearance's list), otherwise
  2. customize/tattoos.lua of illenium-appearance, read while that resource is running.

Each tattoo is shot alone on a bare-skin ped (Customize.TattooBody: underwear, barefoot) with its zone's camera preset (tattoo_torso, tattoo_back, tattoo_head, tattoo_left_arm, ...). Frame each zone once in the preview and save the angle, as with clothing.

Torso tattoos are split into Torso (Front) and Torso (Back) using the facing stored in the game's tattoo shop data. On first use F8 prints how many back-facing tattoos were found. Addon tattoos have no shop data and default to the front camera. If a tattoo lands in the wrong group, add it to Customize.TattooFacing and re-run that category:

Customize.TattooFacing = {
    ['MP_Example_M_000'] = 'back',   -- overlay name from the list (hashMale / hashFemale)
}

With ChromaKeyColor = 'magenta', pink or purple ink can be keyed out with the background. Switch to 'green' if your tattoo set has a lot of it.

The wardrobe has a Tattoos tab too. Click a thumbnail to try the tattoo on your ped, or use re-capture mode to re-shoot single tattoos.


Configuration

All settings live in Customize.lua:

SettingDefaultDescription
Customize.Command'shotmaker'Capture command name
Customize.MenuCommand'wardrobe'Wardrobe command name
Customize.AceRestrictedfalseRequire ACE permission for commands and capture uploads
Customize.RoutingBucket999Routing bucket used during capture
Customize.ScreenshotFormat'png'Output format: 'png', 'webp', or 'jpg'
Customize.ScreenshotQuality0.92Quality for webp / jpg (0.0 to 1.0)
Customize.TransparentBgtrueChroma key removal. Output is always PNG while this is on
Customize.ScreenshotWidth512Output image width
Customize.ScreenshotHeight512Output image height
Customize.CaptureAllTexturesfalseCapture all texture variants, not just texture 0
Customize.ChromaKeyColor'magenta'Chroma key color: 'green' or 'magenta'
Customize.BatchSize10Captures before each batch pause
Customize.BatchPauseWait2000Batch pause length in ms
Customize.GCInterval20Captures between garbage collection runs
Customize.LatentRate8000000Bytes/sec throttle per capture upload (the full-screen frame)
Customize.MaxPendingUploads2Uploads in flight before the capture loop waits for the server

Camera presets, green screen dimensions, studio lighting, the head chroma mask (Customize.HeadMask), clothing, prop, overlay and tattoo categories (Customize.TattooCategories, Customize.TattooBody, Customize.TattooFacing, Customize.Tattoos), vehicle settings, and the object list are all configurable in the same file.

On a remote server, keep Customize.LatentRate at or below your real upload speed (for example 2000000 for about 16 Mbit/s). See Troubleshooting.

On this page