Depending on how you are trying to trigger the animations yes.
Here is a quick example for the middle finger animation using a RegisterCommand in nothing but a client.lua
“/bird”
RegisterCommand("bird",function(source, args)
local ad = "anim@mp_player_intselfiethe_bird"
local player = GetPlayerPed( -1 )
if ( DoesEntityExist( player ) and not IsEntityDead( player )) then
loadAnimDict( ad )
if ( IsEntityPlayingAnim( player, ad, "idle_a", 3 ) ) then
TaskPlayAnim( player, ad, "exit", 8.0, 1.0, -1, 49, 0, 0, 0, 0 )
Wait (100)
ClearPedSecondaryTask(GetPlayerPed(-1))
else
TaskPlayAnim( player, ad, "idle_a", 8.0, 1.0, -1, 49, 0, 0, 0, 0 )
Wait (500)
end
end
end, false)
I am working on the animations you have here but it seems to keep looping with the idle_a for some reason.
RegisterCommand("golf",function(source, args)
while true do
Wait(0)
local ad = "amb@world_human_golf_player@male@idle_a"
local ada = "idle_a"
local ad2 = "mini@golfai"
local ad2a = "iron_idle_a"
local ad4 = "amb@world_human_drinking@beer@male@exit"
local basePlayer = GetPlayerPed(-1)
if ( DoesEntityExist( basePlayer ) and not IsEntityDead( basePlayer )) then
loadAnimDict( ad )
loadAnimDict( ad2 )
loadAnimDict( ad4 )
if (IsEntityPlayingAnim(basePlayer, ad, ada, 3)) then
TaskPlayAnim(basePlayer, ad4, "exit", 8.0, 1.0, -1, 49, 0, 0, 0, 0)
Wait(1000)
ClearPedSecondaryTask(basePlayer)
else
TaskPlayAnim(basePlayer, ad, ada, 8.0, 1.0, -1, 49, 0, 0, 0, 0)
end
end
end
end, false)
Also if you dont want to have to type out the whole RequestAnims etc. You can use this function somewhere in the code, Then just put loadAnimDict(yourDictHere) at the top before anything relating to the choosen Dict.
function loadAnimDict(dict)
while (not HasAnimDictLoaded(dict)) do
RequestAnimDict(dict)
Citizen.Wait(5)
end
end