> For the complete documentation index, see [llms.txt](https://aklgaming.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://aklgaming.gitbook.io/documentation/code-snippets/fix-animasi.md).

# Fix Animasi

```lua
RegisterCommand("animfix", function(source, args, rawCommand)
    local ped = GetPlayerPed(-1)
    local isDead = false

    if not IsEntityInAir(ped) then
        if not IsPedRagdoll(ped) then
            if not IsPedInAnyVehicle(ped) then
                ClearPedTasksImmediately(ped)
                ClearPedSecondaryTask(ped)
                SetPedCanPlayGestureAnims(ped, true)
            else
                exports['gusti-notify']:SendAlert('inform', 'You can\'t use this command while you\'re in a car.', 3000)
            end
        else
            exports['gusti-notify']:SendAlert('inform', 'You can\'t use this command if you\'re not standing.', 3000)
        end
    else
        exports['gusti-notify']:SendAlert('inform', 'You can\'t use this command if you\'re in the air.', 3000)
    end

end, false)

CreateThread(function()
    TriggerEvent('chat:addSuggestion', '/animfix', 'Use this command if your animation gets bugged. It will stop your animation and save you.')
end)
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://aklgaming.gitbook.io/documentation/code-snippets/fix-animasi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
