For the complete documentation index, see llms.txt. This page is also available as Markdown.

Media Lib

cdev_medialib is a tool for developers. With this tool, you can create GIF previews of new animations you add or of animations that are missing a preview in the emote menu.

How setup and use Media Lib

1

Enable DevTools Mode

The DevTools mode needs to be enabled in the cdev_emotemenu configuration file for you to access the DevTools options inside the in-game emote menu.

To enable DevTools mode, go to the file: cdev_emotemenu > public > shared > config.lua (Line 4) as shown in the example below.

 DevTools = true,  
2

Ensure Resources and Their Order in server.cfg

Now you will start the cdev_medialib resource in your server.cfg file, and it needs to be in exactly the same order as shown in the example below.

ensure cdev_lib
ensure cdev_emotemenuassets
ensure cdev_emotemenu
ensure cdev_medialib
3

Record the desired animation in-game

Now you will use the new DevTools options in the in-game emote menu to record the GIF of the new animation. Below is a video showing an example of a recording.

4

Using the Recorded GIF

First, locate the recorded GIF, which will be saved in the cdev_medialib/data/videos folder. After finding the recorded GIF, you will have two options. Below, I will explain both.

Option #1

Use the GIF from a local folder: First, you will copy the GIF found in the cdev_medialib/data/videos folder and paste it into the cdev_emotemenu/data/previews folder.

Now, go to the desired animation inside the Animations.lua file located at cdev_emotemenu/public/shared/Animations.lua and set the file name you saved in the animation’s configuration. Remember, the file needs to be in WEBP format. Below is an example.

{
    category = "generalanimations",
    id = "airguitar",
    thumbnail  = "airguitar.webp",
    label = "Air Guitar",
    firstperson = {
    
        anim = "air_guitar",
        dict = "anim@mp_player_intcelebrationfemale@air_guitar",
    },
    vip = true,
 },

Option #2

Use the CDN GIF:

You will upload your recorded GIF created with the medialib tool to a CDN and then configure the animation preview as shown in the example below.

 {
    category = "generalanimations",
    id = "airguitar",
    thumbnailcdn = "https://yourCDNLink.com/animations/airguitar.webp",
    label = "Air Guitar",
    firstperson = {
    
        anim = "air_guitar",
        dict = "anim@mp_player_intcelebrationfemale@air_guitar",
    },
    vip = true,
  },

Last updated