gpt-4-0314· openai
Suzhen/CodeChat
fivem scripting I'm trying to Task Play Anim "missfam4", "base" so its only upperbody…
- User
fivem scripting I'm trying to Task Play Anim "missfam4", "base" so its only upperbody and the animation stays until its cleared
- Assistant
To play the animation only for the upper body and make it stay until it's cleared, you can use the "TaskPlayUpperAnim". Here's an example of how you can do this in a FiveM script:
local playerPed = PlayerPedId() local animDict = "missfam4" local animName = "base" local upperBodyOnly = true -- set to true for upper body only animation -- Load the animation dictionary RequestAnimDict(animDict) while not HasAnimDictLoaded(animDict) do Citizen.Wait(100) end -- Play the animation TaskPlayUpperAnim(playerPed, animDict, animName, -1, -1, -1, 49, 0, 0, 0, 0)This script utilizes the
TaskPlayUpperAnimfunction which has the following syntax:TaskPlayUpperAnim(Ped ped, char *animDictionary, char *animationName, int p3, int p4, int p5, int p6, int p7, Grm::EAnimFlag animFlag, int p9, int duration)To clear the animation, call the
ClearPedTasksfor the upper body animation:ClearPedTasks(playerPed)
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.