Advertisement
Guest User

Untitled

a guest
Dec 20th, 2014
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. Server.lua
  2.  
  3. if ( SERVER ) then
  4. util.AddNetworkString( "Deathlog" )
  5. hook.Add( "PlayerDeath", "Deathlog:Death", function( victim,inflictor,attacker )
  6. net.Start( "Deathlog" );
  7. net.WriteTable( {victim:Name(), inflictor:GetModel(), attacker:Name()} );
  8. net.Broadcast();
  9. end );
  10. end
  11.  
  12. ------------------------------------------------------
  13. Client.lua
  14.  
  15. if ( CLIENT ) then
  16. net.Receive( "Deathlog", function( len )
  17. tbl = table.Copy(net.ReadTable())
  18. hook.Add( "HUDPaint", "DisplaySomething:HUDPaint", function( )
  19. surface.SetTextColor( 225,50,50,255 );
  20. surface.SetTextPos( 20, 0 );
  21. surface.SetFont("DermaDefault");
  22. surface.DrawText(tbl[3] .. " KILL " .. tbl[1] .. " WITH " .. tbl[2]);
  23. end );
  24. end );
  25. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement