Animation

The Animation library provides animation playback and management for peds.

Side: Client

Functions

Play

Plays an animation on a ped.

Bridge.Anim.Play(ped, dict, anim, flag, duration, blendIn, blendOut, playbackRate, lockX, lockY, lockZ)
ParameterTypeDescription
pednumberPed entity handle
dictstringAnimation dictionary
animstringAnimation name
flagnumberAnimation flag (optional, default 0)
durationnumberDuration in ms (optional, -1 for full)
blendInnumberBlend in speed (optional)
blendOutnumberBlend out speed (optional)
playbackRatenumberPlayback rate (optional)
lockXbooleanLock X movement (optional)
lockYbooleanLock Y movement (optional)
lockZbooleanLock Z movement (optional)

Stop

Stops an animation on a ped.

Bridge.Anim.Stop(ped, dict, anim)
ParameterTypeDescription
pednumberPed entity handle
dictstringAnimation dictionary
animstringAnimation name

IsPlaying

Checks if a ped is playing a specific animation.

local playing = Bridge.Anim.IsPlaying(ped, dict, anim)
-- Returns: boolean
ParameterTypeDescription
pednumberPed entity handle
dictstringAnimation dictionary
animstringAnimation name

Example

local ped = PlayerPedId()
Bridge.Anim.Play(ped, 'amb@world_human_drinking@coffee@male@idle_a', 'idle_c', 49)
Wait(3000)
Bridge.Anim.Stop(ped, 'amb@world_human_drinking@coffee@male@idle_a', 'idle_c')