Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- kills = { }
- addEventHandler('onClientPlayerWasted', getRootElement(),
- function(killer, weapon, bodypart)
- if killer == localPlayer and killer ~= source then
- alpha = 0
- check = false
- begin = true
- table.insert(kills, getPlayerName(source))
- end
- end )
- begin = false
- fadeOut = false
- addEventHandler('onClientRender', getRootElement(),
- function(killer, weapon, bodypart)
- if kills[1] and begin then
- screenX, screenY = guiGetScreenSize()
- message = 'You have killed #ff0000'..(kills[1] or '')..'!'
- scale = 1.4
- width = dxGetTextWidth(message, scale)
- dxDrawText(message, screenX, screenY*0.35, width, 300, tocolor(255, 255, 255, alpha), scale, 'default', 'center', 'top', false, true, false, true)
- if alpha ~= 255 then
- alpha = alpha + 1
- elseif alpha ~= 0 then
- alpha = alpha - 1
- if alpha == 0 then
- table.remove(kills, 1)
- end
- end
- end
- end )
Advertisement
Add Comment
Please, Sign In to add comment