Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Fixed error with Perfect Radar System
- Minior fixes
- Config changes:
- Added .DisplayPoints -> Displays license points on players driver license (only for the player himself)
- ]]
- TBFYDIConfig = TBFYDIConfig or {}
- DI_THEORYDB = DI_THEORYDB or {}
- DI_PLAYERDATA = DI_PLAYERDATA or {}
- DI_INSTRUCTORS = DI_INSTRUCTORS or {}
- --Contact me on SF for help to translate
- --Languages available:
- --[[
- English
- French
- German
- Korean
- Russian
- Slovak
- ]]
- TBFYDIConfig.LanguageToUse = "French"
- //Width and Height of overview menu
- TBFYDIConfig.OverviewW, TBFYDIConfig.OverviewH = 525, 375
- //Width and Height of question menu
- TBFYDIConfig.QuestionW, TBFYDIConfig.QuestionH = 800, 450
- TBFYDIConfig.AdminChatCommands = {"!dimanage", "!dimenu"}
- TBFYDIConfig.InstructorChatCommands = {"!instructor", "!insmenu"}
- //How many % of the questions need to be answered correctly in order to pass the theory test
- TBFYDIConfig.Theory_PercentageRequired = 60
- //How many questions the theory test will have in total
- //NOTE: THIS NUMBER CANT BE HIGHER THAN THE AMOUNT OF QUESTIONS AVAILABLE
- TBFYDIConfig.Theory_QuestionAmount = 20
- //Automatic Practical test can only be done if no instructors are online
- --[[
- 1 = No restrictions
- 2 = Only if there's driver instructors
- 3 = Only if there isn't driver instructors
- ]]
- TBFYDIConfig.PracticalTestRestriction = 1
- //Should The Perfect Radar System fail pracital tests if exceeding speedlimit? (If it's installed)
- TBFYDIConfig.PracticalTestRadarDetection = true
- //How much above the speedlimit do you have to drive to fail the test?
- TBFYDIConfig.PracticalTestRadarSpeedLimit = 1
- //Allow checking the drivers license through vehicle?
- TBFYDIConfig.CheckLicenseThroughVehicle = true
- //When can a player remove/add a point again
- TBFYDIConfig.PointsCooldown = 120
- //Use french point system? (goes from max points to 0 instead of 0 to max points)
- TBFYDIConfig.FrenchPointSystem = true
- //If set to true, you have to redo the theory test if your license is revoked due to points
- TBFYDIConfig.RedoTheoryOnPointsRevoke = true
- //Should the person receive the driving license without a practical test?
- TBFYDIConfig.GrantLicenseOnTheoryComplete = true
- //Instructors requires whitelist for each license type
- TBFYDIConfig.InstructorLicenses = false
- //Do you require whitelist for instructor job/Giving licenses?
- TBFYDIConfig.InstructorWhitelist = false
- //Do you require the specific job in order to grant license?
- TBFYDIConfig.InstructorRestrictToJob = false
- TBFYDIConfig.NPCData = {
- ["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)},
- ["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)},
- }
- --[[
- Name = Name displayed in menu
- Class = Vehicle Class (Found from sandbox spawn menu)
- Skin = Vehicle Skin ID
- Req = LicenseID required, set to nil if for all
- ]]
- TBFYDIConfig.InstructorVehicles = {
- [1] = {Name = "Citroen C4", Class = "c4tdm", Skin = 1, Req = nil},
- [2] = {Name = "Golf GTI 2014", Class = "vwgolfgti14tdm", Skin = 1, Req = 2},
- }
- //Should SteamID be displayed on license?
- TBFYDIConfig.DisplaySteamID = false
- //Should job be displayed on license?
- TBFYDIConfig.DisplayJob = false
- //Should license display points?
- TBFYDIConfig.DisplayPoints = true
- //Set this to false if you only want license restrictions on those you add in the VehicleDATABASE config
- TBFYDIConfig.ShouldRestrictDefault = true
- //The default license you require for every vehicle unless specified different in the VehicleDATABASE config
- TBFYDIConfig.DefaultRestrictLicense = 2
- --[[
- 1 = No Restrictions
- 2 = Notifies that you require license
- 3 = Can't enter vehicle
- ]]
- TBFYDIConfig.EnterVehicleRestrictionType = 3
- //This seems to cause issues to some when set to true, if you have issues set this to false
- TBFYDIConfig.RespawnAfterCleanUp = true
- //Add vehicles that should require licenses here, also which license it requires
- //[MODELPATH] = LicenseID Required
- TBFYDIConfig.VehicleDATABASE = {
- }
- //Who can access admin commands,menus etc
- TBFYDIConfig.AdminAccessCustomCheck = function(Player) return Player:IsSuperAdmin() end
- DI_DATABASE = {
- [1] = {
- Name = "BSR", --License Name
- Desc = "Permis Scooter", --Description
- Image = "di_motorcycle.png", --Image name
- TheoryCost = 2000, --Theory test cost
- TheoryTime = 1200, --How much time for the theory test
- MaxPoints = 5, --Max points for the license before revoked
- PracticalCost = 2500, --How much the practical test costs
- PracticalTime = 100, --How much time you have for the practical test
- PracticalVehicle = "azok30_mbk_booster_spirit", -- Vehicle class
- PracticalVehicleSkin = 1, -- Skin for vehicle
- },
- [2] = {
- Name = "A2",
- Desc = "Permis Moto",
- Image = "di_motorcycle.png",
- TheoryCost = 3000,
- TheoryTime = 1200,
- MaxPoints = 5,
- PracticalCost = 3500,
- PracticalTime = 100,
- PracticalVehicle = "crsk_jawa_350_634",
- PracticalVehicleSkin = 1,
- },
- [3] = {
- Name = "B",
- Desc = "Permis Voiture",
- Image = "di_car.png",
- TheoryCost = 4000,
- TheoryTime = 1200,
- MaxPoints = 5,
- PracticalCost = 4500,
- PracticalTime = 300,
- PracticalVehicle = "vwgolfgti14tdm",
- PracticalVehicleSkin = 1,
- },
- [4] = {
- Name = "E",
- Desc = "Permis Vehicules Militaires",
- Image = "di_military.png",
- TheoryCost = 5000,
- TheoryTime = 1200,
- MaxPoints = 5,
- PracticalCost = 5500,
- PracticalTime = 300,
- PracticalVehicle = "h1opentdm",
- PracticalVehicleSkin = 6,
- }
- }
- function DI_InitJobConfigs()
- timer.Simple(3, function()
- //Jobs that get the license checker and can remove points
- TBFYDIConfig.PoliceJobs = {
- [TEAM_POLICIER] = true,
- [TEAM_CHIEF] = true,
- [TEAM_BAC] = true,
- [TEAM_GENDARME] = true,
- [TEAM_BRIGADEM] = true,
- }
- //Job requirement to give the license
- TBFYDIConfig.InstructorJob = TEAM_STAFF
- end)
- end
- hook.Add("DarkRPFinishedLoading", "DI_InitJobConfigs", function()
- if ezJobs then
- hook.Add("ezJobsLoaded", "DI_InitJobConfigs", DI_InitJobConfigs)
- else
- hook.Add("loadCustomDarkRPItems", "DI_InitJobConfigs", DI_InitJobConfigs)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement