Skip to content

Zerio-AB/fivem-greenscreener

 
 

Repository files navigation

fivem-greenscreener

A small script that allows you to take screenshots of every gta clothing, prop/object or vehicle against a greenscreen. You can use them for example in your inventory, clothing store or vehicle store.

Using the images

You are granted the freedom to utilize the images in your open-source projects with proper accreditation. For commercial usage, please reach out to me on Discord to discuss the conditions.

Key Features

  • Capture screenshots of every GTA clothing item, including addon clothing
  • Capture screenshots of all objects and props in GTA, including addon props
  • Capture screenshots of every vehicle in GTA, including addon vehicles
  • Screenshots are labeled comprehensively for seamless integration into your scripts
  • Minimalistic progress UI for user convenience
  • Almost completely invisible ped
  • Customizable camera positions through configuration settings
  • Option to enable cycling through texture variations
  • Configurable overwrite behavior - skip existing files or overwrite them
  • Automatic removal of the greenscreen backdrop (courtesy of @hakanesnn)
  • Utilizes a large greenscreen box (thanks to @jimgordon20)

Planned Updates

  • Feel free to share any ideas or suggestions for future enhancements!

Installation

Dependencies

Step 1

Simply place the resource in your resources folder.

Do not use a subfolder like resources/[scripts] as it will cause the script to malfunction.

Usage

Screenshot all clothing

Execute the command /screenshot to initiate the clothing screenshot process. Be patient as it may take some time to complete, and it's advisable not to interfere with your PC during this operation.

Screenshot specific clothing

Utilize the command /customscreenshot to capture a specific clothing item, with optional custom camera settings specified in the format outlined in config.json.

/customscreenshot [component] [drawable/all] [props/clothing] [male/female/both] [camerasettings(optional)]

/customscreenshot 11 17 clothing male {"fov": 55, "rotation": { "x": 0, "y": 0, "z": 15}, "zPos": 0.26}

/customscreenshot 11 all clothing male {"fov": 55, "rotation": { "x": 0, "y": 0, "z": 15}, "zPos": 0.26}

Screenshot objects/props

To screenshot objects or props, employ the command /screenshotobject [hash].

Example Usage: /screenshotobject 2240524752

Screenshot vehicles

Capture screenshots of vehicles using /screenshotvehicle [model/all] [primarycolor(optional)] [secondarycolor(optional)].

Example Usage: /screenshotvehicle all 1 1

/screenshotvehicle zentorno 1 1

Development

Code Style

This project uses ESLint and Prettier for consistent code formatting with the following standards:

  • Indentation: 1 tab (not spaces)
  • Quotes: Double quotes
  • Semicolons: Required
  • Line endings: LF (Unix style)

Available Scripts

After installing dev dependencies with yarn install:

  • yarn lint - Check for linting errors
  • yarn lint:fix - Automatically fix linting errors
  • yarn format - Format code with Prettier
  • yarn format:check - Check if code is properly formatted

Editor Configuration

The project includes .editorconfig for consistent editor settings across different IDEs.

Configuration

The script behavior can be customized through the config.json file:

Key Settings

  • overwriteExistingImages (boolean, default: true):

    • When true: Existing image files will be overwritten when regenerating screenshots
    • When false: Existing image files will be skipped, preventing unnecessary regeneration
    • Useful for large vehicle sets where you only want to generate new images for newly added vehicles
  • debug (boolean, default: false): Enable debug logging to see which files are being processed or skipped

  • includeTextures (boolean, default: false): Include texture variations in screenshot generation

Examples

Support the Project

If you wish to support this project, consider buying me a coffee on ko-fi. Your support is greatly appreciated! ❤️​

About

A fivem script that takes screenshots of every gta clothing, prop/object and vehicle

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 95.3%
  • HTML 2.0%
  • CSS 1.7%
  • Lua 1.0%