Media Lib
The cdev_medialib resource does not need to be started on a production server. The cdev_lib and cdev_emotemenu resources do not depend on cdev_medialib to work. Additionally, the medialib resource will only work if the server is running on localhost.
How setup and use Media Lib
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, 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,
},Since you are using the GIF from a local folder, it is necessary that in the animation configuration you use thumbnail instead of thumbnailcdn.
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,
},Remember that since you are using a CDN, the thumbnail variable should be thumbnailcdn instead of thumbnail.
Last updated
