давайте, мне очень нужно
Давай.
Их сборку сливали, скачай и поищи
Деньги плати людям.
Скрин скинь какое меню должно быть
sh_spawnprops.lua (20,4 КБ)
Закинуть в garrysmod\lua\autorun
Да, настроить ранги строка 396
Это то, просто забери у себя суперадмина и проверь
Исправил безобразие с таблицами
-- Декор
local props_1 = {
"models/props_borealis/bluebarrel001.mdl",
"models/props_c17/canister01a.mdl",
"models/props_c17/canister02a.mdl",
"models/props_c17/canister_propane01a.mdl",
"models/props_c17/bench01a.mdl",
"models/props_c17/concrete_barrier001a.mdl",
"models/props_c17/door02_double.mdl",
"models/props_c17/fence01b.mdl",
"models/props_c17/fence02a.mdl",
"models/props_c17/fence01a.mdl",
"models/props_c17/fence02b.mdl",
"models/props_c17/fence03a.mdl",
"models/props_c17/FurnitureBathtub001a.mdl",
"models/props_c17/FurnitureBed001a.mdl",
"models/props_c17/FurnitureBoiler001a.mdl",
"models/props_c17/FurnitureChair001a.mdl",
"models/props_c17/FurnitureCouch001a.mdl",
"models/props_c17/FurnitureCouch002a.mdl",
"models/props_c17/FurnitureCupboard001a.mdl",
"models/props_c17/FurnitureDrawer001a.mdl",
"models/props_c17/FurnitureDrawer002a.mdl",
"models/props_c17/FurnitureDresser001a.mdl",
"models/props_c17/FurnitureFridge001a.mdl",
"models/props_c17/FurnitureFireplace001a.mdl",
"models/props_c17/FurnitureRadiator001a.mdl",
"models/props_c17/FurnitureShelf001a.mdl",
"models/props_c17/FurnitureWashingmachine001a.mdl",
"models/props_c17/furnitureStove001a.mdl",
"models/props_c17/FurnitureTable001a.mdl",
"models/props_c17/FurnitureTable002a.mdl",
"models/props_c17/FurnitureSink001a.mdl",
"models/props_c17/FurnitureToilet001a.mdl",
"models/props_c17/Lockers001a.mdl",
"models/props_c17/gravestone001a.mdl",
"models/props_c17/gravestone002a.mdl",
"models/props_c17/gravestone003a.mdl",
"models/props_c17/oildrum001.mdl",
"models/props_combine/breendesk.mdl",
"models/props_combine/breenchair.mdl",
"models/props_combine/breenglobe.mdl",
"models/props_debris/metal_panel02a.mdl",
"models/props_debris/metal_panel01a.mdl",
"models/props_doors/door03_slotted_left.mdl",
"models/props_docks/dock01_cleat01a.mdl",
"models/props_interiors/BathTub01a.mdl",
"models/props_interiors/Furniture_chair01a.mdl",
"models/props_interiors/Furniture_chair03a.mdl",
"models/props_interiors/Furniture_Couch01a.mdl",
"models/props_interiors/Furniture_Couch02a.mdl",
"models/props_interiors/Furniture_Desk01a.mdl",
"models/props_interiors/Furniture_shelf01a.mdl",
"models/props_interiors/Furniture_Lamp01a.mdl",
"models/props_interiors/Radiator01a.mdl",
"models/props_interiors/refrigerator01a.mdl",
"models/props_interiors/refrigeratorDoor01a.mdl",
"models/props_interiors/refrigeratorDoor02a.mdl",
"models/props_interiors/SinkKitchen01a.mdl",
"models/props_interiors/VendingMachineSoda01a.mdl",
"models/props_junk/cardboard_box001a.mdl",
"models/props_junk/cardboard_box003a.mdl",
"models/props_junk/metal_paintcan001a.mdl",
"models/props_junk/MetalBucket01a.mdl",
"models/props_junk/MetalBucket02a.mdl",
"models/props_junk/plasticbucket001a.mdl",
"models/props_junk/PropaneCanister001a.mdl",
"models/props_junk/PushCart01a.mdl",
"models/props_junk/sawblade001a.mdl",
"models/props_junk/TrashBin01a.mdl",
"models/props_junk/TrafficCone001a.mdl",
"models/props_junk/TrashDumpster02b.mdl",
"models/props_junk/TrashDumpster01a.mdl",
"models/props_junk/wood_crate001a.mdl",
"models/props_junk/wood_crate002a.mdl",
"models/props_junk/wood_pallet001a.mdl",
"models/props_lab/blastdoor001a.mdl",
"models/props_lab/blastdoor001b.mdl",
"models/props_lab/blastdoor001c.mdl",
"models/props_lab/filecabinet02.mdl",
"models/props_lab/kennel_physics.mdl",
"models/props_trainstation/bench_indoor001a.mdl",
"models/props_trainstation/Ceiling_Arch001a.mdl",
"models/props_trainstation/TrackSign02.mdl",
"models/props_trainstation/TrackSign03.mdl",
"models/props_wasteland/controlroom_chair001a.mdl",
"models/props_wasteland/controlroom_filecabinet002a.mdl",
"models/props_wasteland/controlroom_storagecloset001a.mdl",
"models/props_wasteland/gaspump001a.mdl",
"models/props_wasteland/interior_fence001g.mdl",
"models/props_wasteland/interior_fence002d.mdl",
"models/props_wasteland/interior_fence002e.mdl",
"models/props_wasteland/kitchen_counter001b.mdl",
"models/props_wasteland/laundry_cart001.mdl",
"models/props_wasteland/laundry_cart002.mdl",
"models/props_wasteland/laundry_washer003.mdl",
"models/props_wasteland/light_spotlight01_lamp.mdls",
"models/props_wasteland/panel_leverHandle001a.mdl",
"models/props_wasteland/prison_bedframe001b.mdl",
"models/props_wasteland/prison_celldoor001b.mdl",
"models/props_wasteland/prison_heater001a.mdl",
"models/props_wasteland/prison_lamp001c.mdl",
"models/props_wasteland/prison_shelf002a.mdl",
"models/props_wasteland/wood_fence01a.mdl",
"models/props_wasteland/wood_fence02a.mdl",
"models/props_c17/BriefCase001a.mdl",
"models/Gibs/HGIBS.mdl",
"models/props_c17/cashregister01a.mdl",
"models/props_c17/chair_kleiner03a.mdl",
"models/props_c17/streetsign001c.mdl",
"models/props_c17/streetsign002b.mdl",
"models/props_c17/streetsign003b.mdl",
"models/props_c17/streetsign004e.mdl",
"models/props_c17/streetsign004f.mdl",
"models/props_c17/streetsign005b.mdl",
"models/props_c17/streetsign005c.mdl",
"models/props_c17/streetsign005d.mdl",
"models/props_c17/doll01.mdl",
"models/props_c17/clock01.mdl",
"models/props_c17/chair_office01a.mdl",
"models/props_c17/chair_stool01a.mdl",
"models/props_c17/SuitCase001a.mdl",
"models/props_c17/SuitCase_Passenger_Physics.mdl",
"models/props_c17/tools_wrench01a.mdl",
"models/props_c17/TrapPropeller_Lever.mdl",
"models/props_c17/tv_monitor01.mdl",
"models/props_combine/breenbust.mdl",
"models/props_junk/garbage_coffeemug001a.mdl",
"models/props_junk/garbage_glassbottle003a.mdl",
"models/props_junk/GlassBottle01a.mdl",
"models/props_junk/terracotta01.mdl",
"models/props_lab/cactus.mdl",
"models/props_lab/huladoll.mdl",
"models/props_vehicles/carparts_muffler01a.mdl",
"models/props_lab/monitor01a.mdl",
"models/props_lab/monitor01b.mdl",
"models/props_lab/monitor02.mdl",
"models/props_lab/partsbin01.mdl",
"models/props_lab/plotter.mdl",
"models/props_lab/reciever01a.mdl",
"models/props_lab/reciever01b.mdl",
"models/props_lab/reciever01c.mdl",
"models/props_lab/reciever01d.mdl",
"models/props_lab/reciever_cart.mdl",
"models/props_lab/securitybank.mdl",
"models/props_lab/harddrive02.mdl",
"models/props_lab/harddrive01.mdl",
"models/props_lab/frame002a.mdl",
"models/props_lab/desklamp01.mdl",
"models/props_vehicles/carparts_wheel01a.mdl",
"models/props_vehicles/carparts_tire01a.mdl",
"models/props_junk/garbage_newspaper001a.mdl",
"models/props_trainstation/traincar_seats001.mdl",
}
-- Строительство
local props_2 = {
"models/props_phx/construct/metal_plate1.mdl",
"models/props_phx/construct/metal_plate1_tri.mdl",
"models/props_phx/construct/metal_plate1x2.mdl",
"models/props_phx/construct/metal_plate1x2_tri.mdl",
"models/props_phx/construct/metal_plate2x2.mdl",
"models/props_phx/construct/metal_plate2x2_tri.mdl",
"models/props_phx/construct/metal_plate2x4.mdl",
"models/props_phx/construct/metal_plate2x4_tri.mdl",
"models/props_phx/construct/metal_plate4x4.mdl",
"models/props_phx/construct/metal_plate4x4_tri.mdl",
"models/props_phx/construct/metal_tube.mdl",
"models/props_phx/construct/metal_tubex2.mdl",
"models/props_phx/construct/metal_angle360.mdl",
"models/props_phx/construct/metal_angle180.mdl",
"models/props_phx/construct/metal_angle90.mdl",
"models/props_phx/construct/metal_plate_curve360.mdl",
"models/props_phx/construct/metal_plate_curve180.mdl",
"models/props_phx/construct/metal_plate_curve.mdl",
"models/props_phx/construct/metal_plate_curve360x2.mdl",
"models/props_phx/construct/metal_plate_curve180x2.mdl",
"models/props_phx/construct/metal_plate_curve2x2.mdl",
"models/props_phx/construct/metal_dome360.mdl",
"models/props_phx/construct/metal_dome180.mdl",
"models/props_phx/construct/metal_dome90.mdl",
"models/phxtended/tri1x1solid.mdl",
"models/phxtended/tri1x1x1solid.mdl",
"models/phxtended/trieq1x1x1solid.mdl",
"models/phxtended/trieq1x1x2solid.mdl",
"models/phxtended/bar1x.mdl",
"models/phxtended/bar2x.mdl",
"models/props_phx/construct/metal_wire1x1x1.mdl",
"models/props_phx/construct/metal_wire_angle360x1.mdl",
"models/props_phx/construct/metal_wire_angle180x1.mdl",
"models/props_phx/construct/metal_wire_angle360x2.mdl",
"models/props_phx/construct/metal_wire_angle180x2.mdl",
"models/phxtended/tri1x1x1.mdl",
"models/phxtended/trieq1x1x1.mdl",
"models/phxtended/trieq1x1x2.mdl",
"models/props_phx/construct/windows/window1x1.mdl",
"models/props_phx/construct/windows/window1x2.mdl",
"models/props_phx/construct/windows/window2x2.mdl",
"models/props_phx/construct/windows/window2x4.mdl",
"models/props_phx/construct/windows/window4x4.mdl",
"models/props_phx/construct/windows/window_angle360.mdl",
"models/props_phx/construct/windows/window_angle180.mdl",
"models/props_phx/construct/windows/window_angle90.mdl",
"models/props_phx/construct/windows/window_curve360x1.mdl",
"models/props_phx/construct/windows/window_curve180x1.mdl",
"models/props_phx/construct/windows/window_curve90x1.mdl",
"models/props_phx/construct/windows/window_curve360x2.mdl",
"models/props_phx/construct/windows/window_curve180x2.mdl",
"models/props_phx/construct/windows/window_curve90x2.mdl",
"models/props_phx/construct/windows/window_dome360.mdl",
"models/props_phx/construct/windows/window_dome180.mdl",
"models/props_phx/construct/wood/wood_boardx1.mdl",
"models/props_phx/construct/wood/wood_boardx2.mdl",
"models/props_phx/construct/wood/wood_boardx4.mdl",
"models/props_phx/construct/wood/wood_panel1x1.mdl",
"models/props_phx/construct/wood/wood_panel1x2.mdl",
"models/props_phx/construct/wood/wood_panel2x2.mdl",
"models/props_phx/construct/wood/wood_wire1x1x1.mdl",
"models/props_phx/construct/plastic/plastic_panel1x1.mdl",
"models/props_phx/construct/plastic/plastic_panel2x2.mdl",
"models/Mechanics/gears2/pinion_20t3.mdl",
"models/Mechanics/gears2/pinion_40t3.mdl",
"models/Mechanics/gears2/pinion_80t3.mdl",
"models/mechanics/robotics/a1.mdl",
"models/mechanics/robotics/a2.mdl",
"models/mechanics/robotics/a4.mdl",
}
-- Пластик
local props_3 = {
"models/hunter/plates/plate.mdl",
"models/hunter/plates/plate025.mdl",
"models/hunter/plates/plate025x025.mdl",
"models/hunter/plates/plate1x1.mdl",
"models/hunter/plates/plate1x2.mdl",
"models/hunter/plates/plate1x3.mdl",
"models/hunter/plates/plate1x4.mdl",
"models/hunter/plates/plate1x5.mdl",
"models/hunter/plates/plate1x6.mdl",
"models/hunter/plates/plate1x7.mdl",
"models/hunter/plates/plate1x8.mdl",
"models/hunter/plates/plate2x2.mdl",
"models/hunter/plates/plate2x3.mdl",
"models/hunter/plates/plate2x4.mdl",
"models/hunter/plates/plate2x5.mdl",
"models/hunter/plates/plate2x6.mdl",
"models/hunter/plates/plate2x7.mdl",
"models/hunter/plates/plate2x8.mdl",
"models/hunter/plates/plate3x3.mdl",
"models/hunter/plates/plate3x4.mdl",
"models/hunter/plates/plate3x5.mdl",
"models/hunter/plates/plate3x6.mdl",
"models/hunter/plates/plate4x4.mdl",
"models/hunter/plates/plate4x5.mdl",
"models/hunter/plates/plate4x6.mdl",
"models/hunter/plates/plate5x5.mdl",
"models/hunter/plates/plate5x6.mdl",
"models/hunter/plates/plate6x6.mdl",
"models/hunter/plates/plate6x7.mdl",
"models/hunter/plates/plate7x7.mdl",
"models/hunter/plates/plate7x8.mdl",
"models/hunter/plates/plate8x8.mdl",
"models/hunter/blocks/cube025x025x025.mdl",
"models/hunter/blocks/cube025x05x025.mdl",
"models/hunter/blocks/cube025x075x025.mdl",
"models/hunter/blocks/cube025x125x025.mdl",
"models/hunter/blocks/cube025x150x025.mdl",
"models/hunter/blocks/cube025x1x025.mdl",
"models/hunter/blocks/cube025x2x025.mdl",
"models/hunter/blocks/cube05x05x025.mdl",
"models/hunter/blocks/cube05x1x025.mdl",
"models/hunter/blocks/cube05x2x025.mdl",
"models/hunter/blocks/cube05x4x025.mdl",
"models/hunter/blocks/cube05x05x05.mdl",
"models/hunter/blocks/cube05x1x05.mdl",
"models/hunter/blocks/cube05x105x05.mdl",
"models/hunter/blocks/cube05x4x05.mdl",
"models/hunter/blocks/cube05x6x05.mdl",
"models/hunter/blocks/cube1x1x025.mdl",
"models/hunter/blocks/cube2x2x025.mdl",
"models/hunter/blocks/cube2x4x025.mdl",
"models/hunter/blocks/cube2x6x025.mdl",
"models/hunter/blocks/cube1x1x05.mdl",
"models/hunter/blocks/cube2x2x05.mdl",
"models/hunter/blocks/cube2x4x05.mdl",
"models/hunter/blocks/cube2x6x05.mdl",
"models/hunter/blocks/cube6x6x05.mdl",
}
if CLIENT then
local buytable = {}
buytable["Декор:"] = {}
buytable["Декор:"].Model = props_1
buytable["Декор:"].Data = props_1
buytable["Строительство:"] = {}
buytable["Строительство:"].Model = props_2
buytable["Строительство:"].Data = props_2
buytable["Пластик:"] = {}
buytable["Пластик:"].Model = props_3
buytable["Пластик:"].Data = props_3
local PANEL = {}
function PANEL:Init()
self.PanelList = vgui.Create("DPanelList", self)
self.PanelList:SetPadding(4)
self.PanelList:SetSpacing(2)
self.PanelList:EnableVerticalScrollbar(true)
self:BuildList()
end
function PANEL:BuildList()
self.PanelList:Clear()
local Categorised = {}
for k, v in pairs(buytable) do
v.Category = k
Categorised[v.Category] = Categorised[v.Category] or {}
table.insert(Categorised[v.Category], v)
end
for CategoryName, v in SortedPairs(Categorised) do
local Category = vgui.Create("DCollapsibleCategory", self)
self.PanelList:AddItem(Category)
Category:SetExpanded(false)
Category:SetLabel(CategoryName)
Category:SetCookieName("EntitySpawn." .. CategoryName)
local Content = vgui.Create("DPanelList")
Category:SetContents(Content)
Content:EnableHorizontal(true)
Content:SetDrawBackground(false)
Content:SetSpacing(2)
Content:SetPadding(2)
Content:SetAutoSize(true)
number = 1
for k, v in pairs(buytable[CategoryName].Model) do
local Icon = vgui.Create("SpawnIcon", self)
local Model = buytable[CategoryName].Model[number]
if (buytable[CategoryName].Model[number] ~= nil) then
Icon:SetModel(buytable[CategoryName].Model[number])
else
Icon:SetModel("models/error.mdl")
end
Icon.DoClick = function()
RunConsoleCommand("gm_spawn", Model)
end
local lable = vgui.Create("DLabel", Icon)
lable:SetFont("DebugFixedSmall")
lable:SetTextColor(color_black)
lable:SetText(Model)
lable:SetContentAlignment(5)
lable:SetWide(self:GetWide())
lable:AlignBottom(-42)
Content:AddItem(Icon)
number = number + 1
end
end
self.PanelList:InvalidateLayout()
end
function PANEL:PerformLayout()
self.PanelList:StretchToParent(0, 0, 0, 0)
end
local CreationSheet = vgui.RegisterTable(PANEL, "Panel")
local function CreateContentPanel()
local ctrl = vgui.CreateFromTable(CreationSheet)
return ctrl
end
local function RemoveSandboxTabs()
local all_tabs_access_groups = {"superadmin", "admin"}
local tabstoremove = {
language.GetPhrase("spawnmenu.content_tab"),
language.GetPhrase("spawnmenu.category.npcs"),
language.GetPhrase("spawnmenu.category.entities"),
language.GetPhrase("spawnmenu.category.weapons"),
language.GetPhrase("spawnmenu.category.vehicles"),
language.GetPhrase("spawnmenu.category.postprocess"),
language.GetPhrase("spawnmenu.category.dupes"),
language.GetPhrase("spawnmenu.category.saves"),
}
if not table.HasValue(all_tabs_access_groups, LocalPlayer():GetUserGroup()) then
for k, v in pairs(g_SpawnMenu.CreateMenu.Items) do
if table.HasValue(tabstoremove, v.Tab:GetText()) then
g_SpawnMenu.CreateMenu:CloseTab(v.Tab, true)
RemoveSandboxTabs()
end
end
end
end
hook.Add("SpawnMenuOpen", "blockmenutabs", RemoveSandboxTabs)
spawnmenu.AddCreationTab("Разрешенные пропы", CreateContentPanel, "icon16/application_view_tile.png", 4)
end
1 лайк