Need help with GetWeapons()

Hi.

I want to get controllable my Menu with my first part of GetWeapons() in my code and I dont know how to get information with the sliders in the collapsable menu.

Also the weapon selected in the hud is another weapon not the one I hold.

http://img214.imageshack.us/img214/2131/hud2gmod.jpg

[lua]HealthX = player.GetByID( 1 ):Health()
SetHealthX = player.GetByID( 1 ):SetHealth()
x1 = 560
y1 = 20
gun1 = OurStringThing

function myhud()

for k,v in pairs (LocalPlayer():GetWeapons()) do
if v:GetClass() == gun1 then
draw.SimpleText("Clip: " … v:Clip1(), “ScoreboardText”, 15, 50, Color(242, 204, 51, 225), 0, 0)
– draw.SimpleText("Clip Extra: " … client:GetAmmoCount(v:GetActiveWeapon():GetPrimaryAmmoType()), “ScoreboardText”, 15, 60, Color(242, 204, 51, 225), 0, 0)
draw.SimpleText("Clip Secondary: " … LocalPlayer():GetAmmoCount(v:GetSecondaryAmmoType( )), “ScoreboardText”, 15, 70, Color(242, 204, 51, 225), 0, 0)

end

end
end

hook.Add(“HUDPaint”, “myhud”, myhud)

function DrawPlayerHealth()
if (LocalPlayer():Health() > 0) then
draw.RoundedBox( 6, 5 + y1, 5 + x1, 100, 27, Color(0, 0, 0, 150))
draw.RoundedBox( 4, 6 + y1, 34 + x1, 98, 10, Color(0, 0, 0, 150));
draw.RoundedBox( 2, 10 + y1, 37 + x1, (ScrW() - 126)*(LocalPlayer():Health() / 1000), 4, Color(255, 0, 0, 255));
draw.SimpleText("HP: " … LocalPlayer():Health() … “%”, “ScoreboardText”, 16 + y1, 10 + x1, Color(242, 204, 51, 255), 0, 0)
end
end
hook.Add(“HUDPaint”,“drawplayerhealth”,DrawPlayerHealth);

function DrawPlayerArmor()
if (LocalPlayer():Armor() > 0) then
draw.RoundedBox(6, 125 + y1, 5 + x1, 100, 27, Color(0, 0, 0, 150))
draw.RoundedBox( 4, 126 + y1, 34 + x1, 98, 10, Color(0, 0, 0, 150));
draw.RoundedBox( 2, 130 + y1, 37 + x1, (ScrW() - 126)*(LocalPlayer():Armor() / 1000), 4, Color(0, 51, 255, 255));
draw.SimpleText("AP: " … LocalPlayer():Armor() … “%”, “ScoreboardText”, 132 + y1, 10 + x1, Color(242, 204, 51, 255), 0, 0)
end
end
hook.Add(“HUDPaint”,“drawplayerarmor”,DrawPlayerArmor);

function hidehud(name)
for k, v in pairs({“CHudHealth”, “CHudBattery”, “CHudAmmo”, “CHudSecondaryAmmo”} ) do
if name == v then return false end
end
end
hook.Add(“HUDShouldDraw”, “hidehud”, hidehud)

DermaPanel = vgui.Create(“DFrame”)
DermaPanel:SetTitle( "Lotus006 Ammo HUD: ")
DermaPanel:SetPos( 25,20 )
DermaPanel:SetTall(425)
DermaPanel:SetWide(360)
DermaPanel:Center()
DermaPanel:MakePopup()

NumSlider = vgui.Create( “DNumSlider”, DermaPanel )
NumSlider:SetPos( 25,50 )
NumSlider:SetWide( 100 )
NumSlider:GetValue( SetHealthX )
NumSlider:SetText( " Set Health: ")
NumSlider:SetMin( 1 ) – Minimum number of the slider
NumSlider:SetValue( HealthX )
NumSlider:SetMax( 300 ) – Maximum number of the slider
NumSlider:SetDecimals( 0 ) – Sets a decimal. Zero means it’s a whole number
NumSlider.Slider:SetSlideX( HealthX ) – This value is between 0 and 1. Since Health is 50 and the max slider is 100 it will be halfway.

SomeCollapsibleCategory = vgui.Create(“DCollapsibleCategory”, DermaPanel)
SomeCollapsibleCategory:SetPos( 25, 100 )
SomeCollapsibleCategory:SetSize( 200, 50 ) – Keep the second number at 50
SomeCollapsibleCategory:SetExpanded( 1 ) – Expanded when popped up
SomeCollapsibleCategory:SetLabel( "Weapon AR2 : On Screen " )

CategoryList = vgui.Create( “DPanelList” )
CategoryList:SetAutoSize( false )
CategoryList:SetSize( 100, 160 )
CategoryList:SetSpacing( 5 )
CategoryList:EnableHorizontal( false )
CategoryList:EnableVerticalScrollbar( true )

SomeCollapsibleCategory:SetContents( CategoryList ) – Add our list above us as the contents of the collapsible category

SetAmmoAR2 = vgui.Create( “DNumSlider” )
SetAmmoAR2:SetSize( 120, 50 ) – Keep the second number at 50
SetAmmoAR2:SetPos( 5, 5 )
SetAmmoAR2:SetText( “Primary Ammo” )
SetAmmoAR2:SetMin( 0 )
SetAmmoAR2:SetMax( 2000 )
SetAmmoAR2:SetValue( )
SetAmmoAR2:SetDecimals( 0 )
SetAmmoAR2:SetConVar( “sbox_maxprops” )
CategoryList:AddItem( SetAmmoAR2 )

SetAmmoAltAR2 = vgui.Create( “DNumSlider” )
SetAmmoAltAR2:SetSize( 150, 50 ) – Keep the second number at 50
SetAmmoAltAR2:SetText( “Alt Ammo” )
SetAmmoAltAR2:SetPos( 5, 5 )
SetAmmoAltAR2:SetMin( 0 )
SetAmmoAltAR2:SetMax( 2000 )
SetAmmoAltAR2:SetDecimals( 0 )
SetAmmoAltAR2:SetConVar( “sbox_maxprops” )
CategoryList:AddItem( SetAmmoAltAR2 )

ButtonGAR2 = vgui.Create( “DButton”, DermaPanel );
ButtonGAR2:SetSize( 100, 30 );
ButtonGAR2:SetPos( 50, 30 );
ButtonGAR2:SetText( “Give AR2” );
ButtonGAR2.DoClick = function( ButtonGAR2 )
DermaPanel:SetTitle( “Hello world!” );
end

CategoryList:AddItem( ButtonGAR2 )[/lua]