Benny/gamemodes/benny/gamemode/modules/weapons/sh_weapons.lua

1552 lines
38 KiB
Lua
Raw Normal View History

2023-09-25 21:12:22 -04:00
FIREMODE_AUTO = {
{ Mode = math.huge },
}
FIREMODE_AUTOSEMI = {
{ Mode = math.huge },
{ Mode = 1 },
}
FIREMODE_SEMI = {
{ Mode = 1 },
}
WEAPONS = {}
function WeaponGet( classname )
return WEAPONS[ classname ]
end
do -- Sound definitions
AddSound( "1911.Fire", {
"benny/weapons/1911/01.ogg",
"benny/weapons/1911/02.ogg",
"benny/weapons/1911/03.ogg",
}, 140, 100, 0.5, CHAN_STATIC )
AddSound( "Bizon.Fire", {
"benny/weapons/bizon/01.ogg",
"benny/weapons/bizon/02.ogg",
"benny/weapons/bizon/03.ogg",
}, 140, 100, 0.5, CHAN_STATIC )
AddSound( "MP5K.Fire", {
"benny/weapons/mp5k/01.ogg",
"benny/weapons/mp5k/02.ogg",
"benny/weapons/mp5k/03.ogg",
}, 140, 100, 0.5, CHAN_STATIC )
AddSound( "MAC11.Fire", {
"benny/weapons/mac11/01.ogg",
"benny/weapons/mac11/02.ogg",
"benny/weapons/mac11/03.ogg",
}, 140, 100, 0.5, CHAN_STATIC )
AddSound( "MP7.Fire", {
"benny/weapons/mp7/01.ogg",
"benny/weapons/mp7/02.ogg",
"benny/weapons/mp7/03.ogg",
}, 140, 100, 0.5, CHAN_STATIC )
AddSound( "TMP.Fire", {
"benny/weapons/tmp/01.ogg",
"benny/weapons/tmp/02.ogg",
"benny/weapons/tmp/03.ogg",
}, 140, 100, 0.5, CHAN_STATIC )
AddSound( "Anaconda.Fire", {
"benny/weapons/anaconda/01.ogg",
"benny/weapons/anaconda/02.ogg",
"benny/weapons/anaconda/03.ogg",
}, 140, 100, 0.5, CHAN_STATIC )
AddSound( "Nambu.Fire", {
"benny/weapons/nambu/01.ogg",
"benny/weapons/nambu/02.ogg",
"benny/weapons/nambu/03.ogg",
}, 140, 100, 0.5, CHAN_STATIC )
AddSound( "USP.Fire", {
"benny/weapons/usp/01.ogg",
"benny/weapons/usp/02.ogg",
"benny/weapons/usp/03.ogg",
}, 140, 100, 0.5, CHAN_STATIC )
AddSound( "Glock.Fire", {
"benny/weapons/glock/01.ogg",
"benny/weapons/glock/02.ogg",
"benny/weapons/glock/03.ogg",
}, 140, 100, 0.5, CHAN_STATIC )
AddSound( "M92.Fire", {
"benny/weapons/m92/01.ogg",
"benny/weapons/m92/02.ogg",
"benny/weapons/m92/03.ogg",
}, 140, 100, 0.5, CHAN_STATIC )
AddSound( "P226.Fire", {
"benny/weapons/p226/01.ogg",
"benny/weapons/p226/02.ogg",
"benny/weapons/p226/03.ogg",
}, 140, 100, 0.5, CHAN_STATIC )
AddSound( "M16A2.Fire", {
"benny/weapons/m16a2/01.ogg",
"benny/weapons/m16a2/02.ogg",
"benny/weapons/m16a2/03.ogg",
}, 140, 100, 0.5, CHAN_STATIC )
AddSound( "FNC.Fire", {
"benny/weapons/fnc/01.ogg",
"benny/weapons/fnc/02.ogg",
"benny/weapons/fnc/03.ogg",
}, 140, 100, 0.5, CHAN_STATIC )
AddSound( "AA12.Fire", "benny/weapons/aa12/01.ogg", 140, 100, 0.5, CHAN_STATIC )
AddSound( "SPAS12.Fire", {
"benny/weapons/spas12/01.ogg",
"benny/weapons/spas12/02.ogg",
"benny/weapons/spas12/03.ogg",
}, 140, 100, 0.5, CHAN_STATIC )
2023-12-10 04:16:21 -05:00
AddSound( "QBBLSW.Fire", {
2023-12-15 04:16:06 -05:00
"benny/weapons/qbblsw/fire-01.ogg",
"benny/weapons/qbblsw/fire-02.ogg",
"benny/weapons/qbblsw/fire-03.ogg",
2023-12-10 04:16:21 -05:00
}, 140, 100, 0.5, CHAN_STATIC )
AddSound( "Stoner63.Fire", {
"benny/weapons/stoner63/01.ogg",
"benny/weapons/stoner63/02.ogg",
"benny/weapons/stoner63/03.ogg",
}, 140, 100, 0.5, CHAN_STATIC )
2023-12-17 01:05:23 -05:00
AddSound( "Barrett.Fire", {
"benny/weapons/barrett/fire-01.ogg",
"benny/weapons/barrett/fire-02.ogg",
"benny/weapons/barrett/fire-03.ogg",
}, 140, 100, 0.5, CHAN_STATIC )
AddSound( "MP5K.MagOut", "benny/weapons/mp5k/magout.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "MP5K.MagIn", "benny/weapons/mp5k/magin.ogg", 70, 100, 0.5, CHAN_STATIC )
2023-12-17 01:05:23 -05:00
AddSound( "MP5K.Cock", "benny/weapons/mp5k/cock.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "MAC11.MagOut", "benny/weapons/mac11/magout.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "MAC11.MagIn", "benny/weapons/mac11/magin.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "MP7.MagOut", "benny/weapons/mp7/magout.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "MP7.MagIn", "benny/weapons/mp7/magin.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "TMP.MagOut", "benny/weapons/tmp/magout.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "TMP.MagIn", "benny/weapons/tmp/magin.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "Bizon.MagOut", "benny/weapons/bizon/magout.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "Bizon.MagIn", "benny/weapons/bizon/magin.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "Anaconda.MagOut", "benny/weapons/anaconda/magout.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "Anaconda.MagIn", "benny/weapons/anaconda/magin.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "Nambu.MagOut", "benny/weapons/nambu/magout.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "Nambu.MagIn", "benny/weapons/nambu/magin.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "P226.MagOut", "benny/weapons/p226/magout.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "P226.MagIn", "benny/weapons/p226/magin.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "M92.MagOut", "benny/weapons/m92/magout.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "M92.MagIn", "benny/weapons/m92/magin.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "1911.MagOut", "benny/weapons/1911/magout.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "1911.MagIn", "benny/weapons/1911/magin.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "USP.MagOut", "benny/weapons/usp/magout.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "USP.MagIn", "benny/weapons/usp/magin.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "Glock.MagOut", "benny/weapons/glock/magout.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "Glock.MagIn", "benny/weapons/glock/magin.ogg", 70, 100, 0.5, CHAN_STATIC )
2023-12-16 20:27:39 -05:00
AddSound( "Glock.Cock", "benny/weapons/glock/cock.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "Deagle.Cock", "benny/weapons/deagle/cock.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "M16A2.MagOut", "benny/weapons/m16a2/magout.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "M16A2.MagIn", "benny/weapons/m16a2/magin.ogg", 70, 100, 0.5, CHAN_STATIC )
2023-12-16 20:27:39 -05:00
AddSound( "M16A2.Cock", "benny/weapons/m16a2/cock.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "FNC.MagOut", "benny/weapons/fnc/magout.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "FNC.MagIn", "benny/weapons/fnc/magin.ogg", 70, 100, 0.5, CHAN_STATIC )
2023-12-16 20:27:39 -05:00
AddSound( "FNC.Cock", "benny/weapons/fnc/cock.ogg", 70, 100, 0.5, CHAN_STATIC )
2023-12-17 01:05:23 -05:00
AddSound( "Barrett.MagOut", "benny/weapons/barrett/magout.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "Barrett.MagIn", "benny/weapons/barrett/magin.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "Barrett.Cock", "benny/weapons/barrett/cock.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "AA12.MagOut", "benny/weapons/aa12/magout.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "AA12.MagIn", "benny/weapons/aa12/magin.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "SPAS12.MagOut", {
"benny/weapons/spas12/magout-01.ogg",
"benny/weapons/spas12/magout-02.ogg",
"benny/weapons/spas12/magout-03.ogg",
}, 70, 100, 0.5, CHAN_STATIC )
AddSound( "SPAS12.MagIn", "benny/weapons/spas12/magin.ogg", 70, 100, 0.5, CHAN_STATIC )
2023-12-15 04:15:56 -05:00
AddSound( "Common.Unload", "benny/weapons/unload.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "Common.Dryfire.Pistol", "benny/weapons/common/06-13.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "Common.Dryfire.Rifle", "benny/weapons/common/06-12.ogg", 70, 100, 0.5, CHAN_STATIC )
2023-12-17 01:05:23 -05:00
AddSound( "Common.Deploy", "benny/weapons/common/magpouch.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "Common.Holster", "benny/weapons/common/magpouchin.ogg", 70, 100, 0.5, CHAN_STATIC )
AddSound( "Common.NoAmmo", "benny/weapons/noammo.ogg", 70, 100, 0.5, CHAN_STATIC )
2023-12-15 04:15:56 -05:00
AddSound( "Common.ReloadFail", "benny/hud/reloadfail.ogg", 70, 100, 0.1, CHAN_STATIC )
end
2023-09-24 18:38:00 -04:00
2023-11-12 00:44:34 -05:00
do -- Toolgun
local ToolGunTools = {
["ammocrate"] = function( self, p, tr )
if SERVER then
2023-11-12 04:56:24 -05:00
local summon = ents.Create( "benny_equipment_ammo" )
2023-11-12 00:44:34 -05:00
summon:SetPos( tr.HitPos + tr.HitNormal )
summon:Spawn()
end
end,
["summon_human"] = function( self, p, tr )
if SERVER then
2023-11-12 04:56:24 -05:00
local summon = ents.Create( "benny_npc_human" )
2023-11-12 00:44:34 -05:00
summon:SetPos( tr.HitPos + tr.HitNormal )
2023-12-30 01:16:00 -05:00
local ang = Angle( 0, p:EyeAngles().y+180, 0 )
summon:SetAngles( ang )
2023-11-12 00:44:34 -05:00
summon:Spawn()
end
end,
2023-12-30 01:16:00 -05:00
["remover"] = function( self, p, tr )
if SERVER then
local ent = tr.Entity
if IsValid( ent ) then
ent:Remove()
return
end
end
end,
2023-11-12 00:44:34 -05:00
}
local function CreateSelect()
local Frame = vgui.Create( "DFrame" )
Frame:SetSize( 300, 85 )
Frame:SetTitle( "Toolgun Select" )
Frame:Center()
Frame:MakePopup()
local Text = Frame:Add( "DLabel" )
Text:Dock( TOP )
Text:DockMargin( 10, 0, 10, 0 )
Text:SetText( "Select a tool." )
local List = Frame:Add( "DComboBox" )
List:Dock( TOP )
2023-12-03 23:24:50 -05:00
List:SetValue(GetConVar("benny_wep_toolgun"):GetString())
2023-11-12 00:44:34 -05:00
List:DockMargin( 10, 0, 10, 0 )
for i, v in SortedPairs( ToolGunTools ) do
List:AddChoice( i )
end
2023-11-12 00:44:34 -05:00
List.OnSelect = function( self, index, value )
2023-12-03 23:24:50 -05:00
RunConsoleCommand( "benny_wep_toolgun", value )
2023-11-12 00:44:34 -05:00
Frame:Remove()
end
2023-11-12 00:44:34 -05:00
end
WEAPONS["toolgun"] = {
Name = "TOOL GUN",
2023-12-30 02:00:40 -05:00
Description = "Developer development device. Hold ALT for Remover",
2023-11-12 00:44:34 -05:00
Type = "special",
WModel = "models/weapons/w_toolgun.mdl",
HoldType = "revolver",
GestureDraw = { ACT_HL2MP_GESTURE_RELOAD_REVOLVER, 0.8 },
Delay = (60/300),
Firemodes = FIREMODE_SEMI,
2023-11-18 00:29:04 -05:00
Custom_Fire = function( self, data )
2023-11-12 00:44:34 -05:00
if self:GetDelay1() > CurTime() then
return true
end
self:SetDelay1( CurTime() + 0.2 )
local p = self:GetOwner()
local tr = p:GetEyeTrace()
2023-12-30 02:00:40 -05:00
local tool = p:KeyDown( IN_WALK ) and "remover" or p:GetInfo( "benny_wep_toolgun" )
if ToolGunTools[tool] then ToolGunTools[tool]( self, p, tr ) else return true end
2023-11-12 00:44:34 -05:00
if CLIENT and IsFirstTimePredicted() then
local vStart = self:GetAttachment( 1 ).Pos
local vPoint = tr.HitPos
local effectdata = EffectData()
effectdata:SetStart( vStart )
effectdata:SetOrigin( vPoint )
util.Effect( "ToolTracer", effectdata )
end
-- Return true to skip weapon logic
return true
end,
2023-11-18 00:29:04 -05:00
Custom_Reload = function( self, data )
2023-12-03 23:24:50 -05:00
if CLIENT then
2023-11-12 00:44:34 -05:00
CreateSelect()
end
-- Return true to skip weapon logic
return true
end,
2023-11-03 13:20:39 -04:00
2023-11-12 00:44:34 -05:00
Features = "firearm",
}
2023-11-18 00:29:04 -05:00
WEAPONS["camera"] = {
Name = "DIRECTOR'S CAMERA",
Description = "Developer development device",
Type = "special",
WModel = "models/maxofs2d/camera.mdl",
HoldType = "camera",
GestureDraw = { ACT_HL2MP_GESTURE_RELOAD_REVOLVER, 0.8 },
Delay = (60/300),
Firemodes = FIREMODE_SEMI,
Custom_Fire = function( self, data )
if self:GetDelay1() > CurTime() then
return true
end
self:SetDelay1( CurTime() + 0.2 )
local p = self:GetOwner()
if CLIENT and IsFirstTimePredicted() then
local zp, za, zf = p:EyePos(), p:EyeAngles(), 90
RunConsoleCommand( "benny_cam_override", zp.x .. " " .. zp.y .. " " .. zp.z .. " " .. za.p .. " " .. za.y .. " " .. za.r .. " " .. zf )
end
-- Return true to skip weapon logic
return true
end,
Custom_Reload = function( self, data )
RunConsoleCommand( "benny_cam_override", "" )
-- Return true to skip weapon logic
return true
end,
Custom_DisableSpecialMovement = function( self, data )
-- Return true to skip weapon logic
if self:GetUserAim() then
return true
end
end,
2023-11-18 00:29:04 -05:00
Custom_CalcView = function( self, data )
if self:GetUserAim() and GetConVar("benny_cam_override"):GetString() == "" then
data.drawviewer = false
data.origin = self:GetOwner():EyePos()
data.angles = self:GetOwner():EyeAngles()
2023-11-18 00:29:04 -05:00
return true -- Return true to halt
end
end,
Features = "firearm",
}
2023-11-12 00:44:34 -05:00
end
2023-11-03 13:20:39 -04:00
2023-11-12 00:44:34 -05:00
do -- Melee
2023-11-12 00:44:34 -05:00
WEAPONS["melee_bat"] = {
Name = "BAT",
2023-11-18 03:40:52 -05:00
Description = "Aluminum bat. Home run!",
2023-11-12 00:44:34 -05:00
Type = "melee",
2023-11-12 00:44:34 -05:00
WModel = "models/weapons/w_crowbar.mdl",
HoldType = "melee2",
2023-11-12 00:44:34 -05:00
Delay = (60/300),
Firemodes = FIREMODE_SEMI,
Ammo = 0,
Damage = 0,
2023-10-31 19:05:52 -04:00
2023-11-12 00:44:34 -05:00
Features = "melee",
}
2023-11-12 00:44:34 -05:00
WEAPONS["melee_baton"] = {
Name = "BATON",
2023-11-18 03:40:52 -05:00
Description = "Weighty beating stick.",
2023-11-12 00:44:34 -05:00
Type = "melee",
2023-10-31 19:05:52 -04:00
2023-11-12 00:44:34 -05:00
WModel = "models/weapons/w_eq_tonfa.mdl",
HoldType = "knife",
2023-11-11 21:08:06 -05:00
2023-11-12 00:44:34 -05:00
Delay = (60/300),
Firemodes = FIREMODE_SEMI,
Ammo = 0,
Damage = 0,
2023-11-11 21:08:06 -05:00
2023-11-12 00:44:34 -05:00
Features = "melee",
}
2023-11-11 21:08:06 -05:00
2023-11-12 00:44:34 -05:00
WEAPONS["melee_knife"] = {
Name = "KNIFE",
2023-11-18 03:40:52 -05:00
Description = "Makes for a great entrée and dessert.",
2023-11-12 00:44:34 -05:00
Type = "melee",
2023-11-11 21:08:06 -05:00
2023-11-12 00:44:34 -05:00
WModel = "models/weapons/w_knife_ct.mdl",
HoldType = "knife",
2023-11-11 21:08:06 -05:00
2023-11-12 00:44:34 -05:00
Delay = (60/300),
Firemodes = FIREMODE_SEMI,
Ammo = 0,
Damage = 0,
2023-11-11 21:08:06 -05:00
2023-11-12 00:44:34 -05:00
Features = "melee",
}
2023-11-11 21:08:06 -05:00
2023-11-12 00:44:34 -05:00
WEAPONS["melee_machete"] = {
Name = "MACHETE",
2023-11-18 03:40:52 -05:00
Description = "Cut up foliage and people!",
2023-11-12 00:44:34 -05:00
Type = "melee",
2023-11-11 21:08:06 -05:00
2023-11-12 00:44:34 -05:00
WModel = "models/props_canal/mattpipe.mdl",
HoldType = "melee2",
2023-11-11 21:08:06 -05:00
2023-11-12 00:44:34 -05:00
Delay = (60/300),
Firemodes = FIREMODE_SEMI,
Ammo = 0,
Damage = 0,
2023-10-31 19:05:52 -04:00
2023-11-12 00:44:34 -05:00
Features = "melee",
}
2023-10-31 19:05:52 -04:00
2023-11-12 00:44:34 -05:00
end
2023-11-12 00:44:34 -05:00
do -- Handguns
WEAPONS["1911"] = {
Name = "COBRA .45",
Description = "Hits hard. They don't make them like they used to!",
Type = "pistol",
Icon = Material( "benny/weapons/mk23.png", "smooth" ),
WModel = "models/weapons/w_colt.mdl",
HoldType = "revolver",
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_PISTOL, 0.2 },
GestureDraw = { ACT_HL2MP_GESTURE_RELOAD_REVOLVER, 0.8 },
Sound_Fire = "1911.Fire",
Sound_DryFire = "Common.Dryfire.Pistol",
Sound_Reload = "1911.Reload",
Sound_MagOut = "1911.MagOut",
Sound_MagIn = "1911.MagIn",
2023-12-17 01:05:23 -05:00
Sound_Cock = "Glock.Cock",
2023-11-12 00:44:34 -05:00
Delay = (60/300),
Firemodes = FIREMODE_SEMI,
Ammo = 8,
Damage = 30,
2023-11-29 02:03:18 -05:00
Spread = 22/60,
SpreadAdd = 0.5,
SpreadAddMax = 15,
SpreadDecay_Start = 3,
SpreadDecay_End = 11,
SpreadDecay_RampTime = 0.5,
2023-11-12 00:44:34 -05:00
2023-12-17 23:10:20 -05:00
Reload_MagOut = 0.1,
Reload_MagIn = 0.75,
Reload_MagIn_Bonus1 = 0.4,
Reload_MagIn_Bonus2 = 0.4+0.15,
Speed_Move = 1,
2023-12-17 21:34:54 -05:00
Speed_Aiming = 0.98,
Speed_Reloading = 1,
Speed_Firing = 1,
2023-11-12 00:44:34 -05:00
Features = "firearm",
}
WEAPONS["usp"] = {
Name = "MK. 23",
Description = "If it works for hardasses around the world, it'll work for you.",
Type = "pistol",
Icon = Material( "benny/weapons/mk23.png", "smooth" ),
WModel = "models/weapons/w_pist_usp.mdl",
HoldType = "revolver",
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_PISTOL, 0.2 },
GestureDraw = { ACT_HL2MP_GESTURE_RELOAD_REVOLVER, 0.8 },
Sound_Fire = "USP.Fire",
Sound_DryFire = "Common.Dryfire.Pistol",
Sound_Reload = "USP.Reload",
Sound_MagOut = "USP.MagOut",
Sound_MagIn = "USP.MagIn",
2023-12-17 01:05:23 -05:00
Sound_Cock = "Glock.Cock",
2023-11-12 00:44:34 -05:00
Delay = (60/300),
Firemodes = FIREMODE_SEMI,
Ammo = 12,
Damage = 32,
2023-11-29 02:03:18 -05:00
Spread = 15/60,
SpreadAdd = 0.4,
SpreadAddMax = 15,
SpreadDecay_Start = 3,
SpreadDecay_End = 11,
SpreadDecay_RampTime = 0.5,
2023-11-12 00:44:34 -05:00
2023-12-17 23:10:20 -05:00
Reload_MagOut = 0.15,
Reload_MagIn = 0.85,
Reload_MagIn_Bonus1 = 0.5,
Reload_MagIn_Bonus2 = 0.5+0.12,
Speed_Move = 1,
2023-12-17 21:34:54 -05:00
Speed_Aiming = 0.98,
Speed_Reloading = 1,
Speed_Firing = 1,
2023-11-12 00:44:34 -05:00
Features = "firearm",
}
WEAPONS["glock"] = {
Name = "GLOCK-18",
Description = "Bullet storm. Lasts about a second or so, just like you!",
Type = "pistol",
Icon = Material( "benny/weapons/mk23.png", "smooth" ),
WModel = "models/weapons/w_pist_glock18.mdl",
HoldType = "revolver",
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_PISTOL, 0.25 },
GestureDraw = { ACT_HL2MP_GESTURE_RELOAD_REVOLVER, 0.8 },
Sound_Fire = "Glock.Fire",
Sound_DryFire = "Common.Dryfire.Pistol",
Sound_MagOut = "Glock.MagOut",
Sound_MagIn = "Glock.MagIn",
2023-12-16 20:27:39 -05:00
Sound_Cock = "Glock.Cock",
2023-11-12 00:44:34 -05:00
Delay = (60/900),
2023-11-12 00:44:34 -05:00
Firemodes = FIREMODE_AUTOSEMI,
Ammo = 17,
Damage = 22,
Spread = 60/60,
SpreadAdd = 0.8,
SpreadAddMax = 15,
SpreadDecay_Start = 3,
SpreadDecay_End = 11,
SpreadDecay_RampTime = 0.5,
2023-12-17 23:10:20 -05:00
Reload_MagOut = 0.25,
Reload_MagIn = 1.1,
Reload_MagIn_Bonus1 = 0.8,
Reload_MagIn_Bonus2 = 0.8+0.08,
Speed_Move = 1,
Speed_Aiming = 0.95,
Speed_Reloading = 0.95,
Speed_Firing = 0.95,
2023-11-12 00:44:34 -05:00
Features = "firearm",
}
WEAPONS["nambu"] = {
Name = "NAMBU .38",
Description = "Eastern revolver that hits as hard as it costs.",
Type = "pistol",
Icon = Material( "benny/weapons/mk23.png", "smooth" ),
WModel = "models/weapons/w_pist_derringer.mdl",
HoldType = "revolver",
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_REVOLVER, 0.3 },
GestureDraw = { ACT_HL2MP_GESTURE_RELOAD_REVOLVER, 0.8 },
Sound_Fire = "Nambu.Fire",
Sound_DryFire = "Common.Dryfire.Pistol",
Sound_MagOut = "Nambu.MagOut",
Sound_MagIn = "Nambu.MagIn",
2023-12-17 01:05:23 -05:00
Sound_Cock = "Glock.Cock",
2023-11-12 00:44:34 -05:00
Delay = (60/180),
Firemodes = FIREMODE_SEMI,
Ammo = 6,
Damage = 36,
2023-11-29 02:03:18 -05:00
Spread = 30/60,
SpreadAdd = 1.5,
SpreadAddMax = 15,
SpreadDecay_Start = 3,
SpreadDecay_End = 11,
SpreadDecay_RampTime = 0.5,
2023-11-12 00:44:34 -05:00
2023-12-17 23:10:20 -05:00
Reload_MagOut = 0.5,
Reload_MagIn = 0.5,
Reload_MagIn_Bonus1 = 0.2,
Reload_MagIn_Bonus2 = 0.2+0.1,
Speed_Move = 1,
Speed_Aiming = 1,
Speed_Reloading = 0.9,
2023-12-17 23:10:20 -05:00
Speed_Firing = 1,
2023-11-12 00:44:34 -05:00
Features = "firearm",
}
WEAPONS["anaconda"] = {
Name = "ANACONDA",
Description = "Precise and kicks like a mule.",
Type = "pistol",
Icon = Material( "benny/weapons/mk23.png", "smooth" ),
WModel = "models/weapons/w_357.mdl",
HoldType = "revolver",
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_REVOLVER, 0.1 },
GestureDraw = { ACT_HL2MP_GESTURE_RELOAD_REVOLVER, 0.8 },
Sound_Fire = "Anaconda.Fire",
Sound_DryFire = "Common.Dryfire.Pistol",
Sound_MagOut = "Anaconda.MagOut",
Sound_MagIn = "Anaconda.MagIn",
2023-12-17 01:05:23 -05:00
Sound_Cock = "Glock.Cock",
2023-11-12 00:44:34 -05:00
Delay = (60/180),
Firemodes = FIREMODE_SEMI,
Ammo = 6,
Damage = 55,
2023-11-29 02:03:18 -05:00
Spread = 30/60,
SpreadAdd = 6,
SpreadAddMax = 15,
SpreadDecay_Start = 6,
SpreadDecay_End = 22,
SpreadDecay_RampTime = 0.65,
2023-11-12 00:44:34 -05:00
2023-12-17 23:10:20 -05:00
Reload_MagOut = 0.6,
Reload_MagIn = 0.6,
Reload_MagIn_Bonus1 = 0.18,
Reload_MagIn_Bonus2 = 0.18+0.08,
Speed_Move = 1.0,
Speed_Aiming = 0.95,
Speed_Reloading = 0.9,
Speed_Firing = 0.95,
2023-11-12 00:44:34 -05:00
Features = "firearm",
}
WEAPONS["deagle"] = {
Name = "DEAGLE",
Description = "Autoloading .50 caliber pistol.",
Type = "pistol",
Icon = Material( "benny/weapons/mk23.png", "smooth" ),
WModel = "models/weapons/w_pist_deagle.mdl",
HoldType = "revolver",
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_CROSSBOW, 0.5 },
GestureDraw = { ACT_HL2MP_GESTURE_RELOAD_REVOLVER, 0.8 },
Sound_Fire = "Anaconda.Fire",
Sound_DryFire = "Common.Dryfire.Pistol",
Sound_MagOut = "Anaconda.MagOut",
Sound_MagIn = "Anaconda.MagIn",
2023-12-16 20:27:39 -05:00
Sound_Cock = "Deagle.Cock",
2023-11-12 00:44:34 -05:00
Delay = (60/180),
Firemodes = FIREMODE_SEMI,
Ammo = 7,
Damage = 47,
2023-11-29 02:03:18 -05:00
Spread = 30/60,
SpreadAdd = 4,
SpreadAddMax = 15,
SpreadDecay_Start = 8,
SpreadDecay_End = 25,
SpreadDecay_RampTime = 0.5,
2023-11-12 00:44:34 -05:00
Speed_Move = 0.95,
2023-12-17 21:34:54 -05:00
Speed_Aiming = 0.95,
Speed_Reloading = 0.95,
Speed_Firing = 0.95,
Speed_FiringTime = 0.5,
2023-11-12 00:44:34 -05:00
Features = "firearm",
}
2023-10-09 03:00:43 -04:00
2023-11-12 00:44:34 -05:00
end
2023-11-12 00:44:34 -05:00
do -- SMGs & PDWs
WEAPONS["tmp"] = {
Name = "TMP",
2023-11-18 03:40:52 -05:00
Description = "Small, compact, and favored by private security.",
2023-11-12 00:44:34 -05:00
Type = "smg",
WModel = "models/weapons/w_smg_tmp_us.mdl",
HoldType = "rpg",
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_PISTOL, 0.3 },
Sound_Fire = "TMP.Fire",
Sound_DryFire = "Common.Dryfire.Rifle",
Sound_Reload = "TMP.Reload",
Sound_MagOut = "TMP.MagOut",
Sound_MagIn = "TMP.MagIn",
2023-12-17 01:05:23 -05:00
Sound_Cock = "MP5K.Cock",
2023-11-12 00:44:34 -05:00
Delay = (60/650),
Firemodes = FIREMODE_AUTOSEMI,
Ammo = 15,
Damage = 22,
2023-11-12 00:44:34 -05:00
Spread = 20/60,
SpreadAdd = 10/60,
SpreadAddMax = 10,
SpreadDecay_Start = 4,
SpreadDecay_End = 30,
SpreadDecay_RampTime = 0.4,
2023-11-12 00:44:34 -05:00
Speed_Move = 0.97,
Speed_Aiming = 0.97,
Speed_Reloading = 0.97,
Speed_Firing = 0.97,
2023-11-12 00:44:34 -05:00
Features = "firearm",
}
WEAPONS["mp7"] = {
Name = "MP7",
2023-11-18 03:40:52 -05:00
Description = "Small, pistol-sized, goes through kevlar like a knife.",
2023-11-12 00:44:34 -05:00
Type = "smg",
WModel = "models/weapons/w_smg1.mdl",
HoldType = "rpg",
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_PISTOL, 0.3 },
Sound_Fire = "MP7.Fire",
Sound_DryFire = "Common.Dryfire.Rifle",
Sound_Reload = "MP7.Reload",
Sound_MagOut = "MP7.MagOut",
Sound_MagIn = "MP7.MagIn",
2023-12-17 01:05:23 -05:00
Sound_Cock = "MP5K.Cock",
2023-11-12 00:44:34 -05:00
2023-12-08 19:30:00 -05:00
Delay = (60/900),
2023-11-12 00:44:34 -05:00
Firemodes = FIREMODE_AUTOSEMI,
Ammo = 20,
Damage = 19,
2023-11-12 00:44:34 -05:00
Spread = 20/60,
SpreadAdd = 20/60,
SpreadAddMax = 10,
SpreadDecay_Start = 2,
SpreadDecay_End = 30,
SpreadDecay_RampTime = 0.2,
2023-11-12 00:44:34 -05:00
Speed_Move = 0.97,
Speed_Aiming = 0.97,
Speed_Reloading = 0.97,
Speed_Firing = 0.97,
2023-11-12 00:44:34 -05:00
Features = "firearm",
}
WEAPONS["mp5k"] = {
Name = "MP5K",
2023-11-18 03:40:52 -05:00
Description = "Quality manufacturing, but a cumbersome reload.",
2023-11-12 00:44:34 -05:00
Type = "smg",
WModel = "models/weapons/w_smg_mp5k.mdl",
HoldType = "rpg",
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_PISTOL, 0.3 },
Sound_Fire = "MP5K.Fire",
Sound_DryFire = "Common.Dryfire.Rifle",
Sound_Reload = "MP5K.Reload",
Sound_MagOut = "MP5K.MagOut",
Sound_MagIn = "MP5K.MagIn",
2023-12-17 01:05:23 -05:00
Sound_Cock = "MP5K.Cock",
2023-11-12 00:44:34 -05:00
Delay = (60/750),
2023-11-12 00:44:34 -05:00
Firemodes = FIREMODE_AUTOSEMI,
Ammo = 15,
Damage = 22,
2023-11-12 00:44:34 -05:00
Spread = 20/60,
SpreadAdd = 10/60,
SpreadAddMax = 10,
SpreadDecay_Start = 3,
SpreadDecay_End = 30,
SpreadDecay_RampTime = 0.3,
2023-11-12 00:44:34 -05:00
Speed_Move = 0.97,
Speed_Aiming = 0.97,
Speed_Reloading = 0.97,
Speed_Firing = 0.97,
2023-11-12 00:44:34 -05:00
Features = "firearm",
}
WEAPONS["mac11"] = {
Name = "MAC-11",
Description = "More fit for combat in a phone booth.",
Type = "smg",
WModel = "models/weapons/w_smg_mac10.mdl",
HoldType = "revolver",
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_PISTOL, 0.1 },
Sound_Fire = "MAC11.Fire",
Sound_DryFire = "Common.Dryfire.Rifle",
Sound_Reload = "MAC11.Reload",
Sound_MagOut = "MAC11.MagOut",
Sound_MagIn = "MAC11.MagIn",
2023-12-17 01:05:23 -05:00
Sound_Cock = "MP5K.Cock",
2023-11-12 00:44:34 -05:00
Delay = (60/1400),
2023-11-12 00:44:34 -05:00
Firemodes = FIREMODE_AUTOSEMI,
Ammo = 16,
Damage = 19,
Spread = 60/60,
SpreadAdd = 30/60,
SpreadAddMax = 20,
SpreadDecay_Start = 10,
SpreadDecay_End = 30,
SpreadDecay_RampTime = 0.3,
2023-11-12 00:44:34 -05:00
Speed_Move = 0.97,
Speed_Aiming = 0.97,
Speed_Reloading = 0.97,
Speed_Firing = 0.97,
2023-11-12 00:44:34 -05:00
Features = "firearm",
}
WEAPONS["bizon"] = {
Name = "BIZON",
Description = "Unwieldy bullet storm.",
Type = "smg",
WModel = "models/weapons/w_smg_bizon.mdl",
HoldType = "rpg",
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_REVOLVER, 0.34 },
Sound_Fire = "Bizon.Fire",
Sound_DryFire = "Common.Dryfire.Rifle",
Sound_Reload = "Bizon.Reload",
Sound_MagOut = "Bizon.MagOut",
Sound_MagIn = "Bizon.MagIn",
2023-12-17 01:05:23 -05:00
Sound_Cock = "MP5K.Cock",
2023-11-12 00:44:34 -05:00
Delay = (60/700),
2023-11-12 00:44:34 -05:00
Firemodes = FIREMODE_AUTOSEMI,
Ammo = 40,
Damage = 20,
2023-11-12 00:44:34 -05:00
Spread = 40/60,
SpreadAdd = 10/60,
SpreadAddMax = 20,
SpreadDecay_Start = 1,
SpreadDecay_End = 10,
SpreadDecay_RampTime = 0.6,
2023-11-12 00:44:34 -05:00
Speed_Move = 0.94,
Speed_Aiming = 0.94,
Speed_Reloading = 0.93,
Speed_Firing = 0.93,
2023-11-12 00:44:34 -05:00
Features = "firearm",
}
WEAPONS["chicom"] = {
2023-11-18 03:40:52 -05:00
Name = "QCW-CQB-21",
2023-11-12 00:44:34 -05:00
Description = "Subsonic bullpup SMG.",
Type = "smg",
WModel = "models/weapons/w_rif_famas.mdl",
HoldType = "rpg",
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_REVOLVER, 0.34 },
Sound_Fire = "M92.Fire",
Sound_DryFire = "Common.Dryfire.Rifle",
Sound_Reload = "Bizon.Reload",
Sound_MagOut = "Bizon.MagOut",
Sound_MagIn = "Bizon.MagIn",
2023-12-17 01:05:23 -05:00
Sound_Cock = "MP5K.Cock",
2023-11-12 00:44:34 -05:00
Delay = (60/1050),
2023-11-12 00:44:34 -05:00
Firemodes = FIREMODE_AUTOSEMI,
Ammo = 36,
Damage = 18,
2023-11-12 00:44:34 -05:00
Spread = 40/60,
SpreadAdd = 33/60,
SpreadAddMax = 20,
SpreadDecay_Start = 4,
SpreadDecay_End = 30,
SpreadDecay_RampTime = 0.7,
2023-11-12 00:44:34 -05:00
Speed_Move = 0.95,
Speed_Aiming = 0.95,
Speed_Reloading = 0.94,
Speed_Firing = 0.94,
2023-11-12 00:44:34 -05:00
Features = "firearm",
}
2023-10-09 03:00:43 -04:00
2023-11-12 00:44:34 -05:00
end
2023-10-09 03:00:43 -04:00
2023-11-12 00:44:34 -05:00
do -- Shotguns
WEAPONS["spas12"] = {
Name = "SPAS-12",
Description = "Heavy metal pump-action shotgun.",
2023-11-12 00:44:34 -05:00
Type = "shotgun",
WModel = "models/weapons/w_shotgun.mdl",
HoldType = "rpg",
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_CROSSBOW, 0.5 },
Sound_Fire = "SPAS12.Fire",
Sound_DryFire = "Common.Dryfire.Rifle",
Sound_MagOut = "SPAS12.MagOut",
Sound_MagIn = "SPAS12.MagIn",
Delay = (60/120),
Firemodes = FIREMODE_SEMI,
Ammo = 8,
Damage = 10,
Pellets = 8,
Spread = 150/60,
SpreadAdd = 150/60,
SpreadAddMax = 20,
2023-12-08 19:30:00 -05:00
SpreadDecay_Start = 2,
SpreadDecay_End = 30,
2023-12-08 19:30:00 -05:00
SpreadDecay_RampTime = 0.7,
2023-11-12 00:44:34 -05:00
2023-12-17 23:10:20 -05:00
Speed_Move = 0.93,
Speed_Aiming = 0.95,
Speed_Reloading = 0.85,
Speed_Firing = 0.75,
2023-11-12 00:44:34 -05:00
Features = "firearm",
}
2023-11-17 22:56:45 -05:00
WEAPONS["doublebarrel"] = {
Name = "D/B",
Description = "Pocket-sized double-barrelled rocket of fun!",
2023-11-17 22:56:45 -05:00
Type = "shotgun",
WModel = "models/weapons/w_shot_shorty.mdl",
HoldType = "rpg",
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_CROSSBOW, 0.5 },
Sound_Fire = "SPAS12.Fire",
Sound_DryFire = "Common.Dryfire.Rifle",
Sound_MagOut = "SPAS12.MagOut",
Sound_MagIn = "SPAS12.MagIn",
Delay = (60/120),
Firemodes = FIREMODE_SEMI,
Ammo = 2,
Damage = 10,
Pellets = 8,
Spread = 300/60,
SpreadAdd = 150/60,
SpreadAddMax = 20,
2023-12-08 19:30:00 -05:00
SpreadDecay_Start = 10,
SpreadDecay_End = 30,
2023-12-08 19:30:00 -05:00
SpreadDecay_RampTime = 0.5,
2023-11-17 22:56:45 -05:00
2023-12-17 23:10:20 -05:00
Speed_Move = 0.95,
Speed_Aiming = 0.95,
Speed_Reloading = 0.9,
Speed_Firing = 0.9,
Features = "firearm",
}
WEAPONS["overunder"] = {
Name = "O/U",
Description = "Full-length double-barrelled bar fight finisher.",
Type = "shotgun",
WModel = "models/weapons/w_shot_kozlice.mdl",
HoldType = "rpg",
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_CROSSBOW, 0.5 },
Sound_Fire = "SPAS12.Fire",
Sound_DryFire = "Common.Dryfire.Rifle",
Sound_MagOut = "SPAS12.MagOut",
Sound_MagIn = "SPAS12.MagIn",
Delay = (60/120),
Firemodes = FIREMODE_SEMI,
Ammo = 2,
Damage = 10,
Pellets = 8,
Spread = 130/60,
SpreadAdd = 130/60,
SpreadAddMax = 20,
SpreadDecay_Start = 10,
SpreadDecay_End = 30,
SpreadDecay_RampTime = 0.5,
Speed_Move = 0.93,
Speed_Aiming = 0.95,
Speed_Reloading = 0.85,
2023-12-17 23:10:20 -05:00
Speed_Firing = 0.85,
2023-11-17 22:56:45 -05:00
Features = "firearm",
}
2023-11-12 00:44:34 -05:00
WEAPONS["aa12"] = {
Name = "AA-12",
Description = "Magazine fed powerhouse.",
2023-11-12 00:44:34 -05:00
Type = "shotgun",
WModel = "models/weapons/w_shot_br99.mdl",
HoldType = "rpg",
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_CROSSBOW, 0.5 },
Sound_Fire = "AA12.Fire",
Sound_DryFire = "Common.Dryfire.Rifle",
Sound_MagOut = "AA12.MagOut",
Sound_MagIn = "AA12.MagIn",
Delay = (60/180),
Firemodes = FIREMODE_AUTO,
Ammo = 8,
Damage = 8,
Pellets = 8,
Spread = 250/60,
SpreadAdd = 150/60,
SpreadAddMax = 20,
SpreadDecay_Start = 700/60,
SpreadDecay_End = 30,
SpreadDecay_RampTime = 1,
2023-11-12 00:44:34 -05:00
2023-12-17 23:10:20 -05:00
Reload_MagOut = 0.5,
Reload_MagIn = 1.5,
Reload_MagIn_Bonus1 = 1.2,
Reload_MagIn_Bonus2 = 1.2+0.1,
Speed_Move = 0.92,
Speed_Aiming = 0.92,
Speed_Reloading = 0.5,
Speed_Firing = 0.334,
2023-12-17 23:10:20 -05:00
Speed_FiringTime = 0.5,
2023-11-12 00:44:34 -05:00
Features = "firearm",
}
2023-11-12 00:44:34 -05:00
end
2023-11-12 00:44:34 -05:00
do -- Rifles
WEAPONS["fnc"] = {
Name = "FNC PARA",
Description = "Run of the mill automatic assault rifle.",
2023-11-12 00:44:34 -05:00
Type = "rifle",
Icon = Material( "benny/weapons/fnc.png", "smooth" ),
WModel = "models/weapons/w_rif_ar556.mdl",
HoldType = "rpg",
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_PISTOL, 0.3 },
Sound_Fire = "FNC.Fire",
Sound_DryFire = "Common.Dryfire.Rifle",
Sound_MagOut = "FNC.MagOut",
Sound_MagIn = "FNC.MagIn",
2023-12-16 20:27:39 -05:00
Sound_Cock = "FNC.Cock",
2023-11-12 00:44:34 -05:00
2023-12-16 18:46:14 -05:00
Delay = (60/700),
2023-11-12 00:44:34 -05:00
Firemodes = FIREMODE_AUTOSEMI,
Ammo = 30,
Damage = 30,
Spread = 30/60,
SpreadAdd = 22/60,
SpreadAddMax = 10,
SpreadDecay_Start = 0,
SpreadDecay_End = 12,
SpreadDecay_RampTime = 0.2,
2023-11-12 00:44:34 -05:00
2023-12-17 23:10:20 -05:00
Reload_MagOut = 0.3,
Reload_MagIn = 1.3,
Reload_MagIn_Bonus1 = 0.8,
Reload_MagIn_Bonus2 = 0.8+0.1,
Speed_Move = 0.95,
Speed_Aiming = 0.95,
Speed_Reloading = 0.95,
Speed_Firing = 0.95,
2023-11-12 00:44:34 -05:00
Features = "firearm",
}
WEAPONS["qbz"] = {
Name = "QBZ-95",
Description = "Bullpup assault rifle. Low profile, great in close quarters.",
2023-11-12 00:44:34 -05:00
Type = "rifle",
Icon = Material( "benny/weapons/fnc.png", "smooth" ),
WModel = "models/weapons/w_rif_bakm.mdl",
HoldType = "rpg",
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_PISTOL, 0.3 },
2023-12-10 04:16:21 -05:00
Sound_Fire = "QBBLSW.Fire",
2023-11-12 00:44:34 -05:00
Sound_DryFire = "Common.Dryfire.Rifle",
Sound_MagOut = "FNC.MagOut",
Sound_MagIn = "FNC.MagIn",
2023-12-16 20:27:39 -05:00
Sound_Cock = "FNC.Cock",
2023-11-12 00:44:34 -05:00
Delay = (60/800),
2023-11-12 00:44:34 -05:00
Firemodes = FIREMODE_AUTOSEMI,
Ammo = 30,
Damage = 28,
Spread = 45/60,
SpreadAdd = 35/60,
SpreadAddMax = 10,
SpreadDecay_Start = 12,
SpreadDecay_End = 36,
SpreadDecay_RampTime = 0.6,
2023-11-12 00:44:34 -05:00
2023-12-17 23:10:20 -05:00
Reload_MagOut = 0.4,
Reload_MagIn = 1.5,
Reload_MagIn_Bonus1 = 0.8,
Reload_MagIn_Bonus2 = 0.8+0.1,
Speed_Move = 0.975,
Speed_Aiming = 0.975,
Speed_Reloading = 0.975,
Speed_Firing = 0.975,
2023-11-12 00:44:34 -05:00
Features = "firearm",
}
WEAPONS["m16a2"] = {
Name = "M16A2",
Description = "Burst-fire assault rifle. Precise and effective at range.",
2023-11-12 00:44:34 -05:00
Type = "rifle",
Icon = Material( "benny/weapons/m16a2.png", "smooth" ),
WModel = "models/weapons/w_rif_m16a2.mdl",
HoldType = "rpg",
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_PISTOL, 0.3 },
Sound_Fire = "M16A2.Fire",
Sound_DryFire = "Common.Dryfire.Rifle",
Sound_MagOut = "M16A2.MagOut",
Sound_MagIn = "M16A2.MagIn",
2023-12-16 20:27:39 -05:00
Sound_Cock = "M16A2.Cock",
2023-11-12 00:44:34 -05:00
Delay = (60/700),
Firemodes = {
{ Mode = 3 },
{ Mode = 1 },
},
Ammo = 30,
Damage = 32,
Spread = 22/60,
SpreadAdd = 11/60,
SpreadAddMax = 10,
SpreadDecay_Start = 0,
SpreadDecay_End = 12,
SpreadDecay_RampTime = 0.3,
2023-11-12 00:44:34 -05:00
2023-12-17 23:10:20 -05:00
Reload_MagOut = 0.3,
Reload_MagIn = 1.3,
Reload_MagIn_Bonus1 = 0.6,
Reload_MagIn_Bonus2 = 0.6+0.1,
Speed_Move = 0.95,
Speed_Aiming = 0.9,
Speed_Reloading = 0.95,
Speed_Firing = 0.9,
Features = "firearm",
}
end
do -- Sniper rifles
WEAPONS["barrett"] = {
Name = "BARRETT .50c",
Description = "Semi-automatic .50 slinger. Turns people into slushie!",
Type = "sniper",
Icon = Material( "benny/weapons/m16a2.png", "smooth" ),
2023-12-17 01:05:23 -05:00
WModel = "models/weapons/w_snip_awp.mdl",
HoldType = "rpg",
2023-12-17 01:05:23 -05:00
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_CROSSBOW, 0.1 },
2023-12-17 01:05:23 -05:00
Sound_Fire = "Barrett.Fire",
Sound_DryFire = "Common.Dryfire.Rifle",
2023-12-17 01:05:23 -05:00
Sound_MagOut = "Barrett.MagOut",
Sound_MagIn = "Barrett.MagIn",
Sound_Cock = "Barrett.Cock",
2023-12-17 21:34:54 -05:00
ShootHolsterTime = 1,
Delay = (60/140),
2023-12-17 01:05:23 -05:00
Firemodes = FIREMODE_SEMI,
Ammo = 5,
Damage = 99,
Spread = 5/60,
SpreadAdd = 9,
SpreadAddMax = 18,
SpreadDecay_Start = 4,
SpreadDecay_End = 22,
SpreadDecay_RampTime = 1,
2023-12-17 01:05:23 -05:00
Reload_MagOut = 0.5,
Reload_MagIn = 1.5,
Reload_MagIn_Bonus1 = 1.0,
Reload_MagIn_Bonus2 = 1.0+0.1,
Speed_Move = 0.75,
Speed_Aiming = 0.75,
Speed_Reloading = 0.5,
Speed_Firing = 0.334,
2023-12-17 21:34:54 -05:00
Speed_FiringTime = 1,
2023-11-12 00:44:34 -05:00
Features = "firearm",
}
2023-10-09 03:00:43 -04:00
2023-11-12 00:44:34 -05:00
end
2023-11-03 13:20:39 -04:00
2023-11-12 00:44:34 -05:00
do -- Machine guns
WEAPONS["stoner63"] = {
Name = "STONER 63",
2023-12-08 19:30:00 -05:00
Description = "Box-fed light machine gun that maintains mid-range authority.",
2023-11-12 00:44:34 -05:00
Type = "machinegun",
WModel = "models/weapons/w_mach_hk21e.mdl",
HoldType = "rpg",
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_REVOLVER, 0.3 },
2023-12-10 04:16:21 -05:00
Sound_Fire = "Stoner63.Fire",
2023-11-12 00:44:34 -05:00
Sound_DryFire = "Common.Dryfire.Rifle",
Sound_MagOut = "M16A2.MagOut",
Sound_MagIn = "M16A2.MagIn",
2023-12-08 19:30:00 -05:00
Delay = (60/650),
2023-11-12 00:44:34 -05:00
Firemodes = FIREMODE_AUTOSEMI,
Ammo = 75,
Damage = 32,
2023-12-08 19:30:00 -05:00
Spread = 26/60,
SpreadAdd = 22/60,
SpreadAddMax = 10,
SpreadDecay_Start = 4,
SpreadDecay_End = 36,
SpreadDecay_RampTime = 0.6,
2023-11-12 00:44:34 -05:00
Speed_Move = 0.8,
Speed_Aiming = 0.75,
Speed_Reloading = 0.5,
Speed_Firing = 0.334,
2023-11-12 00:44:34 -05:00
Features = "firearm",
}
WEAPONS["qbblsw"] = {
2023-11-18 03:40:52 -05:00
Name = "QBB-LSW-42",
2023-12-08 19:30:00 -05:00
Description = "Bullpup mag-fed light machine gun that excels in close quarters.",
2023-11-12 00:44:34 -05:00
Type = "machinegun",
WModel = "models/weapons/w_mach_mg36.mdl",
HoldType = "rpg",
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_REVOLVER, 0.3 },
2023-12-10 04:16:21 -05:00
Sound_Fire = "QBBLSW.Fire",
2023-11-12 00:44:34 -05:00
Sound_DryFire = "Common.Dryfire.Rifle",
Sound_MagOut = "M16A2.MagOut",
Sound_MagIn = "M16A2.MagIn",
2023-12-08 19:30:00 -05:00
Delay = (60/850),
2023-11-12 00:44:34 -05:00
Firemodes = FIREMODE_AUTOSEMI,
Ammo = 60,
Damage = 29,
2023-12-08 19:30:00 -05:00
Spread = 36/60,
SpreadAdd = 33/60,
SpreadAddMax = 15,
SpreadDecay_Start = 6,
SpreadDecay_End = 36,
SpreadDecay_RampTime = 0.4,
2023-11-12 00:44:34 -05:00
Speed_Move = 0.8,
Speed_Aiming = 0.8,
Speed_Reloading = 0.75,
Speed_Firing = 0.334,
2023-11-12 00:44:34 -05:00
Features = "firearm",
}
2023-11-03 13:20:39 -04:00
2023-11-12 00:44:34 -05:00
end
2023-11-03 13:20:39 -04:00
2023-11-12 00:44:34 -05:00
do -- Grenades, nothing here is guaranteed.
2023-12-17 23:10:20 -05:00
local function GrenadeFire( self, data, class, hand )
2023-11-12 00:44:34 -05:00
local p = self:GetOwner()
2023-11-13 21:48:11 -05:00
if self:GetGrenadeDown() then
2023-11-12 00:44:34 -05:00
return true
end
2023-12-17 23:10:20 -05:00
if self:D_GetHolstering( hand ) > 0 then
return true
end
2023-11-03 13:20:39 -04:00
2023-11-13 21:48:11 -05:00
self:SetGrenadeDown( true )
self:SetGrenadeDownStart( CurTime() )
2023-11-13 21:48:11 -05:00
return true
end
2023-11-03 13:20:39 -04:00
2023-11-13 21:48:11 -05:00
local function GrenadeReload( self, data )
2023-11-11 21:08:06 -05:00
return true
end
local function GrenadeCreate( self, data )
2023-11-13 21:48:11 -05:00
-- PROTO: See to getting this done better. Maybe it's spawned while priming the nade for low CL-SV/phys delay?
local p = self:GetOwner()
local class = WeaponGet(data.Class)
2023-11-13 21:48:11 -05:00
local GENT = ents.Create( class.GrenadeEnt )
GENT:SetOwner( p )
local ang = p:EyeAngles()
ang.p = ang.p - 5
GENT:SetPos( p:EyePos() + (ang:Forward()*16) )
GENT:SetAngles( ang + Angle( 0, 0, -90 ) )
GENT.Fuse = self:GetGrenadeDownStart() + class.GrenadeFuse
GENT:Spawn()
local velocity = ang:Forward() * 1500
velocity:Mul( Lerp( math.TimeFraction( 90, 0, ang.p ), 0, 1 ) )
-- velocity:Add( p:EyeAngles():Up() * 500 * Lerp( math.TimeFraction( 0, -90, p:EyeAngles().p ), 0, 1 ) )
GENT:GetPhysicsObject():SetVelocity( velocity )
end
local function GrenadeThrow( self, data )
local p = self:GetOwner()
local class = WeaponGet(data.Class)
self:SetGrenadeDown( false )
-- TEMP: Do this right!
if !class.GrenadeCharge then self:SetGrenadeDownStart( CurTime() ) end
--
2023-11-29 02:45:36 -05:00
local hand = (self:BTable( true ) and self:BTable( true ).Class == data.Class) or false
self:TPFire( hand )
if SERVER then GrenadeCreate( self, data ) end
2023-11-29 02:45:36 -05:00
local id = self:D_GetID( hand )
self:BHolster( hand )
if SERVER or (CLIENT and IsFirstTimePredicted()) then
p:INV_Discard( id )
end
2023-11-29 02:45:36 -05:00
-- local subsequent = p:INV_Find( data.Class )[1]
-- if subsequent then
-- self:BDeploy( hand, subsequent )
-- end
end
2023-12-17 23:10:20 -05:00
local function GrenadeThink( self, data, class, hand )
2023-11-13 21:48:11 -05:00
local p = self:GetOwner()
local class = WeaponGet(data.Class)
2023-11-13 21:48:11 -05:00
if self:GetGrenadeDown() then
2023-11-29 02:45:36 -05:00
if true or ( CurTime() >= (self:GetGrenadeDownStart() + class.GrenadeFuse) ) then
GrenadeThrow( self, data )
2023-11-13 21:48:11 -05:00
end
end
2023-11-12 04:56:24 -05:00
return true
end
2023-11-13 21:48:11 -05:00
local function GrenadeHolster( self, data )
if self:GetGrenadeDown() then
GrenadeThrow( self, data )
2023-11-13 21:48:11 -05:00
end
2023-11-12 00:44:34 -05:00
return true
2023-11-11 21:08:06 -05:00
end
2023-11-12 00:44:34 -05:00
WEAPONS["g_frag"] = {
Name = "FRAG GRENADE",
Description = "Pull the pin and throw it the hell away!",
Type = "grenade",
2023-11-18 00:29:04 -05:00
Custom_Fire = GrenadeFire,
Custom_Reload = GrenadeReload,
Custom_Think = GrenadeThink,
Custom_Holster = GrenadeHolster,
2023-11-12 04:56:24 -05:00
GrenadeEnt = "benny_grenade_frag",
GrenadeFuse = 4,
GrenadeCharge = true,
2023-11-12 00:44:34 -05:00
2023-11-12 04:56:24 -05:00
WModel = "models/weapons/w_eq_fraggrenade.mdl",
2023-11-12 00:44:34 -05:00
HoldType = "grenade",
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_GRENADE, 0 },
Features = "grenade",
}
WEAPONS["g_semtex"] = {
Name = "SEMTEX GRENADE",
Description = "Long, audible fuse, but sticks to whatever it touches.",
Type = "grenade",
2023-11-12 04:56:24 -05:00
2023-11-18 00:29:04 -05:00
Custom_Fire = GrenadeFire,
Custom_Reload = GrenadeReload,
Custom_Think = GrenadeThink,
Custom_Holster = GrenadeHolster,
2023-11-12 04:56:24 -05:00
GrenadeEnt = "benny_grenade_semtex",
GrenadeFuse = 4,
GrenadeCharge = true,
2023-11-12 00:44:34 -05:00
WModel = "models/weapons/w_eq_flashbang.mdl",
2023-11-12 04:56:24 -05:00
HoldType = "grenade",
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_GRENADE, 0 },
2023-11-12 00:44:34 -05:00
Features = "grenade",
}
WEAPONS["g_molotov"] = {
Name = "MOLOTOV COCKTAIL",
Description = "Alcoholic bottle of flame!",
Type = "grenade",
2023-11-12 04:56:24 -05:00
2023-11-18 00:29:04 -05:00
Custom_Fire = GrenadeFire,
Custom_Reload = GrenadeReload,
Custom_Think = GrenadeThink,
Custom_Holster = GrenadeHolster,
2023-11-12 04:56:24 -05:00
GrenadeEnt = "benny_grenade_molotov",
GrenadeFuse = 4,
GrenadeCharge = true,
2023-11-12 00:44:34 -05:00
WModel = "models/weapons/w_eq_flashbang.mdl",
2023-11-12 04:56:24 -05:00
HoldType = "grenade",
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_GRENADE, 0 },
2023-11-12 00:44:34 -05:00
Features = "grenade",
}
WEAPONS["g_tknife"] = {
Name = "THROWING KNIFE",
Description = "Lightweight knife to throw and pick back up.",
Type = "grenade",
2023-11-12 04:56:24 -05:00
2023-11-18 00:29:04 -05:00
Custom_Fire = GrenadeFire,
Custom_Reload = GrenadeReload,
Custom_Think = GrenadeThink,
Custom_Holster = GrenadeHolster,
2023-11-12 04:56:24 -05:00
GrenadeEnt = "benny_grenade_tknife",
GrenadeFuse = 4,
GrenadeCharge = true,
2023-11-12 00:44:34 -05:00
WModel = "models/weapons/w_eq_flashbang.mdl",
2023-11-12 04:56:24 -05:00
HoldType = "grenade",
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_GRENADE, 0 },
2023-11-12 00:44:34 -05:00
Features = "grenade",
}
WEAPONS["g_smoke"] = {
Name = "SMOKE GRENADE",
Description = "Smoke bomb used to conceal a position, and makes enemies cough.",
Type = "grenade",
2023-11-12 04:56:24 -05:00
2023-11-18 00:29:04 -05:00
Custom_Fire = GrenadeFire,
Custom_Reload = GrenadeReload,
Custom_Think = GrenadeThink,
Custom_Holster = GrenadeHolster,
2023-11-12 04:56:24 -05:00
GrenadeEnt = "benny_grenade_smoke",
GrenadeFuse = 4,
GrenadeCharge = true,
2023-11-12 00:44:34 -05:00
WModel = "models/weapons/w_eq_flashbang.mdl",
2023-11-12 04:56:24 -05:00
HoldType = "grenade",
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_GRENADE, 0 },
2023-11-12 00:44:34 -05:00
Features = "grenade",
}
WEAPONS["g_flashbang"] = {
Name = "FLASHBANG",
Description = "Stun grenade that gives off a bright flash and a loud 'bang'.",
Type = "grenade",
2023-11-12 04:56:24 -05:00
2023-11-18 00:29:04 -05:00
Custom_Fire = GrenadeFire,
Custom_Reload = GrenadeReload,
Custom_Think = GrenadeThink,
Custom_Holster = GrenadeHolster,
2023-11-12 04:56:24 -05:00
GrenadeEnt = "benny_grenade_flashbang",
GrenadeFuse = 2,
GrenadeCharge = false,
2023-11-12 00:44:34 -05:00
WModel = "models/weapons/w_eq_flashbang.mdl",
2023-11-12 04:56:24 -05:00
HoldType = "grenade",
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_GRENADE, 0 },
2023-11-12 00:44:34 -05:00
Features = "grenade",
}
WEAPONS["g_prox"] = {
Name = "PROXIMITY MINE",
Description = "Mine that bounces into the air.",
Type = "grenade",
2023-11-12 04:56:24 -05:00
2023-11-18 00:29:04 -05:00
Custom_Fire = GrenadeFire,
Custom_Reload = GrenadeReload,
Custom_Think = GrenadeThink,
Custom_Holster = GrenadeHolster,
2023-11-12 04:56:24 -05:00
GrenadeEnt = "benny_grenade_prox",
GrenadeFuse = 4,
GrenadeCharge = true,
2023-11-12 00:44:34 -05:00
WModel = "models/weapons/w_eq_flashbang.mdl",
2023-11-12 04:56:24 -05:00
HoldType = "grenade",
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_GRENADE, 0 },
2023-11-12 00:44:34 -05:00
Features = "grenade",
}
end
2023-11-12 00:44:34 -05:00
do -- Equipment, nothing here is guaranteed.
WEAPONS["e_medkit"] = {
Name = "MEDKIT",
Description = "Station that regenerates a portion of health.",
Type = "equipment",
WModel = "models/weapons/w_eq_flashbang.mdl",
Features = "grenade",
}
WEAPONS["e_ammo"] = {
Name = "AMMO CRATE",
Description = "Station that replenishes ammo.",
Type = "equipment",
WModel = "models/weapons/w_eq_flashbang.mdl",
Features = "grenade",
}
end
-- Ammo generator
2023-12-17 23:10:20 -05:00
for class, data in SortedPairs( WEAPONS ) do
if data.Features == "firearm" then
WEAPONS["mag_" .. class] = {
Name = "MAG: " .. WEAPONS[class].Name,
Description = "Magazine for the " .. WEAPONS[class].Name .. ".",
Type = "magazine",
WModel = "models/weapons/w_pist_glock18.mdl",
HoldType = "slam",
Ammo = WEAPONS[class].Ammo,
Features = "magazine",
}
end
2023-11-12 00:44:34 -05:00
end