local sampEvents = require("samp.events")
local hits = {
id = -1,
victimId = -1,
counter = 0
}
function sampEvents.onSpectatePlayer(playerId, camType)
hits = { id = playerId, victimId = -1, counter = 0 }
end
function sampEvents.onBulletSync(playerId, data)
if playerId == hits.id then
if data.targetType == 1 then
if data.targetId == hits.victimId then
hits.counter = hits.counter + 1
--> количество попаданий подряд
else
hits.victimId, hits.counter = data.targetId, 1
end
else
hits.counter = 0
end
end
end