Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. SWEP.Author = "Moochael"
  2. SWEP.Instructions = "Master Key to the City"
  3. SWEP.Contact = ""
  4. SWEP.Purpose = "Unlocks/locks any door"
  5.  
  6. SWEP.PrintName = "Master Key"
  7.  
  8. SWEP.ViewModelFOV = 62
  9. SWEP.ViewModelFlip = false
  10. SWEP.ViewModel = Model("models/weapons/c_crowbar.mdl")
  11. SWEP.WorldModel = Model("models/weapons/w_crowbar.mdl")
  12.  
  13. SWEP.UseHands = true
  14.  
  15. SWEP.Spawnable = true
  16. SWEP.AdminOnly = true
  17. SWEP.Category = "DarkRP (Utility)"
  18.  
  19. SWEP.Sound = Sound("physics/wood/wood_box_impact_hard3.wav")
  20.  
  21. SWEP.Primary.ClipSize = -1 -- Size of a clip
  22. SWEP.Primary.DefaultClip = 0 -- Default number of bullets in a clip
  23. SWEP.Primary.Automatic = false -- Automatic/Semi Auto
  24. SWEP.Primary.Ammo = ""
  25.  
  26. SWEP.Secondary.ClipSize = -1 -- Size of a clip
  27. SWEP.Secondary.DefaultClip = -1 -- Default number of bullets in a clip
  28. SWEP.Secondary.Automatic = false -- Automatic/Semi Auto
  29. SWEP.Secondary.Ammo = ""
  30.  
  31. function SWEP:Initialize()
  32. self:SetHoldType("normal")
  33. end
  34.  
  35. if CLIENT then
  36.  
  37. end
  38.  
  39. function SWEP:PrimaryAttack()
  40. local trace = self.Owner:GetEyeTrace()
  41. local ent = trace.Entity
  42.  
  43. self:SetHoldType("slam")
  44. ent:keysLock()
  45.  
  46. ent:Fire("close", "", .6)
  47. ent:Fire("setanimation", "close", .6)
  48.  
  49. self:SetHoldType("normal")
  50. end
  51.  
  52. function SWEP:SecondaryAttack()
  53. local trace = self.Owner:GetEyeTrace()
  54. local ent = trace.Entity
  55.  
  56. self:SetHoldType("slam")
  57. ent:keysUnLock()
  58.  
  59. ent:Fire("open", "", .6)
  60. ent:Fire("setanimation", "open", .6)
  61.  
  62. self:SetHoldType("normal")
  63. end
  64.  
  65. function SWEP:Holster()
  66.  
  67. end
  68.  
  69. function SWEP:Think()
  70.  
  71. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement