Repository navigation
v1.0.0
First public release. uz_MugShot takes a 512×512 transparent mugshot of every character the moment their look changes, and serves it to any script with one export. It replaces GTA's 128px headshot and works as a drop-in for MugShotBase64.
Highlights
- Hands-free capture. The client fingerprints everything the camera sees (face, hair, makeup, upper body, hats, glasses) and compares it with the stored photo. A change made in any clothing, barber or skin script is captured as its menu closes, without adding code to that script. Pants and shoe changes are ignored.
- Never in the way. Captures wait until no menu, script camera, fade, pause menu, cutscene or loading screen owns the screen. The player sees a curtain for about a second.
- Studio quality. A clone of the ped is photographed in a chroma studio with fixed framing and lighting. The background is keyed on the server with soft edges and cleaned outlines.
- Weather and time stay put. Renewed-Weathersync, qb-weathersync and qbx_weathersync are paused during the shot, and the clock and weather are restored afterwards.
- Stored per character. Photos live in
shots/<citizenid>/, no database needed. An in-memory cache, latent events and per-player rate limits keep it cheap. - Qbox, QBCore and ESX, auto-detected, including frameworks that start after uz_MugShot.
- Update notice. The server console tells you when a newer release is out on GitHub.
Exports
GetPhotoDataURI(id)on server and client, with a citizenid, server ID or pedGetPhotoByCitizenId(citizenid)on the client, for character selectorsCaptureAndReturn(id)for a fresh photo on ID card itemsHasPhoto(id),ForceRecapture(id)and the/remugshot [id]admin commandTriggerInitialCapture(source), an optional spawn hookuz_mugshot:capturedserver event to refresh open UIs when a photo changes
Coming from MugShotBase64
Remove MugShotBase64 and start uz_MugShot in its place. The manifest provides MugShotBase64, so every exports['MugShotBase64']:GetMugShotBase64(...) call keeps working:
- Players get their stored photo scaled to
Config.Compat.size, 128×128 by default. That keeps the string around 20 KB for scripts that save it in item metadata. - NPCs and players without a photo yet get GTA's native headshot, as before. The export never returns
nil.
Install
- Download
uz_MugShot.zipbelow and put theuz_MugShotfolder in your resources. The folder name must stay exactlyuz_MugShot. - Add it to
server.cfgafter your framework:ensure screenshot-basic ensure yarn ensure uz_MugShot add_ace group.admin command.remugshot allow - Start the server. Each character is photographed on their next login or appearance change.
Requires screenshot-basic, yarn and one of qbx_core, qb-core or es_extended.
Upgrading from an older build? Old shots/{cid}_mugshot.png files move into the new folder the first time they are read. The fingerprint now covers more of the face, so every character is recaptured once.
Docs: docs.uz-scripts.com/docs/free/uz-mugshot · Discord: discord.uz-scripts.com