Taking the weapon owner even if we told him to not do it
0 replies, posted
I'm trying to make this melee weapon find everything around him as enemy.
[lua]
for k, v in pairs( ents.FindInSphere( self.Owner:GetPos(), 100 ) ) do
if(!(v==self.Owner)) then[/lua]
As you can see, I told him to do this [B]only[/B] if the enemy in his range [B]isn't[/B] himself, yet, it keep dealing damage to the owner anyway:
[lua]if v:IsPlayer() then
v:TakeDamage( math.random(30, 50), self.Owner, self.Owner )
end[/lua]
Isn't there a way to make this not happen? It's annoying and using the simple self.Owner:GetEyeTrace() is not what I need for this one.
[editline]fag[/editline]
Seems like it works now...
Sorry, you need to Log In to post a reply to this thread.