Advertisement
Guest User

Untitled

a guest
Apr 25th, 2014
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.82 KB | None | 0 0
  1. /*---------------------------------------------------------*/
  2. local HitImpact = function(attacker, tr, dmginfo)
  3.  
  4. local hit = EffectData()
  5. hit:SetOrigin(tr.HitPos)
  6. hit:SetNormal(tr.HitNormal)
  7. hit:SetScale(30)
  8. util.Effect("effect_fo3_hit", hit)
  9.  
  10. return true
  11. end
  12. /*---------------------------------------------------------*/
  13.  
  14. if (SERVER) then
  15. AddCSLuaFile("shared.lua")
  16. SWEP.Weight = 5
  17. SWEP.HoldType = "ar2" -- Hold type style ("ar2" "pistol" "shotgun" "rpg" "normal" "melee" "grenade" "smg")
  18. end
  19.  
  20.  
  21. if (CLIENT) then
  22. SWEP.DrawAmmo = true -- Should we draw the number of ammos and clips?
  23. SWEP.DrawCrosshair = false -- Should we draw the half life 2 crosshair?
  24. SWEP.ViewModelFOV = 50 -- "Y" position of the sweps
  25. SWEP.ViewModelFlip = true -- Should we flip the sweps?
  26. SWEP.CSMuzzleFlashes = false -- Should we add a CS Muzzle Flash?
  27.  
  28. surface.CreateFont( "Firemode", {
  29. font = "HalfLife2",
  30. size = 60,
  31. weight = 500,
  32. antialias = true,
  33. underline = true
  34. } )
  35.  
  36. surface.CreateFont( "CSSelectIcons", {
  37. font = "csd",
  38. size = 60,
  39. weight = 500,
  40. antialias = true,
  41. underline = true
  42. } )
  43.  
  44. surface.CreateFont( "CSKillIcons", {
  45. font = "csd",
  46. size = 30,
  47. weight = 500,
  48. antialias = true,
  49. underline = true
  50. } )
  51. end
  52.  
  53. /*---------------------------------------------------------
  54. Muzzle Effect + Shell Effect
  55. ---------------------------------------------------------*/
  56. SWEP.MuzzleEffect = "fo3_muzzle_rifle" -- This is an extra muzzleflash effect
  57. -- Available muzzle effects: rg_muzzle_grenade, rg_muzzle_highcal, rg_muzzle_hmg, rg_muzzle_pistol, rg_muzzle_rifle, rg_muzzle_silenced, none
  58.  
  59. SWEP.ShellEffect = "rg_shelleject_rifle" -- This is a shell ejection effect
  60. -- Available shell eject effects: rg_shelleject, rg_shelleject_rifle, rg_shelleject_shotgun, none
  61.  
  62. SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models
  63. SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models
  64. /*-------------------------------------------------------*/
  65.  
  66. SWEP.Category = "Spire Fallout Weapons" -- Swep Categorie (You can type what your want)
  67.  
  68. SWEP.DrawWeaponInfoBox = true -- Should we draw a weapon info when you're selecting your swep?
  69.  
  70. SWEP.Author = "Worshipper & Stef for the base. Steven for the weapons. Halokiller for some swep positions." -- Author Name
  71. SWEP.Contact = "" -- Author E-Mail
  72. SWEP.Purpose = "" -- Author's Informations
  73. SWEP.Instructions = ""
  74. SWEP.Spawnable = false -- Everybody can spawn this swep
  75. SWEP.AdminSpawnable = false -- Admin can spawn this swep
  76.  
  77. SWEP.Weight = 5 -- Weight of the swep
  78. SWEP.AutoSwitchTo = false
  79. SWEP.AutoSwitchFrom = false
  80.  
  81. SWEP.Primary.Sound = Sound("Weapon_AK47.Single") -- Sound of the gun
  82. SWEP.Primary.Recoil = 0 -- Recoil of the gun
  83. SWEP.Primary.Damage = 0 -- Damage of the gun
  84. SWEP.Primary.NumShots = 0 -- How many bullet(s) should be fired by the gun at the same time
  85. SWEP.Primary.Cone = 0 -- Precision of the gun
  86. SWEP.Primary.ClipSize = 0 -- Number of bullets in 1 clip
  87. SWEP.Primary.Delay = 0 -- Exemple: If your weapon shoot 800 bullets per minute, this is what you need to do: 1 / (800 / 60) = 0.075
  88. SWEP.Primary.DefaultClip = 0 -- How many ammos come with your weapon (ClipSize + "The number of ammo you want"). If you don't want to add additionnal ammo with your weapon, type the ClipSize only!
  89. SWEP.Primary.Automatic = false -- Is the weapon automatic?
  90. SWEP.Primary.Ammo = "none" -- Type of ammo ("pistol" "ar2" "grenade" "smg1" "xbowbolt" "rpg_round" "351")
  91.  
  92. SWEP.SprintPos = Vector(-2,2,0)
  93. SWEP.SprintAng = Vector(-10,-30,10)
  94.  
  95. SWEP.NewAngle = Vector(0,0,0) --Define Idle position
  96. SWEP.NewAngleAng = Vector(0,0,0) --Define Idle Angle
  97. SWEP.WalkAngle = Vector(0,0,0.5) --Define Idle position while moving
  98.  
  99. SWEP.Secondary.ClipSize = 0
  100. SWEP.Secondary.DefaultClip = 0
  101. SWEP.Secondary.Automatic = false
  102. SWEP.Secondary.Ammo = "none"
  103.  
  104. SWEP.data = {}
  105. SWEP.mode = "semi" -- The starting firemode
  106. SWEP.data.ironsights = 1
  107.  
  108. SWEP.data.semi = {}
  109. SWEP.data.semi.FireMode = "p"
  110.  
  111. SWEP.data.auto = {}
  112. SWEP.data.auto.FireMode = "ppppp"
  113.  
  114. SWEP.data.burst = {}
  115. SWEP.data.burst.FireMode = "ppp"
  116.  
  117. /*---------------------------------------------------------
  118. Auto/Semi/Burst Configuration
  119. ---------------------------------------------------------*/
  120. function SWEP.data.semi.Init(self)
  121.  
  122. self.Primary.Automatic = false
  123. self.Weapon:EmitSound("weapons/smg1/switch_single.wav")
  124. self.Weapon:SetNetworkedInt("firemode", 3)
  125. end
  126.  
  127. function SWEP.data.auto.Init(self)
  128.  
  129. self.Primary.Automatic = true
  130. self.Weapon:EmitSound("weapons/smg1/switch_burst.wav")
  131. self.Weapon:SetNetworkedInt("firemode", 1)
  132. end
  133.  
  134. function SWEP.data.burst.Init(self)
  135.  
  136. self.Primary.Automatic = false
  137. self.Weapon:EmitSound("weapons/smg1/switch_burst.wav")
  138. self.Weapon:SetNetworkedInt("firemode", 2)
  139. end
  140.  
  141. /*---------------------------------------------------------
  142. IronSight
  143. ---------------------------------------------------------*/
  144. function SWEP:SetIronsights( b )
  145.  
  146. self.Weapon:SetNetworkedBool( "Ironsights", b )
  147. self.Owner:SetFOV( 65, 0.15 )
  148.  
  149. end
  150.  
  151.  
  152. SWEP.NextSecondaryAttack = 0
  153.  
  154. /*---------------------------------------------------------
  155. Initialize
  156. ---------------------------------------------------------*/
  157. function SWEP:Initialize()
  158. self:SetWeaponHoldType( self.HoldType )
  159. end
  160.  
  161. /*---------------------------------------------------------
  162. Reload
  163. ---------------------------------------------------------*/
  164. function SWEP:Reload()
  165.  
  166. if ( self.Reloadaftershoot > CurTime() ) then return end
  167. -- If you're firering, you can't reload
  168.  
  169. self.Weapon:DefaultReload(ACT_VM_RELOAD)
  170. -- Animation when you're reloading
  171.  
  172. if ( self.Weapon:Clip1() < self.Primary.ClipSize ) and self.Owner:GetAmmoCount(self.Primary.Ammo) > 0 then
  173. -- When the current clip < full clip and the rest of your ammo > 0, then
  174.  
  175. self.Owner:SetFOV( 0, 0.15 )
  176. -- Zoom = 0
  177.  
  178. self:SetIronsights(false)
  179. -- Set the ironsight to false
  180. end
  181. end
  182.  
  183. /*---------------------------------------------------------
  184. Deploy
  185. ---------------------------------------------------------*/
  186. function SWEP:Deploy()
  187.  
  188. self.Weapon:SendWeaponAnim( ACT_VM_DRAW )
  189. -- Set the deploy animation when deploying
  190.  
  191. self.Reloadaftershoot = CurTime() + 1
  192. -- Can't shoot while deploying
  193.  
  194. self:SetIronsights(false)
  195. -- Set the ironsight mod to false
  196.  
  197. self.Weapon:SetNextPrimaryFire(CurTime() + 1)
  198. -- Set the next primary fire to 1 second after deploying
  199.  
  200. return true
  201. end
  202.  
  203. /*---------------------------------------------------------
  204. PrimaryAttack
  205. ---------------------------------------------------------*/
  206. function SWEP:PrimaryAttack()
  207.  
  208. if not self:CanPrimaryAttack() or self.Owner:WaterLevel() > 2 then return end
  209. -- If your gun have a problem or if you are under water, you'll not be able to fire
  210.  
  211. self.Reloadaftershoot = CurTime() + self.Primary.Delay
  212. -- Set the reload after shoot to be not able to reload when firering
  213.  
  214. self.Weapon:SetNextSecondaryFire(CurTime() + self.Primary.Delay)
  215. -- Set next secondary fire after your fire delay
  216.  
  217. self.Weapon:SetNextPrimaryFire(CurTime() + self.Primary.Delay)
  218. -- Set next primary fire after your fire delay
  219.  
  220. self.Weapon:EmitSound(self.Primary.Sound)
  221. -- Emit the gun sound when you fire
  222.  
  223. self:RecoilPower()
  224.  
  225. self:TakePrimaryAmmo(1)
  226. -- Take 1 ammo in you clip
  227.  
  228. if ((game.SinglePlayer() and SERVER) or CLIENT) then
  229. self.Weapon:SetNetworkedFloat("LastShootTime", CurTime())
  230. end
  231. end
  232.  
  233. /*---------------------------------------------------------
  234. SecondaryAttack
  235. ---------------------------------------------------------*/
  236. function SWEP:SecondaryAttack()
  237.  
  238. if !self.Owner:KeyDown(IN_USE) then
  239.  
  240.  
  241. bIronsights = !self.Weapon:GetNetworkedBool( "Ironsights", false )
  242.  
  243. self:SetIronsights( bIronsights )
  244.  
  245. self.NextSecondaryAttack = CurTime() + 0.3
  246. end
  247. end
  248.  
  249. /*---------------------------------------------------------
  250. CanPrimaryAttack
  251. ---------------------------------------------------------*/
  252. function SWEP:CanPrimaryAttack()
  253.  
  254. if ( self.Weapon:Clip1() <= 0 ) and self.Primary.ClipSize > -1 then
  255. self.Weapon:SetNextPrimaryFire(CurTime() + 0.5)
  256. self.Weapon:EmitSound("weapons/pistol_10mm/wpn_pistol10mm_firedry.wav")
  257. return false
  258. end
  259. return true
  260. end
  261.  
  262. /*---------------------------------------------------------
  263. GetViewModelPosition
  264. ---------------------------------------------------------*/
  265. local IRONSIGHT_TIME = 0.25
  266. -- Time to enter in the ironsight mod
  267.  
  268. function SWEP:GetViewModelPosition(pos, ang)
  269.  
  270. if (not self.IronSightsPos) then return pos, ang end
  271.  
  272. local bIron = self.Weapon:GetNWBool("Ironsights")
  273.  
  274. if (bIron != self.bLastIron) then
  275. self.bLastIron = bIron
  276. self.fIronTime = CurTime()
  277.  
  278. if (bIron) then
  279. self.SwayScale = 0.3
  280. self.BobScale = 0.1
  281. else
  282. self.SwayScale = 1.8
  283. self.BobScale = 2.0
  284. end
  285. end
  286.  
  287. local fIronTime = self.fIronTime or 0
  288.  
  289. if (not bIron and fIronTime < CurTime() - IRONSIGHT_TIME) then
  290. return pos, ang
  291. end
  292.  
  293. local Mul = 1.0
  294.  
  295. if (fIronTime > CurTime() - IRONSIGHT_TIME) then
  296. Mul = math.Clamp((CurTime() - fIronTime) / IRONSIGHT_TIME, 0, 1)
  297.  
  298. if not bIron then Mul = 1 - Mul end
  299. end
  300.  
  301. local Offset = self.IronSightsPos
  302.  
  303. if (self.IronSightsAng) then
  304. ang = ang * 1
  305. ang:RotateAroundAxis(ang:Right(), self.IronSightsAng.x * Mul)
  306. ang:RotateAroundAxis(ang:Up(), self.IronSightsAng.y * Mul)
  307. ang:RotateAroundAxis(ang:Forward(), self.IronSightsAng.z * Mul)
  308. end
  309.  
  310. local Right = ang:Right()
  311. local Up = ang:Up()
  312. local Forward = ang:Forward()
  313.  
  314. pos = pos + Offset.x * Right * Mul
  315. pos = pos + Offset.y * Forward * Mul
  316. pos = pos + Offset.z * Up * Mul
  317.  
  318. return pos, ang
  319. end
  320.  
  321. /*---------------------------------------------------------
  322. SetIronsights
  323. ---------------------------------------------------------*/
  324. function SWEP:SetIronsights(b)
  325.  
  326. self.Weapon:SetNetworkedBool("Ironsights", b)
  327. end
  328.  
  329. function SWEP:GetIronsights()
  330.  
  331. return self.Weapon:GetNWBool("Ironsights")
  332. end
  333.  
  334. /*---------------------------------------------------------
  335. RecoilPower
  336. ---------------------------------------------------------*/
  337. function SWEP:RecoilPower()
  338.  
  339. if not self.Owner:IsOnGround() then
  340. if (self:GetIronsights() == true) then
  341. self:CSShootBullet(self.Primary.Damage, self.Primary.Recoil, self.Primary.NumShots, self.Primary.Cone)
  342. -- Put normal recoil when you're in ironsight mod
  343.  
  344. self.Owner:ViewPunch(Angle(math.Rand(-0.5,-2.5) * (self.Primary.Recoil), math.Rand(-1,1) * (self.Primary.Recoil), 0))
  345. -- Punch the screen 1x less hard when you're in ironsigh mod
  346. else
  347. self:CSShootBullet(self.Primary.Damage, self.Primary.Recoil * 2.5, self.Primary.NumShots, self.Primary.Cone)
  348. -- Recoil * 2.5
  349.  
  350. self.Owner:ViewPunch(Angle(math.Rand(-0.5,-2.5) * (self.Primary.Recoil * 2.5), math.Rand(-1,1) * (self.Primary.Recoil * 2.5), 0))
  351. -- Punch the screen * 2.5
  352. end
  353.  
  354. elseif self.Owner:KeyDown(IN_FORWARD , IN_BACK , IN_MOVELEFT , IN_MOVERIGHT) then
  355. if (self:GetIronsights() == true) then
  356. self:CSShootBullet(self.Primary.Damage, self.Primary.Recoil / 2, self.Primary.NumShots, self.Primary.Cone)
  357. -- Put recoil / 2 when you're in ironsight mod
  358.  
  359. self.Owner:ViewPunch(Angle(math.Rand(-0.5,-2.5) * (self.Primary.Recoil / 1.5), math.Rand(-1,1) * (self.Primary.Recoil / 1.5), 0))
  360. -- Punch the screen 1.5x less hard when you're in ironsigh mod
  361. else
  362. self:CSShootBullet(self.Primary.Damage, self.Primary.Recoil * 1.5, self.Primary.NumShots, self.Primary.Cone)
  363. -- Recoil * 1.5
  364.  
  365. self.Owner:ViewPunch(Angle(math.Rand(-0.5,-2.5) * (self.Primary.Recoil * 1.5), math.Rand(-1,1) * (self.Primary.Recoil * 1.5), 0))
  366. -- Punch the screen * 1.5
  367. end
  368.  
  369. elseif self.Owner:Crouching() then
  370. if (self:GetIronsights() == true) then
  371. self:CSShootBullet(self.Primary.Damage, 0, self.Primary.NumShots, self.Primary.Cone)
  372. -- Put 0 recoil when you're in ironsight mod
  373.  
  374. self.Owner:ViewPunch(Angle(math.Rand(-0.5,-2.5) * (self.Primary.Recoil / 3), math.Rand(-1,1) * (self.Primary.Recoil / 3), 0))
  375. -- Punch the screen 3x less hard when you're in ironsigh mod
  376. else
  377. self:CSShootBullet(self.Primary.Damage, self.Primary.Recoil / 2, self.Primary.NumShots, self.Primary.Cone)
  378. -- Recoil / 2
  379.  
  380. self.Owner:ViewPunch(Angle(math.Rand(-0.5,-2.5) * (self.Primary.Recoil / 2), math.Rand(-1,1) * (self.Primary.Recoil / 2), 0))
  381. -- Punch the screen / 2
  382. end
  383. else
  384. if (self:GetIronsights() == true) then
  385. self:CSShootBullet(self.Primary.Damage, self.Primary.Recoil / 6, self.Primary.NumShots, self.Primary.Cone)
  386. -- Put recoil / 4 when you're in ironsight mod
  387.  
  388. self.Owner:ViewPunch(Angle(math.Rand(-0.5,-2.5) * (self.Primary.Recoil / 2), math.Rand(-1,1) * (self.Primary.Recoil / 2), 0))
  389. -- Punch the screen 2x less hard when you're in ironsigh mod
  390. else
  391. self:CSShootBullet(self.Primary.Damage, self.Primary.Recoil, self.Primary.NumShots, self.Primary.Cone)
  392. -- Put normal recoil when you're not in ironsight mod
  393.  
  394. self.Owner:ViewPunch(Angle(math.Rand(-0.5,-2.5) * self.Primary.Recoil, math.Rand(-1,1) *self.Primary.Recoil, 0))
  395. -- Punch the screen
  396. end
  397. end
  398. end
  399.  
  400. function SWEP:Holster( wep )
  401. timer.Destroy("fatman_reload2")
  402. timer.Destroy("fatman_reload3")
  403. timer.Destroy("fatman_reload4")
  404. timer.Destroy("fatman_reload5")
  405. timer.Destroy("fatman_reload6")
  406. timer.Destroy("alien_reload1")
  407. timer.Destroy("alien_reload2")
  408. timer.Destroy("shottie_reload1")
  409. timer.Destroy("shottie_reload2")
  410. timer.Destroy("shottie_reload3")
  411. return true
  412. end
  413.  
  414. /*---------------------------------------------------------
  415. ShootBullet
  416. ---------------------------------------------------------*/
  417. function SWEP:CSShootBullet(dmg, recoil, numbul, cone)
  418.  
  419. numbul = numbul or 1
  420. cone = cone or 0.01
  421.  
  422. local bullet = {}
  423. bullet.Num = numbul
  424. bullet.Src = self.Owner:GetShootPos() -- Source
  425. bullet.Dir = self.Owner:GetAimVector() -- Dir of bullet
  426. bullet.Spread = Vector(cone, cone, 0) -- Aim Cone
  427. bullet.Tracer = 1 -- Show a tracer on every x bullets
  428. bullet.Force = 0.5 * dmg -- Amount of force to give to phys objects
  429. bullet.Damage = dmg -- Amount of damage to give to the bullets
  430. bullet.Callback = HitImpact
  431. -- bullet.Callback = function ( a, b, c ) BulletPenetration( 0, a, b, c ) end -- CALL THE FUNCTION BULLETPENETRATION
  432.  
  433. self.Owner:FireBullets(bullet) -- Fire the bullets
  434. self.Weapon:SendWeaponAnim(ACT_VM_PRIMARYATTACK) -- View model animation
  435. self.Owner:MuzzleFlash() -- Crappy muzzle light
  436.  
  437. self.Owner:SetAnimation(PLAYER_ATTACK1) -- 3rd Person Animation
  438.  
  439. local fx = EffectData()
  440. fx:SetEntity(self.Weapon)
  441. fx:SetOrigin(self.Owner:GetShootPos())
  442. fx:SetNormal(self.Owner:GetAimVector())
  443. fx:SetAttachment(self.MuzzleAttachment)
  444. util.Effect(self.MuzzleEffect,fx) -- Additional muzzle effects
  445.  
  446. timer.Simple( self.EjectDelay, function()
  447. if not IsFirstTimePredicted() then
  448. return
  449. end
  450.  
  451. local fx = EffectData()
  452. fx:SetEntity(self.Weapon)
  453. fx:SetNormal(self.Owner:GetAimVector())
  454. fx:SetAttachment(self.ShellEjectAttachment)
  455.  
  456. util.Effect(self.ShellEffect,fx) -- Shell ejection
  457. end)
  458.  
  459. if ((game.SinglePlayer() and SERVER) or (not game.SinglePlayer() and CLIENT)) then
  460. local eyeang = self.Owner:EyeAngles()
  461. eyeang.pitch = eyeang.pitch - recoil
  462. self.Owner:SetEyeAngles(eyeang)
  463. end
  464. end
  465.  
  466. if( CLIENT ) then
  467.  
  468. local SparkMaterial = CreateMaterial( "fo3weapons/bullet", "UnlitGeneric", {
  469. [ "$basetexture" ] = "sprites/orangeflare1",
  470. [ "$brightness" ] = "effects/spark_brightness",
  471. [ "$additive" ] = "1",
  472. [ "$vertexcolor" ] = "1",
  473. [ "$vertexalpha" ] = "1",
  474. } );
  475.  
  476. local EFFECT = {};
  477.  
  478.  
  479. --[[------------------------------------
  480. Init()
  481. ------------------------------------]]
  482. function EFFECT:Init( data )
  483.  
  484. local weapon = data:GetEntity();
  485. local attachment = data:GetAttachment();
  486.  
  487. local startPos = GetMuzzlePosition( weapon, attachment );
  488. local endPos = data:GetOrigin();
  489. local distance = ( startPos - endPos ):Length();
  490.  
  491. self.StartPos = startPos;
  492. self.EndPos = endPos;
  493. self.Normal = ( endPos - startPos ):GetNormal();
  494. self.Length = math.random( 128, 500 );
  495. self.Magnitude = 50;
  496. self.StartTime = CurTime();
  497. self.DieTime = CurTime() + ( distance + self.Length ) / 15000;
  498.  
  499. end
  500.  
  501.  
  502. --[[------------------------------------
  503. Think()
  504. ------------------------------------]]
  505. function EFFECT:Think()
  506.  
  507. return self.DieTime >= CurTime();
  508.  
  509. end
  510.  
  511.  
  512. --[[------------------------------------
  513. Render()
  514. ------------------------------------]]
  515. function EFFECT:Render()
  516.  
  517. local time = CurTime() - self.StartTime;
  518.  
  519. local endDistance = 15000 * time;
  520. local startDistance = endDistance - self.Length;
  521.  
  522. // clamp the start distance so we don't extend behind the weapon
  523. startDistance = math.max( 0, startDistance );
  524.  
  525. local startPos = self.StartPos + self.Normal * startDistance;
  526. local endPos = self.StartPos + self.Normal * endDistance;
  527.  
  528. // draw the beam
  529. render.SetMaterial( SparkMaterial );
  530. render.DrawBeam( startPos, endPos, 25, 0, 1, Color( 255, 255, 255, 255 ) );
  531.  
  532. end
  533.  
  534. effects.Register( EFFECT, "HardcoreBullet" );
  535.  
  536. end
  537.  
  538. -- BULLET PENETRATION | EXPERIMENTAL CODE | BULLETS CAN PASS TROUGHT THE SMALL PROPS
  539. /*---------------------------------------------------------
  540. BulletPenetration
  541. ---------------------------------------------------------*/
  542.  
  543. /*---------------------------------------------------------
  544. function BulletPenetration( hitNum, attacker, tr, dmginfo )
  545.  
  546. local DoDefaultEffect = true;
  547. if ( !tr.HitWorld ) then DoDefaultEffect = true end
  548. if ( tr.HitWorld ) then return end
  549.  
  550. if tr.Hit then
  551. end
  552.  
  553. if ( CLIENT ) then return end
  554. if ( hitNum > 6 ) then return end
  555.  
  556. local bullet =
  557. {
  558. Num = 1,
  559. Src = tr.HitPos + attacker:GetAimVector() * 4,
  560. Dir = attacker:GetAimVector(),
  561. Spread = Vector( 0.005, 0.005, 0 ),
  562. Tracer = 1,
  563. TracerName = "effect_trace_bulletpenetration",
  564. Force = 0,
  565. Damage = 25 / hitNum,
  566. AmmoType = "Pistol"
  567. }
  568. if (SERVER) then
  569. bullet.Callback = function( a, b, c ) BulletPenetration( hitNum + 1, a, b, c ) end
  570. end
  571. timer.Simple( 0.01 * hitNum, attacker.FireBullets, attacker, bullet )
  572. return { damage = true, effects = DoDefaultEffect }
  573. end
  574.  
  575.  
  576.  
  577. ---------------------------------------------------------*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement