Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
456
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.21 KB | None | 0 0
  1. SWEP.Author              = "Mikael #"
  2. SWEP.Contact             = "mikaelgame@hotmail.com"
  3. SWEP.Purpose             = "Used to hack the vault!"
  4. SWEP.Instructions        = "Have the swep out, and left click on the vault."
  5. SWEP.Spawnable           = true
  6. SWEP.AdminSpawnable      = false
  7. SWEP.PrintName           = "Vault Cracker"
  8. SWEP.ViewModel           = "models/weapons/c_crowbar.mdl"
  9. SWEP.WorldModel          = "models/weapons/w_crowbar.mdl"
  10. SWEP.UseHands = true
  11. SWEP.DrawAmmo            = false
  12. SWEP.Primary.ClipSize    = -1
  13. SWEP.Primary.DefaultClip = -1
  14. SWEP.Primary.Ammo        = "none"
  15. SWEP.Primary.AmmoType    = "none"
  16. SWEP.Secondary.Ammo      = "none"
  17. SWEP.DrawCrosshair       = false
  18.  
  19. if SERVER then
  20.  
  21. function SWEP:PrimaryAttack()
  22.     local ply = self.Owner
  23.     local ei = self:EntIndex()
  24.     local ent = ply:GetEyeTrace().Entity
  25.    
  26.     if ply:GetActiveWeapon():GetClass() == "swat_shield" then
  27.         if ply.isshieldout then
  28.             ply.isshieldout = false        
  29.         else
  30.             ply.isshieldout = true 
  31.         end
  32.     end
  33. end
  34.  
  35. function GM:ScalePlayerDamage( ply, hitgroup, dmginfo )
  36.     if ply.isshieldout && ( hitgroup == HITGROUP_HEAD ) then
  37.         dmginfo:ScaleDamage( 0.50 )
  38.     elseif ( hitgroup == HITGROUP_HEAD ) then
  39.         dmginfo:ScaleDamage( 2 )
  40.     end
  41. end
  42.  
  43. end
  44.  
  45. function SWEP:SecondaryAttack() end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement