Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 30th, 2012  |  syntax: Lua  |  size: 0.96 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. local kills = 0
  2. local screenWidth, screenHeight = guiGetScreenSize ( )
  3.  
  4.  
  5. function onWasted(killer, weapon, bodypart)
  6.     if ( killer and getElementType(killer) == "player" and getElementType(source) == "ped" ) then
  7.         kills = kills + 1
  8.                 outputChatBox(getPlayerName(killer).." has killed a Zombie")
  9.         dxDrawText ( kills, 44, screenHeight - 41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" )
  10.         end
  11. end
  12.  
  13. addEventHandler("onClientPedWasted", getRootElement(), onWasted)
  14.  
  15.  
  16. function kills_anzeige ()
  17.  
  18. dxDrawText ( kills, 44, screenHeight - 41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" )
  19. dxDrawText ( kills, 44, screenHeight - 43, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, "pricedown" )
  20.  
  21. end
  22.  
  23. function HandleTheRendering ( thePlayer )
  24.     addEventHandler ( "onClientRender", root, kills_anzeige )
  25. end
  26. addEventHandler ( "onClientResourceStart", resourceRoot, HandleTheRendering )