Discord
Steam
/
Garry's Mod
/
Developers
/
DarkRP Broken ..
Login/Join
Event Log
DarkRP Broken with custom spawnmenu?
0 replies, posted
Search
In This Thread
My custom spawnmenu on Q for some reason has triggered the fact no entities pop up on the f4 buy menu :S help! [lua] function proplist() print ("List Opening") local props = {} props[1] = "models/props_lab/blastdoor001b.mdl" props[2] = "models/props_lab/blastdoor001a.mdl" props[3] = "models/props_junk/wood_crate002a.mdl" props[4] = "models/props_junk/wood_crate001a.mdl" props[5] = "models/props_wasteland/barricade001a.mdl" props[6] = "models/props_wasteland/wood_fence01a.mdl" props[7] = "models/props_c17/furnitureStove001a.mdl" props[8] = "models/props_c17/FurnitureSink001a.mdl" props[9] = "models/props_c17/fence03a.mdl" props[10] = "models/props_c17/fence01a.mdl" props[11] = "models/props_c17/FurnitureChair001a.mdl" props[12] = "models/props_junk/watermelon01.mdl" props[13] = "models/props_junk/TrafficCone001a.mdl" props[14] = "models/props_interiors/VendingMachineSoda01a.mdl" props[15] = "models/props_interiors/VendingMachineSoda01a_door.mdl" props[16] = "models/props_interiors/Furniture_shelf01a.mdl" props[17] = "models/props_vehicles/wagon001a_phy.mdl" props[18] = "models/props_phx/construct/metal_plate1.mdl" props[19] = "models/props_phx/construct/metal_plate1x2.mdl" props[20] = "models/props_phx/construct/metal_plate2x2.mdl" props[21] = "models/props_phx/construct/metal_plate4x4.mdl" props[22] = "models/props_phx/construct/metal_plate2x4.mdl" props[23] = "models/props_phx/construct/glass/glass_plate4x4.mdl" props[24] = "models/props_phx/construct/glass/glass_plate2x4.mdl" props[25] = "models/props_phx/construct/glass/glass_plate2x2.mdl" props[26] = "models/props_phx/construct/glass/glass_plate1x2.mdl" props[27] = "models/props_phx/construct/glass/glass_plate1x1.mdl" local slframe = vgui.Create("DFrame") local IconList = vgui.Create("DPanelList", slframe) local collapst = vgui.Create("DCollapsibleCategory", slframe) slframe:Center() slframe:SetSize(800,400) slframe:SetTitle("ToolBox") slframe:Center() slframe:MakePopup() IconList:EnableVerticalScrollbar( true ) IconList:EnableHorizontal( true ) IconList:SetPadding( 5 ) IconList:SetPos(10,30) IconList:SetSize(200,350) collapst:SetPos( 220, 25 ) collapst:SetSize(250, 50 ) collapst:SetExpanded( 0 ) collapst:SetLabel( "Constraints" ) CategoryList = vgui.Create( "DPanelList" ) CategoryList:SetAutoSize( true ) CategoryList:SetSpacing( 5 ) CategoryList:EnableHorizontal( false ) CategoryList:EnableVerticalScrollbar( true ) collapst:SetContents( CategoryList ) local weldb = vgui.Create("DButton") weldb:SetSize(100, 25) weldb:SetPos(300, 50) weldb:SetText("Weld") CategoryList:AddItem( weldb ) weldb.DoClick = function() LocalPlayer():ConCommand("gmod_toolmode weld") LocalPlayer():ConCommand( "use gmod_tool") end local bsb = vgui.Create("DButton") bsb:SetSize(100, 25) bsb:SetPos(400, 50) bsb:SetText("Ballsocket") CategoryList:AddItem( bsb ) bsb.DoClick = function() LocalPlayer():ConCommand("gmod_toolmode ballsocket") LocalPlayer():ConCommand( "use gmod_tool") end local remv = vgui.Create("DButton") remv:SetSize(100, 25) remv:SetPos(500, 50) remv:SetText("Remover") CategoryList:AddItem( remv ) remv.DoClick = function() LocalPlayer():ConCommand("gmod_toolmode remover") LocalPlayer():ConCommand( "use gmod_tool") end for k,v in pairs(props) do local icon = vgui.Create( "SpawnIcon", IconList ) icon:SetModel( v ) IconList:AddItem( icon ) icon.DoClick = function( icon ) surface.PlaySound( "ui/buttonclickrelease.wav" ) RunConsoleCommand("gm_spawn", v) end end end concommand.Add("slist", proplist) function GM:OnSpawnMenuOpen() LocalPlayer():ConCommand("slist") end function GM:OnSpawnMenuClose() DFrame:Close(slframe) end [/lua] On another note i need to make the last function work, it doesn't atm.
Sorry, you need to
Log In
to post a reply to this thread.