Client Exports
RunAnimationById
If you want to get rid of unnecessary animation requesting in another script, you can use the function from vms_anims by specifying the animation ID from the in-game panel and specifying parameters.
-- @param {id: number}: Animation id displayed on each animation in the menu
-- @param {disableCancel: boolean}: Ability to cancel animation at any time (true = cannot cancel animation / false = can cancel the animation)
-- @param {time number}: Animation duration, if you want infinite animation set -1, otherwise value given in milliseconds
-- @param {flag: number}: Animation flag: https://docs.fivem.net/natives/?_0xEA47FE3719165B94
-- @param {disableAdjusting: boolean}: Is the player to be able to adjust the position of the animation with a button or command
-- @param {syncedOptions: table}: Options for synced animation
-- selecting: Is the player to be able to choose the player
-- force: Will the other player have forced acceptance without choice
-- player: You can specify the ID of the player to be selected for animation
exports['vms_anims']:RunAnimationById(
id,
disableCancel,
time,
flag,
disableAdjusting,
syncedOptions
)RunAnimation
If you want to get rid of the unnecessary animation request in another script, you can use the function from vms_anims, specifying the name of the animation and specifying the required parameters.
Cancel
If you have run an animation using the RunAnimationById export, and you want to cancel it, you can do so using the Cancel export
isMenuOpened
Checking if the player has the menu running
getAnimData
Get information about the animation currently running
Last updated
Was this helpful?