Entity damage

Is there a way to make it so if your entity is damaged then it will tell you who damaged it?

If by your entity you mean your SENT use **[ENT.OnTakeDamage

http://wiki.garrysmod.com/favicon.ico](wiki.garrysmod.com/?title=ENT.OnTakeDamage)**.

Otherwise use **[Gamemode.EntityTakeDamage

http://wiki.garrysmod.com/favicon.ico](wiki.garrysmod.com/?title=Gamemode.EntityTakeDamage)**.

What I am trying to do is when a darkrp microwave is damaged it will tell everyone who has damaged it.

This is what I have and I know it is probably horribly wrong


function GM:EntityTakeDamage( ent, attacker, ply )
if ent:GetClass() == "microwave" then
Notify(ply,1,4,  attacker:Name() .. " has damaged a microwave")
		     end
          end

You’d need to know who the microwave belongs to.

Not really. The code he posted should work fine.