Scripts Guides
Preview

ANIMATION PREVIEW'S

The onex-emotes tool includes a built-in feature to generate animation previews automatically. It works with any emotes you have, including custom ones—no manual effort required!


FOLLOW THESE 2 STEPS:

  1. Set up Pre-recorded Animation Previews.

  2. Learn how to record animation previews yourself, whether for custom emotes or re-recording all emote animations.

SET UP PRE-RECORDED ANIMATION PREVIEWS

Open the !README.md file located in onex-emotes/!README.md. Inside, you'll find links to Pre-Recorded animations. Download them, and within preview.zip, you’ll find a preview folder. Move that folder into the onex-emotes directory.

Note
Don't worry about the file size (1.6GB). Many people get concerned about the size, but whether it's 1.6GB or more, it won’t affect server performance. Additionally, it won’t be downloaded when you initially connect to the server. The content is downloaded in small chunks as you explore the menu. For example, if you view 50 emotes, the game will download those animations, each around 1MB. Once downloaded, they are stored in the cache, so you won’t need to download them again. No need to worry about the size!

Now you can join server and you will see the animation preview working.

SHOOT ANIMATION PREVIEWS

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

This process is called “shooting” animations. 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-emotes, and if you have any custom emotes file.

CAN YOU SHOOT ANIMATIONS ON A VPS?

While it’s possible to shoot animations on a VPS, we recommend doing this only for smaller tasks, like shooting single animation (for example, just sitchair animation). 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-emotes/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

ENABLEING SHOOTING COMMAND

Open file onex-emotes/shared/studio.lua, you will find this at top Studio.Command 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.Command = {
    enable = true,
    name = 'shootanim'
}

COMMAND GUIDE

Use these commands to quickly shoot animaton.


SHOOT ALL ANIMATION

To shoot all available animation, use this simple command:

t/shootanim

SHOOT SPECIFIC CATEGORY ANIMATION

You can also focus on a specific animation category like expression, prop_emotes. Here are the available categories (out of the box).:

Check inside shared/emotes.lua their you find category name.

  • animal_emotes
  • dances
  • emotes
  • exits
  • expressions
  • placeholder
  • prop_emotes
  • shared_dances
  • shared_emotes
  • walks_styles
t/shootanim category_name

For example, to shoot all dances:

t/shootanim dances

SHOOT A SINGLE ANIMATION IN A CATEGORY

To shoot a specific animation(emote) within a category, use its item emote/animation name.

t/shootanim category_name emote_name

Example: To shoot beachring in category prop_emotes

t/shootanim prop_emotes beachring

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-emotes/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 while 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.

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.