csmit195

Untitled

Jan 27th, 2013
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.88 KB | None | 0 0
  1. kills = { }
  2.  
  3. addEventHandler('onClientPlayerWasted', getRootElement(),
  4. function(killer, weapon, bodypart)
  5.     if killer == localPlayer and killer ~= source then
  6.         alpha = 0
  7.         check = false
  8.         begin = true
  9.         table.insert(kills, getPlayerName(source))
  10.     end
  11. end )
  12.  
  13. begin = false
  14. fadeOut = false
  15. addEventHandler('onClientRender', getRootElement(),
  16. function(killer, weapon, bodypart)
  17.     if kills[1] and begin then
  18.         screenX, screenY = guiGetScreenSize()
  19.         message = 'You have killed #ff0000'..(kills[1] or '')..'!'
  20.         scale = 1.4
  21.         width = dxGetTextWidth(message, scale)
  22.         dxDrawText(message, screenX, screenY*0.35, width, 300, tocolor(255, 255, 255, alpha), scale, 'default', 'center', 'top', false, true, false, true)
  23.         if alpha ~= 255 then
  24.             alpha = alpha + 1
  25.         elseif alpha ~= 0 then
  26.             alpha = alpha - 1
  27.             if alpha == 0 then
  28.                 table.remove(kills, 1)
  29.             end
  30.         end
  31.     end
  32. end )
Advertisement
Add Comment
Please, Sign In to add comment