Security HUD
System Watchdog
×
Threads Scanned
-- / --
SYS. LOAD --%
AI SHIELD ACTIVE
DMCA Policy
×

📋 DMCA Compliance

This platform and community fully complies with the Digital Millennium Copyright Act (DMCA) and international copyright laws. We take all copyright protection seriously.

🛡️ Copyright Protection

If you believe a posted item belongs to you or violates your copyright, you may file a DMCA takedown request through our official channels. Upon receiving a valid claim, the infringing content will be removed within 24 hours.

What's new
×
Fiveguard

Question How to animate

JustKaym

Member
Joined
Aug 11, 2024
Messages
6
Reaction score
0
Points
156
Location
Dominican Republic
So i got this code:

RegisterCommand(‘carry’, function ()

local animDict = "anim@heists@fleeca_bank@ig_7_jetski_owner:eek:wner_idle"

RequestAnimDict(animDict)
while (not HasAnimDictLoaded(animDict)) do Citizen.Wait(1) print('loop 1') RequestAnimDict(animDict) end

local ped = PlayerPedId()

TaskPlayAnim(ped, animDict, "base", 2.0, 2.0, 50000000, 51, 0, false, false, false)

end, false)

how can I make the ped play the animation? the loop prints in console but the animation doesn’t play, I have a dictionary of animations but I dont know how to make It so the script takes the animation from the dictionary and play it.

I am trying to play the animation owner_idle of this:
{
“DictionaryName”: “anim@heists@fleeca_bank@ig_7_jetski_owner”,
“Animations”: [
“owner_reaction”,
“owner_idle”
]
},
 

sh4dow_g2

Gold Elite
Joined
Jan 23, 2022
Messages
91
Reaction score
134
Points
256
Location
United Kingdom
Try this

RegisterCommand('carry', function()
local animDict = "anim@heists@fleeca_bank@ig_7_jetski_owner"
local animName = "owner_idle"

-- Request the animation dictionary
RequestAnimDict(animDict)

-- Wait for the animation dictionary to load
while not HasAnimDictLoaded(animDict) do
Citizen.Wait(100) -- Short wait to prevent spamming
print('Loading animation dictionary: ' .. animDict)
end

-- Get the player's ped
local ped = PlayerPedId()

-- Play the animation
TaskPlayAnim(ped, animDict, animName, 8.0, -8.0, -1, 49, 0, false, false, false)

-- Optionally, you can clear the animation dictionary to free up memory
-- RemoveAnimDict(animDict)
end, false)
 
Top