Adding New Animations

Adding New Animations

⚠️

Quick Solution for Adding Animations

If you've used DPEmotes or RPEmotes before, here's a streamlined solution for adding animations:

  1. Open shared/animations/convert.lua.
  2. Paste your old animation into the appropriate table:
    • Use the Emotes table for PropEmotes and Emotes.
  3. For other animations, add them as you normally would.

Simplify the process of incorporating animations

Animation Template

The animations are located in the shared/animations folder. Each .lua file maps to a corresponding category in the menu.

-- Define a command configuration for "COMMAND_NAME"
["COMMAND_NAME"] = {
    "DICT",          -- Dictionary identifier (string)
    "ANIM",          -- Animation identifier (string)
    "LABEL",         -- Display label for the command (string)
 
    -- Animation options table
    animationOptions = {
        prop = "PROP",         -- Prop identifier to attach to the animation
        propBone = 0,          -- Index of the bone to attach the prop to
 
        -- Prop placement settings: position and rotation offsets
        propPlacement = {
            0.0, -- pos x: X-axis position offset
            0.0, -- pos y: Y-axis position offset
            0.0, -- pos z: Z-axis position offset
            0.0, -- rot x: Rotation around the X-axis
            0.0, -- rot y: Rotation around the Y-axis
            0.0  -- rot z: Rotation around the Z-axis
        },
 
        ptfxAsset = "example_asset",  -- Example particle effect asset
        ptfxName = "example_effect",  -- Example particle effect name
        ptfxNoProp = false,           -- Example boolean flag
        ptfxPlacement = {
            0.0, -- Example pos x
            0.0, -- Example pos y
            0.0, -- Example pos z
            0.0, -- Example rot x
            0.0, -- Example rot y
            0.0, -- Example rot z
            1.0  -- Example scale
        },
        ptfxInfo = "Example Info",    -- Example info text
        ptfxWait = 100,              -- Example wait time
        ptfxCanHold = false,         -- Example boolean flag
 
        emoteLoop = false,     -- Boolean flag: whether the emote should loop
        emoteMoving = false,   -- Boolean flag: whether the emote allows movement
 
        onlyInVehicle = false, -- Boolean flag: emote is only usable in a vehicle
        onlyOnFoot = false, -- Boolean flag: emote is only usable on foot
 
        musicURL = "", -- URL for music to be played while the emote is active. The music will loop. You can use a directory for xsound or a link such as YouTube.
 
        customMovementType = 1 -- Custom movement type flag; overrides default movement settings
    }
},