Advertisement
Guest User

sh_addonsup.lua

a guest
Dec 9th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.73 KB | None | 0 0
  1. -- _______ __ _______ __ __ _______ ______ ______
  2. -- | | |.---.-..----.| |.-----. | __||__|.--------..-----.| |.-----. | | || __ \| |.-----.
  3. -- | || _ || __| |_||__ --| |__ || || || _ || || -__| | || __/| ---||__ --|
  4. -- |__|_|__||___._||____| |_____| |_______||__||__|__|__|| __||__||_____| |__|____||___| |______||_____|
  5. --
  6. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  7. ///////////////////////// Warning! Nothing to edit here, you can break the system //////////////////////////////
  8. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  9.  
  10. MCS.AddonList = {}
  11.  
  12. MCS.AddonList["CH FireSystem"] = {
  13. ["path"] = "entities/npc_firetruck/init.lua",
  14. ["function"] = nil,
  15. ["function_sv"] = function(ply)
  16. if IsValid( ply ) and table.HasValue( CH_FireSystem.Config.AllowedTeams, team.GetName(ply:Team()) ) then
  17. net.Start( "FIRE_FiretruckMenu" )
  18. net.Send( ply )
  19. else
  20. DarkRP.notify(ply, 2, 5, "Only firefighters can access this NPC!")
  21. end
  22. end,
  23. ["enabled"] = false,
  24. }
  25.  
  26. MCS.AddonList["CH TowTruck"] = {
  27. ["path"] = "entities/npc_towtruck/init.lua",
  28. ["function"] = nil,
  29. ["function_sv"] = function(ply)
  30. if IsValid( ply ) and ply:Team() == TEAM_TOWER then
  31. net.Start("TOW_TowTruck_Menu", ply)
  32. net.Send( ply )
  33. else
  34. DarkRP.notify(ply, 1, 5, "Only tow truck drivers can access this NPC!")
  35. end
  36. end,
  37. ["enabled"] = false,
  38. }
  39.  
  40. MCS.AddonList["CH ShopNPC"] = {
  41. ["path"] = "entities/npc_shop_npc/init.lua",
  42. ["function"] = function() NPC_ShopMenu() end,
  43. ["function_sv"] = nil,
  44. ["enabled"] = false,
  45. }
  46.  
  47. MCS.AddonList["CH GovStation"] = {
  48. ["path"] = "autorun/client/govstation_client.lua",
  49. ["function"] = function() GovStation_Menu() end,
  50. ["function_sv"] = nil,
  51. ["enabled"] = false,
  52. }
  53.  
  54. MCS.AddonList["SH Accessories"] = {
  55. ["path"] = "accessory/sv_accessory.lua",
  56. ["function"] = nil,
  57. ["function_sv"] = function(ply) SH_ACC:Show(ply) end,
  58. ["enabled"] = false,
  59. }
  60.  
  61. -- B e n o's addon support
  62.  
  63. MCS.AddonList["Bricks Crafting"] = {
  64. ["path"] = "entities/mcs_npc/shared.lua",
  65. ["function"] = nil,
  66. ["function_sv"] = function(ply) net.Start( "BCS_Net_UseNPC" ) net.Send( ply ) end,
  67. ["enabled"] = true,
  68. }
  69.  
  70. MCS.AddonList["ClothesMod Change Name Menu"] = {
  71. ["path"] = "entities/mcs_npc/shared.lua",
  72. ["function"] = function() OpenGlobalNameMenu() end,
  73. ["function_sv"] = nil,
  74. ["enabled"] = true,
  75. }
  76.  
  77. MCS.AddonList["ClothesMod Store Menu"] = {
  78. ["path"] = "entities/mcs_npc/shared.lua",
  79. ["function"] = function() CM_OpenShop(LocalPlayer()) end,
  80. ["function_sv"] = nil,
  81. ["enabled"] = true,
  82. }
  83.  
  84. MCS.AddonList["ClothesMod Custom Shirt NPC"] = {
  85. ["path"] = "entities/mcs_npc/shared.lua",
  86. ["function"] = function() MCSOpenGUIGlobal() end,
  87. ["function_sv"] = nil,
  88. ["enabled"] = true,
  89. }
  90.  
  91. MCS.AddonList["Hunter NPC"] = {
  92. ["path"] = "entities/mcs_npc/shared.lua",
  93. ["function"] = nil,
  94. ["function_sv"] = function(ply)
  95. if !ply:Alive() then return end
  96.  
  97. local price = ply:GetNWInt("DeadmanKillerPrice", 0)
  98. if price == 0 then
  99. ply:ChatPrint("Tu as une peau d'animal a me vendre? Non? Alors dégage.")
  100. else
  101. ply:addMoney( price )
  102. ply:ChatPrint("Content de Marchander avec toi ! Voici $"..price )
  103. ply:SetNWInt("DeadmanKillerPrice", 0)
  104. end
  105. end,
  106. ["enabled"] = true,
  107. }
  108.  
  109.  
  110. local function AddonListCheck()
  111.  
  112. for id, addon in pairs(MCS.AddonList) do
  113. if addon["path"] and file.Exists(addon["path"], "LUA") then
  114. addon["enabled"] = true
  115. print(id.." enabled!")
  116. end
  117. end
  118.  
  119. end
  120.  
  121. timer.Simple(2, function() AddonListCheck() end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement