VGUI Help

Hello…

Im havein this VGUI for my NPC in my Gamemode that i wont to make working and finnish it.


LastStand.VGUI	= { }
	LastStand.VGUI.WeaponTable 	= { 
	
		{ "weapon_enforcer", "Enforcer", "models/weapons/w_r_enforce.mdl", 250 },
		{ "weapon_g36c", "G36C", "models/weapons/w_rif_g36c.mdl", 300 },
		{ "weapon_hk_mp5", "MP5", "models/weapons/w_hkg_mp5.mdl", 350 },
		{ "weapon_l85a1", "Unknown", "models/weapons/w_rif_l85a1.mdl", 425 },
		{ "weapon_laserp228", "P228", "models/weapons/w_laserp228.mdl", 500 },
		{ "weapon_lwr", "Sniper", "models/weapons/w_snip_lwr.mdl", 1000 },
		{ "weapon_m24", "Unknown", "models/weapons/w_snip_m24sr.mdl", 50 },
		{ "weapon_magnum", "Magnum Pistol", "models/weapons/w_pist_357mag.mdl", 125 },
		{ "weapon_mk18", "MK18", "models/weapons/w_rif_mk18.mdl", 200 },
		{ "weapon_mk82", "MK82", "models/weapons/w_blackmk8.mdl", 500 },
		{ "weapon_p90", "P90", "models/weapons/w_gla_p90.mdl", 600 },
		{ "weapon_scar", "Rifle", "models/weapons/w_rif_scar.mdl", 250 },
		{ "weapon_sigp210", "Unknown", "models/weapons/w_pistol_sigp210.mdl", 400 },
		{ "weapon_sil_ump45", "UMP", "models/weapons/w_sil_ump45.mdl", 600 },
		{ "weapon_wooddeagle", "Wood Dealge", "models/weapons/w_wood_deagle.mdl", 600 }
	
	}
	
	LastStand.VGUI.AmmoTable	= { 
	
		{ "SMG1", "60 Rounds", "models/Items/BoxMRounds.mdl", 50, 60 },
		{ "SMG1", "120 Rounds", "models/Items/BoxMRounds.mdl", 100, 120 },
		{ "SMG1", "240 Rounds", "models/Items/BoxMRounds.mdl", 150, 240 },
		{ "Pistol", "12 Rounds", "models/Items/BoxSRounds.mdl", 24, 12 },
		{ "Pistol", "60 Rounds", "models/Items/BoxSRounds.mdl", 60, 60 },
		{ "Pistol", "120 Rounds", "models/Items/BoxSRounds.mdl", 80, 120 },
		{ "357", "6 Rounds", "models/Items/357ammobox.mdl", 12, 6 },
		{ "357", "24 Rounds", "models/Items/357ammobox.mdl", 60, 24 },
		{ "357", "62 Rounds", "models/Items/357ammobox.mdl", 120, 62 },
		{ "Buckshot", "8 Rounds", "models/Items/BoxBuckshot.mdl", 40, 8 },
		{ "Buckshot", "24 Rounds", "models/Items/BoxBuckshot.mdl", 100, 24 },
		{ "Buckshot", "42 Rounds", "models/Items/BoxBuckshot.mdl", 160, 42 },
		{ "Armor", "25 Armor", "models/Items/hevsuit.mdl", 50, 25 },
		{ "Armor", "50 Armor", "models/Items/hevsuit.mdl", 100, 50 },
		{ "Armor", "75 Armor", "models/Items/hevsuit.mdl", 150, 75 },
		{ "Armor", "100 Armor", "models/Items/hevsuit.mdl", 200, 100 },
		{ "Health", "25 Health", "models/healthvial.mdl", 50, 25 },
		{ "Health", "50 Health", "models/healthvial.mdl", 100, 50 },
		{ "Health", "75 Health", "models/healthvial.mdl", 150, 75 },
		{ "Health", "100 Health", "models/healthvial.mdl", 200, 100 },
	
	}

local X	= ScrW( ) / 2
local Y	= ScrH( ) / 2

function LastStand.VGUI.OpenScreen( )

	local MainFrame = vgui.Create( "DFrame" )
	
	local WeaponPanel = vgui.Create( "DPanelList", MainFrame )
	local AmmoPanel   = vgui.Create( "DPanelList", MainFrame )
	
	MainFrame:SetPos( X	* 0.60, Y * 0.60 )
	MainFrame:SetSize( 400, 300 )
	
	MainFrame:SetTitle( "Weapon Market!" )
	
	MainFrame:SetVisible( true )
	MainFrame:SetDraggable( true )
	MainFrame:ShowCloseButton( true )
	
	MainFrame:MakePopup( )
	
	//Panel (Wepons)
	WeaponPanel:SetSpacing( 2 )
	WeaponPanel:EnableVerticalScrollbar( true )
	WeaponPanel:EnableHorizontal( false )
	
	WeaponPanel:SetPos( 150, 25 )
	WeaponPanel:SetSize( 224, 120 )
	
	//WeaponPanel:EnableVerticalScrollbar( true )

	WeaponPanel.Paint = function( )
		
		surface.SetDrawColor( 50, 50, 50, 255 )
		surface.DrawRect( 0, 0, WeaponPanel:GetWide( ), WeaponPanel:GetTall( ) )
		
	end
	
	//Panel (Ammuntion)
	AmmoPanel:SetSpacing( 2 )
	AmmoPanel:EnableVerticalScrollbar( true )
	AmmoPanel:EnableHorizontal( false )
	
	AmmoPanel:SetPos( 150, 200 )
	AmmoPanel:SetSize( 224, 120 )
	
	//AmmoPanel:EnableVerticalScrollbar( true )

	AmmoPanel.Paint = function( )
		
		surface.SetDrawColor( 50, 50, 50, 255 )
		surface.DrawRect( 0, 0, AmmoPanel:GetWide( ), AmmoPanel:GetTall( ) )
		
	end
	
end

usermessage.Hook( "LastStand_VGUI_OpenScreen", LastStand.VGUI.OpenScreen )

If anybody could help me finnishing this (Or make a new one) i would more than happy :slight_smile:
If you got any questions feel free to ask…

If you finnish this (Or make a new one) i can get in the Credits menu if you want :slight_smile:

Thanks.

So… What?

lol?


(User was banned for this post ("Why reply?" - mahalis))