Skip to main content

GameEntity::getEntityAnimDuration

Not available on SYNC MP yet

This member is part of the RAGE:MP API but SYNC MP does not implement it yet (Client-side JavaScript). Calling it does nothing or throws.

Client-side function

JavaScript​

Required Params​

  • animDict: string - The name of the animation dictionary.
  • animName: string - The name of the animation.

Return value​

  • number - The duration of the specified animation in seconds.

Syntax​

mp.game.entity.getEntityAnimDuration(animDict, animName)

Example​

// Example animation dictionary and name
let animDict = mp.game.joaat("anim@mp_ferris_wheel");
let animName = mp.game.joaat("idle_a");

// Get the duration of the specified animation
let duration = mp.game.entity.getEntityAnimDuration(animDict, animName);
mp.gui.chat.push("Animation Duration: " + duration + " seconds");