Advertisement
Guest User

Untitled

a guest
May 26th, 2018
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.11 KB | None | 0 0
  1.  
  2. AddCSLuaFile()
  3.  
  4. if (CLIENT) then
  5. hook.Add("PopulateVJBaseHome","AddpwBaseSpawnMenu_Home",function(pnlContent,tree,node)
  6. local hometree = tree:AddNode("Home", "icon16/monkey.png")
  7. hometree.PropPanel = vgui.Create("ContentContainer", pnlContent)
  8. hometree.PropPanel:SetVisible(false)
  9. hometree.PropPanel:SetTriggerSpawnlistChange(false)
  10. //hometree.PropPanel:MoveToFront()
  11.  
  12. function hometree:DoClick()
  13. pnlContent:SwitchPanel(self.PropPanel)
  14. end
  15.  
  16. local Header1 = vgui.Create("DLabel")
  17. Header1:SetPos(40, 40)
  18. Header1:SetSize(200, 70)
  19. Header1:SetTextColor(Color(255, 102, 0, 255))
  20. Header1:SetText("Welcome to VJ Base!")
  21. hometree.PropPanel:Add(Header1)
  22.  
  23. local Text1 = vgui.Create("DLabel")
  24. Header1:SetPos(80, 80)
  25. Text1:SetSize(100, 35)
  26. Text1:SetTextColor(Color(102, 204, 255, 255))
  27. Text1:SetText("By: DrVrej")
  28. hometree.PropPanel:Add(Text1)
  29.  
  30. hometree:InternalDoClick()
  31. end)
  32.  
  33. --[-------------------------------------------------------]--
  34. hook.Add("PopulateVJBaseEntities","AddpwBaseSpawnMenu_Entity",function(pnlContent,tree,node)
  35. local models = {
  36. ["Construction"] = {
  37. "models/props_fortifications/sandbags_line1.mdl",
  38. "models//props_trenches/sandbags_curved.mdl",
  39. "models/static_fortifications/sandbagwall01.mdl",
  40. "models/props_fortifications/sandbags_line1_tall.mdl",
  41. "models/props_fortifications/sandbags_corner2_tall.mdl",
  42. "models/props_trenches/curvedsandbags01.mdl",
  43. "models//props_trenches/sandbags_curved_endb.mdl",
  44. "models/props_trenches/sandbags_straight_endb.mdl",
  45. "models/props_trenches/sandbag01.mdl",
  46. "models/props_trenches/sandbags_straight.mdl",
  47. "models/sandbagwall02.mdl",
  48. "models/static_fortifications/sandbagwall02.mdl",
  49. },
  50. ["Box"] = {
  51. "models/props_junk/wood_crate001a.mdl",
  52. "models/props_supplies/german/acrate04.mdl",
  53. "models/props_supplies/german/88mm-crate_close01_physic.mdl",
  54. "models/props_supplies/german/r_crate_lefh18.mdl",
  55. "models/props_supplies/german/r_crate_pak50mm.mdl",
  56. "models/props_supplies/german/r_crate_lefh18_stacked.mdl",
  57. "models/props_supplies/german/r_crate_pak50mm_stacked.mdl",
  58. "models/props_supplies/german/acrate01.mdl",
  59. "models/props_supplies/german/acrate01_group.mdl",
  60. "models/props_supplies/german/acrate03.mdl",
  61. "models/props_supplies/german/acrate04.mdl",
  62. "models/props_supplies/german/ammobox1.mdl",
  63. "models/props_supplies/german/box4.mdl",
  64. "models/props_supplies/american/ac_footlocker_closed_physic.mdl",
  65. "models/props_supplies/american/ac_footlocker_open_phsyic.mdl",
  66. "models/props_supplies/german/20mm-crate_close01_physic.mdl",
  67. "models/items/supply_chest.mdl",
  68. },
  69. ["Autres"] = {
  70. "models/ww2_flags/flag_ww2_ww1_animated.mdl",
  71. "models/prop_medical_bundle_01.mdl",
  72. "models/prop_food_ration_01.mdl",
  73. "models/ammunition_crate_01.mdl",
  74. "models/wwii/humans/jap/gmod/ija_hero_06_tatsuhiko.mdl",
  75. "models/wwii/humans/jap/gmod/ija_hero_squadleader_04_kitano.mdl",
  76. "models/wwii/weapons/jap/type92_hmg.mdl",
  77. "models/wwii/weapons/jap/type89_mortar.mdl",
  78. "models/wwii/weapons/jap/type99_lmg.mdl",
  79. "models/wwii/weapons/jap/katana.mdl",
  80. "models/ironeurope/58mm crate.mdl",
  81. "models/ironeurope/grenaten ammo crate.mdl",
  82. "models/ironeurope/minewerfer ammo crate.mdl",
  83. "models/damik/isuzu type 94/isuzu - truck.mdl",
  84. "models/damik/isuzu type 94/isuzu - type 94.mdl",
  85. "models/props_supplies/german/tent1.mdl",
  86. "models/props_supplies/german/zeltbahn4.mdl",
  87. "models/tent_v2/tent_green_v2.mdl",
  88. "models/german tents/ro gertent3.mdl",
  89. "models/wwii/humans/usa/gmod/player/usmc_hero_06_bill.mdl",
  90. "models/wwii/humans/usa/gmod/player/usmc_hero_03_glenn.mdl",
  91. "models/wwii/humans/usa/gmod/us_hero_08_james.mdl",
  92. "models/wwii/humans/usa/gmod/us_hero_06_bill.mdl",
  93. "models/clutter/radio.mdl",
  94. "models/weapons/w_30cal.mdl",
  95. "models/props_furniture/r_bunkbed1.mdl",
  96. "models/props/cs_militia/bunkbed.mdl",
  97. "models/props/cs_militia/bunkbed2.mdl",
  98. "models/props/de_prodigy/ammo_can_01.mdl",
  99. "models/props/de_prodigy/prodcratesa.mdl",
  100. "models/props/cs_militia/ladderwood.mdl",
  101. "models/rs uslvta4.mdl",
  102. }
  103. }
  104. local RootNode = tree:AddNode("Resistance and Liberation Props", "icon16/resistance_and_liberation.png")
  105. local ViewPanel = vgui.Create("ContentContainer", pnlContent)
  106. ViewPanel:SetVisible(false)
  107. RootNode.DoClick = function()
  108. ViewPanel:Clear(true)
  109. for name, tbl in SortedPairs(models) do
  110. local label = vgui.Create("ContentHeader", container)
  111. label:SetText(name)
  112. ViewPanel:Add(label)
  113. for _, v in ipairs(tbl) do
  114. local mdlicon = spawnmenu.GetContentType("model")
  115. if mdlicon then
  116. mdlicon(ViewPanel, {model = v})
  117. end
  118. end
  119. end
  120. pnlContent:SwitchPanel(ViewPanel)
  121. end
  122. RootNode:SetExpanded(true)
  123. end)
  124.  
  125. --[-------------------------------------------------------]--
  126. spawnmenu.AddCreationTab("Props",function()
  127. local ctrl = vgui.Create("SpawnmenuContentPanel")
  128. //ctrl:CallPopulateHook("PopulatepwBaseHome")
  129. ctrl:CallPopulateHook("PopulatepwBaseEntities")
  130. return ctrl
  131. end,"icon16/plugin.png",1,"Tout les props :)")
  132. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement