Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function JBR_InitRanks()
- timer.Simple(3, function()
- --[[
- JBR_SetupRestrictedJob(Job, RequiredJobs)
- Job - The job to be restricted
- RequiredJobs - Table of the ranks you must reach in that specific job {[Job] = RequiredRank, [Job2] = RequiredRank} etc
- ]]
- JBR_SetupRestrictedJob(TEAM_CHIEF, {[TEAM_POLICE] = 8})
- --[[
- JBR_SetupJobPermissionList(Job, AllowedJobs)
- Job - Job that is allowed to promote/demote
- AllowedJobs - The jobs the job is allowed to promote/demote {[Job] = true, [Job2] = true} etc
- ]]
- JBR_SetupJobPermissionList(TEAM_POLICE, {
- [TEAM_POLICE] = true,
- [TEAM_RPOLICE] = true,
- )
- )
- JBR_SetupJobPermissionList(TEAM_CHIEF, {
- [TEAM_POLICE] = true,
- [TEAM_RPOLICE] = true,
- [TEAM_SWAT] = true,
- [TEAM_FBI] = true,
- [TEAM_RPOLICE] = true
- )
- )
- -------------------------------------------
- --
- --
- --
- --
- -------------------------------------------
- ----------------TEAM_POLICE----------------
- -------------------------------------------
- JBR_AddJobToRankTable(TEAM_POLICE, 1)
- --JBR_SetupRankTable( "1" Job, "8" MaxRank, "15" BonusSalary, "." PrefixSeparator, "5" Warrant, "5" Wanted, "false" DisableProgression)
- JBR_SetupRankTable(1, 8, 15, ".", 5, 5, false)-- THIS MUST ALWAYS BE FIRST OR IT WILL SETUP FOR THE JOBRANK THAT WAS DEFINED BEFORE THIS
- ---Rank Police---
- JBR_SetupRank(1, 0, "Recruit", "Rct", {Promote = false, Demote = false}, {Health = 5, Armor = 5}, {}, Material("jobranks/police/rank1.png"))
- JBR_SetupRank(2, 0, "Deputy", "Dpt", {Promote = false, Demote = false}, {Health = 10, Armor = 10}, {}, Material("jobranks/police/rank2.png"))
- JBR_SetupRank(3, 3000, "Detective", "Det", {Promote = false, Demote = false}, {Health = 15, Armor = 15}, {}, Material("jobranks/police/rank3.png"))
- JBR_SetupRank(4, 6000, "Sergeant", "Sgt", {Promote = false, Demote = false}, {Health = 20, Armor = 20}, {}, Material("jobranks/police/rank4.png"))
- JBR_SetupRank(5, 12000, "Lieutenant", "Lt", {Promote = false, Demote = true, MaxDemotion = 4}, {Health = 25, Armor = 25}, {"weapon_pumpshotgun2"}, Material("jobranks/police/rank5.png"))
- JBR_SetupRank(6, 20000, "Captain", "Cpt", {Promote = true, Demote = false, MaxPromotion = 5}, {Health = 30, Armor = 30}, {}, Material("jobranks/police/rank6.png"))
- JBR_SetupRank(7, 30000, "Major", "Maj", {Promote = true, Demote = true, MaxPromotion = 5, MaxDemotion = 3}, {Health = 35, Armor = 35}, {"weapon_mp52"}, Material("jobranks/police/rank7.png"))
- JBR_SetupRank(8, 45000, "Inspector", "Insp", {Promote = true, Demote = true}, {Health = 40, Armor = 40}, {}, Material("jobranks/police/rank8.png"))
- JBR_SetupRankSpawnFunc(false, function(Player) print(Player, "all ranks") end) -- This custom lua function will run for ALL ranks upon SPAWN
- JBR_SetupRankSpawnFunc(1, function(Player) print(Player, "rank 1") end) -- This custom lua function will run for ONLY RANK 1 upon SPAWN
- ---PM---
- --JBR_SetupRankModel(1, {{Model = "models/player/police.mdl", Bodygroups = {{0,0},{2,1}}, Skin = 1}})--Sets model, two custom bodygroups and skin to 1
- --Skipped rank 2, it will now set default model on rank 2
- --JBR_SetupRankModel(3, {{Model = "models/player/police.mdl", Bodygroups = {{0,0},{2,1}}, Skin = 1},{Model = "models/player/police_fem.mdl", Bodygroups = nil, Skin = 3}}) -- EXAMPLE OF MULTIPLY MODELS FOR ONE RANK
- --JBR_SetupRankModel(4, {{Model = "models/player/police_fem.mdl", Bodygroups = nil, Skin = 3}})--Sets model, no bodygroups, sets skin to 3
- --JBR_SetupRankModel(5, {{Model = nil, Bodygroups = nil, Skin = 2}})--Sets default model, no bodygroups, sets skin to 2
- ---Loadout---
- --JBR_AddLoadout(5, {"weapon_pumpshotgun2"})
- --JBR_AddLoadout(7, {"weapon_mp52"})
- ---Entity---
- JBR_AddEntity(5, {"money_printer"})
- ---Shipments---
- JBR_AddShipment(5, {"weapon_pumpshotgun2"})
- --------------------------------------------
- -----------------TEAM_POLICE----------------
- --------------------END---------------------
- --
- --------------------------------------------
- -----------------TEAM_CHIEF-----------------
- --------------------------------------------
- JBR_AddJobToRankTable(TEAM_CHIEF, 2)
- --JBR_SetupRankTable(Job, MaxRank, BonusSalary, PrefixSeparator, Warrant, Wanted, DisableProgression)
- JBR_SetupRankTable(2, 8, 15, ".", 5, 5, false)-- THIS MUST ALWAYS BE FIRST OR IT WILL SETUP FOR THE JOBRANK THAT WAS DEFINED BEFORE THIS
- ---Rank Police---
- JBR_SetupRankTable(2, 4, 30, ".", 1, 1, false) -- THIS MUST ALWAYS BE FIRST OR IT WILL SETUP FOR THE JOBRANK THAT WAS DEFINED BEFORE THIS
- JBR_SetupRank(1, 0, "Chief Recruit", "Rct", {Promote = false, Demote = false}, {Health = 5, Armor = 5}, {}, nil)
- JBR_SetupRank(2, 5000, "Deputy Chief", "Dpt", {Promote = false, Demote = false}, {Health = 25, Armor = 25}, {}, nil)
- JBR_SetupRank(3, 10000, "Assistant Chief", "Asst", {Promote = false, Demote = false}, {Health = 50, Armor = 50}, {}, nil)
- JBR_SetupRank(4, 20000, "Chief of Police", "Chief", {Promote = true, Demote = true}, {Health = 100, Armor = 100}, {}, nil)
- ---
- JBR_SetupRankSpawnFunc(false, function(Player) print(Player, "all ranks") end) -- This custom lua function will run for ALL ranks upon SPAWN
- JBR_SetupRankSpawnFunc(1, function(Player) print(Player, "rank 1") end) -- This custom lua function will run for ONLY RANK 1 upon SPAWN
- ---PM---
- --JBR_SetupRankModel(1, {{Model = "models/player/police.mdl", Bodygroups = {{0,0},{2,1}}, Skin = 1}})--Sets model, two custom bodygroups and skin to 1
- --Skipped rank 2, it will now set default model on rank 2
- --JBR_SetupRankModel(3, {{Model = "models/player/police.mdl", Bodygroups = {{0,0},{2,1}}, Skin = 1},{Model = "models/player/police_fem.mdl", Bodygroups = nil, Skin = 3}}) -- EXAMPLE OF MULTIPLY MODELS FOR ONE RANK
- --JBR_SetupRankModel(4, {{Model = "models/player/police_fem.mdl", Bodygroups = nil, Skin = 3}})--Sets model, no bodygroups, sets skin to 3
- --JBR_SetupRankModel(5, {{Model = nil, Bodygroups = nil, Skin = 2}})--Sets default model, no bodygroups, sets skin to 2
- ---Loadout---
- --JBR_AddLoadout(5, {"weapon_pumpshotgun2"})
- --JBR_AddLoadout(7, {"weapon_mp52"})
- ---Entity---
- JBR_AddEntity(5, {"money_printer"})
- ---Shipments---
- JBR_AddShipment(5, {"weapon_pumpshotgun2"})
- --------------------------------------------
- -----------------TEAM_CHIEF-----------------
- --------------------END---------------------
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement