Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SWEP.Author = "Moochael"
- SWEP.Instructions = "Master Key to the City"
- SWEP.Contact = ""
- SWEP.Purpose = "Unlocks/locks any door"
- SWEP.PrintName = "Master Key"
- SWEP.ViewModelFOV = 62
- SWEP.ViewModelFlip = false
- SWEP.ViewModel = Model("models/weapons/c_crowbar.mdl")
- SWEP.WorldModel = Model("models/weapons/w_crowbar.mdl")
- SWEP.UseHands = true
- SWEP.Spawnable = true
- SWEP.AdminOnly = true
- SWEP.Category = "DarkRP (Utility)"
- SWEP.Sound = Sound("physics/wood/wood_box_impact_hard3.wav")
- SWEP.Primary.ClipSize = -1 -- Size of a clip
- SWEP.Primary.DefaultClip = 0 -- Default number of bullets in a clip
- SWEP.Primary.Automatic = false -- Automatic/Semi Auto
- SWEP.Primary.Ammo = ""
- SWEP.Secondary.ClipSize = -1 -- Size of a clip
- SWEP.Secondary.DefaultClip = -1 -- Default number of bullets in a clip
- SWEP.Secondary.Automatic = false -- Automatic/Semi Auto
- SWEP.Secondary.Ammo = ""
- function SWEP:Initialize()
- self:SetHoldType("normal")
- end
- if CLIENT then
- end
- function SWEP:PrimaryAttack()
- local trace = self.Owner:GetEyeTrace()
- local ent = trace.Entity
- if trace.HitPos:Distance(self.Owner:GetShootPos()) < 100 and ent.isDoor() then
- self:SetHoldType("slam")
- if SERVER then
- ent:keysLock()
- ent:Fire("close", "", .6)
- ent:Fire("setanimation", "close", .6)
- end
- self:SetHoldType("normal")
- end
- end
- function SWEP:SecondaryAttack()
- local trace = self.Owner:GetEyeTrace()
- local ent = trace.Entity
- if trace.HitPos:Distance(self.Owner:GetShootPos()) < 100 and ent.isDoor() then
- self:SetHoldType("slam")
- if SERVER then
- ent:keysUnLock()
- ent:Fire("open", "", .6)
- ent:Fire("setanimation", "open", .6)
- end
- self:SetHoldType("normal")
- end
- end
- function SWEP:Holster()
- return true
- end
- function SWEP:Think()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement