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

1166 lines
28 KiB
Lua

FIREMODE_AUTO = {
{ Mode = math.huge },
}
FIREMODE_AUTOSEMI = {
{ Mode = math.huge },
{ Mode = 1 },
}
FIREMODE_SEMI = {
{ Mode = 1 },
}
WEAPONS = {}
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 )
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 )
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 )
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 )
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 )
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 )
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 )
AddSound( "Common.NoAmmo", "benny/weapons/noammo.ogg", 70, 100, 0.5, CHAN_STATIC )
do -- Toolgun
CreateClientConVar( "benny_toolgun", "", true, true )
local ToolGunTools = {
["ammocrate"] = function( self, p, tr )
if SERVER then
local summon = ents.Create( "bitem_ammo" )
summon:SetPos( tr.HitPos + tr.HitNormal )
summon:Spawn()
end
end,
["summon_human"] = function( self, p, tr )
if SERVER then
local summon = ents.Create( "bnpc_human" )
summon:SetPos( tr.HitPos + tr.HitNormal )
summon:Spawn()
end
end,
}
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 )
List:SetValue(GetConVar("benny_toolgun"):GetString())
List:DockMargin( 10, 0, 10, 0 )
for i, v in SortedPairs( ToolGunTools ) do
List:AddChoice( i )
end
List.OnSelect = function( self, index, value )
RunConsoleCommand( "benny_toolgun", value )
Frame:Remove()
end
end
WEAPONS["toolgun"] = {
Name = "TOOL GUN",
Description = "Developer development device",
Type = "special",
WModel = "models/weapons/w_toolgun.mdl",
HoldType = "revolver",
GestureDraw = { ACT_HL2MP_GESTURE_RELOAD_REVOLVER, 0.8 },
Delay = (60/300),
Firemodes = FIREMODE_SEMI,
Ammo = 0,
Damage = 0,
Fire = function( self, slot )
if self:GetDelay1() > CurTime() then
return true
end
self:SetDelay1( CurTime() + 0.2 )
local p = self:GetOwner()
local tr = p:GetEyeTrace()
local tool = p:GetInfo( "benny_toolgun" )
if ToolGunTools[tool] then ToolGunTools[tool]( self, p, tr ) end
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,
Reload = function( self, slot )
if CLIENT and self:GetOwner():KeyPressed( IN_RELOAD ) then
CreateSelect()
end
-- Return true to skip weapon logic
return true
end,
Features = "firearm",
}
end
do -- Melee
WEAPONS["melee_bat"] = {
Name = "BAT",
Description = "meow",
Type = "melee",
WModel = "models/weapons/w_crowbar.mdl",
HoldType = "melee2",
Delay = (60/300),
Firemodes = FIREMODE_SEMI,
Ammo = 0,
Damage = 0,
Features = "melee",
}
WEAPONS["melee_baton"] = {
Name = "BATON",
Description = "meow",
Type = "melee",
WModel = "models/weapons/w_eq_tonfa.mdl",
HoldType = "knife",
Delay = (60/300),
Firemodes = FIREMODE_SEMI,
Ammo = 0,
Damage = 0,
Features = "melee",
}
WEAPONS["melee_knife"] = {
Name = "KNIFE",
Description = "meow",
Type = "melee",
WModel = "models/weapons/w_knife_ct.mdl",
HoldType = "knife",
Delay = (60/300),
Firemodes = FIREMODE_SEMI,
Ammo = 0,
Damage = 0,
Features = "melee",
}
WEAPONS["melee_machete"] = {
Name = "MACHETE",
Description = "meow",
Type = "melee",
WModel = "models/props_canal/mattpipe.mdl",
HoldType = "melee2",
Delay = (60/300),
Firemodes = FIREMODE_SEMI,
Ammo = 0,
Damage = 0,
Features = "melee",
}
end
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",
Delay = (60/300),
Firemodes = FIREMODE_SEMI,
Ammo = 8,
Damage = 30,
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",
Delay = (60/300),
Firemodes = FIREMODE_SEMI,
Ammo = 12,
Damage = 30,
Features = "firearm",
}
WEAPONS["m92"] = {
Name = "M92FS",
Description = "Accurate pistol, but low caliber won't do much against armor.",
Type = "pistol",
Icon = Material( "benny/weapons/mk23.png", "smooth" ),
WModel = "models/weapons/w_pist_elite_single.mdl",
HoldType = "revolver",
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_PISTOL, 0.2 },
GestureDraw = { ACT_HL2MP_GESTURE_RELOAD_REVOLVER, 0.8 },
Sound_Fire = "M92.Fire",
Sound_DryFire = "Common.Dryfire.Pistol",
Sound_Reload = "USP.Reload",
Sound_MagOut = "USP.MagOut",
Sound_MagIn = "USP.MagIn",
Delay = (60/400),
Firemodes = FIREMODE_SEMI,
Ammo = 15,
Damage = 30,
Features = "firearm",
}
WEAPONS["p226"] = {
Name = "P226",
Description = "Special forces pistol in fast .357 ammo.",
Type = "pistol",
Icon = Material( "benny/weapons/mk23.png", "smooth" ),
WModel = "models/weapons/w_pist_p228.mdl",
HoldType = "revolver",
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_PISTOL, 0.2 },
GestureDraw = { ACT_HL2MP_GESTURE_RELOAD_REVOLVER, 0.8 },
Sound_Fire = "P226.Fire",
Sound_DryFire = "Common.Dryfire.Pistol",
Sound_Reload = "USP.Reload",
Sound_MagOut = "P226.MagOut",
Sound_MagIn = "P226.MagIn",
Delay = (60/350),
Firemodes = FIREMODE_SEMI,
Ammo = 13,
Damage = 30,
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",
Delay = (60/800),
Firemodes = FIREMODE_AUTOSEMI,
Ammo = 17,
Damage = 18,
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",
Delay = (60/180),
Firemodes = FIREMODE_SEMI,
Ammo = 6,
Damage = 26,
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",
Delay = (60/180),
Firemodes = FIREMODE_SEMI,
Ammo = 6,
Damage = 40,
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",
Delay = (60/180),
Firemodes = FIREMODE_SEMI,
Ammo = 7,
Damage = 40,
Features = "firearm",
}
end
do -- SMGs & PDWs
WEAPONS["tmp"] = {
Name = "TMP",
Description = "Small, compact, and fast.",
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",
Delay = (60/650),
Firemodes = FIREMODE_AUTOSEMI,
Ammo = 15,
Damage = 18,
Spread = 20/60,
Features = "firearm",
}
WEAPONS["mp7"] = {
Name = "MP7",
Description = "Small, pistol-sized.",
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",
Delay = (60/700),
Firemodes = FIREMODE_AUTOSEMI,
Ammo = 20,
Damage = 16,
Spread = 20/60,
Features = "firearm",
}
WEAPONS["mp5k"] = {
Name = "MP5K",
Description = "Quality manufacturing, but cumbersome.",
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",
Delay = (60/700),
Firemodes = FIREMODE_AUTOSEMI,
Ammo = 15,
Damage = 18,
Spread = 20/60,
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",
Delay = (60/770),
Firemodes = FIREMODE_AUTOSEMI,
Ammo = 16,
Damage = 16,
Spread = 30/60,
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",
Delay = (60/525),
Firemodes = FIREMODE_AUTOSEMI,
Ammo = 40,
Damage = 16,
Spread = 40/60,
Features = "firearm",
}
WEAPONS["chicom"] = {
Name = "QCW-CQB",
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",
Delay = (60/525),
Firemodes = FIREMODE_AUTOSEMI,
Ammo = 36,
Damage = 12,
Spread = 40/60,
Features = "firearm",
}
end
do -- Shotguns
WEAPONS["spas12"] = {
Name = "SPAS-12",
Description = "meow",
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,
Features = "firearm",
}
WEAPONS["cqb70"] = {
Name = "CS-70",
Description = "meow",
Type = "shotgun",
WModel = "models/weapons/w_shot_cs3.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/120),
Firemodes = FIREMODE_SEMI,
Ammo = 4,
Damage = 10,
Pellets = 8,
Spread = 150/60,
Features = "firearm",
}
WEAPONS["m12ak"] = {
Name = "M12AK",
Description = "meow",
Type = "shotgun",
WModel = "models/weapons/w_shot_saiga.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/160),
Firemodes = FIREMODE_SEMI,
Ammo = 5,
Damage = 10,
Pellets = 8,
Spread = 150/60,
Features = "firearm",
}
WEAPONS["aa12"] = {
Name = "AA-12",
Description = "meow",
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,
Features = "firearm",
}
end
do -- Rifles
WEAPONS["fnc"] = {
Name = "FNC PARA",
Description = "meow",
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",
Delay = (60/600),
Firemodes = FIREMODE_AUTOSEMI,
Ammo = 30,
Damage = 10,
Features = "firearm",
}
WEAPONS["qbz"] = {
Name = "QBZ-95",
Description = "Bullpup assault rifle.",
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 },
Sound_Fire = "FNC.Fire",
Sound_DryFire = "Common.Dryfire.Rifle",
Sound_MagOut = "FNC.MagOut",
Sound_MagIn = "FNC.MagIn",
Delay = (60/600),
Firemodes = FIREMODE_AUTOSEMI,
Ammo = 30,
Damage = 10,
Features = "firearm",
}
WEAPONS["m16a2"] = {
Name = "M16A2",
Description = "meow",
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",
Delay = (60/700),
Firemodes = {
{ Mode = 3 },
{ Mode = 1 },
},
Ammo = 30,
Damage = 10,
Features = "firearm",
}
end
do -- Machine guns
WEAPONS["stoner63"] = {
Name = "STONER 63",
Description = "meow",
Type = "machinegun",
WModel = "models/weapons/w_mach_hk21e.mdl",
HoldType = "rpg",
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_REVOLVER, 0.3 },
Sound_Fire = "FNC.Fire",
Sound_DryFire = "Common.Dryfire.Rifle",
Sound_MagOut = "M16A2.MagOut",
Sound_MagIn = "M16A2.MagIn",
Delay = (60/550),
Firemodes = FIREMODE_AUTOSEMI,
Ammo = 75,
Damage = 10,
Features = "firearm",
}
WEAPONS["qbblsw"] = {
Name = "QBB-LSW",
Description = "Bullpup light machine gun.",
Type = "machinegun",
WModel = "models/weapons/w_mach_mg36.mdl",
HoldType = "rpg",
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_REVOLVER, 0.3 },
Sound_Fire = "FNC.Fire",
Sound_DryFire = "Common.Dryfire.Rifle",
Sound_MagOut = "M16A2.MagOut",
Sound_MagIn = "M16A2.MagIn",
Delay = (60/550),
Firemodes = FIREMODE_AUTOSEMI,
Ammo = 60,
Damage = 10,
Features = "firearm",
}
end
do -- Grenades, nothing here is guaranteed.
local function GrenadeFire( self )
local p = self:GetOwner()
if self:GetDelay1() > CurTime() then
return true
end
self:SetDelay1( CurTime() + 0.1 )
self:TPFire()
-- PROTO: See to getting this done better. Maybe it's spawned while priming the nade for low CL-SV/phys delay?
if SERVER then
local GENT = ents.Create( "bgrenade_frag" )
GENT:SetOwner( p )
GENT:SetPos( p:EyePos() + (p:EyeAngles():Forward()*16) )
GENT:SetAngles( p:EyeAngles() + Angle( 0, 0, -90 ) )
GENT.Fuse = CurTime() + 4
GENT:Spawn()
local velocity = p:EyeAngles():Forward() * 1500
velocity:Mul( Lerp( math.TimeFraction( 90, 0, p:EyeAngles().p ), 0, 1 ) )
-- velocity:Add( p:EyeAngles():Up() * 500 * Lerp( math.TimeFraction( 0, -90, p:EyeAngles().p ), 0, 1 ) )
GENT:GetPhysicsObject():SetVelocity( velocity )
end
return true
end
local function GrenadeThink()
-- print("yay")
return true
end
WEAPONS["g_frag"] = {
Name = "FRAG GRENADE",
Description = "Pull the pin and throw it the hell away!",
Type = "grenade",
Fire = GrenadeFire,
WModel = "models/weapons/w_eq_flashbang.mdl",
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",
WModel = "models/weapons/w_eq_flashbang.mdl",
Features = "grenade",
}
WEAPONS["g_molotov"] = {
Name = "MOLOTOV COCKTAIL",
Description = "Alcoholic bottle of flame!",
Type = "grenade",
WModel = "models/weapons/w_eq_flashbang.mdl",
Features = "grenade",
}
WEAPONS["g_tknife"] = {
Name = "THROWING KNIFE",
Description = "Lightweight knife to throw and pick back up.",
Type = "grenade",
WModel = "models/weapons/w_eq_flashbang.mdl",
Features = "grenade",
}
WEAPONS["g_smoke"] = {
Name = "SMOKE GRENADE",
Description = "Smoke bomb used to conceal a position, and makes enemies cough.",
Type = "grenade",
WModel = "models/weapons/w_eq_flashbang.mdl",
Features = "grenade",
}
WEAPONS["g_flashbang"] = {
Name = "FLASHBANG",
Description = "Stun grenade that gives off a bright flash and a loud 'bang'.",
Type = "grenade",
WModel = "models/weapons/w_eq_flashbang.mdl",
Features = "grenade",
}
WEAPONS["g_gas"] = {
Name = "GAS GRENADE",
Description = "Short burst of gas that slows and disorient targets.",
Type = "grenade",
WModel = "models/weapons/w_eq_flashbang.mdl",
Features = "grenade",
}
WEAPONS["g_prox"] = {
Name = "PROXIMITY MINE",
Description = "Mine that bounces into the air.",
Type = "grenade",
WModel = "models/weapons/w_eq_flashbang.mdl",
Features = "grenade",
}
WEAPONS["g_claymore"] = {
Name = "CLAYMORE",
Description = "Mine that shoots shrapnel in a cone.",
Type = "grenade",
WModel = "models/weapons/w_eq_flashbang.mdl",
Features = "grenade",
}
WEAPONS["g_scrambler"] = {
Name = "SCRAMBLER",
Description = "Disrupts enemy radar based on proximity.",
Type = "grenade",
WModel = "models/weapons/w_eq_flashbang.mdl",
Features = "grenade",
}
WEAPONS["g_emp"] = {
Name = "EMP NADE",
Description = "Disrupts enemy equipment based on proximity.",
Type = "grenade",
WModel = "models/weapons/w_eq_flashbang.mdl",
Features = "grenade",
}
WEAPONS["g_shockcharge"] = {
Name = "SHOCK CHARGE",
Description = "Charge that stuns and forces enemies to fire their weapons.",
Type = "grenade",
WModel = "models/weapons/w_eq_flashbang.mdl",
Features = "grenade",
}
end
do -- Equipment, nothing here is guaranteed.
WEAPONS["e_tacinsertion"] = {
Name = "TACTICAL INSERTION",
Description = "Flare that changes your deployment location.",
Type = "equipment",
WModel = "models/weapons/w_eq_flashbang.mdl",
Features = "grenade",
}
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",
}
WEAPONS["e_cover"] = {
Name = "DEPLOYABLE COVER",
Description = ".",
Type = "equipment",
WModel = "models/weapons/w_eq_flashbang.mdl",
Features = "grenade",
}
WEAPONS["e_ddos"] = {
Name = "DDOS",
Description = ".",
Type = "equipment",
WModel = "models/weapons/w_eq_flashbang.mdl",
Features = "grenade",
}
WEAPONS["e_trophysystem"] = {
Name = "TROPHY SYSTEM",
Description = "Disrupts enemy equipment.",
Type = "equipment",
WModel = "models/weapons/w_eq_flashbang.mdl",
Features = "grenade",
}
WEAPONS["e_portableradar"] = {
Name = "PORTABLE RADAR",
Description = "Detects nearby enemies based on proximity.",
Type = "equipment",
WModel = "models/weapons/w_eq_flashbang.mdl",
Features = "grenade",
}
WEAPONS["e_cameraspike"] = {
Name = "CAMERA SPIKE",
Description = "Mountable camera that gives you a live video feed.",
Type = "equipment",
WModel = "models/weapons/w_eq_flashbang.mdl",
Features = "grenade",
}
WEAPONS["e_recondrone"] = {
Name = "RECON DRONE",
Description = "Pilotable hovering recon drone that automatically marks enemies.",
Type = "equipment",
WModel = "models/weapons/w_eq_flashbang.mdl",
Features = "grenade",
}
WEAPONS["e_gasdrone"] = {
Name = "GAS DRONE",
Description = "Drone that dispenses toxic gas onto an area.",
Type = "equipment",
WModel = "models/weapons/w_eq_flashbang.mdl",
Features = "grenade",
}
WEAPONS["e_suppressionmine"] = {
Name = "SUPPRESSION MINE",
Description = "Mine that detonates to dispense hard-to-see sleeping gas.",
Type = "equipment",
WModel = "models/weapons/w_eq_flashbang.mdl",
Features = "grenade",
}
WEAPONS["e_antiarmor"] = {
Name = "ANTI-ARMOR ROUNDS",
Description = "Ammo crate that dispenses armor to disable vehicles.",
Type = "equipment",
WModel = "models/weapons/w_eq_flashbang.mdl",
Features = "grenade",
}
end