Kinetix AI Emote Creator for FiveM - Documentation
GitHubDiscord
  • ๐Ÿ–๏ธIntroduction
  • ๐Ÿ‘€Overview
  • ๐Ÿš€Get started
  • ๐Ÿ‘จโ€๐Ÿ’ปDeveloper Portal
    • Game/App Space - Creation
    • Game/App Space - Settings
  • โš™๏ธCore
    • User Creation
    • Emote generation
    • Webhook
    • User bag
    • Sharing emote
    • Validation / Retake process
    • Paywalls
    • File download
    • Playing animations
  • ๐Ÿ–ฅ๏ธInterface
    • Events
      • Server
      • Client
    • Render functions
      • CreateRootMenu()
      • CreateQRCodeAlert(url)
      • CreateMainMenu()
      • CreateEmoteBagMenu(emotes)
      • OpenEmoteBagMenu()
      • CreateProcessValidationMenu(process)
      • CreateEmoteCreatorMenu(processes)
      • CreateErrorMenu(statusCode, error)
      • NotifyProcessUpdate(process)
      • NotifyEmoteReady(data)
      • CreateEmoteWheel(emotes)
  • ๐Ÿ”ŒIntegrations
  • ๐ŸงชLive Demo
  • ๐Ÿ“šVideo recording Guidelines & AI Specs
    • AI Emote Creator - specifications
    • Video recording guidelines
Powered by GitBook
On this page
  1. Core

Playing animations

The code responsible for playing animations is the following :

RegisterCommand('kinetix_anim', function(source, params)
    local dictName = params[1] .. '@animation'
    local animName = 'clip'
    local retry = 0

    if not HasAnimDictLoaded(dictName) then
       RequestAnimDict(dictName)
    end

    while not HasAnimDictLoaded(dictName) and retry < 50 do
        Wait(0)
       retry = retry + 1
    end
    retry = 0
    ClearPedTasks(PlayerPedId())
    local animFlag = IsPedInAnyVehicle(PlayerPedId()) == 1 and 16 + 32 or 0
    if IsPedOnAnyBike(PlayerPedId()) then return end
    TaskPlayAnim(PlayerPedId(), dictName, animName, 8.0, -8.0, -1, animFlag, 0.0, false, false, false)
end)
PreviousFile downloadNextInterface

Last updated 11 months ago

A specific command with the emote uuid as a parameter needs to be called in order to play animations. This is the command used by the .

The command will check that the anim dict has been loaded. The will also load anim dicts, in order for the client to have every custom animations preloaded to ensure network synchronization. The anim dict must not be unloaded after playing. This method will use to control animations. In the case the user is in a vehicle, flags 16 and 32 will be used to only animate upper body and void clipping through the vehicle. In the case the user is on a bike, the playing is disabled.

โš™๏ธ
emote wheel
emote_ready event
animation flags