How to use GM:PlayerDeath and still keep the default kill feed?

Using GM:PlayerDeath to do something, but using it makes the kill feed not show up. If anyone knows how I can keep the kill feed then please let me know.

Thanks in advance.

Either copy it from bade/sandbox or call to your baseclass self.BaseClass.PlayerDeath( self, ply) only remember to put DEFINE_BASECLASS(“urbase”) to your shared.lua.

You do know that there is a good chance he is going to literally write DEFINE_BASECLASS(“urbase”) in his shared.lua if you don’t give him more explanations than that, right? Plus DEFINE_BASECLASS is not even needed. All it does is this:

[lua]-- DEFINE_BASECLASS( “base_class_name” )

– Now the local variable BaseClass will be available.
– ( in engine DEFINE_BASECLASS is replaced with “local BaseClass = baseclass.Get” )[/lua]

It’s hacky and impractical. No one has ever used that.

If you are writing a gamemode, and it’s based on the base gamemode or sandbox, then the first thing Robotboy suggested should work (although it’s a bit incomplete). Here’s something more detailed:

[lua]
function GM:PlayerDeath(victim, inflictor, attacker)
self.BaseClass.PlayerDeath(self, victim, inflictor, attacker)

-- add your custom code here

end
[/lua]

My gamemode is not derived from the sandbox or base gamemode, reason being I started this gamemode just to learn as much as I can about how to code lua. People seem to really like it so I am trying to finish it.

Huh, if it’s derived neither from the sandbox gamemode nor from the base gamemode, then what is it derived from?

Never mind I didn’t realize that it automatically derives it off of the base game mode.