Rebind Reload1 and Reload2
This commit is contained in:
parent
5559d1ebe1
commit
b973b4da70
|
@ -107,11 +107,11 @@ hook.Add( "PlayerButtonDown", "Benny_PlayerButtonDown_TempForAim", function( ply
|
|||
end
|
||||
end
|
||||
|
||||
if button == KEY_R then
|
||||
if button == ply:GetInfoNum("benny_bind_reload", KEY_R) then
|
||||
wep:Reload( wep:hFlipHand( false ) )
|
||||
end
|
||||
|
||||
if button == KEY_T then
|
||||
if button == ply:GetInfoNum("benny_bind_reloada", KEY_T) then
|
||||
wep:Reload( wep:hFlipHand( true ) )
|
||||
end
|
||||
end
|
||||
|
|
|
@ -58,8 +58,12 @@ CONVARS_CL["wep_ao_junk"] = { 0, 0, 1, true, true, "Whether offhand junk
|
|||
|
||||
CONVARS_CL["wep_toolgun"] = { "", nil, nil, true, true, "Toolgun tool." }
|
||||
|
||||
CONVARS_CL["cam_override"] = { "", nil, nil, false, true, "Override camera" }
|
||||
CONVARS_CL["cam_unlock"] = { 0, 0, 1, false, false, "Unlock camera" }
|
||||
CONVARS_CL["cam_override"] = { "", nil, nil, false, true, "Override camera" }
|
||||
CONVARS_CL["cam_unlock"] = { 0, 0, 1, false, false, "Unlock camera" }
|
||||
|
||||
|
||||
CONVARS_CL["bind2_reload"] = { KEY_R, nil, nil, true, true, "Bind for Reload" }
|
||||
CONVARS_CL["bind2_reloada"] = { KEY_T, nil, nil, true, true, "Bind for ReloadAlt" }
|
||||
|
||||
CONVARS_CL_GEN = {}
|
||||
for i, v in pairs( CONVARS_CL ) do
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
-- Settings panel
|
||||
|
||||
-- 0 = checkbox, 1 = slider, 2 = string
|
||||
-- 0 = checkbox, 1 = slider, 2 = string, 3 = binder
|
||||
local conf = {
|
||||
[1] = {
|
||||
{ 0, "benny_hud_enable_health", "Health", },
|
||||
|
@ -17,6 +17,8 @@ local conf = {
|
|||
{ 2, "Pressing Left Mouse will throw an offhand grenade." },
|
||||
{ 0, "benny_wep_ao_junk", "Junk Overrides Primary Attack" },
|
||||
{ 2, "Pressing Left Mouse will throw offhand junk." },
|
||||
{ 3, "benny_bind_reload", "Reload" },
|
||||
{ 3, "benny_bind_reloada", "Reload Alt" },
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -47,6 +49,20 @@ local function genpan( Base, Sect, Conf )
|
|||
Butt:Dock(TOP)
|
||||
Butt:DockMargin( 24, -5, 0, 0 )
|
||||
Butt:SetText( v[2] )
|
||||
elseif v[1] == 3 then
|
||||
local Butt = Scroll:Add("DLabel")
|
||||
Butt:Dock(TOP)
|
||||
Butt:DockMargin( 48+5, 0, 0, 0 )
|
||||
Butt:SetText( v[3] )
|
||||
|
||||
local Butt = Scroll:Add("DBinder")
|
||||
Butt:Dock(TOP)
|
||||
Butt:DockMargin( 48, 0, 48, 2 )
|
||||
Butt:SetText( v[2] )
|
||||
|
||||
function Butt:OnChange( num )
|
||||
RunConsoleCommand( v[2], num )
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue