Cu aceasta functie vei putea detecta daca un jucator/npc foloseste o animatie sau nu
Exemplu:
bindKey("i", "down", function()
if isPedDoingAnim(localPlayer) then
outputChatBox("Folosesti o animatie", 255, 255, 255, true)
else
outputChatBox("Nu folosesti o animatie", 255, 255, 255, true)
end
end)
function isPedDoingAnim(theElement)
if isElement(theElement) and getElementType(theElement) == "ped" or getElementType(theElement) == "player" then
local block, anim = getPedAnimation(theElement)
if block ~= nil and anim ~= nil then
return true
else
return false
end
end
end