zombiesurvival-evolved/gamemodes/zombiesurvival/entities/weapons/weapon_zs_blaster.lua

68 lines
1.8 KiB
Lua
Raw Normal View History

2014-10-02 08:49:54 +08:00
AddCSLuaFile()
SWEP.Base = "weapon_zs_baseshotgun"
SWEP.PrintName = "'Blaster' Shotgun"
SWEP.Description = "A basic shotgun that can deal significant amounts of damage at close range."
2014-10-02 08:49:54 +08:00
if CLIENT then
SWEP.ViewModelFlip = false
SWEP.HUD3DPos = Vector(4, -3.5, -1.2)
SWEP.HUD3DAng = Angle(90, 0, -30)
SWEP.HUD3DScale = 0.02
SWEP.HUD3DBone = "SS.Grip.Dummy"
end
SWEP.HoldType = "shotgun"
SWEP.ViewModel = "models/weapons/v_supershorty/v_supershorty.mdl"
SWEP.WorldModel = "models/weapons/w_supershorty.mdl"
SWEP.UseHands = false
2014-10-02 08:49:54 +08:00
SWEP.ReloadDelay = 0.4
SWEP.Primary.Sound = Sound("Weapon_Shotgun.NPC_Single")
SWEP.Primary.Damage = 8.325
SWEP.Primary.NumShots = 8
2014-10-02 08:49:54 +08:00
SWEP.Primary.Delay = 0.8
SWEP.Primary.ClipSize = 5
2014-10-02 08:49:54 +08:00
SWEP.Primary.Automatic = false
SWEP.Primary.Ammo = "buckshot"
GAMEMODE:SetupDefaultClip(SWEP.Primary)
SWEP.ConeMax = 8.75
SWEP.ConeMin = 5
2014-10-02 08:49:54 +08:00
SWEP.WalkSpeed = SPEED_SLOWER
SWEP.PumpSound = Sound("Weapon_M3.Pump")
SWEP.ReloadSound = Sound("Weapon_Shotgun.Reload")
2014-10-02 08:49:54 +08:00
SWEP.PumpActivity = ACT_SHOTGUN_PUMP
2014-10-02 08:49:54 +08:00
GAMEMODE:AttachWeaponModifier(SWEP, WEAPON_MODIFIER_CLIP_SIZE, 1)
GAMEMODE:AddNewRemantleBranch(SWEP, 1, "'Blaster' Slug Gun", "Single accurate slug round, less total damage", function(wept)
wept.Primary.Damage = wept.Primary.Damage * 5.5
wept.Primary.NumShots = 1
wept.ConeMin = wept.ConeMin * 0.15
wept.ConeMax = wept.ConeMax * 0.3
end)
2014-10-02 08:49:54 +08:00
function SWEP:SendWeaponAnimation()
self:SendWeaponAnim(ACT_VM_PRIMARYATTACK)
self:GetOwner():GetViewModel():SetPlaybackRate(self.FireAnimSpeed)
2014-10-02 08:49:54 +08:00
timer.Simple(0.15, function()
if IsValid(self) then
self:SendWeaponAnim(ACT_SHOTGUN_PUMP)
self:GetOwner():GetViewModel():SetPlaybackRate(self.FireAnimSpeed)
2014-10-02 08:49:54 +08:00
if CLIENT and self:GetOwner() == MySelf then
self:EmitSound("weapons/m3/m3_pump.wav", 65, 100, 0.4, CHAN_AUTO)
end
2014-10-02 08:49:54 +08:00
end
end)
2014-10-02 08:49:54 +08:00
end