Binding an animation/emote to a key?

Hey was just wondering if i could get some help on binding an animation to a key, I know pointing is bound to B but what if i want to bind amb@world_human_hang_out_street@female_arms_crossed@idle_a to a key? ( or any other emote/anim ? Thanks in advance!

You can put this code anywhere on client-side, so when a user clicks [E] he will play the animation :slight_smile:

Citizen.CreateThread(function()
 while true do
    Citizen.Wait(15)
    if IsControlJustPressed(0, 38) then -- 0,38 is E
       -- Play the animation using TaskPlayAnim
    end
 end
end)

Hope it works out for you :slight_smile:

1 Like

Can not get this to work…

This Works…

TaskStartScenarioInPlace(GetPlayerPed(-1), "WORLD_HUMAN_JOG_STANDING", 0, false)

But this doesn’t

TaskPlayAnim(playerPed, 'special_ped@mountain_dancer@monologue_1@monologue_1a', 'mtn_dnc_if_you_want_to_get_to_heaven', 1.0, -1, -1, 50, 0, false, false, false)
1 Like

dont worked for me pls help

http://prntscr.com/ms7b6m This is my client.lua file

u need to load the anim dict