Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Added ezJobs support
- Added checks so if bLogs fails to correctly it will no longer error
- Configs added:
- Reset ranks on death
- ]]
- JobRanksConfig = JobRanksConfig or {}
- //Who can access admin commands,menus etc
- JobRanksConfig.AdminAccessCustomCheck = function(Player) return Player:IsSuperAdmin() end
- //How often should it update and save?
- JobRanksConfig.UpdateTimer = 30
- //Players Required to be able to earns playtime through timer
- JobRanksConfig.PlayersRequired = 2
- //Should it give SALARY*Bonus instead of SALARY+Bonus?
- //NOTE: This calculates BaseSalary + (BaseSalary/100*Bonus)
- //So if you set BonusSalary to 15 it will be 15% of the original salary
- JobRanksConfig.BonusSalaryPercent = true
- //Disables progression if player is AFK
- JobRanksConfig.DisableAFKProgress = true
- //Set to true to allow higher ranks to promote those who are lower
- JobRanksConfig.HigherRankPromotion = true
- //Set to true to allow higher ranks to demote those who are lower
- JobRanksConfig.HigherRankDemotion = true
- //NOTE: These uses DarkRPs chatcommand system, which means it will always use / before the command so by default it would be -> /rpromote NICK REASON
- //Chatcommand to promote
- JobRanksConfig.PromotionChatCommands = {"rpromote"}
- //Chatcommand to demote
- JobRanksConfig.DemotionChatCommands = {"rdemote"}
- //Should ranks reset when you die?
- JobRanksConfig.ResetRanksOnDeath = true
- //HUD Jobranks
- JobRanksConfig.HUD = true
- //Defined 0-100, 0 is as much left as it can and 100 is as much right as it can
- JobRanksConfig.UIW = 0.5
- //Defined 0-100, 0 is as much up as it can and 100 is as much down as it can
- JobRanksConfig.UIH = 0.5
- --[[
- bar = a bar for progress
- time = text for time left
- number = numbers only
- ]]
- JobRanksConfig.HUDType = "bar"
- JobRanksConfig.UIBoxColor = Color(100,100,100,200)
- JobRanksConfig.UIOutlineColor = Color(200, 200, 200, 200)
- JobRanksConfig.UITextColor = Color(255,255,255,200)
- JobRanksConfig.BarBackground = Color(62,62,62,255)
- JobRanksConfig.Bar = Color(66,139,202,255)
- JobRanks = JobRanks or {}
- local function JBR_InitRanks()
- timer.Simple(3, function()
- -- POLICIER
- JobRanks[TEAM_POLICIER] = {} -- Each rank table REQUIRES this one to work, otherwise it will BREAK!
- JobRanks[TEAM_POLICIER].MaxJobRank = 8 -- Max rank achieveable
- JobRanks[TEAM_POLICIER].ReqRanks = { -- XP/Playtime required for each rank -> [RANKID] = AmountRequired,
- [1] = 0,
- [2] = 2250, --THE VALUE MUST BE HIGHER IN EACH RANK THAN THE PREVIOUS RANK
- [3] = 4500,
- [4] = 9000,
- [5] = 18000,
- [6] = 30000,
- [7] = 45000,
- [8] = 67500,
- }
- JobRanks[TEAM_POLICIER].NameRanks = { -- Names for each rank -> [RANKID] = "Name"
- [1] = "Cadet",
- [2] = "Sécurité publique",
- [3] = "Brigade des stup.",
- [4] = "CRS",
- [5] = "Police judiciaire",
- [6] = "Renseignement",
- [7] = "DRCPN",
- [8] = "Directeur générale",
- }
- JobRanks[TEAM_POLICIER].BonusSalary = 15 --Extra salary bonus for EACH rank -> 15*RANK -> At rank 2 $30 extra salary, rank 3 $45 extra salary and so on
- JobRanks[TEAM_POLICIER].ExtraLoadout = { --Bonus Equipments for rank X and higher, [RANKID] = WEAPONCLASS
- [2] = "m9k_m92beretta",
- [4] = "vc_spikestrip_wep", --Rank 4 or higher spawns with spikestrip
- [6] = "m9k_ump45", --Rank 6 or higher spawns with UMP45
- }
- JobRanks[TEAM_POLICIER].ExtraLoadoutSingleRank = { --Bonus Equipments for a SPECIFIC rank only, [RANKID] = WEAPONCLASS
- --[5] = "weapon_pumpshotgun2", --ONLY at rank 5 you spawn with shotgun
- --[7] = "weapon_mp52", --ONLY at rank 7 you spawn with MP5
- }
- JobRanks[TEAM_POLICIER].Model = { --Setup different models for each rank, leave it empty to keep default, if you want specific ranks to use default models dont add it in this table
- --[RankID] = {Model = "MODELPATH", Bodygroups{{BodygroupID, Amount}}, Skin = SKINID}
- [1] = {Model = nil, Bodygroups = {{0,0}}, Skin = 4}, --Sets model, two custom bodygroups and skin to 1
- --Skipped rank 2, it will now set default model on rank 2
- [2] = {Model = nil, Bodygroups = nil, Skin = 0},
- [3] = {Model = nil, Bodygroups = nil, Skin = 8}, --Sets model, no bodygroups, sets skin to 3
- [4] = {Model = nil, Bodygroups = nil, Skin = 10},
- [5] = {Model = nil, Bodygroups = nil, Skin = 5},
- [6] = {Model = nil, Bodygroups = nil, Skin = 1},
- [7] = {Model = nil, Bodygroups = nil, Skin = 3},
- [8] = {Model = nil, Bodygroups = nil, Skin = 6}, --Sets default model, no bodygroups, sets skin to 2
- }
- JobRanks[TEAM_POLICIER].Prefix = { --It's set infront of the name for example Pvt.ToBadForYou, Sgt.ToBadForYou -> [RANKID] = "Prefix"
- [1] = "CAD",
- [2] = "SP",
- [3] = "BS",
- [4] = "CRS",
- [5] = "PJ",
- [6] = "RG",
- [7] = "DRCP",
- [8] = "DIR",
- }
- JobRanks[TEAM_POLICIER].Entities = { --Restrict specific entities to ranks -> [ENTCLASS] = RankRequired
- --["money_printer"] = 5, --Requires rank 5 in order to buy moneyprinter
- }
- JobRanks[TEAM_POLICIER].Shipments = { --Restrict specific shipments to ranks -> [SHIPMENT] = RankRequired
- --["weapon_pumpshotgun2"] = 5, --Requires rank 5 in order to buy shotgun shipment
- }
- JobRanks[TEAM_POLICIER].Warrant = 6 --Allows warranting for rank it set to and higher, so Rank 5 and higher can warrant: SET TO NIL TO DISABLE WARRANT FOR ALL RANKS
- JobRanks[TEAM_POLICIER].Wanted = 6--Allows wanted for rank it set to and higher, so Rank 5 and higher can wanted: SET TO NIL TO DISABLE WANTED FOR ALL RANKS
- //THESE ARE JUST TEMPLATES, download icons online and insert their path here (Also upload it on workshop or to your FastDL and add it to force download)
- JobRanks[TEAM_POLICIER].Icons = { --Setup Rank icons -> [RANKID] = Material("PATH TO PNG")
- [1] = Material("jobranks/police/rank1.png"),
- [2] = Material("jobranks/police/rank2.png"),
- [3] = Material("jobranks/police/rank3.png"),
- [4] = Material("jobranks/police/rank4.png"),
- [5] = Material("jobranks/police/rank5.png"),
- [6] = Material("jobranks/police/rank6.png"),
- [7] = Material("jobranks/police/rank7.png"),
- [8] = Material("jobranks/police/rank8.png"),
- }
- JobRanks[TEAM_POLICIER].DisableProgression = false --Setting this to true will only allow progression through promotion manually by admin
- JobRanks[TEAM_POLICIER].BonusStats = { --Bonus stats for ranks -> [RankID] = {Health = AmountExtraHP, Armor = AmountExtraAP}
- [1] = {Health = 0, Armor = 0},
- [2] = {Health = 0, Armor = 0},
- [3] = {Health = 0, Armor = 20},
- [4] = {Health = 0, Armor = 20},
- [5] = {Health = 0, Armor = 50},
- [6] = {Health = 0, Armor = 50},
- [7] = {Health = 0, Armor = 80},
- [8] = {Health = 0, Armor = 100},
- }
- -- CHEF DE LA POLICE
- JobRanks[TEAM_COMMISSAIRE] = {}
- JobRanks[TEAM_COMMISSAIRE].MaxJobRank = 4
- JobRanks[TEAM_COMMISSAIRE].ReqRanks = {
- [1] = 0,
- [2] = 7500,
- [3] = 15000,
- [4] = 30000,
- }
- JobRanks[TEAM_COMMISSAIRE].NameRanks = {
- [1] = "Lieutenant",
- [2] = "Capitaine",
- [3] = "Commandant",
- [4] = "Commissaire",
- }
- JobRanks[TEAM_COMMISSAIRE].BonusSalary = 30
- JobRanks[TEAM_COMMISSAIRE].ExtraLoadout = {}
- JobRanks[TEAM_COMMISSAIRE].ExtraLoadoutSingleRank = {}
- JobRanks[TEAM_COMMISSAIRE].Model = {
- [1] = {Model = nil, Bodygroups = nil, Skin = nil},
- [2] = {Model = nil, Bodygroups = nil, Skin = nil},
- [3] = {Model = nil, Bodygroups = nil, Skin = nil},
- [4] = {Model = nil, Bodygroups = nil, Skin = nil},
- }
- JobRanks[TEAM_COMMISSAIRE].Prefix = {
- [1] = "LT",
- [2] = "CAP",
- [3] = "COM",
- [4] = "CS",
- }
- JobRanks[TEAM_COMMISSAIRE].Prefix = {}
- JobRanks[TEAM_COMMISSAIRE].ReqToJoin = { [TEAM_POLICIER] = 8 }
- JobRanks[TEAM_COMMISSAIRE].Entities = {}
- JobRanks[TEAM_COMMISSAIRE].Shipments = {}
- JobRanks[TEAM_COMMISSAIRE].Warrant = 1
- JobRanks[TEAM_COMMISSAIRE].Wanted = 1
- JobRanks[TEAM_COMMISSAIRE].Icons = {}
- JobRanks[TEAM_COMMISSAIRE].DisableProgression = false
- JobRanks[TEAM_COMMISSAIRE].BonusStats = {}
- ----- RAID
- JobRanks[TEAM_CHEFDURAID] = {}
- JobRanks[TEAM_CHEFDURAID].MaxJobRank = 4
- JobRanks[TEAM_CHEFDURAID].ReqRanks = {
- [1] = 0,
- [2] = 8000,
- [3] = 18000,
- [4] = 40000,
- }
- JobRanks[TEAM_CHEFDURAID].NameRanks = {
- [1] = "Chauffeur (R.A.I.D)",
- [2] = "Agent (R.A.I.D)",
- [3] = "Sniper (R.A.I.D)",
- [4] = "Lieutenant (R.A.I.D)",
- }
- JobRanks[TEAM_CHEFDURAID].ExtraLoadout = {
- [2] = "m9k_ump45",
- [3] = "m9k_intervention",
- }
- JobRanks[TEAM_CHEFDURAID].ExtraLoadoutSingleRank = {}
- JobRanks[TEAM_CHEFDURAID].Prefix = {
- [1] = "CHR",
- [2] = "AGR",
- [3] = "SNR",
- [4] = "LTR",
- }
- JobRanks[TEAM_CHEFDURAID].BonusSalary = 30
- JobRanks[TEAM_CHEFDURAID].Model = {}
- JobRanks[TEAM_CHEFDURAID].ReqToJoin = {
- [TEAM_POLICIER] = 8,
- }
- JobRanks[TEAM_CHEFDURAID].Entities = {}
- JobRanks[TEAM_CHEFDURAID].Shipments = {}
- JobRanks[TEAM_CHEFDURAID].Warrant = 2
- JobRanks[TEAM_CHEFDURAID].Wanted = 2
- -- MAIRE
- JobRanks[TEAM_MAIRE] = {}
- JobRanks[TEAM_MAIRE].MaxJobRank = 6
- JobRanks[TEAM_MAIRE].ReqRanks = {
- [1] = 0,
- [2] = 8000,
- [3] = 18000,
- [4] = 40000,
- [5] = 60000,
- [6] = 100000,
- }
- JobRanks[TEAM_MAIRE].NameRanks = {
- [1] = "Maire",
- [2] = "Sénateur",
- [3] = "Député",
- [4] = "Président du sénat",
- [5] = "Premier ministre",
- [6] = "Président",
- }
- JobRanks[TEAM_MAIRE].ExtraLoadout = {}
- JobRanks[TEAM_MAIRE].BonusSalary = 60
- JobRanks[TEAM_MAIRE].ExtraLoadout = {}
- JobRanks[TEAM_MAIRE].ExtraLoadoutSingleRank = {}
- JobRanks[TEAM_MAIRE].Model = {}
- JobRanks[TEAM_MAIRE].Prefix = {}
- JobRanks[TEAM_MAIRE].ReqToJoin = {}
- JobRanks[TEAM_MAIRE].Entities = {}
- JobRanks[TEAM_MAIRE].Shipments = {}
- JobRanks[TEAM_MAIRE].Warrant = 1
- JobRanks[TEAM_MAIRE].Wanted = 1
- -- S.A.M.U
- JobRanks[TEAM_DOCTEUR] = {}
- JobRanks[TEAM_DOCTEUR].MaxJobRank = 9
- JobRanks[TEAM_DOCTEUR].ReqRanks = {
- [1] = 0,
- [2] = 1500,
- [3] = 3000,
- [4] = 6000,
- [5] = 12000,
- [6] = 20000,
- [7] = 30000,
- [8] = 45000,
- [9] = 60000,
- }
- JobRanks[TEAM_DOCTEUR].NameRanks = {
- [1] = "Medic Trainee",
- [2] = "Medic",
- [3] = "Medical Scientist",
- [4] = "Junior Doctor",
- [5] = "Doctor",
- [6] = "Plastic Surgeon",
- [7] = "Brain Surgeon",
- [8] = "Chief Physician",
- [9] = "Hospital Manager",
- }
- JobRanks[TEAM_DOCTEUR].BonusSalary = 15
- JobRanks[TEAM_DOCTEUR].ExtraLoadout = {}
- JobRanks[TEAM_DOCTEUR].ExtraLoadoutSingleRank = {}
- JobRanks[TEAM_DOCTEUR].Model = {}
- JobRanks[TEAM_DOCTEUR].Prefix = {}
- JobRanks[TEAM_DOCTEUR].Entities = {}
- JobRanks[TEAM_DOCTEUR].Shipments = {}
- JobRanks[TEAM_DOCTEUR].Warrant = nil
- JobRanks[TEAM_DOCTEUR].Wanted = nil
- end)
- end
- if ezJobs then
- hook.Add("ezJobsLoaded", "JBR_InitRanks", JBR_InitRanks)
- else
- hook.Add("loadCustomDarkRPItems", "JBR_InitRanks", JBR_InitRanks)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement