Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- damage = {
- [1] = 0,
- } hir kommt errorr
- kills = {
- [1] = 0,
- }
- addEventHandler("onClientResourceStart", resourceRoot,
- function()
- addEventHandler ( "onClientRender", root, dxdraw )
- end
- )
- function dxdraw ()
- dxDrawRectangle(1841*x, 296*y, 74*x, 59*y, tocolor(0, 0, 0, 215), true)
- dxDrawRectangle(1762*x, 296*y, 74*x, 59*y, tocolor(0, 0, 0, 215), true)
- dxDrawText("Kills:", 1768*x, 317*y, 1810*x, 327*y, tocolor(255, 255, 255, 255), 1.0, "default", "left", "top", false, false, true, false, false)
- dxDrawText("DMG:", 1846*x, 317*y, 1888*x, 327*y, tocolor(255, 255, 255, 255), 1.0, "default", "left", "top", false, false, true, false, false)
- dxDrawText(math.floor(damage[1]), 1876*x, 316.5*y, 1888*x, 327*y, tocolor(255, 255, 255, 255), 1.1, "default-bold", "left", "top", false, false, true, false, false)
- dxDrawText(kills[1], 1792*x, 316.5*y, 1820*x, 341*y, tocolor(255, 255, 255, 255), 1.1, "default-bold", "left", "top", false, false, true, false, false)
- end
- function cancelPedDamage ( attacker, weapon, bodypart, loss )
- if attacker == getLocalPlayer() then
- table.insert(damage,1,tonumber(damage[1] + loss))
- end
- end
- addEvent("DMG:DAMAGE", true )
- addEventHandler ( "DMG:DAMAGE", getRootElement(), cancelPedDamage )
- function onWasted(killer, weapon, bodypart)
- if killer == getLocalPlayer() then
- table.insert(kills,1,(kills[1] + 1))
- end
- end
- addEvent("DMG:KILL", true )
- addEventHandler("DMG:KILL", getRootElement(), onWasted)
- function reset ( attacker, weapon, bodypart )
- table.insert(damage,1,tonumber(0))
- table.insert(kills,1,0)
- end
- addEventHandler ( "onClientRoundCountdownStarted", getLocalPlayer(), reset )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement