Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Added a folder for languages, each language now have seperate files due to encoding issues
- Small fix
- Configs added:
- None
- ]]
- TBFY_FAConfig = TBFY_FAConfig or {}
- FALICENSE_PLAYERDB = FALICENSE_PLAYERDB or {}
- FA_TheoryTestDB = FA_TheoryTestDB or {}
- --Contact me on SF for help to translate
- --Languages available:
- --[[
- English
- French
- ]]
- TBFY_FAConfig.LanguageToUse = "English"
- //Width and Height of theory test window
- TBFY_FAConfig.TheoryTestW, TBFY_FAConfig.Theory)=TestH = 900, 700
- //How many % of the questions need to be answered correctly in order to pass the theory test
- TBFY_FAConfig.Theory_PercentageRequired = 80
- //Should SteamID be displayed on license?
- TBFY_FAConfig.DisplaySteamID = true
- //Should job be displayed on license?
- TBFY_FAConfig.DisplayJob = true
- //Text above Practical Test NPC
- TBFY_FAConfig.PTEST_NPC_Text = "Practical Firearms Test"
- //Model for Practical Test NPC
- TBFY_FAConfig.PTEST_NPC_Model = "models/alyx.mdl"
- //Text above Practical Test NPC
- TBFY_FAConfig.APP_NPC_Text = "Firearms License Applications"
- //Model for Practical Test NPC
- TBFY_FAConfig.APP_NPC_Model = "models/alyx.mdl"
- TBFY_FAConfig.AdminChatCommands = {"!famanage", "!famenu"}
- //Who can access admin commands,menus etc
- TBFY_FAConfig.AdminAccessCustomCheck = function(Player) return Player:IsSuperAdmin() end
- //Chat commands to open the application examine menu
- TBFY_FAConfig.ApplicationExamineChatCommands = {"!licenseapps", "!examinefa", "!gunlicenses"}
- TBFY_FAConfig.InstructorChatCommands = {"!fains", "!fainsmenu"}
- //Do you require whitelist for instructor job/Giving licenses?
- TBFY_FAConfig.InstructorWhitelist = true
- //Do you require the specific job in order to grant license?
- TBFY_FAConfig.InstructorRestrictToJob = true
- //What types instructors are allowed to grant/revoke
- TBFY_FAConfig.InstructorPermission = {
- ["Theory"] = false,
- ["Practical"] = true,
- ["Carry"] = true,
- ["Sell"] = false,
- }
- //Set this to false if you only want license restrictions on those you add in the WeaponDB config
- TBFY_FAConfig.ShouldRestrictDefault = false
- //The default license you require for every weapon unless specified different in the WeaponDB config
- TBFY_FAConfig.DefaultRestrictLicense = 1
- --[[
- 1 = No Restrictions
- 2 = Notifies that you require license to wield it
- 3 = Can't pickup weapon
- ]]
- TBFY_FAConfig.WeaponRestrictionType = 3
- //Insert weapons here to set specific licenses required
- //[WEAPON CLASS] = LicenseID Required,
- TBFY_FAConfig.WeaponDB = {
- ["weapon_deagle2"] = 1,
- ["weapon_glock2"] = 1,
- ["weapon_pumpshotgun2"] = 2,
- ["weapon_ak472"] = 4,
- ["weapon_m42"] = 4,
- }
- //This seems to cause issues to some when set to true, if you have issues set this to false
- TBFY_FAConfig.RespawnAfterCleanUp = true
- FALICENSE_DATABASE = {
- [1] = {
- Name = "D-1",
- Desc = "Tir sportif ou chasse",
- Image = "fa_shotgun.png",
- TheoryCost = 300,
- TheoryTime = 600,
- PracticalCost = 300,
- PracticalTime = 90,
- PracticalWeapon = "weapon_pumpshotgun2",
- PracticalAmmoAmount = 0,
- },
- [2] = {
- Name = "C",
- Desc = "Sportif ou chasse",
- Image = "fa_smg.png",
- TheoryCost = 500,
- TheoryTime = 600,
- PracticalCost = 600,
- PracticalTime = 60,
- PracticalWeapon = "weapon_mp52",
- PracticalAmmoAmount = 0,
- },
- [3] = {
- Name = "B",
- Desc = "Arme de poing",
- Image = "fa_pistol",
- TheoryCost = 800,
- TheoryTime = 600,
- PracticalCost = 800,
- PracticalTime = 60,
- PracticalWeapon = "weapon_mp52",
- PracticalAmmoAmount = 0,
- },
- [4] = {
- Name = "A1",
- Desc = "Arme de guerre/militaire",
- Image = "fa_assault_rifle.png",
- TheoryCost = 500,
- TheoryTime = 600,
- PracticalCost = 500,
- PracticalTime = 90,
- PracticalWeapon = "weapon_ak472",
- PracticalAmmoAmount = 0,
- },
- [5] = {
- Name = "E",
- Desc = "License for sniper rifles.",
- Image = "fa_sniper.png",
- TheoryCost = 500,
- TheoryTime = 600,
- PracticalCost = 500,
- PracticalTime = 60,
- PracticalWeapon = "ls_sniper",
- PracticalAmmoAmount = 10,
- },
- }
- hook.Add("loadCustomDarkRPItems", "fa_load_jobconfigs", function()
- //Make sure teams are created before creating config
- timer.Simple(3, function()
- //Teams that can access the application examine menu
- TBFY_FAConfig.AppExamineAccess = {
- [TEAM_MAYOR] = true,
- [TEAM_CHIEF] = true,
- }
- //Weapons that doesn't require licenses for certain jobs/all jobs
- //Useful to allow weapons on certain jobs without licenses
- TBFY_FAConfig.WeaponWhitelist = {
- ["firearms_license"] = true, --Allows all jobs to use it
- ["gmod_tool"] = true,
- ["keys"] = true,
- ["pocket"] = true,
- ["driving_license"] = true,
- ["weapon_physcannon"] = true,
- ["gmod_camera"] = true,
- ["weapon_physgun"] = true,
- ["collections_bag"] = true,
- ["driving_license_checker"] = true,
- ["fine_list"] = true,
- ["weapon_r_handcuffs"] = true,
- ["door_ram"] = true,
- ["med_kit"] = true,
- ["stunstick"] = true,
- ["arrest_stick"] = true,
- ["unarrest_stick"] = true,
- ["weapon_r_restrained"] = true,
- ["tbfy_surrendered"] = true,
- ["weapon_r_cuffed"] = true,
- ["weaponchecker"] = true,
- ["weapon_keypadchecker"] = true,
- ["weapon_glock2"] = { --If it's for specific jobs it has to be a table
- [TEAM_POLICE] = true, -- Allows Police officers to wear glock without license
- [TEAM_GUN] = true, -- Allows Gun dealers to wear glock without license
- },
- ["weapon_deagle2"] = { --If it's for specific jobs it has to be a table
- [TEAM_CHIEF] = true, -- Allows Chief of police to wear deagle without license
- },
- }
- //Job requirement to give the license
- TBFY_FAConfig.InstructorJob = TEAM_FA_INSTRUCTOR
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment