Advertisement
Guest User

Untitled

a guest
May 23rd, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.85 KB | None | 0 0
  1. function BulletPenetration( hitNum, attacker, tr, dmginfo )
  2.  
  3.     local DoDefaultEffect = true;
  4.     if ( !tr.HitWorld ) then DoDefaultEffect = true end
  5.     if ( tr.HitWorld ) then return end
  6.  
  7.     if tr.Hit then
  8.     end
  9.  
  10.     if ( CLIENT ) then return end
  11.     if ( hitNum > 6 ) then return end
  12.  
  13.     local bullet =  
  14.     {    
  15.         Num         = 1,
  16.         Src         = tr.HitPos + attacker:GetAimVector() * 4,
  17.         Dir         = attacker:GetAimVector(),
  18.         Spread  = Vector( 0.005, 0.005, 0 ),
  19.         Tracer  = 1,
  20.         TracerName  = "effect_trace_bulletpenetration",
  21.         Force       = 0,
  22.         Damage  = 25 / hitNum,
  23.         AmmoType    = "Pistol"  
  24.     }
  25.     if (SERVER) then
  26.         bullet.Callback    = function( a, b, c ) BulletPenetration( hitNum + 1, a, b, c ) end
  27.     end
  28.     timer.Simple( 0.01 * hitNum, attacker.FireBullets, attacker, bullet )
  29.     return { damage = true, effects = DoDefaultEffect }
  30. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement