- Initiateur de la discussion
M
Mathe---0_0---
Geek
- Messages
- 41
- Score réaction
- 2
- Points
- 90
J'émerait savoir comment faire des onglet de props pour mon serveur basewars genre que un onglet meuble etc ...
Merci
Merci
local props_spawnmenu = { ["Constructions"] = { icon = "icon16/page.png", model = { "models/props_lab/blastdoor001b.mdl", "models/props_lab/blastdoor001c.mdl", "models/props_wasteland/interior_fence002d.mdl", "models/props_wasteland/interior_fence001g.mdl", "models/props_c17/fence01a.mdl", "models/props_c17/fence01b.mdl", "models/props_c17/fence02a.mdl", "models/props_c17/fence02b.mdl", "models/props_c17/fence03a.mdl", "models/props_building_details/Storefront_Template001a_Bars.mdl", "models/props_c17/concrete_barrier001a.mdl", "models/props_phx/construct/metal_plate1x2.mdl", "models/props_phx/construct/metal_plate2x2.mdl", "models/props_phx/construct/metal_plate2x4.mdl", "models/props_phx/construct/metal_plate4x4.mdl", "models/props_phx/construct/metal_plate4x4_tri.mdl", "models/props_phx/construct/metal_tube.mdl" }, }, ["Mobilier"] = { icon = "icon16/page.png", model = { "models/splayn/rp/lr/couch.mdl", "models/splayn/rp/lr/chair.mdl", "models/testmodels/sofa_double.mdl", "models/testmodels/sofa_single.mdl", "models/props_unique/hospital/exam_table.mdl"},
}
hook.Add("PopulateContent", "RoleplayProps", function(pnlContent, tree) local props = tree:AddNode("Categorie Props", "icon16/shield.png") rytro:ExpandTo(true) for k,v in pairs(props_spawnmenu) do local k = props:AddNode(k, v.icon) local ViewPanel = vgui.Create("ContentContainer", pnlContent) ViewPanel:SetVisible(false) k.DoClick = function() ViewPanel:Clear(true) local mdlicon = spawnmenu.GetContentType("model") if mdlicon then for _,mdl in pairs(v.model) do mdlicon(ViewPanel, {model = mdl}) end end pnlContent:SwitchPanel(ViewPanel) end end
end)
Merci mes comment je fait pour enlever les props de base ?gtside à dit:Bonjour, il suffit de crée un fichier.lua dans lua/autorun/client et y mettre :
CordialementCode:local props_spawnmenu = { ["Constructions"] = { icon = "icon16/page.png", model = { "models/props_lab/blastdoor001b.mdl", "models/props_lab/blastdoor001c.mdl", "models/props_wasteland/interior_fence002d.mdl", "models/props_wasteland/interior_fence001g.mdl", "models/props_c17/fence01a.mdl", "models/props_c17/fence01b.mdl", "models/props_c17/fence02a.mdl", "models/props_c17/fence02b.mdl", "models/props_c17/fence03a.mdl", "models/props_building_details/Storefront_Template001a_Bars.mdl", "models/props_c17/concrete_barrier001a.mdl", "models/props_phx/construct/metal_plate1x2.mdl", "models/props_phx/construct/metal_plate2x2.mdl", "models/props_phx/construct/metal_plate2x4.mdl", "models/props_phx/construct/metal_plate4x4.mdl", "models/props_phx/construct/metal_plate4x4_tri.mdl", "models/props_phx/construct/metal_tube.mdl" }, }, ["Mobilier"] = { icon = "icon16/page.png", model = { "models/splayn/rp/lr/couch.mdl", "models/splayn/rp/lr/chair.mdl", "models/testmodels/sofa_double.mdl", "models/testmodels/sofa_single.mdl", "models/props_unique/hospital/exam_table.mdl"}, } hook.Add("PopulateContent", "RoleplayProps", function(pnlContent, tree) local props = tree:AddNode("Categorie Props", "icon16/shield.png") rytro:ExpandTo(true) for k,v in pairs(props_spawnmenu) do local k = props:AddNode(k, v.icon) local ViewPanel = vgui.Create("ContentContainer", pnlContent) ViewPanel:SetVisible(false) k.DoClick = function() ViewPanel:Clear(true) local mdlicon = spawnmenu.GetContentType("model") if mdlicon then for _,mdl in pairs(v.model) do mdlicon(ViewPanel, {model = mdl}) end end pnlContent:SwitchPanel(ViewPanel) end end end)
hook.Add("PostGamemodeLoaded", "RemoveClientSpawnList", function () GAMEMODE.PopulatePropMenu = function () end end)
Je crois que c'est l'addon extended propslist mais j'suis pas sur...Sanik91 à dit:@gtside Bonjour , j'ai fait cela mais il y'a quand même un dossier addons :/ savez vous comment l'enlever ? Screenshot
Oui je penseSanik91 à dit:@Z0mCh!ps ça ? : Steam Workshop :: Extended Spawnmenu
Mais finalement j'ai essayé et ça change rienSanik91 à dit:@Z0mCh!ps ça ? : Steam Workshop :: Extended Spawnmenu
Et j'ai aussi le problème, sauf que moi j'ai roleplay props vu que je les ai installésZ0mCh!ps à dit:Mais finalement j'ai essayé et ça change rien