Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 23.51 KB | None | 0 0
  1. BEModuleConfig = {}
  2. BEModuleFunctions = {}
  3.  
  4. local Config = BEModuleConfig
  5.  
  6. -- General Settings --
  7. Config.Version = 2.5 -- Which version of DarkRP, don't include second decimals INCORRECT: (2.5.0) Correct: (2.5)
  8. Config.Style = 2 -- The default VGUI style, players can change theirs (1-4) 1: "Sleek" Dark, 2: Dark/Black, 3: Pink, 4: Red
  9. Config.Currency = "$" -- The symbol displayed to represent money
  10. Config.LoadTime = 30 -- How long it takes for the initilization timers to take (to allow other things to load, basically)
  11.  
  12. -- Economy Settings --
  13. Config.Reputation = 50 -- Where the reputation progress starts at (0-100) (reloading the script resets the game value)
  14. Config.EconomyBank = 20000 -- How much money the bank begins with (reloading the script resets the game value)
  15.  
  16. Config.E_HUDPosition = "top" -- Where the economy meter and basic information is located: "top" or "bottom"
  17. Config.E_HUDHeight = 25 -- The height of the HUD displaying economy, reputation, and money
  18. Config.E_HUDWidth = 250 -- Same as height, but the width, which is horizontal
  19.  
  20. Config.EconomyStyleCommand = "estyle" -- The command used to change the VGUI style, no slash required
  21. Config.EconomyManagerCommand = "economy" -- The command that allows the mayor to manage the economy
  22. Config.EconomyManagerQuickKey = true -- If this is enabled, the mayor can press F2 (when not looking at a door) to open the economy manager
  23.  
  24. -- Bank Robbing Settings --
  25. Config.NoRobbingJobs = { "Офицер полиции", "Спецназ", "Патрульный", "ФБР", "Шеф полиции", "Снайпер спецназа", "Дорожная полиция", "Робокоп", "Оружейный барон", "ТТВ", "Житель", "Медик" } -- The job names that aren't allowed to rob, can't use variables such as TEAM_POLICE
  26. Config.RequiredRobJobs = { "Офицер полиции", "Спецназ", "Патрульный", "ФБР", "Шеф полиции", "Снайпер спецназа", "Робокоп" } -- How many players of one job there should be for robbing to work
  27. Config.MinimumRequired = 0 -- There must at least be this many required of the jobs above for robbing to work, set 0 to disable
  28. Config.AutoWant = true -- Want the player when being robbed
  29. Config.WantMessage = "Расхищает казну!" -- The message displayed when a player begins robbing
  30. Config.MoneyPickupSpeed = 0.25 -- How fast the player picks up money from money stacks
  31. Config.MoneyPickupSound = "physics/body/body_medium_impact_soft6.wav" -- The sound each time money is picked up from money stacks, set to "" to disable
  32. Config.MoneyWorth = 100 -- The worth of each individual money stack
  33. Config.MoneyStacks = 48 -- How many money stacks are in the money stack
  34. Config.MoneyRespawn = 2400 -- How many seconds until money stacks respawn again
  35. Config.MoneyComesFromGovernment = true -- When money stacks are taken, that money will also be deducted from the government's bank
  36. Config.MoneyEmpty = "У государства нет денег!" -- The message displayed if there isn't any money left (and the above variable is enabled)
  37. Config.MoneyRespawnDelay = 5 -- The delay after all money has been taken, when it will respawn again
  38. Config.AlarmSound = "ambient/alarms/alarm1.wav" -- The sound played when the alarm is ringing
  39. Config.AlarmHealth = 100 -- How much health the alarm has, when it reaches 0 health any alarm will stop
  40. Config.AlarmSparkOnDamage = true -- When the alarm takes damage it will make spark sounds
  41. Config.AlarmStartAgain = 30 -- How long before the alarm will start again after being damaged to turn off
  42. Config.AlarmCooldown = 60 -- How long until the alarm stops (after the last robbing action)
  43.  
  44. Config.AlarmLocations = {
  45.     -- Where alarms are put for bank robberies
  46.     -- Remove these to disable alarms
  47.     { map = "rp_califonia_r", model = "models/props_wasteland/speakercluster01a.mdl", pos = Vector(-3055.863037, 3407.066162, 383.804504), ang = Angle(22.736019, 177.275803, 0.000000) },
  48. }
  49.  
  50. Config.MoneyStackLocations = {
  51.     -- Individual money stacks that are placed
  52.     -- Use "models/props_wasteland/speakercluster01a.mdl" as a refrence for placement
  53.    
  54. }
  55.  
  56. Config.ShelfLocations = {
  57.     -- Shelves of stacks of money
  58.     -- Use "models/props/cs_office/shelves_metal.mdl" as a refrence for placement
  59.     { map = "rp_califonia_r", pos = Vector(-1874.658325, 4153.312500, 192.031250), ang = Angle(26.784014, 85.975739, 0.000000) },
  60. }
  61.  
  62. -- Mayor Settings --
  63. Config.MayorTeamName = "Мэр" -- The team name of the "mayor team" (economy privledges), can't use variables such as TEAM_MAYOR
  64.  
  65. Config.UnacceptableReputation = 15 -- When the reputation is considered "unacceptable," should be less than or equal to 20
  66. Config.AllowRecall = true -- When the reputation reaches unacceptable, people can recall the mayor (legal demotion)
  67.  
  68. -- Hints --
  69. Config.HintInterval = 180 -- The delay between showning hints
  70. Config.HintLength = 7 -- How long the hint stays before it fades away
  71. Config.SayHintBeforeHint = true -- Display "HINT: " before hints.
  72.  
  73. Config.Hints = {
  74.     -- Remember to fit these to your configuration's specifications (it doesn't do it automatically)
  75.    
  76.     "Есть несколько стилей меню экономики. Вы можете изменить его, написав /estyle <ИД стиля>, всего их 1-4.",
  77.     "Мэр принимает решения, которые влияют на репутацию и на общее положение. Если экономика города падает до неприемлимой, то мэра можно выгнать командой /recall.",
  78.     "Случаи, при которых мэр может поднять экономику происходят регулярно. Временами даже верные решения могут дать плохой оборот.",
  79.     "Хорошая экономика позволяет силовым структурам лучше экипироваться. Также, она влияет на зарплату каждого.",
  80.     "Если вы мэр, то нажмите F2 или напишите /economy для открытия меню экономики.",
  81.     "Каждый раз, получая зарплату, с вас будет списывается налог.",
  82.     "Работая сотрудником полиции вы можете улучшать свои навыки, а также, если есть вариант выбирать лучшее снаряжение.",
  83. }
  84.  
  85. -- Taxes --
  86. Config.EnableTaxes = true -- Whether people are taxed, and that tax money is put into the government's bank
  87. Config.GovernmentSalary = { "Офицер полиции", "Спецназ", "Патрульный", "ФБР", "Шеф полиции", "Снайпер спецназа", "Робокоп", "Мэр" } -- The team names of people paid using the government's bank, can't use variables such as TEAM_POLICE
  88. Config.TaxPayers = { "Житель", "Гангстер", "Бандит", "Оружейный барон", "ТТВ", "Механик", "Радио DJ" } -- The team names of jobs that must pay taxes, can't use variables such as TEAM_CITIZEN
  89. Config.MaxTaxes = 100 -- The, percentage, limit that taxes can be set to (100 being all money can be taken from paychecks)
  90. Config.DefaultTaxes = 20 -- Where taxes begin
  91. Config.TaxNotificationLength = 10 -- How long it displays the new taxes for
  92.  
  93. -- Loadouts --
  94. Config.EnableLoadouts = true -- Whether loadouts are enabled, which allows for government to modify their weapons when they spawn
  95. Config.GovernmentJobs = { "Офицер полиции", "Спецназ", "Патрульный", "ФБР", "Шеф полиции", "Снайпер спецназа", "Робокоп" } -- The team names of government members, can't use variables such as TEAM_POLICE
  96.  
  97. Config.PerkNotificationLength = 10 -- How long the notification is displayed for when a perk is bought or expires
  98.  
  99. Config.Perks = {
  100.     -- Duration is in minutes
  101.     -- Make sure the ID values for weapon loadouts match
  102.    
  103.     { id = "primaryWeapons", title = "Основное оружие", cost = 10000, duration = 60, description = [[Открывает дополнительное оружие для всех сотрудников полиции.]] },
  104.     { id = "secondaryWeapons", title = "Вспомогательное оружие", cost = 5000, duration = 60, description = [[Открывает дополнительные пистолеты для сотрудников полиции.]] },
  105.    
  106.     -- Do not modify these ID values (you can remove the perks, though)
  107.     { id = "upgrades", title = "Улучшения", cost = 10000, duration = 60, description = [[Позволяет полицейским улучшать их параметры, такие как, сила ног, сопротивление урону, броню.]] },
  108.     { id = "reputation", title = "Уважаемый", cost = 25000, duration = 60, description = [[Репутация будет вдвойне увеличена при случае.]] },
  109.     { id = "economy", title = "Лучшая экономика", cost = 5000, duration = 60, description = [[Люди будут получать двойную зарплату.]] },
  110. }
  111.  
  112. Config.WeaponsLoadout = {
  113.     -- In order to remove this from loadouts, just remove all of the tables (not the entire variable, just empty it)
  114.     { id = "primaryWeapons", category = "Основные", reputationRequired = 70, classes = { "m9k_m4a1", "m9k_l85", "m9k_g3a3", "m9k_ithacam37" } },
  115.     { id = "secondaryWeapons", category = "Вспомогательные", reputationRequired = 50, classes = { "m9k_colt1911", "m9k_coltpython", "m9k_deagle", "m9k_model500", "m9k_m92beretta" } },
  116. }
  117.  
  118. Config.UpgradesReputation = 50 -- How low the reputation is allowed for upgrades to be used
  119. Config.AvailableUpgradePoints = 10 -- How many points are available to be distributed into upgrades (default and minimum value is 1 and the maximum value is 10 for each perk)
  120.  
  121. Config.WalkSpeedUpgrade = 50 -- The maximum value that is added to the player's speed when using the leg strength upgrade
  122. Config.DamageScaleUpgrade = 0.5 -- The maximum scale that is subtracted from the player's damage scale with the resistance upgrade
  123.  
  124. Config.UpgradesLoadout = {
  125.     -- WARNING: Do not modify the ID values
  126.     -- You can remove the upgrades or modify the title
  127.    
  128.     { id = "legStrength", title = "Сила ног" },
  129.     { id = "resistance", title = "Сопротивление урону" },
  130.     { id = "armor", title = "Защитное снаряжение" },
  131. }
  132.  
  133. Config.CurrentPerks = {} -- Used for the current perks, also can work for default perks (use ID)
  134.  
  135. -- Opportunities --
  136. Config.OpportunityInterval = 800 -- The interval between opportunities given to the mayor (make this greater than the sum of the expirations)
  137. Config.OpportunityNotificationExpiration = 60 -- How long before the question to check the opportunity disappears
  138. Config.OpportunityDecisionExpiration = 300 -- How long to make an answer
  139. Config.OpportunityPostNotificationExpiration = 15 -- How long before the message displaying the outcome of the opportunity expires
  140. Config.OpportunityNotification = "Вам пришел запрос." -- The message displayed
  141.  
  142. Config.OpportunitySkipped = 5 -- How much reputation is taken when an opportunity is skipped or there is no mayor
  143. Config.OpportunityMinPlayers = 1 -- How many players there must be for reputation to actually be lowered for missing an opportunity
  144.  
  145. Config.Opportunities = {
  146.     { title = "Исследование",
  147.     description = [[Местный исследовательский центр просит, чтобы вы инвестировали в один из их отделов. Вы можете проигнорировать их запрос, но они имеют большое влияние. Эти исследователи являются одними из лучших в мире, но несомненно, им нужно финансирование. Имеется большой спрос на медицинские технологии, но также они являются довольно рисковыми.]],
  148.     choices = {
  149.         { choice = "Инвестировать в медицину", choiceCost = 5000,
  150.             results = {
  151.                 { chance = 50, money = 7500, reputation = 4, message = [[Было сделано несколько открытии в медицине.]] },
  152.                 { chance = 20, money = 10000, reputation = 6, message = [[Исследователи сделали очень много открытии.]] },
  153.                 { chance = 5, money = 25000, reputation = 10, message = [[Исследовали несколько лекарств от летальных заболевании.]] },
  154.                 { chance = 5, money = 15000, reputation = 8, message = [[Научились лечить некоторые нелетальные вирусы.]] },
  155.                 { chance = 5, money = 25000, reputation = 2, message = [[Слишком мало было сделано открытии для получения какой-либо прибыли.]] },
  156.                 { chance = 5, money = 0, reputation = 0, message = [[Исследователи ничего не достигли.]] },
  157.                 { chance = 5, money = 0, reputation = 0, message = [[Возникла авария, в результате которой потерялись все ваши инвестиции.]] },
  158.                 { chance = 2, money = 90000, reputation = 15, message = [[Открыли лекарство, которое лечит практически всё.]] },
  159.                 { chance = 1, money = 0, reputation = -4, message = [[Случился большой взрыв. Этого могло не случится, если бы вы проигнорировали их запрос.]] },
  160.                 { chance = 1, money = 0, reputation = -2, message = [[Кто-то обезумел и использовал ваши инвестиции для того, чтобы убивать людей.]] },
  161.                 { chance = 1, money = 0, reputation = -2, message = [[Неспособность следовать плану привела к катастрофе.]] },
  162.             }
  163.         },
  164.        
  165.         { choice = "Инвестировать в технологии", choiceCost = 5000,
  166.             results = {
  167.                 { chance = 45, money = 10000, reputation = 5, message = [[Было открыто несколько технологии.]] },
  168.                 { chance = 15, money = 20000, reputation = 8, message = [[Достаточно много технологии было открыто.]] },
  169.                 { chance = 10, money = 3500, reputation = 2, message = [[Слишком мало было исследовано, чтобы получить какую-то существенную прибыль.]] },
  170.                 { chance = 10, money = 500, reputation = 0, message = [[Что-то исследовали.]] },
  171.                 { chance = 5, money = 25000, reputation = 10, message = [[Была изобретена технология сохранения жизни.]] },
  172.                 { chance = 5, money = 0, reputation = 0, message = [[Исследователи ничего не достигли.]] },
  173.                 { chance = 5, money = 0, reputation = 0, message = [[Случилась авария, которая отбросила все исследования назад.]] },
  174.                 { chance = 1, money = 100000, reputation = -4, message = [[Был изобретен источник вечной энергии. К сожалению, не для общественности.]] },
  175.                 { chance = 1, money = 10000, reputation = 12, message = [[Был изобретен источник вечной энергии. Общество ликует.]] },
  176.                 { chance = 1, money = 0, reputation = -4, message = [[Произошёл серьёзный взрыв. Этого могло не случится, если бы вы не инвестировали]] },
  177.                 { chance = 1, money = 0, reputation = -6, message = [[Какой-то безумец создал оружие массового поражения.]] },
  178.                 { chance = 1, money = 0, reputation = -2, message = [[Неспособность следовать плану привела к катастрофе.]] },
  179.             }
  180.         },
  181.        
  182.         { choice = "Игнорировать", choiceCost = 0,
  183.             results = {
  184.                 { chance = 50, money = 0, reputation = 0, message = [[Вы проигнорировали запрос, и не получили особых проблем.]] },
  185.                 { chance = 25, money = 0, reputation = -5, message = [[Проигнорировав запрос, вы опустились в глазах некоторых людей.]] },
  186.                 { chance = 15, money = 0, reputation = -2, message = [[Игнорирование привело к смертям, которых можно было избежать.]] },
  187.                 { chance = 5, money = 0, reputation = 2, message = [[Люди думают, что было правильно никуда не инвестировать.]] },
  188.                 { chance = 5, money = 0, reputation = 2, message = [[Была обнаружена аномалия, которая могла бы привести к бедам, если бы вы инвестировали.]] },
  189.             }
  190.         }
  191.     }},
  192.    
  193.     { title = "Терроризм",
  194.     description = [[ Всё шло хорошо, пока кто-то не решил взорвать здание больницы. Какой-то человек говорил, что его знакомый собирается готов взорвать больницу, из-за того, что ему неправильно сделали укол. Что вы собираетесь делать с этим ?]],
  195.     choices = {
  196.         { choice = "Ничего не делать", choiceCost = 0,
  197.             results = {
  198.                 { chance = 60, money = 0, reputation = -10, message = [[Здание взорвалось, и погибло много людей.]] },
  199.                 { chance = 20, money = 0, reputation = -4, message = [[Ничего не случилось, но люди в ярости от того, что вы ничего не предприняли.]] },
  200.                 { chance = 10, money = 0, reputation = 0, message = [[Ничего не произошло и общество ничего не узнало.]] },
  201.                 { chance = 10, money = 0, reputation = -6, message = [[Кого-то подозрительно поймали со взрывчаткой, но люди недовольны, что это не ваша инициатива.]] },
  202.             }
  203.         },
  204.        
  205.         { choice = "Позвонить в ФБР", choiceCost = 5000,
  206.             results = {
  207.                 { chance = 80, money = 0, reputation = 10, message = [[ФБР выслеживает и арестовывает челвоека, который собирался взорвать здание.]] },
  208.                 { chance = 10, money = 20000, reputation = 8, message = [[ФБР не нашло взрывчатки, но они случайно вышли на склад наркотиков.]] },
  209.                 { chance = 5, money = 0, reputation = 2, message = [[ФБР выяснили, что всё это был розыгрыш и арестовали человека, сказавшего об этом.]] },
  210.                 { chance = 3, money = 0, reputation = 0, message = [[ФБР ничего не нашли и ничего не произошло.]] },
  211.                 { chance = 2, money = 0, reputation = 0, message = [[Агенты облажались. Взрыв унёс множество жизней.]] },
  212.             }
  213.         },
  214.        
  215.         { choice = "Эвакуировать здание", choiceCost = 0,
  216.             results = {
  217.                 { chance = 30, money = 0, reputation = 8, message = [[Здание эвакуировали и нашли бомбу.]] },
  218.                 { chance = 30, money = 0, reputation = 0, message = [[Здание эвакуировали, но бомбу не нашли.]] },
  219.                 { chance = 20, money = 0, reputation = 10, message = [[Здание эвакуировали, затем произошел взрыв. Никто не пострадал.]] },
  220.                 { chance = 20, money = 0, reputation = -4, message = [[Эвакуация провалилась и террорист взорвал бомбу до того, как все успели эвакуироваться.]] },
  221.             }
  222.         }
  223.     }},
  224.    
  225.     { title = "Пожертвования для дела",
  226.     description = [[Люди собрали 100,000$ для того, чтобы улучшить экономику. Всё зависит от вас. Безработных 10%, эти деньги помогут справиться с их трудообеспечением.]],
  227.     choices = {
  228.         { choice = "Набрать рабочих", choiceCost = 0,
  229.             results = {
  230.                 { chance = 80, money = 50000, reputation = 6, message = [[Количество безработных уменьшилось до 4%.]] },
  231.                 { chance = 10, money = 125000, reputation = 8, message = [[Количество безработных уменьшилось до 2%.]] },
  232.                 { chance = 8, money = 5000, reputation = 2, message = [[Количество безработных всего лишь уменьшилось до 8%.]] },
  233.                 { chance = 2, money = 0, reputation = 2, message = [[Ничего не изменилось. Но вы хотя бы попытались. Люди одобряют это.]] },
  234.             }
  235.         },
  236.        
  237.         { choice = "Оставить деньги", choiceCost = 0,
  238.             results = {
  239.                 { chance = 99, money = 100000, reputation = -75, message = [[Вы своровали деньги, и люди никогда не были так разочарованы в вас.]] },
  240.                 { chance = 1, money = 100000, reputation = 0, message = [[Похоже, что всем наплевать на это.]] },
  241.             }
  242.         }
  243.     }},
  244. }
  245.  
  246. -- Functions (for versions) --
  247. Config.GiveMoney = function(ply, amount)
  248.     if Config.Version == 2.5 then
  249.         ply:addMoney(amount)
  250.     elseif Config.Version < 2.5 then
  251.         ply:AddMoney(amount)
  252.     end
  253. end
  254.  
  255. Config.Notify = function(ply, msgType, time, message)
  256.     if Config.Version == 2.5 then
  257.         DarkRP.notify(ply, msgType, time, message)
  258.     elseif Config.Version < 2.5 then
  259.         GAMEMODE:Notify(ply, msgType, time, message)
  260.     end
  261. end
  262.  
  263. Config.NotifyAll = function(msgType, time, message)
  264.     if Config.Version == 2.5 then
  265.         DarkRP.notifyAll(msgType, time, message)
  266.     elseif Config.Version < 2.5 then
  267.         GAMEMODE:NotifyAll(msgType, time, message)
  268.     end
  269. end
  270.  
  271. Config.AddChatCommand = function(command, callback, description, delay)
  272.     if Config.Version == 2.5 then
  273.         if SERVER then
  274.             DarkRP.defineChatCommand(command, callback)
  275.         end
  276.        
  277.         DarkRP.declareChatCommand{ command = command, description = description, delay = delay }
  278.     elseif Config.Version < 2.5 then
  279.         AddChatCommand("/"..command, callback)
  280.     end
  281. end
  282.  
  283. Config.FormatNumber = function(n)
  284.     if (!n) then
  285.         return 0
  286.     end
  287.    
  288.     if n >= 1e14 then return tostring(n) end
  289.    
  290.     n = tostring(n)
  291.     sep = sep or ","
  292.    
  293.     local dp = string.find(n, "%.") or #n+1
  294.    
  295.     for i=dp-4, 1, -3 do
  296.         n = n:sub(1, i) .. sep .. n:sub(i+1)
  297.     end
  298.    
  299.     return n
  300. end
  301.  
  302. Config.ChangeTeam = function(ply, t, force)
  303.     if t == "Default" then
  304.         t = GAMEMODE.DefaultTeam
  305.     end
  306.    
  307.     if Config.Version == 2.5 then
  308.         ply:changeTeam(t, force)
  309.     elseif Config.Version < 2.5 then
  310.         ply:ChangeTeam(t, force)
  311.     end
  312. end
  313.  
  314. Config.IsDoor = function(entity)
  315.     if Config.Version == 2.5 then
  316.         return entity:isDoor()
  317.     elseif Config.Version < 2.5 then
  318.         return entity:IsDoor()
  319.     end
  320. end
  321.  
  322. Config.IsWanted = function(ply)
  323.     if Config.Version == 2.5 then
  324.         return ply:isWanted()
  325.     elseif Config.Version < 2.5 then
  326.         return ply:IsWanted()
  327.     end
  328. end
  329.  
  330. Config.Wanted = function(ply, reason)
  331.     if Config.Version == 2.5 then
  332.         ply:wanted(ply, reason)
  333.     elseif Config.Version < 2.5 then
  334.         GAMEMODE:PlayerWanted(ply, ply, reason)
  335.     end
  336. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement