Props

  • Initiateur de la discussion Mathe---0_0---
  • Date de début
  • 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
 
gtside

gtside

Geek suprême
Messages
162
Score réaction
20
Points
130
Bonjour, il suffit de crée un fichier.lua dans lua/autorun/client et y mettre :
Code:
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)
Cordialement
 
  • Initiateur de la discussion
M

Mathe---0_0---

Geek
Messages
41
Score réaction
2
Points
90
gtside à dit:
Bonjour, il suffit de crée un fichier.lua dans lua/autorun/client et y mettre :
Code:
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)
Cordialement
Merci mes comment je fait pour enlever les props de base ?
 
gtside

gtside

Geek suprême
Messages
162
Score réaction
20
Points
130
Bonsoir, Il suffit de crée un fichier.lua dans autorum/client et y collé :
Code:
hook.Add("PostGamemodeLoaded", "RemoveClientSpawnList", function () GAMEMODE.PopulatePropMenu = function () end end)
 
S

Sanik91

Têtard
Messages
7
Score réaction
0
Points
5
@gtside Bonjour , j'ai fait cela mais il y'a quand même un dossier addons :/ savez vous comment l'enlever ? Screenshot
 
Z0mCh!ps

Z0mCh!ps

Geek
Messages
37
Score réaction
6
Points
55
Sanik91 à dit:
@gtside Bonjour , j'ai fait cela mais il y'a quand même un dossier addons :/ savez vous comment l'enlever ? Screenshot
Je crois que c'est l'addon extended propslist mais j'suis pas sur...
 
S

Sanik91

Têtard
Messages
7
Score réaction
0
Points
5
@Z0mCh!ps ça ? : Steam Workshop :: Extended Spawnmenu
 
Z0mCh!ps

Z0mCh!ps

Geek
Messages
37
Score réaction
6
Points
55
Z0mCh!ps

Z0mCh!ps

Geek
Messages
37
Score réaction
6
Points
55
Sanik91 à dit:
@Z0mCh!ps ça ? : Steam Workshop :: Extended Spawnmenu
Mais finalement j'ai essayé et ça change rien
 
Z0mCh!ps

Z0mCh!ps

Geek
Messages
37
Score réaction
6
Points
55
Z0mCh!ps à dit:
Mais finalement j'ai essayé et ça change rien
Et j'ai aussi le problème, sauf que moi j'ai roleplay props vu que je les ai installés
 
Discord d'entraide
Rejoignz-nous sur Discord