gpt-3.5-turbo-0301· 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 make a task play animation "missfam4", "base" only on the upper body, and make it stay until it's cleared, you can use the following code:
codelocal upperBodyAnim = "missfam4" local baseAnim = "base" -- Start the animation on the upper body TaskPlayAnimAdvanced(PlayerPedId(), upperBodyAnim, "anim@heists@fleeca_bank@ig_10", vector3(0.0, 0.0, 0.0), vector3(0.0, 0.0, 0.0), 8.0, -8.0, -1, 49, 0, 0, 0, 0) -- Set the animation to loop TaskPlayAnimAdvanced(PlayerPedId(), baseAnim, "anim@heists@fleeca_bank@ig_10", vector3(0.0, 0.0, 0.0), vector3(0.0, 0.0, 0.0), -1, -8.0, -1, 49, 0, 0, 0, 0) -- Wait for the animation to finish Citizen.Wait(5000) -- Clear the animation from the upper body ClearPedSecondaryTask(PlayerPedId())This code starts the animation on the upper body first by using
TaskPlayAnimAdvanced, and then sets the base animation to loop by setting the duration to -1. It waits for 5 seconds before clearing the animation from the upper body.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.