Trace

Hey, I’ve got a problem with understanding of this piece of code. Can someone tell me what self.Owner does and when we use it? Also, what is with this tracedata.endpos = pos+(ang*80)? And how can we check if trace hit the player?

self.Owner is the owner of the entity ( I think ) or else its the player. tracedata.endpos = pos+(ang*80) is basicly, the Position + The Angle timed with 80, Which gives an Angle of 80. Because Angle = 1.

self.Owner can be used to get the player holding a swep. So in a swep primary fire function:
[lua]ply.Owner:Ignite(100)[/lua]

Sets the player holding the SWEP on fire when it primary fires.