Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Server.lua
- if ( SERVER ) then
- util.AddNetworkString( "Deathlog" )
- hook.Add( "PlayerDeath", "Deathlog:Death", function( victim,inflictor,attacker )
- net.Start( "Deathlog" );
- net.WriteTable( {victim:Name(), inflictor:GetModel(), attacker:Name()} );
- net.Broadcast();
- end );
- end
- ------------------------------------------------------
- Client.lua
- if ( CLIENT ) then
- net.Receive( "Deathlog", function( len )
- tbl = table.Copy(net.ReadTable())
- hook.Add( "HUDPaint", "DisplaySomething:HUDPaint", function( )
- surface.SetTextColor( 225,50,50,255 );
- surface.SetTextPos( 20, 0 );
- surface.SetFont("DermaDefault");
- surface.DrawText(tbl[3] .. " KILL " .. tbl[1] .. " WITH " .. tbl[2]);
- end );
- end );
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement