Apply Color for other players/ Swep question

Hey guys, I have a quick question:

How would I make my Swep see that It hurted a player and then it changes his player color, Im currently working on another Swep, Almost done but Im only stuck at this point…

It might be something with this:

function ENT:OnTakeDamage(dmg)

Looked that up, but im not sure if that counts for the one that are hit, or for yourself?

It would be like, If you are hit and your innocent your playermodel paints green, and if Traitor then your playermodel paints red till end of the round.

I hope this is understandable.

Thanks in advance :slight_smile: