Weapon models work now, they use ASTW2 models

This commit is contained in:
Fesiug 2023-10-22 00:39:36 -04:00
parent 13330ccc2c
commit f5637f13ae
1 changed files with 308 additions and 289 deletions

View File

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