Popups! RELOADING LOGIC! SOUNDS!!!!
This commit is contained in:
parent
ac374ae803
commit
9a8ad838ff
|
@ -25,6 +25,8 @@ function SWEP:SetupDataTables()
|
||||||
self:NetworkVar( "Float", 2, "Delay2" )
|
self:NetworkVar( "Float", 2, "Delay2" )
|
||||||
self:NetworkVar( "String", 0, "Wep1" )
|
self:NetworkVar( "String", 0, "Wep1" )
|
||||||
self:NetworkVar( "String", 1, "Wep2" )
|
self:NetworkVar( "String", 1, "Wep2" )
|
||||||
|
self:NetworkVar( "Int", 0, "Wep1Clip" )
|
||||||
|
self:NetworkVar( "Int", 1, "Wep2Clip" )
|
||||||
|
|
||||||
self:NetworkVarNotify( "Wep1", self.OnVarChanged )
|
self:NetworkVarNotify( "Wep1", self.OnVarChanged )
|
||||||
self:NetworkVarNotify( "Wep2", self.OnVarChanged )
|
self:NetworkVarNotify( "Wep2", self.OnVarChanged )
|
||||||
|
@ -63,17 +65,12 @@ function SWEP:PrimaryAttack()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if self:Clip1() == 0 then
|
if self:Clip1() == 0 then
|
||||||
self:EmitSound( "benny/weapons/common/06-13.ogg", 80, 100, 1, CHAN_STATIC )
|
B_Sound( self, self.B_ClassT1.Sound_DryFire )
|
||||||
self:SetDelay1( CurTime() + 0.2 )
|
self:SetDelay1( CurTime() + 0.2 )
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- if CLIENT then
|
|
||||||
-- AddCaption( "PISTOL", Color( 61, 61, 61 ), "[Pistol shot]", 0.1, 0.5 )
|
|
||||||
-- end
|
|
||||||
|
|
||||||
B_Sound( self, self.B_ClassT1.Sound_Fire )
|
B_Sound( self, self.B_ClassT1.Sound_Fire )
|
||||||
-- self:EmitSound( "benny/weapons/1911/0".. math.random(1,3) ..".ogg", 110, 100, 1, CHAN_STATIC )
|
|
||||||
|
|
||||||
self:B_Ammo1( self:Clip1() - 1 )
|
self:B_Ammo1( self:Clip1() - 1 )
|
||||||
self:SetDelay1( CurTime() + self.B_ClassT1.Delay )
|
self:SetDelay1( CurTime() + self.B_ClassT1.Delay )
|
||||||
|
@ -90,18 +87,21 @@ function SWEP:B_Wep2()
|
||||||
end
|
end
|
||||||
|
|
||||||
function SWEP:B_Ammo1( value )
|
function SWEP:B_Ammo1( value )
|
||||||
|
assert( self:GetWep1Clip() > 0, "You cannot mess with an EMPTY magazine!")
|
||||||
self:SetClip1( value )
|
self:SetClip1( value )
|
||||||
self:B_Wep1().Ammo = value
|
self:B_Wep1()["Ammo" .. self:GetWep1Clip()] = value
|
||||||
end
|
end
|
||||||
|
|
||||||
function SWEP:B_Ammo2( value )
|
function SWEP:B_Ammo2( value )
|
||||||
|
assert( self:GetWep1Clip() > 0, "You cannot mess with an EMPTY magazine!")
|
||||||
self:SetClip2( value )
|
self:SetClip2( value )
|
||||||
self:B_Wep2().Ammo = value
|
self:B_Wep2()["Ammo" .. self:GetWep1Clip()] = value
|
||||||
end
|
end
|
||||||
|
|
||||||
function SWEP:B_MaxAmmo1( value )
|
function SWEP:B_MaxAmmo1( value )
|
||||||
|
assert( self:GetWep1Clip() > 0, "You cannot mess with an EMPTY magazine!")
|
||||||
self:SetClip1( value )
|
self:SetClip1( value )
|
||||||
self:B_Wep1().Ammo = value
|
self:B_Wep1()["Ammo" .. self:GetWep1Clip()] = value
|
||||||
end
|
end
|
||||||
|
|
||||||
function SWEP:B_Class1()
|
function SWEP:B_Class1()
|
||||||
|
@ -114,8 +114,28 @@ end
|
||||||
|
|
||||||
function SWEP:Reload()
|
function SWEP:Reload()
|
||||||
if self:B_Wep1() and self:Clip1() < self:B_Class1().Ammo then
|
if self:B_Wep1() and self:Clip1() < self:B_Class1().Ammo then
|
||||||
B_Sound( self, self.B_ClassT1.Sound_Reload )
|
if self:GetDelay1() > CurTime() then
|
||||||
self:B_Ammo1( self:B_Class1().Ammo )
|
return false
|
||||||
|
end
|
||||||
|
self:SetDelay1( CurTime() + 0.2 )
|
||||||
|
|
||||||
|
if self:GetWep1Clip() != 0 then
|
||||||
|
B_Sound( self, self.B_ClassT1.Sound_MagOut )
|
||||||
|
self:SetClip1( 0 )
|
||||||
|
self:SetWep1Clip( 0 )
|
||||||
|
self:B_Wep1().Loaded = 0
|
||||||
|
else
|
||||||
|
local maglist = { self:B_Wep1().Ammo1, self:B_Wep1().Ammo2, self:B_Wep1().Ammo3 }
|
||||||
|
for i, v in SortedPairsByValue( maglist, true ) do
|
||||||
|
if v == 0 then B_Sound( self, "Common.NoAmmo" ) return end
|
||||||
|
self:B_Wep1().Loaded = i
|
||||||
|
self:SetWep1Clip( i )
|
||||||
|
self:SetClip1( v )
|
||||||
|
break
|
||||||
|
end
|
||||||
|
B_Sound( self, self.B_ClassT1.Sound_MagIn )
|
||||||
|
end
|
||||||
|
-- self:B_Ammo1( self:B_Class1().Ammo )
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
|
@ -40,7 +40,7 @@ local function genfonts()
|
||||||
surface.CreateFont( "Benny_" .. size, {
|
surface.CreateFont( "Benny_" .. size, {
|
||||||
font = "Carbon Plus Bold",
|
font = "Carbon Plus Bold",
|
||||||
size = ss(size),
|
size = ss(size),
|
||||||
weight = 0
|
weight = 0,
|
||||||
} )
|
} )
|
||||||
end
|
end
|
||||||
local sizes = {
|
local sizes = {
|
||||||
|
@ -253,7 +253,7 @@ hook.Add( "HUDPaint", "Benny_HUDPaint", function()
|
||||||
surface.DrawText( wep1c.Firemode or "???" )
|
surface.DrawText( wep1c.Firemode or "???" )
|
||||||
|
|
||||||
surface.SetFont( "Benny_12" )
|
surface.SetFont( "Benny_12" )
|
||||||
local text = wep:Clip1() .. " - MAG 3"
|
local text = wep:Clip1() .. " - MAG " .. wep:GetWep1Clip()
|
||||||
local tw = surface.GetTextSize( text )
|
local tw = surface.GetTextSize( text )
|
||||||
surface.SetTextColor( scheme["fg"] )
|
surface.SetTextColor( scheme["fg"] )
|
||||||
surface.SetTextPos( sw - b - ss(4) - tw, sh - b - ss(24) )
|
surface.SetTextPos( sw - b - ss(4) - tw, sh - b - ss(24) )
|
||||||
|
@ -266,6 +266,25 @@ hook.Add( "HUDPaint", "Benny_HUDPaint", function()
|
||||||
surface.DrawRect( sw - b - ss(3+4) - ( ss(5) * (i-1) ), sh - b - ss(8+4), ss(3), ss(8) )
|
surface.DrawRect( sw - b - ss(3+4) - ( ss(5) * (i-1) ), sh - b - ss(8+4), ss(3), ss(8) )
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local amlist = { wep.B_WepT1["Ammo" .. 1], wep.B_WepT1["Ammo" .. 2], wep.B_WepT1["Ammo" .. 3] }
|
||||||
|
local i = 1
|
||||||
|
for _, v in ipairs( amlist ) do
|
||||||
|
if v == 0 then continue end
|
||||||
|
local perc = v / wep.B_ClassT1.Ammo
|
||||||
|
surface.SetDrawColor( scheme["fg"] )
|
||||||
|
surface.DrawOutlinedRect( sw - b - ss(w-4-2) + ss(29) + ( ss(10+2) * (i-1) ),
|
||||||
|
sh - b + ss(16) - ss(BOXHEIGHT-4),
|
||||||
|
ss(10),
|
||||||
|
ss(10),
|
||||||
|
ss(0.5) )
|
||||||
|
surface.SetDrawColor( scheme["fg"] )
|
||||||
|
surface.DrawRect( sw - b - ss(w-4-2) + ss(29) + ( ss(10+2) * (i-1) ),
|
||||||
|
sh - b + ss(16) - ss(BOXHEIGHT-4) + ss(10*(1-perc)),
|
||||||
|
ss(10),
|
||||||
|
ss(10*perc) )
|
||||||
|
i = i + 1
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -308,12 +327,6 @@ hook.Add( "HUDPaint", "Benny_HUDPaint", function()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- [UUID_generate()] = {
|
|
||||||
-- Clip1 = 20,
|
|
||||||
-- Mag1 = 12,
|
|
||||||
-- Mag2 = 9,
|
|
||||||
-- Mag3 = 17,
|
|
||||||
-- }
|
|
||||||
do -- Inventory
|
do -- Inventory
|
||||||
local gap = 0
|
local gap = 0
|
||||||
for ID, Data in pairs( p:INV_Get() ) do
|
for ID, Data in pairs( p:INV_Get() ) do
|
||||||
|
|
|
@ -7,7 +7,9 @@ function GM:PlayerSpawn( ply )
|
||||||
end
|
end
|
||||||
|
|
||||||
if SERVER then
|
if SERVER then
|
||||||
util.AddNetworkString( "benny_sendinv" )
|
util.AddNetworkString( "benny_syncinv" )
|
||||||
|
util.AddNetworkString( "benny_sendinvitem" )
|
||||||
|
util.AddNetworkString( "benny_discardinvitem" )
|
||||||
end
|
end
|
||||||
|
|
||||||
concommand.Add("benny_debug_give", function(ply, cmd, args)
|
concommand.Add("benny_debug_give", function(ply, cmd, args)
|
||||||
|
@ -24,13 +26,16 @@ concommand.Add("benny_debug_give", function(ply, cmd, args)
|
||||||
|
|
||||||
local item = {
|
local item = {
|
||||||
Class = args[3],
|
Class = args[3],
|
||||||
Ammo = class.Ammo,
|
Loaded = 1,
|
||||||
|
Ammo1 = class.Ammo,
|
||||||
|
Ammo2 = class.Ammo,
|
||||||
|
Ammo3 = class.Ammo,
|
||||||
}
|
}
|
||||||
|
|
||||||
inv[str] = item
|
inv[str] = item
|
||||||
|
|
||||||
-- PROTO: WriteTable.
|
-- PROTO: WriteTable.
|
||||||
net.Start( "benny_sendinv" )
|
net.Start( "benny_sendinvitem" )
|
||||||
net.WriteString( str )
|
net.WriteString( str )
|
||||||
net.WriteTable( item )
|
net.WriteTable( item )
|
||||||
net.Send( ply )
|
net.Send( ply )
|
||||||
|
@ -39,24 +44,17 @@ concommand.Add("benny_debug_give", function(ply, cmd, args)
|
||||||
|
|
||||||
if slot == 1 then
|
if slot == 1 then
|
||||||
wep:SetWep1( str )
|
wep:SetWep1( str )
|
||||||
wep:SetClip1( class.Ammo )
|
wep:SetWep1Clip( item.Loaded )
|
||||||
|
wep:SetClip1( item[ "Ammo" .. item.Loaded ] )
|
||||||
elseif slot == 2 then
|
elseif slot == 2 then
|
||||||
wep:SetWep2( str )
|
wep:SetWep2( str )
|
||||||
wep:SetClip2( class.Ammo )
|
wep:SetWep2Clip( item.Loaded )
|
||||||
|
wep:SetClip2( item[ "Ammo" .. item.Loaded ] )
|
||||||
else
|
else
|
||||||
|
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
if CLIENT then
|
|
||||||
net.Receive( "benny_sendinv", function( len, ply )
|
|
||||||
assert(CLIENT, "not client")
|
|
||||||
local ply = LocalPlayer()
|
|
||||||
assert(IsValid( ply ), "ply is invalid?")
|
|
||||||
ply:INV_Get()[net.ReadString()] = net.ReadTable()
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- PROTO: Move this all into weapon code.
|
-- PROTO: Move this all into weapon code.
|
||||||
concommand.Add("benny_inv_equip", function( ply, cmd, args )
|
concommand.Add("benny_inv_equip", function( ply, cmd, args )
|
||||||
local inv = ply:INV_Get()
|
local inv = ply:INV_Get()
|
||||||
|
@ -66,12 +64,143 @@ concommand.Add("benny_inv_equip", function( ply, cmd, args )
|
||||||
assert( item, "That item doesn't exist." )
|
assert( item, "That item doesn't exist." )
|
||||||
|
|
||||||
wep:SetWep1( args[1] )
|
wep:SetWep1( args[1] )
|
||||||
wep:SetClip1( item.Ammo )
|
wep:SetWep1Clip( item.Loaded )
|
||||||
|
|
||||||
|
wep:SetClip1( item[ "Ammo" .. item.Loaded ] )
|
||||||
wep:OnReloaded()
|
wep:OnReloaded()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
concommand.Add("benny_inv_sync", function( ply, cmd, args )
|
||||||
|
local inv = ply:INV_Get()
|
||||||
|
|
||||||
|
-- PROTO: WriteTable.
|
||||||
|
net.Start("benny_syncinv")
|
||||||
|
net.WriteUInt( table.Count( inv ), 4 )
|
||||||
|
for ID, Data in pairs( inv ) do
|
||||||
|
net.WriteString( ID )
|
||||||
|
net.WriteTable( Data )
|
||||||
|
end
|
||||||
|
net.Send( ply )
|
||||||
|
end)
|
||||||
|
|
||||||
|
concommand.Add("benny_inv_discard", function( ply, cmd, args )
|
||||||
|
local inv = ply:INV_Get()
|
||||||
|
local wep = ply:GetActiveWeapon()
|
||||||
|
local item = inv[args[1]]
|
||||||
|
-- PROTO: Check that this is the correct 'benny' weapon.
|
||||||
|
assert( item, "That item doesn't exist." )
|
||||||
|
|
||||||
|
inv[args[1]] = nil
|
||||||
|
net.Start( "benny_discardinvitem" )
|
||||||
|
net.WriteString( args[1] )
|
||||||
|
net.Send( ply )
|
||||||
|
|
||||||
|
local reload = false
|
||||||
|
if wep:GetWep1() == args[1] then
|
||||||
|
wep:SetWep1( "" )
|
||||||
|
wep:SetWep1Clip( 0 )
|
||||||
|
wep:SetClip1( 0 )
|
||||||
|
reload = true
|
||||||
|
end
|
||||||
|
if wep:GetWep2() == args[1] then
|
||||||
|
wep:SetWep2( "" )
|
||||||
|
wep:SetWep2Clip( 0 )
|
||||||
|
wep:SetClip2( 0 )
|
||||||
|
reload = true
|
||||||
|
end
|
||||||
|
if reload then
|
||||||
|
wep:OnReloaded()
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- Network to client
|
||||||
|
if CLIENT then
|
||||||
|
net.Receive( "benny_syncinv", function( len, ply )
|
||||||
|
local ply = LocalPlayer()
|
||||||
|
local inv = ply:INV_Get()
|
||||||
|
|
||||||
|
table.Empty( inv )
|
||||||
|
for i=1, net.ReadUInt( 4 ) do
|
||||||
|
inv[net.ReadString()] = net.ReadTable()
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
net.Receive( "benny_sendinvitem", function( len, ply )
|
||||||
|
local ply = LocalPlayer()
|
||||||
|
ply:INV_Get()[net.ReadString()] = net.ReadTable()
|
||||||
|
end)
|
||||||
|
net.Receive( "benny_discardinvitem", function( len, ply )
|
||||||
|
local ply = LocalPlayer()
|
||||||
|
ply:INV_Get()[net.ReadString()] = nil
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
function GM:ShowHelp( ply )
|
||||||
|
if SERVER then
|
||||||
|
ply:SendLua( [[OpenSMenu()]] )
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Debug inv
|
-- Debug inv
|
||||||
if CLIENT then
|
if CLIENT then
|
||||||
|
function GM:OnSpawnMenuOpen()
|
||||||
|
RunConsoleCommand( "benny_debug_inv" )
|
||||||
|
end
|
||||||
|
function GM:OnSpawnMenuClose()
|
||||||
|
if IsValid( base ) then base:Remove() end
|
||||||
|
end
|
||||||
|
|
||||||
|
function OpenSMenu()
|
||||||
|
if IsValid( smenu ) then smenu:Remove() return end
|
||||||
|
smenu = vgui.Create("DFrame")
|
||||||
|
smenu:SetSize( ss(400), ss(240) )
|
||||||
|
smenu:MakePopup()
|
||||||
|
smenu:SetKeyboardInputEnabled( false )
|
||||||
|
smenu:Center()
|
||||||
|
|
||||||
|
function smenu:Paint( w, h )
|
||||||
|
surface.SetDrawColor( schemes["benny"]["bg"] )
|
||||||
|
surface.DrawRect( 0, 0, w, h )
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
local itemlist = smenu:Add("DScrollPanel")
|
||||||
|
itemlist:Dock( FILL )
|
||||||
|
|
||||||
|
for ClassName, Class in SortedPairsByMemberValue( WEAPONS, "Name" ) do
|
||||||
|
local button = vgui.Create( "DButton" )
|
||||||
|
itemlist:AddItem( button )
|
||||||
|
button:SetSize( 1, ss(30) )
|
||||||
|
button:Dock( TOP )
|
||||||
|
button:DockMargin( 0, 0, 0, ss(4) )
|
||||||
|
|
||||||
|
button.Text_Name = Class.Name
|
||||||
|
button.Text_Desc = Class.Description
|
||||||
|
|
||||||
|
-- PROTO: These functions don't need to be remade over and over like this.
|
||||||
|
function button:DoClick()
|
||||||
|
RunConsoleCommand( "benny_debug_give", LocalPlayer():EntIndex(), 0, ClassName )
|
||||||
|
end
|
||||||
|
|
||||||
|
function button:DoRightClick()
|
||||||
|
end
|
||||||
|
|
||||||
|
function button:Paint( w, h )
|
||||||
|
surface.SetDrawColor( schemes["benny"]["fg"] )
|
||||||
|
surface.DrawRect( 0, 0, w, h )
|
||||||
|
|
||||||
|
surface.SetTextColor( schemes["benny"]["bg"] )
|
||||||
|
|
||||||
|
surface.SetFont( "Benny_16" )
|
||||||
|
surface.SetTextPos( ss(4), ss(4) )
|
||||||
|
surface.DrawText( self.Text_Name )
|
||||||
|
|
||||||
|
surface.SetFont( "Benny_12" )
|
||||||
|
surface.SetTextPos( ss(4), ss(4 + 12) )
|
||||||
|
surface.DrawText( self.Text_Desc )
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
local function regen_items( itemlist )
|
local function regen_items( itemlist )
|
||||||
local ply = LocalPlayer()
|
local ply = LocalPlayer()
|
||||||
itemlist:Clear()
|
itemlist:Clear()
|
||||||
|
@ -90,19 +219,23 @@ if CLIENT then
|
||||||
|
|
||||||
-- PROTO: These functions don't need to be remade over and over like this.
|
-- PROTO: These functions don't need to be remade over and over like this.
|
||||||
function button:DoClick()
|
function button:DoClick()
|
||||||
local Menu = DermaMenu()
|
|
||||||
Menu:AddOption( "Equip", function()
|
|
||||||
RunConsoleCommand("benny_inv_equip", button.ID)
|
RunConsoleCommand("benny_inv_equip", button.ID)
|
||||||
end )
|
timer.Simple( 0.1, function() regen_items( itemlist ) end )
|
||||||
Menu:AddOption( "Discard", function()
|
|
||||||
RunConsoleCommand("benny_inv_discard", button.ID)
|
|
||||||
end )
|
|
||||||
|
|
||||||
Menu:Open()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function button:DoRightClick()
|
function button:DoRightClick()
|
||||||
|
RunConsoleCommand("benny_inv_discard", button.ID)
|
||||||
|
timer.Simple( 0.1, function() regen_items( itemlist ) end )
|
||||||
|
-- local Menu = DermaMenu()
|
||||||
|
-- Menu:AddOption( "Equip", function()
|
||||||
|
-- RunConsoleCommand("benny_inv_equip", button.ID)
|
||||||
|
-- timer.Simple( 0.1, function() regen_items( itemlist ) end )
|
||||||
|
-- end )
|
||||||
|
-- Menu:AddOption( "Discard", function()
|
||||||
|
-- RunConsoleCommand("benny_inv_discard", button.ID)
|
||||||
|
-- timer.Simple( 0.1, function() regen_items( itemlist ) end )
|
||||||
|
-- end )
|
||||||
|
-- Menu:Open()
|
||||||
end
|
end
|
||||||
|
|
||||||
function button:Paint( w, h )
|
function button:Paint( w, h )
|
||||||
|
@ -115,12 +248,13 @@ if CLIENT then
|
||||||
surface.SetTextPos( ss(4), ss(4) )
|
surface.SetTextPos( ss(4), ss(4) )
|
||||||
surface.DrawText( self.Text_Name )
|
surface.DrawText( self.Text_Name )
|
||||||
|
|
||||||
surface.SetFont( "Benny_10" )
|
surface.SetFont( "Benny_12" )
|
||||||
surface.SetTextPos( ss(4), ss(4 + 12) )
|
surface.SetTextPos( ss(4), ss(4 + 12) )
|
||||||
surface.DrawText( self.Text_Desc )
|
surface.DrawText( self.Text_Desc )
|
||||||
|
|
||||||
surface.SetFont( "Benny_10" )
|
surface.SetFont( "Benny_12" )
|
||||||
surface.SetTextPos( ss(4), ss(4 + 20) )
|
local tx = surface.GetTextSize( self.ID )
|
||||||
|
surface.SetTextPos( w - ss(4) - tx, ss(4) )
|
||||||
surface.DrawText( self.ID )
|
surface.DrawText( self.ID )
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
@ -129,8 +263,9 @@ if CLIENT then
|
||||||
concommand.Add("benny_debug_inv", function()
|
concommand.Add("benny_debug_inv", function()
|
||||||
if IsValid( base ) then base:Remove() end
|
if IsValid( base ) then base:Remove() end
|
||||||
base = vgui.Create("DFrame")
|
base = vgui.Create("DFrame")
|
||||||
base:SetSize( ss(340), ss(240) )
|
base:SetSize( ss(400), ss(240) )
|
||||||
base:MakePopup()
|
base:MakePopup()
|
||||||
|
base:SetKeyboardInputEnabled( false )
|
||||||
base:Center()
|
base:Center()
|
||||||
|
|
||||||
function base:Paint( w, h )
|
function base:Paint( w, h )
|
||||||
|
|
|
@ -13,18 +13,74 @@ AddSound( "Bizon.Fire", {
|
||||||
"benny/weapons/bizon/03.ogg",
|
"benny/weapons/bizon/03.ogg",
|
||||||
}, 140, 100, 0.5, CHAN_STATIC )
|
}, 140, 100, 0.5, CHAN_STATIC )
|
||||||
|
|
||||||
AddSound( "1911.Reload", "benny/weapons/1911/slidedrop.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( "Bizon.Reload", "benny/weapons/bizon/boltdrop.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( "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( "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 )
|
||||||
|
AddSound( "Common.NoAmmo", "benny/weapons/common/30-01.ogg", 70, 100, 0.5, CHAN_STATIC )
|
||||||
|
|
||||||
local wep = {}
|
local wep = {}
|
||||||
WEAPONS["1911"] = wep
|
WEAPONS["1911"] = wep
|
||||||
wep.Name = "COBRA .45"
|
wep.Name = "COBRA .45"
|
||||||
wep.Description = "Hits hard. They don't make them like they used to! Low capacity."
|
wep.Description = "Hits hard. They don't make them like they used to!"
|
||||||
|
|
||||||
wep.WModel = "models/weapons/w_pist_usp.mdl"
|
wep.WModel = "models/weapons/w_pist_usp.mdl"
|
||||||
wep.Sound_Fire = "1911.Fire"
|
wep.Sound_Fire = "1911.Fire"
|
||||||
|
wep.Sound_DryFire = "Common.Dryfire.Pistol"
|
||||||
wep.Sound_Reload = "1911.Reload" -- placeholder
|
wep.Sound_Reload = "1911.Reload" -- placeholder
|
||||||
|
wep.Sound_MagOut = "1911.MagOut" -- placeholder
|
||||||
|
wep.Sound_MagIn = "1911.MagIn" -- placeholder
|
||||||
|
|
||||||
wep.Delay = (60/300)
|
wep.Delay = (60/300)
|
||||||
wep.Ammo = 8
|
wep.Ammo = 8
|
||||||
|
@ -33,11 +89,14 @@ wep.Damage = 30
|
||||||
local wep = {}
|
local wep = {}
|
||||||
WEAPONS["usp"] = wep
|
WEAPONS["usp"] = wep
|
||||||
wep.Name = "USP .45"
|
wep.Name = "USP .45"
|
||||||
wep.Description = "It works for hardasses around the world, it works for you. Higher capacity."
|
wep.Description = "It works for hardasses around the world, it works for you."
|
||||||
|
|
||||||
wep.WModel = "models/weapons/w_pist_usp.mdl"
|
wep.WModel = "models/weapons/w_pist_usp.mdl"
|
||||||
wep.Sound_Fire = "1911.Fire"
|
wep.Sound_Fire = "USP.Fire"
|
||||||
wep.Sound_Reload = "1911.Reload" -- placeholder
|
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.Delay = (60/300)
|
||||||
wep.Ammo = 12
|
wep.Ammo = 12
|
||||||
|
@ -46,11 +105,13 @@ wep.Damage = 30
|
||||||
local wep = {}
|
local wep = {}
|
||||||
WEAPONS["glock"] = wep
|
WEAPONS["glock"] = wep
|
||||||
wep.Name = "GLOCK-18"
|
wep.Name = "GLOCK-18"
|
||||||
wep.Description = "Superb precision but poor capacity."
|
wep.Description = "Bullet storm. Lasts about a second or so, just like you!"
|
||||||
|
|
||||||
wep.WModel = "models/weapons/w_pist_glock18.mdl"
|
wep.WModel = "models/weapons/w_pist_glock18.mdl"
|
||||||
wep.Sound_Fire = "1911.Fire"
|
wep.Sound_Fire = "Glock.Fire"
|
||||||
wep.Sound_Reload = "1911.Reload" -- placeholder
|
wep.Sound_DryFire = "Common.Dryfire.Pistol"
|
||||||
|
wep.Sound_MagOut = "Glock.MagOut" -- placeholder
|
||||||
|
wep.Sound_MagIn = "Glock.MagIn" -- placeholder
|
||||||
|
|
||||||
wep.Delay = (60/800)
|
wep.Delay = (60/800)
|
||||||
wep.Ammo = 17
|
wep.Ammo = 17
|
||||||
|
@ -59,11 +120,13 @@ wep.Damage = 18
|
||||||
local wep = {}
|
local wep = {}
|
||||||
WEAPONS["nambu"] = wep
|
WEAPONS["nambu"] = wep
|
||||||
wep.Name = "NAMBU .38"
|
wep.Name = "NAMBU .38"
|
||||||
wep.Description = "Eastern revolver that hits as much as it costs. Low capacity."
|
wep.Description = "Eastern revolver that hits as much as it costs."
|
||||||
|
|
||||||
wep.WModel = "models/weapons/w_pist_glock18.mdl"
|
wep.WModel = "models/weapons/w_pist_glock18.mdl"
|
||||||
wep.Sound_Fire = "1911.Fire"
|
wep.Sound_Fire = "Nambu.Fire"
|
||||||
wep.Sound_Reload = "1911.Reload" -- placeholder
|
wep.Sound_DryFire = "Common.Dryfire.Pistol"
|
||||||
|
wep.Sound_MagOut = "Nambu.MagOut" -- placeholder
|
||||||
|
wep.Sound_MagIn = "Nambu.MagIn" -- placeholder
|
||||||
|
|
||||||
wep.Delay = (60/180)
|
wep.Delay = (60/180)
|
||||||
wep.Ammo = 6
|
wep.Ammo = 6
|
||||||
|
@ -72,11 +135,13 @@ wep.Damage = 26
|
||||||
local wep = {}
|
local wep = {}
|
||||||
WEAPONS["anaconda"] = wep
|
WEAPONS["anaconda"] = wep
|
||||||
wep.Name = "ANACONDA"
|
wep.Name = "ANACONDA"
|
||||||
wep.Description = "Precise and kicks like a mule, but low capacity."
|
wep.Description = "Precise and kicks like a mule."
|
||||||
|
|
||||||
wep.WModel = "models/weapons/w_pist_glock18.mdl"
|
wep.WModel = "models/weapons/w_pist_glock18.mdl"
|
||||||
wep.Sound_Fire = "1911.Fire"
|
wep.Sound_Fire = "Anaconda.Fire"
|
||||||
wep.Sound_Reload = "1911.Reload" -- placeholder
|
wep.Sound_DryFire = "Common.Dryfire.Pistol"
|
||||||
|
wep.Sound_MagOut = "Anaconda.MagOut" -- placeholder
|
||||||
|
wep.Sound_MagIn = "Anaconda.MagIn" -- placeholder
|
||||||
|
|
||||||
wep.Delay = (60/180)
|
wep.Delay = (60/180)
|
||||||
wep.Ammo = 6
|
wep.Ammo = 6
|
||||||
|
@ -85,13 +150,16 @@ wep.Damage = 40
|
||||||
local wep = {}
|
local wep = {}
|
||||||
WEAPONS["tmp"] = wep
|
WEAPONS["tmp"] = wep
|
||||||
wep.Name = "TMP"
|
wep.Name = "TMP"
|
||||||
wep.Description = "Precise."
|
wep.Description = "Precise and sharp, like a damn suit's pet."
|
||||||
|
|
||||||
wep.WModel = "models/weapons/w_pist_glock18.mdl"
|
wep.WModel = "models/weapons/w_pist_glock18.mdl"
|
||||||
wep.Sound_Fire = "1911.Fire"
|
wep.Sound_Fire = "MP5K.Fire"
|
||||||
wep.Sound_Reload = "1911.Reload" -- placeholder
|
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/800)
|
wep.Delay = (60/700)
|
||||||
wep.Ammo = 15
|
wep.Ammo = 15
|
||||||
wep.Damage = 18
|
wep.Damage = 18
|
||||||
|
|
||||||
|
@ -101,8 +169,11 @@ wep.Name = "MP7"
|
||||||
wep.Description = "Small, pistol-sized, and simple."
|
wep.Description = "Small, pistol-sized, and simple."
|
||||||
|
|
||||||
wep.WModel = "models/weapons/w_pist_glock18.mdl"
|
wep.WModel = "models/weapons/w_pist_glock18.mdl"
|
||||||
wep.Sound_Fire = "1911.Fire"
|
wep.Sound_Fire = "MP5K.Fire"
|
||||||
wep.Sound_Reload = "1911.Reload" -- placeholder
|
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.Delay = (60/700)
|
||||||
wep.Ammo = 15
|
wep.Ammo = 15
|
||||||
|
@ -114,8 +185,11 @@ wep.Name = "MP5K"
|
||||||
wep.Description = "Quality manufacturing, but cumbersome."
|
wep.Description = "Quality manufacturing, but cumbersome."
|
||||||
|
|
||||||
wep.WModel = "models/weapons/w_pist_glock18.mdl"
|
wep.WModel = "models/weapons/w_pist_glock18.mdl"
|
||||||
wep.Sound_Fire = "1911.Fire"
|
wep.Sound_Fire = "MP5K.Fire"
|
||||||
wep.Sound_Reload = "1911.Reload" -- placeholder
|
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.Delay = (60/700)
|
||||||
wep.Ammo = 15
|
wep.Ammo = 15
|
||||||
|
@ -127,8 +201,11 @@ wep.Name = "MAC-11"
|
||||||
wep.Description = "More fit for combat in a phone booth."
|
wep.Description = "More fit for combat in a phone booth."
|
||||||
|
|
||||||
wep.WModel = "models/weapons/w_pist_glock18.mdl"
|
wep.WModel = "models/weapons/w_pist_glock18.mdl"
|
||||||
wep.Sound_Fire = "1911.Fire"
|
wep.Sound_Fire = "MP5K.Fire"
|
||||||
wep.Sound_Reload = "1911.Reload" -- placeholder
|
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/800)
|
wep.Delay = (60/800)
|
||||||
wep.Ammo = 16
|
wep.Ammo = 16
|
||||||
|
@ -141,7 +218,10 @@ wep.Description = "Unwieldy bullet storm."
|
||||||
|
|
||||||
wep.WModel = "models/weapons/w_pist_glock18.mdl"
|
wep.WModel = "models/weapons/w_pist_glock18.mdl"
|
||||||
wep.Sound_Fire = "Bizon.Fire"
|
wep.Sound_Fire = "Bizon.Fire"
|
||||||
|
wep.Sound_DryFire = "Common.Dryfire.Rifle"
|
||||||
wep.Sound_Reload = "Bizon.Reload" -- placeholder
|
wep.Sound_Reload = "Bizon.Reload" -- placeholder
|
||||||
|
wep.Sound_MagOut = "Bizon.MagOut" -- placeholder
|
||||||
|
wep.Sound_MagIn = "Bizon.MagIn" -- placeholder
|
||||||
|
|
||||||
wep.Delay = (60/600)
|
wep.Delay = (60/600)
|
||||||
wep.Ammo = 40
|
wep.Ammo = 40
|
||||||
|
|
Loading…
Reference in New Issue