How to get the entity that spawned my custom entity

Im currently working on a entity that hurts all npcs and players in a range. Im already done with that but now i want to exclude the entity that spawned my custom entity from that. All id need is a way to get the entity that spawned my custom entity ( i mean the player not the swep. Because i spawn my entity using a swep ).

Just assign the original player as a variable of the created entity?

Uhm.

How do i do that?
Im kinda new to this :what: