Take your players experience to the next level with a comprehensive set of basic and optimized animations tailored specifically for your roleplay server.
I took the liberty of modifying the piece about the ragdoll so as to avoid that when you want to get up it directly cancels the task, but now it gets up as if it had actually tripped
local isPointing = false
local ragdoll = false
Citizen.CreateThread(function()
for i, v in pairs(NT.animations) do
if v.commandenable then
RegisterCommand(v.command, function()
local playerPed = PlayerPedId()
if v.name == "pointing" then
if not isPointing then
startPointing()
else
stopPointing()
end
else
if not IsEntityPlayingAnim(playerPed, v.lib, v.anim, 3) then
if v.haveLib then
RequestAnimDict(v.lib)
while not HasAnimDictLoaded(v.lib) do
Citizen.Wait(0)
end
TaskPlayAnim(playerPed, v.lib, v.anim, 8.0, 8.0, -1, v.loop and 49 or 0, 0, false, false,
false)
end
if v.name == "handsup" then
TaskPlayAnim(playerPed, v.lib, v.anim, 8.0, 8.0, -1, 50, 0, false, false, false)
elseif v.name == "ragdoll" then
ragdoll = not ragdoll
while ragdoll do
Wait(0)
SetPedToRagdoll(playerPed, 1000, 1000, 0, 0, 0, 0)
end
end
else
ClearPedTasks(playerPed)
end
end
end, false)
end
RegisterKeyMapping(v.command, v.name, 'keyboard', v.key)
end
end)