UZ Scripts
uz_AutoShot

HTTP API

REST API reference for uz_AutoShot. Manifest endpoints, filtering, photo existence checks, and directory structure.

HTTP API

The Node.js backend runs on http://127.0.0.1:3959 for API endpoints and upload processing. Photos are served via FiveM's native cfx-nui protocol, no port forwarding needed.


Endpoints

GET /api/manifest

Returns all captured photos.

GET http://127.0.0.1:3959/api/manifest

Response:

{
  "generatedAt": 1711234567890,
  "total": 2480,
  "items": [
    {
      "url": "https://cfx-nui-uz_AutoShot/shots/male/11/5_0.png",
      "file": "male/11/5_0.png",
      "gender": "male",
      "type": "component",
      "id": 11,
      "drawable": 5,
      "texture": 0
    },
    {
      "url": "https://cfx-nui-uz_AutoShot/shots/vehicles/adder.png",
      "file": "vehicles/adder.png",
      "gender": "unisex",
      "type": "vehicle",
      "id": 0,
      "drawable": 0,
      "texture": 0,
      "model": "adder"
    }
  ]
}

GET /api/manifest/:gender

Filter by gender.

GET http://127.0.0.1:3959/api/manifest/male
GET http://127.0.0.1:3959/api/manifest/female

GET /api/manifest/:gender/:type/:id

Filter by specific category. type can be component, prop, or overlay.

# All male tops (component 11)
GET http://127.0.0.1:3959/api/manifest/male/component/11

# All female hats (prop 0)
GET http://127.0.0.1:3959/api/manifest/female/prop/0

# All male facial hair (overlay 1)
GET http://127.0.0.1:3959/api/manifest/male/overlay/1

Response:

{
  "generatedAt": 1711234567890,
  "total": 55,
  "items": [
    { "url": "https://cfx-nui-uz_AutoShot/shots/male/11/0_0.png", "drawable": 0, "texture": 0 },
    { "url": "https://cfx-nui-uz_AutoShot/shots/male/11/1_0.png", "drawable": 1, "texture": 0 },
    { "url": "https://cfx-nui-uz_AutoShot/shots/male/11/2_0.png", "drawable": 2, "texture": 0 }
  ]
}

GET /api/exists

Check if a specific photo has been captured.

GET http://127.0.0.1:3959/api/exists?gender=male&type=component&id=11&drawable=5&texture=0

Response:

{ "exists": true }

GET /api/stats

Summary statistics for all captured photos.

GET http://127.0.0.1:3959/api/stats

Response:

{
  "total": 2480,
  "byGender": { "male": 1200, "female": 980, "unisex": 300 },
  "byType": { "component": 1600, "prop": 280, "overlay": 200, "vehicle": 250, "object": 150 }
}

Photo URLs (cfx-nui)

Photos are served via FiveM's native cfx-nui protocol, no HTTP server needed for image delivery.

https://cfx-nui-uz_AutoShot/shots/male/11/5_0.png
https://cfx-nui-uz_AutoShot/shots/female/prop_0/3.png
https://cfx-nui-uz_AutoShot/shots/male/overlay_1/3.png
https://cfx-nui-uz_AutoShot/shots/vehicles/adder.png
https://cfx-nui-uz_AutoShot/shots/objects/prop_bench_01a.png

After generating new photos, restart the resource (ensure uz_AutoShot) so FiveM indexes the new files. Photos are cached on the client automatically.


Directory Structure

Photos are organized in the shots/ directory:

shots/
├── male/
│   ├── 2/              # Hair (component 2)
│   │   ├── 0_0.png     # drawable 0, texture 0
│   │   ├── 1_0.png     # drawable 1, texture 0
│   │   └── 2_1.png     # drawable 2, texture 1
│   ├── 11/             # Tops (component 11)
│   ├── prop_0/         # Hats (prop 0)
│   └── overlay_1/      # Facial Hair (overlay 1)
│       ├── 0.png       # drawable 0
│       └── 1.png       # drawable 1
├── female/
│   └── ...
├── vehicles/
│   ├── adder.png
│   ├── zentorno.png
│   └── ...
└── objects/
    ├── prop_bench_01a.png
    ├── prop_laptop_01a.png
    └── ...

Naming convention:

  • Components: {gender}/{componentId}/{drawable}_{texture}.png
  • Props: {gender}/prop_{propId}/{drawable}_{texture}.png
  • Overlays: {gender}/overlay_{overlayIndex}/{drawable}.png (no texture suffix)
  • Vehicles: vehicles/{modelName}.png
  • Objects: objects/{modelName}.png

GTA V Category Reference

Components (clothing)

Component IDLabelCamera Preset
2Hairhair
1Maskmask
3Arms / Glovesarms_gloves
4Pantslegs
5Bagsdecals
6Shoesshoes
7Accessoriesaccessories
8Undershirttops
9Body Armorbody
10Decalsdecals
11Topstops

Props (accessories)

Prop IDLabelCamera Preset
0Hatshats
1Glassesglasses
2Earsears
6Watcheswatches
7Braceletsbracelets

Head Overlays (appearance)

Overlay IndexLabelCamera PresetColor Type
0Blemishesface_overlayHair
1Facial Hairface_overlayHair
2Eyebrowsface_overlayHair
3Ageingface_overlayHair
4Makeupface_overlayMakeup
5Blushface_overlayMakeup
6Complexionface_overlayHair
7Sun Damageface_overlayHair
8Lipstickface_overlayMakeup
9Moles & Frecklesface_overlayHair
10Chest Hairchest_overlayHair
11Body Blemisheschest_overlayHair

Vehicle Classes (auto-detected)

Class IDLabel
0Compacts
1Sedans
2SUVs
3Coupes
4Muscle
5Sports Classics
6Sports
7Super
8Motorcycles
9Off-Road
10-22Industrial, Utility, Vans, Boats, Aircraft, Service, Emergency, Military, etc.

On this page