function event.onApplyPlayerAnimation(playerId, animLib, animName, frameDelta, loop, lockX, lockY, freeze, time)
local _, myId = sampGetPlayerIdByCharHandle(PLAYER_PED)
if playerId == myId and acctive_heal and getCharHealth(PLAYER_PED) <= 20 then
sampSendChat(u8:decode(mainIni.settings.command_heal))
if animName == 'floor_hit_f' then
wait(0)
end
end
end