Is there a way to make a SWEP shoot the player holding it? I tried:
function SWEP:SecondaryAttack()
local bullet = {}
bullet.Num = 1
bullet.Src = self.Owner:GetPos()
bullet.Dir = self.Owner:GetPos()
bullet.Spread = 0
bullet.Tracer = 0
bullet.Force = 5
bullet.Damage = 25
self.Owner:FireBullets( bullet )
end
But nothing happens. Do I have to change the bullet.Src to some random point in the world ?
I also thought that the bullet might not hurt the player because the player is the owner of it