Scripts Guides
Preview

HOW GENERATE CREATION PREVIEW

With onex-creation, there’s a built-in tool that helps you generate clothing previews automatically. This works with any clothing files or packs you have—no manual work required!


When you first open the creation menu, you’ll see a placeholder image for clothes:

Clothes Placeholder Image

This placeholder image shows up when the preview for a clothing item isn’t available. If the specific preview file for that item is missing in onex-creation/preview/, you’ll see this placeholder instead of the actual preview. Once the preview files (in .webp format) are available in the folder, they will automatically appear.


HOW TO GENERATE CLOTHES PREVIEWS

You might be wondering how to get these preview images. Let’s go through the process step-by-step:

This process is called “shooting” clothes previews. For best results, we recommend using a localhost server (meaning you’re running both FiveM and the server on the same computer).

CHOOSE YOUR ENVIRONMENT

USING A LOCALHOST SERVER

A localhost server is ideal for this process. This means you’ll run FiveM and host the server on the same computer. No need to transfer everything! You can even use the same server you’re running on a VPS or any standalone server. Just make sure to add the required dependencies, onex-creation, and your clothing pack.

CAN YOU SHOOT PREVIEWS ON A VPS?

While it’s possible to shoot previews on a VPS, we recommend doing this only for smaller tasks, like a single category of clothing (for example, just masks). A VPS might have latency issues that can slow down the process—sometimes even a ping of 70ms is too much for optimal preview shooting. On some VPS servers, the shooting process might get stuck due to network settings, security measures, or DDoS protection. However, this doesn’t mean you can’t use the menu on that VPS. You can still use all its features—just shoot the previews on your localhost and then copy the entire preview folder to the [onex-creation/preview/] directory on your VPS.

CONS OF USING A VPS FOR SHOOTING :

LocalhostVPS
Shooting time is up to 80% fasterGenerally slower than localhost (but speed varies by VPS)
Preview quality is 100%Preview quality might decrease due to network, hardware, and latency factors
Smooth and error-freeSome VPS servers may face issues due to security settings or DDoS protection, which can disrupt the shooting process or event totally not work

LINUX OPERATING SYSTEM

If you're using a Linux Operating System and want to use these shooting features, whether on localhost or not, you'll need to run the following command in the Linux terminal:

If your system requires sudo, run the command with it; otherwise, you can skip sudo:

sudo apt update
sudo apt install ffmpeg

ENABLEING SHOOTING COMMAND

Open file onex-creation/shared/studio.lua, you will find this at top Studio.Commads enable like below example and name is the command name .

Before opening servers for player disable this command so palyer cant acess this command
Studio.Commands = {
    enable = true,
    name = 'shootclothes'
}

COMMAND GUIDE

Use these commands to quickly preview clothing items within your FiveM script. Each command allows you to specify categories and ranges to fine-tune what appears.


PREVIEW ALL CLOTHING ITEMS

To preview all available clothing items, use this simple command:

t/shootclothes

Note: This command will generate previews for both male and female models by default.


PREVIEW SPECIFIC CATEGORY

You can also focus on a specific clothing category like shoes, masks, or accessories. Here are the available categories:

  • mask
  • hair
  • arms
  • legs
  • bags
  • shoes
  • accessory
  • shirt
  • armor
  • torso
  • hat
  • glass
  • ear
  • watch
  • bracelet
  • beard
  • eyebrow
  • makeup
  • blush
  • face
  • face2
  • race
t/shootclothes category_name

For example, to preview all bags:

t/shootclothes bags

PREVIEW A SINGLE ITEM IN A CATEGORY

To preview a specific item within a category, use its item number.

t/shootclothes category_name item_number

Example: To preview item 23 in the mask category:

t/shootclothes mask 23

PREVIEW A RANGE OF ITEMS IN A CATEGORY

You can also specify a range of items within a category. Just provide the start and end numbers.

t/shootclothes category_name start_number end_number

Example: To preview items 23 to 34 in the shoes category:

t/shootclothes shoes 23 34

PREVIEW MALE OR FEMALE ONLY

By default, the shootclothes command shows both male and female previews. You can limit the previews to male or female only by specifying gender at the end:

t/shootclothes false false false gender

Example: To preview only female items:

t/shootclothes false false false female

To preview only female shirts, you would use:

t/shootclothes shirt false false false female

Tip: Use false to skip parameters you don't need. This allows for greater flexibility in creating commands tailored to your needs.

STARTING THE SHOOTING PROCESS

Once you've joined the server, initiate the shooting sequence by entering the command exactly as shown below:

Command Execution


After you enter the command, you will see that the shooting process has started like below:

Shooting Started

As the previews are generated, they will be saved automatically to the onex-creation/preview/ folder. Here’s a quick preview of how the files are saved:

Saving Previews

This step-by-step process will help you initiate, view, and manage the previews as they are stored for easy access and review within the designated folder.


⚠️

To stop the process its running, restart or stop the onex-creation script. If you halt the process before it completes, only the previews processed up to that point will be saved. For example, stopping midway may result in only 50 out of 100 emotes being saved.

Each animation preview is saved immediately after it’s processed, so you can safely stop the process at any point, and the saved previews will still be accessible in the menu.