AlioNiroti

Untitled

Feb 19th, 2018
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.43 KB | None | 0 0
  1.  
  2. --[[
  3. Added a folder for languages, each language now have seperate files due to encoding issues
  4. Small fix
  5.  
  6. Configs added:
  7. None
  8. ]]
  9.  
  10. TBFY_FAConfig = TBFY_FAConfig or {}
  11. FALICENSE_PLAYERDB = FALICENSE_PLAYERDB or {}
  12. FA_TheoryTestDB = FA_TheoryTestDB or {}
  13.  
  14. --Contact me on SF for help to translate
  15. --Languages available:
  16. --[[
  17. English
  18. French
  19. ]]
  20. TBFY_FAConfig.LanguageToUse = "English"
  21. //Width and Height of theory test window
  22. TBFY_FAConfig.TheoryTestW, TBFY_FAConfig.Theory)=TestH = 900, 700
  23. //How many % of the questions need to be answered correctly in order to pass the theory test
  24. TBFY_FAConfig.Theory_PercentageRequired = 80
  25. //Should SteamID be displayed on license?
  26. TBFY_FAConfig.DisplaySteamID = true
  27. //Should job be displayed on license?
  28. TBFY_FAConfig.DisplayJob = true
  29. //Text above Practical Test NPC
  30. TBFY_FAConfig.PTEST_NPC_Text = "Practical Firearms Test"
  31. //Model for Practical Test NPC
  32. TBFY_FAConfig.PTEST_NPC_Model = "models/alyx.mdl"
  33. //Text above Practical Test NPC
  34. TBFY_FAConfig.APP_NPC_Text = "Firearms License Applications"
  35. //Model for Practical Test NPC
  36. TBFY_FAConfig.APP_NPC_Model = "models/alyx.mdl"
  37. TBFY_FAConfig.AdminChatCommands = {"!famanage", "!famenu"}
  38. //Who can access admin commands,menus etc
  39. TBFY_FAConfig.AdminAccessCustomCheck = function(Player) return Player:IsSuperAdmin() end
  40. //Chat commands to open the application examine menu
  41. TBFY_FAConfig.ApplicationExamineChatCommands = {"!licenseapps", "!examinefa", "!gunlicenses"}
  42. TBFY_FAConfig.InstructorChatCommands = {"!fains", "!fainsmenu"}
  43. //Do you require whitelist for instructor job/Giving licenses?
  44. TBFY_FAConfig.InstructorWhitelist = true
  45. //Do you require the specific job in order to grant license?
  46. TBFY_FAConfig.InstructorRestrictToJob = true
  47. //What types instructors are allowed to grant/revoke
  48. TBFY_FAConfig.InstructorPermission = {
  49. ["Theory"] = false,
  50. ["Practical"] = true,
  51. ["Carry"] = true,
  52. ["Sell"] = false,
  53. }
  54. //Set this to false if you only want license restrictions on those you add in the WeaponDB config
  55. TBFY_FAConfig.ShouldRestrictDefault = false
  56. //The default license you require for every weapon unless specified different in the WeaponDB config
  57. TBFY_FAConfig.DefaultRestrictLicense = 1
  58. --[[
  59. 1 = No Restrictions
  60. 2 = Notifies that you require license to wield it
  61. 3 = Can't pickup weapon
  62. ]]
  63. TBFY_FAConfig.WeaponRestrictionType = 3
  64. //Insert weapons here to set specific licenses required
  65. //[WEAPON CLASS] = LicenseID Required,
  66. TBFY_FAConfig.WeaponDB = {
  67. ["weapon_deagle2"] = 1,
  68. ["weapon_glock2"] = 1,
  69. ["weapon_pumpshotgun2"] = 2,
  70. ["weapon_ak472"] = 4,
  71. ["weapon_m42"] = 4,
  72. }
  73.  
  74. //This seems to cause issues to some when set to true, if you have issues set this to false
  75. TBFY_FAConfig.RespawnAfterCleanUp = true
  76.  
  77. FALICENSE_DATABASE = {
  78. [1] = {
  79. Name = "D-1",
  80. Desc = "Tir sportif ou chasse",
  81. Image = "fa_shotgun.png",
  82. TheoryCost = 300,
  83. TheoryTime = 600,
  84. PracticalCost = 300,
  85. PracticalTime = 90,
  86. PracticalWeapon = "weapon_pumpshotgun2",
  87. PracticalAmmoAmount = 0,
  88. },
  89. [2] = {
  90. Name = "C",
  91. Desc = "Sportif ou chasse",
  92. Image = "fa_smg.png",
  93. TheoryCost = 500,
  94. TheoryTime = 600,
  95. PracticalCost = 600,
  96. PracticalTime = 60,
  97. PracticalWeapon = "weapon_mp52",
  98. PracticalAmmoAmount = 0,
  99. },
  100.  
  101. [3] = {
  102. Name = "B",
  103. Desc = "Arme de poing",
  104. Image = "fa_pistol",
  105. TheoryCost = 800,
  106. TheoryTime = 600,
  107. PracticalCost = 800,
  108. PracticalTime = 60,
  109. PracticalWeapon = "weapon_mp52",
  110. PracticalAmmoAmount = 0,
  111. },
  112. [4] = {
  113. Name = "A1",
  114. Desc = "Arme de guerre/militaire",
  115. Image = "fa_assault_rifle.png",
  116. TheoryCost = 500,
  117. TheoryTime = 600,
  118. PracticalCost = 500,
  119. PracticalTime = 90,
  120. PracticalWeapon = "weapon_ak472",
  121. PracticalAmmoAmount = 0,
  122. },
  123. [5] = {
  124. Name = "E",
  125. Desc = "License for sniper rifles.",
  126. Image = "fa_sniper.png",
  127. TheoryCost = 500,
  128. TheoryTime = 600,
  129. PracticalCost = 500,
  130. PracticalTime = 60,
  131. PracticalWeapon = "ls_sniper",
  132. PracticalAmmoAmount = 10,
  133. },
  134. }
  135.  
  136. hook.Add("loadCustomDarkRPItems", "fa_load_jobconfigs", function()
  137. //Make sure teams are created before creating config
  138. timer.Simple(3, function()
  139. //Teams that can access the application examine menu
  140. TBFY_FAConfig.AppExamineAccess = {
  141. [TEAM_MAYOR] = true,
  142. [TEAM_CHIEF] = true,
  143. }
  144.  
  145. //Weapons that doesn't require licenses for certain jobs/all jobs
  146. //Useful to allow weapons on certain jobs without licenses
  147. TBFY_FAConfig.WeaponWhitelist = {
  148. ["firearms_license"] = true, --Allows all jobs to use it
  149. ["gmod_tool"] = true,
  150. ["keys"] = true,
  151. ["pocket"] = true,
  152. ["driving_license"] = true,
  153. ["weapon_physcannon"] = true,
  154. ["gmod_camera"] = true,
  155. ["weapon_physgun"] = true,
  156. ["collections_bag"] = true,
  157. ["driving_license_checker"] = true,
  158. ["fine_list"] = true,
  159. ["weapon_r_handcuffs"] = true,
  160. ["door_ram"] = true,
  161. ["med_kit"] = true,
  162. ["stunstick"] = true,
  163. ["arrest_stick"] = true,
  164. ["unarrest_stick"] = true,
  165. ["weapon_r_restrained"] = true,
  166. ["tbfy_surrendered"] = true,
  167. ["weapon_r_cuffed"] = true,
  168. ["weaponchecker"] = true,
  169. ["weapon_keypadchecker"] = true,
  170.  
  171. ["weapon_glock2"] = { --If it's for specific jobs it has to be a table
  172. [TEAM_POLICE] = true, -- Allows Police officers to wear glock without license
  173. [TEAM_GUN] = true, -- Allows Gun dealers to wear glock without license
  174. },
  175. ["weapon_deagle2"] = { --If it's for specific jobs it has to be a table
  176. [TEAM_CHIEF] = true, -- Allows Chief of police to wear deagle without license
  177. },
  178.  
  179. }
  180.  
  181. //Job requirement to give the license
  182. TBFY_FAConfig.InstructorJob = TEAM_FA_INSTRUCTOR
  183. end)
  184. end)
Advertisement
Add Comment
Please, Sign In to add comment