Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.28 KB | None | 0 0
  1. --[[
  2. Fixed error with Perfect Radar System
  3. Minior fixes
  4.  
  5. Config changes:
  6. Added .DisplayPoints -> Displays license points on players driver license (only for the player himself)
  7. ]]
  8.  
  9. TBFYDIConfig = TBFYDIConfig or {}
  10. DI_THEORYDB = DI_THEORYDB or {}
  11. DI_PLAYERDATA = DI_PLAYERDATA or {}
  12. DI_INSTRUCTORS = DI_INSTRUCTORS or {}
  13.  
  14. --Contact me on SF for help to translate
  15. --Languages available:
  16. --[[
  17. English
  18. French
  19. German
  20. Korean
  21. Russian
  22. Slovak
  23. ]]
  24. TBFYDIConfig.LanguageToUse = "French"
  25.  
  26. //Width and Height of overview menu
  27. TBFYDIConfig.OverviewW, TBFYDIConfig.OverviewH = 525, 375
  28. //Width and Height of question menu
  29. TBFYDIConfig.QuestionW, TBFYDIConfig.QuestionH = 800, 450
  30.  
  31. TBFYDIConfig.AdminChatCommands = {"!dimanage", "!dimenu"}
  32. TBFYDIConfig.InstructorChatCommands = {"!instructor", "!insmenu"}
  33.  
  34. //How many % of the questions need to be answered correctly in order to pass the theory test
  35. TBFYDIConfig.Theory_PercentageRequired = 60
  36. //How many questions the theory test will have in total
  37. //NOTE: THIS NUMBER CANT BE HIGHER THAN THE AMOUNT OF QUESTIONS AVAILABLE
  38. TBFYDIConfig.Theory_QuestionAmount = 20
  39.  
  40. //Automatic Practical test can only be done if no instructors are online
  41. --[[
  42. 1 = No restrictions
  43. 2 = Only if there's driver instructors
  44. 3 = Only if there isn't driver instructors
  45. ]]
  46. TBFYDIConfig.PracticalTestRestriction = 1
  47. //Should The Perfect Radar System fail pracital tests if exceeding speedlimit? (If it's installed)
  48. TBFYDIConfig.PracticalTestRadarDetection = true
  49. //How much above the speedlimit do you have to drive to fail the test?
  50. TBFYDIConfig.PracticalTestRadarSpeedLimit = 1
  51.  
  52. //Allow checking the drivers license through vehicle?
  53. TBFYDIConfig.CheckLicenseThroughVehicle = true
  54.  
  55. //When can a player remove/add a point again
  56. TBFYDIConfig.PointsCooldown = 120
  57. //Use french point system? (goes from max points to 0 instead of 0 to max points)
  58. TBFYDIConfig.FrenchPointSystem = true
  59.  
  60. //If set to true, you have to redo the theory test if your license is revoked due to points
  61. TBFYDIConfig.RedoTheoryOnPointsRevoke = true
  62.  
  63. //Should the person receive the driving license without a practical test?
  64. TBFYDIConfig.GrantLicenseOnTheoryComplete = true
  65.  
  66. //Instructors requires whitelist for each license type
  67. TBFYDIConfig.InstructorLicenses = false
  68.  
  69. //Do you require whitelist for instructor job/Giving licenses?
  70. TBFYDIConfig.InstructorWhitelist = false
  71.  
  72. //Do you require the specific job in order to grant license?
  73. TBFYDIConfig.InstructorRestrictToJob = false
  74.  
  75. TBFYDIConfig.NPCData = {
  76. ["di_instructor_vehiclespawner"] = {Text = "Véhicules Moniteur", Model = "models/breen.mdl", TextFont = "di_npc_text", TextRotationSpeed = 80, TextColor = Color(255,255,255,255), TextBackgroundColor = Color(0,0,0,255)},
  77. ["di_practicaltest_npc"] = {Text = "Test Pratique", Model = "models/breen.mdl", TextFont = "di_npc_text", TextRotationSpeed = 80, TextColor = Color(255,255,255,255), TextBackgroundColor = Color(0,0,0,255)},
  78. }
  79.  
  80. --[[
  81. Name = Name displayed in menu
  82. Class = Vehicle Class (Found from sandbox spawn menu)
  83. Skin = Vehicle Skin ID
  84. Req = LicenseID required, set to nil if for all
  85. ]]
  86. TBFYDIConfig.InstructorVehicles = {
  87. [1] = {Name = "Citroen C4", Class = "c4tdm", Skin = 1, Req = nil},
  88. [2] = {Name = "Golf GTI 2014", Class = "vwgolfgti14tdm", Skin = 1, Req = 2},
  89. }
  90.  
  91. //Should SteamID be displayed on license?
  92. TBFYDIConfig.DisplaySteamID = false
  93. //Should job be displayed on license?
  94. TBFYDIConfig.DisplayJob = false
  95. //Should license display points?
  96. TBFYDIConfig.DisplayPoints = true
  97.  
  98. //Set this to false if you only want license restrictions on those you add in the VehicleDATABASE config
  99. TBFYDIConfig.ShouldRestrictDefault = true
  100. //The default license you require for every vehicle unless specified different in the VehicleDATABASE config
  101. TBFYDIConfig.DefaultRestrictLicense = 2
  102. --[[
  103. 1 = No Restrictions
  104. 2 = Notifies that you require license
  105. 3 = Can't enter vehicle
  106. ]]
  107. TBFYDIConfig.EnterVehicleRestrictionType = 3
  108. //This seems to cause issues to some when set to true, if you have issues set this to false
  109. TBFYDIConfig.RespawnAfterCleanUp = true
  110.  
  111. //Add vehicles that should require licenses here, also which license it requires
  112. //[MODELPATH] = LicenseID Required
  113. TBFYDIConfig.VehicleDATABASE = {
  114. }
  115.  
  116. //Who can access admin commands,menus etc
  117. TBFYDIConfig.AdminAccessCustomCheck = function(Player) return Player:IsSuperAdmin() end
  118.  
  119. DI_DATABASE = {
  120. [1] = {
  121. Name = "BSR", --License Name
  122. Desc = "Permis Scooter", --Description
  123. Image = "di_motorcycle.png", --Image name
  124. TheoryCost = 2000, --Theory test cost
  125. TheoryTime = 1200, --How much time for the theory test
  126. MaxPoints = 5, --Max points for the license before revoked
  127. PracticalCost = 2500, --How much the practical test costs
  128. PracticalTime = 100, --How much time you have for the practical test
  129. PracticalVehicle = "azok30_mbk_booster_spirit", -- Vehicle class
  130. PracticalVehicleSkin = 1, -- Skin for vehicle
  131. },
  132. [2] = {
  133. Name = "A2",
  134. Desc = "Permis Moto",
  135. Image = "di_motorcycle.png",
  136. TheoryCost = 3000,
  137. TheoryTime = 1200,
  138. MaxPoints = 5,
  139. PracticalCost = 3500,
  140. PracticalTime = 100,
  141. PracticalVehicle = "crsk_jawa_350_634",
  142. PracticalVehicleSkin = 1,
  143. },
  144.  
  145. [3] = {
  146. Name = "B",
  147. Desc = "Permis Voiture",
  148. Image = "di_car.png",
  149. TheoryCost = 4000,
  150. TheoryTime = 1200,
  151. MaxPoints = 5,
  152. PracticalCost = 4500,
  153. PracticalTime = 300,
  154. PracticalVehicle = "vwgolfgti14tdm",
  155. PracticalVehicleSkin = 1,
  156. },
  157. [4] = {
  158. Name = "E",
  159. Desc = "Permis Vehicules Militaires",
  160. Image = "di_military.png",
  161. TheoryCost = 5000,
  162. TheoryTime = 1200,
  163. MaxPoints = 5,
  164. PracticalCost = 5500,
  165. PracticalTime = 300,
  166. PracticalVehicle = "h1opentdm",
  167. PracticalVehicleSkin = 6,
  168. }
  169. }
  170.  
  171. function DI_InitJobConfigs()
  172. timer.Simple(3, function()
  173. //Jobs that get the license checker and can remove points
  174. TBFYDIConfig.PoliceJobs = {
  175. [TEAM_POLICIER] = true,
  176. [TEAM_CHIEF] = true,
  177. [TEAM_BAC] = true,
  178. [TEAM_GENDARME] = true,
  179. [TEAM_BRIGADEM] = true,
  180. }
  181.  
  182. //Job requirement to give the license
  183. TBFYDIConfig.InstructorJob = TEAM_STAFF
  184. end)
  185. end
  186.  
  187. hook.Add("DarkRPFinishedLoading", "DI_InitJobConfigs", function()
  188. if ezJobs then
  189. hook.Add("ezJobsLoaded", "DI_InitJobConfigs", DI_InitJobConfigs)
  190. else
  191. hook.Add("loadCustomDarkRPItems", "DI_InitJobConfigs", DI_InitJobConfigs)
  192. end
  193. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement