Advertisement
ArcticFox

Untitled

Feb 27th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.33 KB | None | 0 0
  1.  
  2. --[[
  3. You can no longer drop weapons you are given through ranks
  4. Fixed not setting rank model upon respawning
  5.  
  6. Configs added:
  7. None
  8. ]]
  9. JobRanksConfig = {}
  10.  
  11. //How often should it update and save?
  12. JobRanksConfig.UpdateTimer = 30
  13. //Players Required to be able to earns playtime through timer
  14. JobRanksConfig.PlayersRequired = 0
  15. //Should it give SALARY*Bonus instead of SALARY+Bonus?
  16. //NOTE: This calculates BaseSalary + (BaseSalary/100*Bonus)
  17. //So if you set BonusSalary to 15 it will be 15% of the original salary
  18. JobRanksConfig.BonusSalaryPercent = false
  19. //Disables progression if player is AFK
  20. JobRanksConfig.DisableAFKProgress = true
  21.  
  22. //HUD Jobranks
  23. JobRanksConfig.HUD = true
  24. //Defined 0-100, 0 is as much left as it can and 100 is as much right as it can
  25. JobRanksConfig.UIW = 100
  26. //Defined 0-100, 0 is as much up as it can and 100 is as much down as it can
  27. JobRanksConfig.UIH = 50
  28. --[[
  29. bar = a bar for progress
  30. time = text for time left
  31. number = numbers only
  32. ]]
  33. JobRanksConfig.HUDType = "number"
  34.  
  35. JobRanksConfig.UIBoxColor = Color(100,100,100,200)
  36. JobRanksConfig.UIOutlineColor = Color(200, 200, 200, 200)
  37. JobRanksConfig.UITextColor = Color(255,255,255,200)
  38. JobRanksConfig.BarBackground = Color(0,0,0,255)
  39. JobRanksConfig.Bar = Color(0,200,0,255)
  40.  
  41. //Allow teams to be created before we use IDs
  42. hook.Add("loadCustomDarkRPItems", "LoadJobConfigs", function()
  43. timer.Simple(3, function()
  44. JobRanks = {}
  45.  
  46. //Setup table for job
  47. JobRanks[TEAM_POLICE] = {}
  48. //Maximum rank achieveable
  49. JobRanks[TEAM_POLICE].MaxJobRank = 12
  50. //Required playtime for each promotion
  51. JobRanks[TEAM_POLICE].ReqRanks = {0,1500, 3000, 6000, 12000, 20000, 30000, 45000, 60000, 75000, 90000, 105000}
  52. //Each ranks title
  53. JobRanks[TEAM_POLICE].NameRanks = {"Private","Private First Class","Lance Corporal","Corporal","Sergeant","Staff Sergeant","Sergeant First Class","Master Sergeant","First Sergeant","Sergeant Major","Command Sergeant Major","Sergeant Major Of The Battlion"}
  54. //Bonus salary for each promotion
  55. JobRanks[TEAM_POLICE].BonusSalary = 0
  56. //Bonus equipment -> {RANK REQUIRED, WEAPON CLASS} for example ->
  57. //for example -> JobRanks[JOB].ExtraLoadout = {{5,"weapon_pumpshotgun2"},{7, "weapon_mp52"}}
  58. JobRanks[TEAM_POLICE].ExtraLoadout = {{5,"weapon_pumpshotgun2"},{7, "weapon_mp52"}}
  59. //Works the same way as ExtraLoadout, but only gives to that specific rank
  60. JobRanks[TEAM_POLICE].ExtraLoadoutSingleRank = {}
  61. //JobRanks[JOB].Model = {MODEL PATH, {BodygroupID, number}, skin}
  62. //if left empty it will set ranks to standard model, bodygroup and skin
  63. //Set a specific model, bodygroup and skin to JUST one rank and not to all you can use JobRanks[JOB].Model[RANK ID] = {"modelpath", {{BodygroupID, number},{BodygroupID, number}}, skin}
  64. JobRanks[TEAM_POLICE].Model = {}
  65. //Prefix, it's set infront of the name for example Pvt.ToBadForYou, Sgt.ToBadForYou
  66. //to set a prefix to JUST one rank and not to all you can use JobRanks[JOB].Prefix[RANK ID] = "prefix"
  67. //or like this if you want for all -> JobRanks[TEAM_POLICE].Prefix = {"Rct","Dpt","Det","Sgt","Lt", "Cpt", "Maj", "Insp"}
  68. JobRanks[TEAM_POLICE].Prefix = {"PVT","PFC","LCPL","CPL","SGT","SSG","SFC","MSG","1SG","SGM","CSM","SMB"}
  69. //Restrict certain entities to a specific or higher rank JobRanks[JOB].Entities[ENT CLASS] = LEVELREQUIREMENT
  70. //For example -> JobRanks[TEAM_POLICE].Entities["money_printer"] = 5 -> You need to be rank 5 in order to buy a money printer as a police officer
  71. //Add entities under JobRanks[TEAM_POLICE].Entities = {}
  72. JobRanks[TEAM_POLICE].Entities = {}
  73. //Works the same as for entities except here you write the entity that the shipments contain so for example for
  74. //Shotgun you would do JobRanks[TEAM_POLICE].Shipments["weapon_pumpshotgun2"] = 5
  75. JobRanks[TEAM_POLICE].Shipments = {}
  76. //Allows warranting if player is this rank or higher, Set to nil if no one should be able to within this job
  77. JobRanks[TEAM_POLICE].Warrant = 5
  78. //Allows player to make others wanted, if player is this rank or higher, Set to nil if no one should be able to within this job
  79. JobRanks[TEAM_POLICE].Wanted = 5
  80. //THESE ARE JUST TEMPLATES, download icons online and insert their path here (Also upload it on workshop or to your FastDL and add it to force download)
  81. JobRanks[TEAM_POLICE].Icons = {
  82. [1] = Material(""),
  83. }
  84. //Set this to true to disable progression through time
  85. JobRanks[TEAM_POLICE].DisableProgression = true
  86. //Add bonus stats depending on rank (Currently supports Health+Armor)
  87. JobRanks[TEAM_POLICE].BonusStats = {}
  88.  
  89. //Requirement to become this job -> {RANK, JOB}
  90. //For example -> JobRanks[TEAM_CHIEF].ReqToJoin = {2,TEAM_POLICE}
  91. //Means you require rank 2 as Police before you can become Chief
  92. JobRanks[TEAM_CHIEF].ReqToJoin = {8, TEAM_POLICE}
  93. JobRanks[TEAM_CHIEF].Entities = {}
  94. JobRanks[TEAM_CHIEF].Shipments = {}
  95.  
  96. JobRanks[TEAM_CT] = {}
  97. JobRanks[TEAM_CT].MaxJobRank = 12
  98. JobRanks[TEAM_CT].ReqRanks = {0,}
  99. JobRanks[TEAM_CT].NameRanks = {"Private","Private First Class","Lance Corporal","Corporal","Sergeant","Staff Sergeant","Sergeant First Class","Master Sergeant","First Sergeant","Sergeant Major","Command Sergeant Major","Sergeant Major Of The Battlion"}
  100. JobRanks[TEAM_CT].BonusSalary = 0
  101. JobRanks[TEAM_CT].ExtraLoadout = {}
  102. JobRanks[JOB].Model = {models/player/sgg/starwars/clonetrooper_clean.mdl, 1}
  103. JobRanks[TEAM_CT].Prefix = {"PVT","PFC","LCPL","CPL","SGT","SSG","SFC","MSG","1SG","SGM","CSM","SMB"}
  104.  
  105. end)
  106. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement