Advertisement
Guest User

Untitled

a guest
Jan 17th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.09 KB | None | 0 0
  1.  
  2. --[[
  3. Addon is now dependent on: tbfy_shared addon
  4. This new addon includes a SWEP that is used to easily setup the addon and also shared code between my addons
  5. Simply spawn it from your sandbox menu and use R to open the selection menu
  6. All my addons will in the near future support and include this
  7.  
  8. You can now setup specific jail locations for each jailer NPC, if none is setup it will use the global jail locations
  9. Added a remove all jail locations command
  10. Recoded itemstore networking for the inspection system
  11. Itemstore illegal items can now be enabled/disabled
  12. Fixed itemstore inspection issue (with illegal items)
  13. You will now respawn in jail if you die while arrested
  14. Should no longer error if jobs config weren't loaded properly (unless it lua errors)
  15. Now supports ezJobs
  16. Minior fixes not worth mentioning
  17.  
  18. Config changes:
  19. Added ItemStoreIllegalItemsEnabled
  20. Added a function for loading the job configs
  21. ]]
  22. RHandcuffsConfig = RHandcuffsConfig or {}
  23.  
  24. --Contact me on SF for help to translate
  25. --Languages available:
  26. --[[
  27. Chinese
  28. Danish
  29. Dutch
  30. English
  31. French
  32. German
  33. Korean
  34. Norwegian
  35. Polish
  36. Russian
  37. ]]
  38. RHandcuffsConfig.LanguageToUse = "French"
  39.  
  40. RHandcuffsConfig.JailerModel = "models/player/Group01/Female_01.mdl"
  41. RHandcuffsConfig.JailerText = "Arrestation"
  42.  
  43. RHandcuffsConfig.BailerModel = "models/Barney.mdl"
  44. RHandcuffsConfig.BailerText = "Liberation"
  45.  
  46. RHandcuffsConfig.CuffSound = "weapons/357/357_reload1.wav"
  47.  
  48. //The bail price for each year so -> YEARS*ThisConfig, so 10 years = 5000 in this case
  49. RHandcuffsConfig.BailPricePerYear = 500
  50. //How many years(minutes) can a player be arrested for?
  51. RHandcuffsConfig.MaxJailYears = 10
  52. //What it displays as, default is years
  53. RHandcuffsConfig.JailAmountType = "Years"
  54. //How long it takes to lockpick the cuffs
  55. RHandcuffsConfig.CuffPickTime = 15
  56. //How long it takes to cuff someone
  57. RHandcuffsConfig.CuffTime = 2
  58. //Displays if player is cuffed overhead while aiming at him
  59. RHandcuffsConfig.DisplayOverheadCuffed = false
  60. //Calculates Movement/Penalty, so 2 would make player move half as fast
  61. //Moving penalty while cuffed
  62. RHandcuffsConfig.RestrainedMovePenalty = 3
  63. //Moving penalty while dragging
  64. RHandcuffsConfig.DraggingMovePenalty = 3
  65. //Setting this to true will cause the system to bonemanipulate clientside, might cause sync issues but won't require you to install all playermodels on the server
  66. RHandcuffsConfig.BoneManipulateClientside = false
  67. //Range for cuffing
  68. RHandcuffsConfig.CuffRange = 75
  69. //Range while dragging, if player is too far away the dragging will cancel
  70. RHandcuffsConfig.DragMaxRange = 175
  71. //Maximum of velocity for dragging (raise if dragging is slow)
  72. RHandcuffsConfig.DragMaxForce = 30
  73. //Lower this to raise the velocity of dragging (lower if dragging is slow)
  74. RHandcuffsConfig.DragRangeForce = 100
  75. //Does the player has to be cuffed in order to arrest him?
  76. RHandcuffsConfig.RestrainArrest = true
  77. //Can only arrest players through the jailer NPC
  78. RHandcuffsConfig.NPCArrestOnly = true
  79. //Should the player stay cuffed after arrested?
  80. RHandcuffsConfig.RestrainOnArrest = true
  81. //Cuffs must be removed before you can unarrest if this is set to true
  82. RHandcuffsConfig.UnarrestMustRemoveCuffs = true
  83. //Give rewards when successfully arrested someone?
  84. RHandcuffsConfig.ArrestReward = true
  85. //Reward amount
  86. RHandcuffsConfig.ArrestRewardAmount = 750
  87. //Reward for each weapon
  88. RHandcuffsConfig.ConfiscateRewardAmount = 400
  89. //Reward for each item
  90. RHandcuffsConfig.ConfiscateItemRewardAmount = 150
  91. //Sets players to a specific team when arrested
  92. RHandcuffsConfig.SetTeamOnArrest = false
  93. //Players can't press E on anything while cuffed
  94. RHandcuffsConfig.DisableUseOnRestrain = true
  95. --[[
  96. 1 = Only cuffing player can drag
  97. 2 = Only jobs in the RHC_PoliceJobs can drag
  98. 3 = Anyone can drag
  99. ]]
  100. RHandcuffsConfig.DraggingPermissions = 1
  101. //Key to drag a player
  102. //https://wiki.garrysmod.com/page/Enums/IN
  103. RHandcuffsConfig.KEY = IN_USE
  104.  
  105. RHandcuffsConfig.SurrenderEnabled = false
  106. //All keys can be found here -> https://wiki.garrysmod.com/page/Enums/KEY
  107. //Key for surrendering
  108. RHandcuffsConfig.SurrenderKey = KEY_T
  109. //You can't surrender while holding these weapons
  110. RHandcuffsConfig.SurrenderWeaponWhitelist = {
  111. ["weapon_arc_phone"] = true,
  112. }
  113. //Disables drawing player shadow
  114. //Only use this if the shadows are causing issues
  115. //This is a temp fix, will be fixed in the future
  116. RHandcuffsConfig.DisablePlayerShadow = false
  117.  
  118. //Disable confiscation system (both for itemstore and weapons)
  119. RHandcuffsConfig.DisableConfiscations = false
  120. //If itemstore is installed, should confiscating illegal items be enabled?
  121. RHandcuffsConfig.ItemStoreIllegalItemsEnabled = true
  122. //Items that are illegal, defined by the entity class
  123. RHandcuffsConfig.ItemStoreIllegalItems = {
  124. ["money_printer"] = true,
  125. }
  126. RHandcuffsConfig.BlackListedWeapons = {
  127. ["gmod_tool"] = true,
  128. ["weapon_keypadchecker"] = true,
  129. ["vc_wrench"] = true,
  130. ["vc_jerrycan"] = true,
  131. ["vc_spikestrip_wep"] = true,
  132. ["laserpointer"] = true,
  133. ["remotecontroller"] = true,
  134. ["idcard"] = true,
  135. ["pickpocket"] = true,
  136. ["keys"] = true,
  137. ["pocket"] = true,
  138. ["driving_license"] = true,
  139. ["firearms_license"] = true,
  140. ["weapon_physcannon"] = true,
  141. ["gmod_camera"] = true,
  142. ["weapon_physgun"] = true,
  143. ["weapon_r_restrained"] = true,
  144. ["tbfy_surrendered"] = true,
  145. ["weapon_r_cuffed"] = true,
  146. ["collections_bag"] = true,
  147. ["weapon_fists"] = true,
  148. ["weapon_arc_atmcard"] = true,
  149. ["itemstore_pickup"] = true,
  150. ["weapon_checker"] = true,
  151. ["driving_license_checker"] = true,
  152. ["fine_list"] = true,
  153. ["weapon_r_handcuffs"] = true,
  154. ["door_ram"] = true,
  155. ["med_kit"] = true,
  156. ["stunstick"] = true,
  157. ["arrest_stick"] = true,
  158. ["unarrest_stick"] = true,
  159. ["weaponchecker"] = true,
  160. }
  161. //Set this to true if you wanna restrict the cuffs use to only specific jobs
  162. RHandcuffsConfig.RestrictCuffsToWhitelist = false
  163.  
  164. //Add all female models here or the handcuffs positioning will be weird
  165. //It's case sensitive, make sure all letters are lowercase
  166. RHandcuffsConfig.FEMALE_MODELS = {
  167. "models/player/group01/female_01.mdl",
  168. "models/player/group01/female_02.mdl",
  169. "models/player/group01/female_03.mdl",
  170. "models/player/group01/female_04.mdl",
  171. "models/player/group01/female_05.mdl",
  172. "models/player/group01/female_06.mdl",
  173. "models/player/group03/female_01.mdl",
  174. "models/player/group03/female_02.mdl",
  175. "models/player/group03/female_03.mdl",
  176. "models/player/group03/female_04.mdl",
  177. "models/player/group03/female_05.mdl",
  178. "models/player/group03/female_06.mdl",
  179. }
  180.  
  181. function RHC_InitJobsConfig()
  182. timer.Simple(3, function()
  183. //The team it sets on player during jailtime if enabled
  184. RHandcuffsConfig.ArrestTeam = TEAM_GANG
  185. //Jobs that can use the cuffs if the cuffs is restricted
  186. RHandcuffsConfig.WhitelistedJobs = {
  187. [TEAM_POLICE] = true,
  188. [TEAM_CHIEF] = true,
  189. }
  190. //Jobs that can't be cuffed
  191. RHandcuffsConfig.ImmuneJobs = {
  192. [TEAM_POLICE] = true,
  193. [TEAM_CHIEF] = true,
  194. [TEAM_MAYOR] = true,
  195. }
  196. end)
  197. end
  198. if ezJobs then
  199. hook.Add("ezJobsLoaded", "RHC_InitJobs", RHC_InitJobsConfig)
  200. else
  201. hook.Add("loadCustomDarkRPItems", "RHC_InitJobs", RHC_InitJobsConfig)
  202. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement