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 = "English"
- //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 = 80
- //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 = 48
- //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 = 3
- //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 = true
- //Do you require whitelist for instructor job/Giving licenses?
- TBFYDIConfig.InstructorWhitelist = true
- //Do you require the specific job in order to grant license?
- TBFYDIConfig.InstructorRestrictToJob = true
- TBFYDIConfig.NPCData = {
- ["di_instructor_vehiclespawner"] = {Text = "Instructor Vehicle Spawn", Model = "models/alyx.mdl", TextFont = "di_npc_text", TextRotationSpeed = 80, TextColor = Color(255,255,255,255), TextBackgroundColor = Color(0,0,0,255)},
- ["di_practicaltest_npc"] = {Text = "Practical Driver Test", Model = "models/alyx.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 = "Jeep", Class = "Jeep", Skin = 1, Req = nil},
- [2] = {Name = "Airboat", Class = "Airboat", Skin = 1, Req = 2},
- }
- //Should SteamID be displayed on license?
- TBFYDIConfig.DisplaySteamID = true
- //Should job be displayed on license?
- TBFYDIConfig.DisplayJob = true
- //Should license display points?
- TBFYDIConfig.DisplayPoints = false
- //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 = {
- ["models/tdmcars/bmwm3e92.mdl"] = 3,
- }
- //Who can access admin commands,menus etc
- TBFYDIConfig.AdminAccessCustomCheck = function(Player) return Player:IsSuperAdmin() end
- DI_DATABASE = {
- [1] = {
- Name = "A", --License Name
- Desc = "Any motorcycle or motor tricycle.", --Description
- Image = "di_motorcycle.png", --Image name
- TheoryCost = 500, --Theory test cost
- TheoryTime = 1200, --How much time for the theory test
- MaxPoints = 5, --Max points for the license before revoked
- PracticalCost = 500, --How much the practical test costs
- PracticalTime = 100, --How much time you have for the practical test
- PracticalVehicle = "Jeep", -- Vehicle class
- PracticalVehicleSkin = 1, -- Skin for vehicle
- },
- [2] = {
- Name = "B",
- Desc = "Motor vehicles.",
- Image = "di_car.png",
- TheoryCost = 2500,
- TheoryTime = 1200,
- MaxPoints = 5,
- PracticalCost = 2500,
- PracticalTime = 100,
- PracticalVehicle = "Jeep",
- PracticalVehicleSkin = 1,
- },
- [3] = {
- Name = "C",
- Desc = "Large goods vehicles.",
- Image = "di_truck.png",
- TheoryCost = 3000,
- TheoryTime = 1200,
- MaxPoints = 5,
- PracticalCost = 3000,
- PracticalTime = 100,
- PracticalVehicle = "Jeep",
- PracticalVehicleSkin = 1,
- },
- [4] = {
- Name = "D",
- Desc = "Buses.",
- Image = "di_bus.png",
- TheoryCost = 3000,
- TheoryTime = 1200,
- MaxPoints = 5,
- PracticalCost = 3000,
- PracticalTime = 100,
- PracticalVehicle = "Jeep",
- PracticalVehicleSkin = 1,
- },
- [5] = {
- Name = "E",
- Desc = "Military Grade vehicles.",
- Image = "di_military.png",
- TheoryCost = 5000,
- TheoryTime = 1200,
- MaxPoints = 5,
- PracticalCost = 5000,
- PracticalTime = 100,
- PracticalVehicle = "Jeep",
- PracticalVehicleSkin = 1,
- }
- }
- function DI_InitJobConfigs()
- timer.Simple(3, function()
- //Jobs that get the license checker and can remove points
- TBFYDIConfig.PoliceJobs = {
- [TEAM_POLICE] = true,
- [TEAM_CHIEF] = true,
- }
- //Job requirement to give the license
- TBFYDIConfig.InstructorJob = TEAM_DI_INSTRUCTOR
- 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