local sampev = require 'lib.samp.events'
local enable = false
function main()
while not isSampAvailable() do wait(0) end
sampRegisterChatCommand("dmginfo", function()
enable = not enable
sampAddChatMessage(enable and "Дамагинформер работает!" or "Дамагинформер не работает!")
end)
wait(-1)
end
function sampev.onSendTakeDamage(playerId, damage, weapon, bodypart)
if playerId ~= 65535 and enable then
if sampIsPlayerConnected(playerId) then
sampSendChat("/id "..playerId)
nick = sampGetPlayerNickname(playerId)
sampAddChatMessage("Игрок " .. nick .. "[" .. tostring(playerId) .. "] Нанес вам " .. tostring(damage) .. " урона", -1)
end
end
end