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

463 lines
12 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( "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( "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( "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( "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 )
local wep = {}
WEAPONS["toolgun"] = wep
wep.Name = "TOOL GUN"
wep.Description = "Developer development device"
wep.Type = "special"
wep.WModel = "models/weapons/w_toolgun.mdl"
wep.Delay = (60/300)
wep.Firemodes = FIREMODE_SEMI
wep.Ammo = 0
wep.Damage = 0
function wep.Fire( self, slot )
if self:GetDelay1() > CurTime() then
return true
end
self:SetDelay1( CurTime() + 0.2 )
local p = self:GetOwner()
local tr = p:GetEyeTrace()
if SERVER then
local summon = ents.Create( "bnpc_human" )
-- summon:SetModel( "models/props_junk/cardboard_box001a.mdl" )
-- summon:Give( "weapon_stunstick")
summon:SetPos( tr.HitPos )
summon:Spawn()
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
function wep.Reload( self, slot )
if self:GetOwner():KeyPressed( IN_RELOAD ) then
print( self )
end
-- Return true to skip weapon logic
return true
end
local wep = {}
WEAPONS["melee_bat"] = wep
wep.Name = "BAT"
wep.Description = "meow"
wep.Type = "melee"
wep.WModel = "models/weapons/w_crowbar.mdl"
wep.Delay = (60/300)
wep.Firemodes = FIREMODE_SEMI
wep.Ammo = 0
wep.Damage = 0
local wep = {}
WEAPONS["melee_baton"] = wep
wep.Name = "BATON"
wep.Description = "meow"
wep.Type = "melee"
wep.WModel = "models/weapons/w_crowbar.mdl"
wep.Delay = (60/300)
wep.Firemodes = FIREMODE_SEMI
wep.Ammo = 0
wep.Damage = 0
local wep = {}
WEAPONS["melee_knife"] = wep
wep.Name = "KNIFE"
wep.Description = "meow"
wep.Type = "melee"
wep.WModel = "models/weapons/w_crowbar.mdl"
wep.Delay = (60/300)
wep.Firemodes = FIREMODE_SEMI
wep.Ammo = 0
wep.Damage = 0
local wep = {}
WEAPONS["melee_machete"] = wep
wep.Name = "MACHETE"
wep.Description = "meow"
wep.Type = "melee"
wep.WModel = "models/weapons/w_crowbar.mdl"
wep.Delay = (60/300)
wep.Firemodes = FIREMODE_SEMI
wep.Ammo = 0
wep.Damage = 0
local wep = {}
WEAPONS["1911"] = wep
wep.Name = "COBRA .45"
wep.Description = "Hits hard. They don't make them like they used to!"
wep.Type = "pistol"
wep.WModel = "models/weapons/w_pist_usp.mdl"
wep.Sound_Fire = "1911.Fire"
wep.Sound_DryFire = "Common.Dryfire.Pistol"
wep.Sound_Reload = "1911.Reload" -- placeholder
wep.Sound_MagOut = "1911.MagOut" -- placeholder
wep.Sound_MagIn = "1911.MagIn" -- placeholder
wep.Delay = (60/300)
wep.Firemodes = FIREMODE_SEMI
wep.Ammo = 8
wep.Damage = 30
local wep = {}
WEAPONS["usp"] = wep
wep.Name = "MK. 23"
wep.Description = "If it works for hardasses around the world, it'll work for you."
wep.Type = "pistol"
wep.WModel = "models/weapons/w_pist_usp.mdl"
wep.Sound_Fire = "USP.Fire"
wep.Sound_DryFire = "Common.Dryfire.Pistol"
wep.Sound_Reload = "USP.Reload" -- placeholder
wep.Sound_MagOut = "USP.MagOut" -- placeholder
wep.Sound_MagIn = "USP.MagIn" -- placeholder
wep.Delay = (60/300)
wep.Firemodes = FIREMODE_SEMI
wep.Ammo = 12
wep.Damage = 30
local wep = {}
WEAPONS["glock"] = wep
wep.Name = "GLOCK-18"
wep.Description = "Bullet storm. Lasts about a second or so, just like you!"
wep.Type = "pistol"
wep.WModel = "models/weapons/w_pist_glock18.mdl"
wep.Sound_Fire = "Glock.Fire"
wep.Sound_DryFire = "Common.Dryfire.Pistol"
wep.Sound_MagOut = "Glock.MagOut" -- placeholder
wep.Sound_MagIn = "Glock.MagIn" -- placeholder
wep.Delay = (60/800)
wep.Firemodes = FIREMODE_AUTOSEMI
wep.Ammo = 17
wep.Damage = 18
local wep = {}
WEAPONS["nambu"] = wep
wep.Name = "NAMBU .38"
wep.Description = "Eastern revolver that hits as hard as it costs."
wep.Type = "pistol"
wep.WModel = "models/weapons/w_pist_glock18.mdl"
wep.Sound_Fire = "Nambu.Fire"
wep.Sound_DryFire = "Common.Dryfire.Pistol"
wep.Sound_MagOut = "Nambu.MagOut" -- placeholder
wep.Sound_MagIn = "Nambu.MagIn" -- placeholder
wep.Delay = (60/180)
wep.Firemodes = FIREMODE_SEMI
wep.Ammo = 6
wep.Damage = 26
local wep = {}
WEAPONS["anaconda"] = wep
wep.Name = "ANACONDA"
wep.Description = "Precise and kicks like a mule."
wep.Type = "pistol"
wep.WModel = "models/weapons/w_pist_glock18.mdl"
wep.Sound_Fire = "Anaconda.Fire"
wep.Sound_DryFire = "Common.Dryfire.Pistol"
wep.Sound_MagOut = "Anaconda.MagOut" -- placeholder
wep.Sound_MagIn = "Anaconda.MagIn" -- placeholder
wep.Delay = (60/180)
wep.Firemodes = FIREMODE_SEMI
wep.Ammo = 6
wep.Damage = 40
local wep = {}
WEAPONS["tmp"] = wep
wep.Name = "TMP"
wep.Description = "Precise and sharp, like a damn suit's pet."
wep.Type = "smg"
wep.WModel = "models/weapons/w_pist_glock18.mdl"
wep.Sound_Fire = "TMP.Fire"
wep.Sound_DryFire = "Common.Dryfire.Rifle"
wep.Sound_Reload = "TMP.Reload" -- placeholder
wep.Sound_MagOut = "TMP.MagOut" -- placeholder
wep.Sound_MagIn = "TMP.MagIn" -- placeholder
wep.Delay = (60/700)
wep.Firemodes = FIREMODE_AUTOSEMI
wep.Ammo = 15
wep.Damage = 18
local wep = {}
WEAPONS["mp7"] = wep
wep.Name = "MP7"
wep.Description = "Small, pistol-sized."
wep.Type = "smg"
wep.WModel = "models/weapons/w_pist_glock18.mdl"
wep.Sound_Fire = "MP7.Fire"
wep.Sound_DryFire = "Common.Dryfire.Rifle"
wep.Sound_Reload = "MP7.Reload" -- placeholder
wep.Sound_MagOut = "MP7.MagOut" -- placeholder
wep.Sound_MagIn = "MP7.MagIn" -- placeholder
wep.Delay = (60/700)
wep.Firemodes = FIREMODE_AUTOSEMI
wep.Ammo = 20
wep.Damage = 16
local wep = {}
WEAPONS["mp5k"] = wep
wep.Name = "MP5K"
wep.Description = "Quality manufacturing, but cumbersome."
wep.Type = "smg"
wep.WModel = "models/weapons/w_pist_glock18.mdl"
wep.Sound_Fire = "MP5K.Fire"
wep.Sound_DryFire = "Common.Dryfire.Rifle"
wep.Sound_Reload = "MP5K.Reload" -- placeholder
wep.Sound_MagOut = "MP5K.MagOut" -- placeholder
wep.Sound_MagIn = "MP5K.MagIn" -- placeholder
wep.Delay = (60/700)
wep.Firemodes = FIREMODE_AUTOSEMI
wep.Ammo = 15
wep.Damage = 18
local wep = {}
WEAPONS["mac11"] = wep
wep.Name = "MAC-11"
wep.Description = "More fit for combat in a phone booth."
wep.Type = "smg"
wep.WModel = "models/weapons/w_pist_glock18.mdl"
wep.Sound_Fire = "MAC11.Fire"
wep.Sound_DryFire = "Common.Dryfire.Rifle"
wep.Sound_Reload = "MAC11.Reload" -- placeholder
wep.Sound_MagOut = "MAC11.MagOut" -- placeholder
wep.Sound_MagIn = "MAC11.MagIn" -- placeholder
wep.Delay = (60/800)
wep.Firemodes = FIREMODE_AUTOSEMI
wep.Ammo = 16
wep.Damage = 16
local wep = {}
WEAPONS["bizon"] = wep
wep.Name = "BIZON"
wep.Description = "Unwieldy bullet storm."
wep.Type = "smg"
wep.WModel = "models/weapons/w_pist_glock18.mdl"
wep.Sound_Fire = "Bizon.Fire"
wep.Sound_DryFire = "Common.Dryfire.Rifle"
wep.Sound_Reload = "Bizon.Reload" -- placeholder
wep.Sound_MagOut = "Bizon.MagOut" -- placeholder
wep.Sound_MagIn = "Bizon.MagIn" -- placeholder
wep.Delay = (60/600)
wep.Firemodes = FIREMODE_AUTOSEMI
wep.Ammo = 40
wep.Damage = 16
-- Shotguns
local wep = {}
WEAPONS["spas12"] = wep
wep.Name = "SPAS-12"
wep.Description = "meow"
wep.Type = "shotgun"
wep.WModel = "models/weapons/w_crowbar.mdl"
wep.Delay = (60/600)
wep.Firemodes = FIREMODE_AUTOSEMI
wep.Ammo = 8
wep.Damage = 2
-- Rifles
local wep = {}
WEAPONS["fnc"] = wep
wep.Name = "FNC PARA"
wep.Description = "meow"
wep.Type = "rifle"
wep.WModel = "models/weapons/w_crowbar.mdl"
wep.Sound_Fire = "FNC.Fire"
wep.Sound_MagOut = "FNC.MagOut" -- placeholder
wep.Sound_MagIn = "FNC.MagIn" -- placeholder
wep.Delay = (60/700)
wep.Firemodes = FIREMODE_AUTOSEMI
wep.Ammo = 30
wep.Damage = 2
local wep = {}
WEAPONS["m16a2"] = wep
wep.Name = "M16A2"
wep.Description = "meow"
wep.Type = "rifle"
wep.WModel = "models/weapons/w_crowbar.mdl"
wep.Sound_Fire = "M16A2.Fire"
wep.Sound_MagOut = "M16A2.MagOut" -- placeholder
wep.Sound_MagIn = "M16A2.MagIn" -- placeholder
wep.Delay = (60/1000)
wep.Firemodes = {
{ Mode = 3 },
{ Mode = 1 },
}
wep.Ammo = 30
wep.Damage = 2
-- Machine guns
local wep = {}
WEAPONS["stoner63"] = wep
wep.Name = "STONER 63"
wep.Description = "meow"
wep.Type = "machinegun"
wep.WModel = "models/weapons/w_crowbar.mdl"
wep.Delay = (60/700)
wep.Firemodes = FIREMODE_AUTOSEMI
wep.Ammo = 100
wep.Damage = 2