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

363 lines
9.9 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 = {}
AddSound( "1911.Fire", {
"benny/weapons/1911/01.ogg",
"benny/weapons/1911/02.ogg",
"benny/weapons/1911/03.ogg",
}, 140, 100, 0.5, CHAN_STATIC )
2023-09-24 18:38:00 -04:00
AddSound( "Bizon.Fire", {
"benny/weapons/bizon/01.ogg",
"benny/weapons/bizon/02.ogg",
"benny/weapons/bizon/03.ogg",
}, 140, 100, 0.5, CHAN_STATIC )
2023-09-25 17:26:52 -04:00
AddSound( "MP5K.Fire", {
"benny/weapons/mp5k/01.ogg",
"benny/weapons/mp5k/02.ogg",
"benny/weapons/mp5k/03.ogg",
}, 140, 100, 0.5, CHAN_STATIC )
2023-09-25 20:42:17 -04:00
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 )
2023-09-25 17:26:52 -04:00
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 )
2023-09-25 17:26:52 -04:00
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( "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-09-25 20:42:17 -04:00
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 )
2023-09-25 17:26:52 -04:00
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( "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-09-25 20:42:17 -04:00
AddSound( "Common.NoAmmo", "benny/weapons/noammo.ogg", 70, 100, 0.5, CHAN_STATIC )
2023-09-24 18:38:00 -04:00
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 = "BASEBALL BAT"
wep.Description = "meow"
wep.Type = "melee"
wep.WModel = "models/weapons/w_crowbar.mdl"
local wep = {}
WEAPONS["melee_baton"] = wep
wep.Name = "POLICE BATON"
wep.Description = "meow"
wep.Type = "melee"
wep.WModel = "models/weapons/w_crowbar.mdl"
2023-09-24 01:19:23 -04:00
local wep = {}
WEAPONS["1911"] = wep
wep.Name = "COBRA .45"
2023-09-25 17:26:52 -04:00
wep.Description = "Hits hard. They don't make them like they used to!"
wep.Type = "pistol"
2023-09-24 01:19:23 -04:00
wep.WModel = "models/weapons/w_pist_usp.mdl"
wep.Sound_Fire = "1911.Fire"
2023-09-25 17:26:52 -04:00
wep.Sound_DryFire = "Common.Dryfire.Pistol"
wep.Sound_Reload = "1911.Reload" -- placeholder
2023-09-25 17:26:52 -04:00
wep.Sound_MagOut = "1911.MagOut" -- placeholder
wep.Sound_MagIn = "1911.MagIn" -- placeholder
2023-09-24 01:19:23 -04:00
wep.Delay = (60/300)
2023-09-25 21:12:22 -04:00
wep.Firemodes = FIREMODE_SEMI
2023-09-24 01:19:23 -04:00
wep.Ammo = 8
wep.Damage = 30
local wep = {}
WEAPONS["usp"] = wep
wep.Name = "USP .45"
2023-09-25 20:42:17 -04:00
wep.Description = "If it works for hardasses around the world, it works for you."
wep.Type = "pistol"
2023-09-24 01:19:23 -04:00
wep.WModel = "models/weapons/w_pist_usp.mdl"
2023-09-25 17:26:52 -04:00
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
2023-09-24 01:19:23 -04:00
wep.Delay = (60/300)
2023-09-25 21:12:22 -04:00
wep.Firemodes = FIREMODE_SEMI
2023-09-24 01:19:23 -04:00
wep.Ammo = 12
wep.Damage = 30
local wep = {}
WEAPONS["glock"] = wep
wep.Name = "GLOCK-18"
2023-09-25 17:26:52 -04:00
wep.Description = "Bullet storm. Lasts about a second or so, just like you!"
wep.Type = "pistol"
2023-09-24 01:19:23 -04:00
wep.WModel = "models/weapons/w_pist_glock18.mdl"
2023-09-25 17:26:52 -04:00
wep.Sound_Fire = "Glock.Fire"
wep.Sound_DryFire = "Common.Dryfire.Pistol"
wep.Sound_MagOut = "Glock.MagOut" -- placeholder
wep.Sound_MagIn = "Glock.MagIn" -- placeholder
2023-09-24 01:19:23 -04:00
wep.Delay = (60/800)
2023-09-25 21:12:22 -04:00
wep.Firemodes = FIREMODE_AUTOSEMI
wep.Ammo = 17
wep.Damage = 18
local wep = {}
2023-09-24 01:19:23 -04:00
WEAPONS["nambu"] = wep
wep.Name = "NAMBU .38"
2023-09-25 20:42:17 -04:00
wep.Description = "Eastern revolver that hits as hard as it costs."
wep.Type = "pistol"
2023-09-24 01:19:23 -04:00
2023-09-24 18:38:00 -04:00
wep.WModel = "models/weapons/w_pist_glock18.mdl"
2023-09-25 17:26:52 -04:00
wep.Sound_Fire = "Nambu.Fire"
wep.Sound_DryFire = "Common.Dryfire.Pistol"
wep.Sound_MagOut = "Nambu.MagOut" -- placeholder
wep.Sound_MagIn = "Nambu.MagIn" -- placeholder
2023-09-24 18:38:00 -04:00
2023-09-24 01:19:23 -04:00
wep.Delay = (60/180)
2023-09-25 21:12:22 -04:00
wep.Firemodes = FIREMODE_SEMI
2023-09-24 01:19:23 -04:00
wep.Ammo = 6
wep.Damage = 26
local wep = {}
WEAPONS["anaconda"] = wep
wep.Name = "ANACONDA"
2023-09-25 17:26:52 -04:00
wep.Description = "Precise and kicks like a mule."
wep.Type = "pistol"
2023-09-24 01:19:23 -04:00
2023-09-24 18:38:00 -04:00
wep.WModel = "models/weapons/w_pist_glock18.mdl"
2023-09-25 17:26:52 -04:00
wep.Sound_Fire = "Anaconda.Fire"
wep.Sound_DryFire = "Common.Dryfire.Pistol"
wep.Sound_MagOut = "Anaconda.MagOut" -- placeholder
wep.Sound_MagIn = "Anaconda.MagIn" -- placeholder
2023-09-24 18:38:00 -04:00
2023-09-24 01:19:23 -04:00
wep.Delay = (60/180)
2023-09-25 21:12:22 -04:00
wep.Firemodes = FIREMODE_SEMI
wep.Ammo = 6
2023-09-24 01:19:23 -04:00
wep.Damage = 40
local wep = {}
WEAPONS["tmp"] = wep
wep.Name = "TMP"
2023-09-25 17:26:52 -04:00
wep.Description = "Precise and sharp, like a damn suit's pet."
wep.Type = "smg"
2023-09-24 18:38:00 -04:00
wep.WModel = "models/weapons/w_pist_glock18.mdl"
2023-09-25 20:42:17 -04:00
wep.Sound_Fire = "TMP.Fire"
2023-09-25 17:26:52 -04:00
wep.Sound_DryFire = "Common.Dryfire.Rifle"
wep.Sound_Reload = "TMP.Reload" -- placeholder
wep.Sound_MagOut = "TMP.MagOut" -- placeholder
wep.Sound_MagIn = "TMP.MagIn" -- placeholder
2023-09-24 18:38:00 -04:00
2023-09-25 17:26:52 -04:00
wep.Delay = (60/700)
2023-09-25 21:12:22 -04:00
wep.Firemodes = FIREMODE_AUTOSEMI
wep.Ammo = 15
2023-09-24 01:19:23 -04:00
wep.Damage = 18
local wep = {}
WEAPONS["mp7"] = wep
wep.Name = "MP7"
wep.Description = "Small, pistol-sized."
wep.Type = "smg"
2023-09-24 01:19:23 -04:00
2023-09-24 18:38:00 -04:00
wep.WModel = "models/weapons/w_pist_glock18.mdl"
2023-09-25 20:42:17 -04:00
wep.Sound_Fire = "MP7.Fire"
2023-09-25 17:26:52 -04:00
wep.Sound_DryFire = "Common.Dryfire.Rifle"
2023-09-25 20:42:17 -04:00
wep.Sound_Reload = "MP7.Reload" -- placeholder
wep.Sound_MagOut = "MP7.MagOut" -- placeholder
wep.Sound_MagIn = "MP7.MagIn" -- placeholder
2023-09-24 18:38:00 -04:00
2023-09-24 01:19:23 -04:00
wep.Delay = (60/700)
2023-09-25 21:12:22 -04:00
wep.Firemodes = FIREMODE_AUTOSEMI
wep.Ammo = 20
2023-09-24 01:19:23 -04:00
wep.Damage = 16
local wep = {}
WEAPONS["mp5k"] = wep
wep.Name = "MP5K"
wep.Description = "Quality manufacturing, but cumbersome."
wep.Type = "smg"
2023-09-24 01:19:23 -04:00
2023-09-24 18:38:00 -04:00
wep.WModel = "models/weapons/w_pist_glock18.mdl"
2023-09-25 17:26:52 -04:00
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
2023-09-24 18:38:00 -04:00
2023-09-24 01:19:23 -04:00
wep.Delay = (60/700)
2023-09-25 21:12:22 -04:00
wep.Firemodes = FIREMODE_AUTOSEMI
wep.Ammo = 15
2023-09-24 01:19:23 -04:00
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"
2023-09-24 01:19:23 -04:00
2023-09-24 18:38:00 -04:00
wep.WModel = "models/weapons/w_pist_glock18.mdl"
2023-09-25 20:42:17 -04:00
wep.Sound_Fire = "MAC11.Fire"
2023-09-25 17:26:52 -04:00
wep.Sound_DryFire = "Common.Dryfire.Rifle"
2023-09-25 20:42:17 -04:00
wep.Sound_Reload = "MAC11.Reload" -- placeholder
wep.Sound_MagOut = "MAC11.MagOut" -- placeholder
wep.Sound_MagIn = "MAC11.MagIn" -- placeholder
2023-09-24 18:38:00 -04:00
2023-09-24 01:19:23 -04:00
wep.Delay = (60/800)
2023-09-25 21:12:22 -04:00
wep.Firemodes = FIREMODE_AUTOSEMI
2023-09-24 01:19:23 -04:00
wep.Ammo = 16
wep.Damage = 16
local wep = {}
WEAPONS["bizon"] = wep
wep.Name = "BIZON"
wep.Description = "Unwieldy bullet storm."
wep.Type = "smg"
2023-09-24 01:19:23 -04:00
2023-09-24 18:38:00 -04:00
wep.WModel = "models/weapons/w_pist_glock18.mdl"
wep.Sound_Fire = "Bizon.Fire"
2023-09-25 17:26:52 -04:00
wep.Sound_DryFire = "Common.Dryfire.Rifle"
2023-09-24 18:38:00 -04:00
wep.Sound_Reload = "Bizon.Reload" -- placeholder
2023-09-25 17:26:52 -04:00
wep.Sound_MagOut = "Bizon.MagOut" -- placeholder
wep.Sound_MagIn = "Bizon.MagIn" -- placeholder
2023-09-24 18:38:00 -04:00
2023-09-24 01:19:23 -04:00
wep.Delay = (60/600)
2023-09-25 21:12:22 -04:00
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"
-- Rifles
local wep = {}
WEAPONS["fnc"] = wep
wep.Name = "FNC PARA"
wep.Description = "meow"
wep.Type = "rifle"
wep.WModel = "models/weapons/w_crowbar.mdl"