Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function BulletPenetration( hitNum, attacker, tr, dmginfo )
- local DoDefaultEffect = true;
- if ( !tr.HitWorld ) then DoDefaultEffect = true end
- if ( tr.HitWorld ) then return end
- if tr.Hit then
- end
- if ( CLIENT ) then return end
- if ( hitNum > 6 ) then return end
- local bullet =
- {
- Num = 1,
- Src = tr.HitPos + attacker:GetAimVector() * 4,
- Dir = attacker:GetAimVector(),
- Spread = Vector( 0.005, 0.005, 0 ),
- Tracer = 1,
- TracerName = "effect_trace_bulletpenetration",
- Force = 0,
- Damage = 25 / hitNum,
- AmmoType = "Pistol"
- }
- if (SERVER) then
- bullet.Callback = function( a, b, c ) BulletPenetration( hitNum + 1, a, b, c ) end
- end
- timer.Simple( 0.01 * hitNum, attacker.FireBullets, attacker, bullet )
- return { damage = true, effects = DoDefaultEffect }
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement