Hi, so first sorry for my bad english.
I try to create a gmod server for my community and it is almost finished but i have a last problem with my custom police's job only (for TEAM_LIEUTENANT,TEAM_RAID and TEAM_CRAID) i can't use warrant's command or other. Can you help me please. Here my jobs.lua
--[[---------------------------------------------------------------------------
DarkRP custom jobs
---------------------------------------------------------------------------
This file contains your custom jobs.
This file should also contain jobs from DarkRP that you edited.
Note: If you want to edit a default DarkRP job, first disable it in darkrp_config/disabled_defaults.lua
Once you've done that, copy and paste the job to this file and edit it.
The default jobs can be found here:
https://github.com/FPtje/DarkRP/blob/master/gamemode/config/jobrelated.lua
For examples and explanation please visit this wiki page:
http://wiki.darkrp.com/index.php/DarkRP:CustomJobFields
Add your custom jobs under the following line:
---------------------------------------------------------------------------]]
TEAM_POLICE = DarkRP.createJob("Policier", {
color = Color(0, 255, 255, 255),
model = {"models/player/kerry-mrssx/policefr_02.mdl", "models/player/kerry-mrssx/policefr_04.mdl", "models/player/kerry-mrssx/policefr_05.mdl", "models/player/kerry-mrssx/policefr_07.mdl", "models/player/kerry-mrssx/policefr_08.mdl"},
description = [[Vous êtes chargé de la sécurité de la ville et de la protection de ses habitants.]],
weapons = {"arrest_stick", "unarrest_stick", "stunstick", "door_ram", "weaponchecker","idcard", "weapon_fists", "cw_p99", "cw_mp5", "vc_spikestrip_wep", "weapon_stungun", "handcuffs","keypad_cracker"},
command = "policer",
max = 6,
salary = 1600,
admin = 0,
vote = false,
hasLicense = true,
category = "Gouvernement",
})
TEAM_CHIEF = DarkRP.createJob("Commissaire", {
color = Color(20, 20, 255, 255),
model = {"models/portal2/patrol_02.mdl"},
description = [[Vous êtes chargé de la sécurité de la ville et de la protection de ses habitants. Vous dirigez les services de police.Vous pouvez délivrer des licences d'armes.]],
weapons = {"arrest_stick", "unarrest_stick", "stunstick", "door_ram", "weaponchecker", "idcard", "weapon_fists", "cw_p99", "cw_mp5", "vc_spikestrip_wep", "weapon_stungun", "handcuffs","keypad_cracker"},
command = "commissaire",
max = 2,
salary = 2000,
admin = 0,
vote = true,
hasLicense = true,
chief = true,
category = "Gouvernement",
PlayerLoadout = function(ply) ply:SetArmor(100) end,
})
TEAM_LIEUTENANT = DarkRP.createJob("Lieutenant", {
color = Color(0, 255, 255, 255),
model = {"models/portal2/patrol_08.mdl"},
description = [[Vous êtes chargé de la sécurité de la ville et de la protection de ses habitants. Vous obéissez aux ordres du commissaire et dirigez les policiers.Vous pouvez délivrer des licences d'armes.]],
weapons = {"arrest_stick", "unarrest_stick", "stunstick", "door_ram", "weaponchecker", "idcard", "weapon_fists", "cw_p99", "cw_mp5", "vc_spikestrip_wep", "weapon_stungun", "handcuffs","keypad_cracker"},
command = "lieutenant",
max = 1,
salary = 1800,
admin = 0,
vote = true,
hasLicense = true,
candemote = true,
category = "Gouvernement",
chief = true,
PlayerLoadout = function(ply) ply:SetArmor(100) end,
})
--[[
Generated using: DarkRP | Job Generator
https://csite.io/tools/gmod-darkrp-job
--]]
TEAM_STAFF = DarkRP.createJob("Admin", {
color = Color(255, 0, 0, 255),
model = {"models/player/portal/male_03HVE.mdl"},
description = [[Vous gérez les problèmes sur le serveur.]],
weapons = {"idcard", "weapon_fists"},
command = "staff",
max = 0,
salary = 0,
admin = 1,
vote = false,
hasLicense = false,
candemote = false,
category = "STAFF",
customCheck = function(ply) return ply:GetNWString("usergroup") == "superadmin" or ply:GetNWString("usergroup") == "admin" end,
})
TEAM_MAIRE = DarkRP.createJob("Maire", {
color = Color(0, 255, 255, 255),
model = {"models/Obama/Obama.mdl"},
description = [[Vous dirigez la ville.Vous pouvez délivrer des licences d'armes.]],
weapons = {"idcard", "weapon_fists"},
command = "maire",
max = 1,
salary = 3500,
admin = 0,
vote = true,
hasLicense = true,
candemote = true,
category = "Gouvernement",
mayor = true,
})
TEAM_CITOYEN = DarkRP.createJob("Civil", {
color = Color(0, 255, 0, 255),
model = {"models/humans/modern/male_01_01.mdl", "models/humans/modern/male_01_02.mdl", "models/humans/modern/male_01_03.mdl", "models/humans/modern/male_02_01.mdl", "models/humans/modern/male_02_02.mdl", "models/humans/modern/male_02_03.mdl"},
description = [[Vous menez une vie paisible.Vous choisissez votre voie.]],
weapons = {"idcard", "weapon_fists"},
command = "civil",
max = 0,
salary = 800,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
category = "Civils"
})
TEAM_SDF = DarkRP.createJob("SDF", {
color = Color(0, 255, 0, 255),
model = {"models/player/hunter.mdl"},
description = [[Vous devez faire la manche pour avoir de l'argent.Vous vivez dans la rue.]],
weapons = {"idcard", "weapon_fists"},
command = "sdf",
max = 0,
salary = 0,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
category = "Civils"
})
TEAM_SECURITE = DarkRP.createJob("Agent de securite", {
color = Color(220, 118, 51, 255),
model = {"models/player/adam_jensen.mdl"},
description = [[Vous êtes chargé de la sécurité de votre employeur.]],
weapons = {"idcard","weapon_fists","stunstick","weapon_stungun","weaponchecker"},
command = "sécu",
max = 4,
salary = 1200,
admin = 0,
vote = false,
hasLicense = true,
candemote = true,
category = "Services"
})
TEAM_BANQUIER = DarkRP.createJob("Banquier", {
color = Color(220, 118, 51, 255),
model = {"models/player/female_02_suit.mdl"},
description = [[Vous êtes chargé des printers laisser par vos clients.]],
weapons = {"idcard", "weapon_fists"},
command = "banquier",
max = 4,
salary = 1400,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
category = "Services"
})
TEAM_SAMU = DarkRP.createJob("Medecin", {
color = Color(220, 118, 51, 255),
model = {"models/player/kerry/medic/medic_01.mdl","models/player/kerry/medic/medic_02.mdl","models/player/kerry/medic/medic_03.mdl","models/player/kerry/medic/medic_04.mdl"},
description = [[Vous soignez les personnes .]],
weapons = {"idcard", "weapon_fists", "med_kit"},
command = "samu",
max = 4,
salary = 1700,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
category = "Services"
})
TEAM_GUN = DarkRP.createJob("Vendeur d'armes", {
color = Color(220, 118, 51, 255),
model = {"models/players/mj_re6_formalchris.mdl"},
description = [[Vous vendez des armes légales uniquements.]],
weapons = {"idcard", "weapon_fists"},
command = "gundealer",
max = 2,
salary = 1375,
admin = 0,
vote = false,
hasLicense = true,
candemote = true,
category = "Services"
})
TEAM_COOK = DarkRP.createJob("Cuisinier", {
color = Color(220, 118, 51, 255),
model = {"models/fearless/chef1.mdl"},
description = [[Vous préparez à manger pour les habitants de la ville.]],
weapons = {"idcard", "weapon_fists"},
command = "cook",
max = 2,
salary = 1450,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
cook = true,
category = "Services"
})
--TEAM_DEALER = DarkRP.createJob("Dealer", {
-- color = Color(1, 1, 1, 255),
-- model = {"models/snoopdogg.mdl"},
-- description = [[Vous vendez de la drogue discrètement.Attention à la police.Vous faites la guerre aux autres dealer]],
-- weapons = {"idcard", "weapon_fists"},
-- command = "dealer",
-- max = 2,
-- salary = 550,
-- admin = 0,
-- vote = false,
-- hasLicense = false,
-- candemote = true,
-- category = "Illégals"
--})
TEAM_VOLEUR = DarkRP.createJob("Voleur", {
color = Color(1, 1, 1, 255),
model = {"models/player/kinderstyle/Metropwn2.mdl"},
description = [[Vous volez les voitures et braquez les gens discrètement pour gagner votre vie.Attention à la police.]],
weapons = {"idcard", "lockpick", "weapon_fists","keypad_cracker"},
command = "voleur",
max = 4,
salary = 550,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
category = "Illégals"
})
TEAM_HITMAN = DarkRP.createJob("Tueur a gage" , {
color = Color(1, 1, 1, 255),
model = {"models/player/agent_47.mdl"},
description = [[Vous devez éliminer des cibles discrètement. Attention à la police.]],
weapons = {"idcard", "weapon_fists","realistic_hook"},
command = "hitman",
max = 2,
salary = 550,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
category = "Illégals",
})
TEAM_MAFIA = DarkRP.createJob("Mafieux", {
color = Color(1, 1, 1, 255),
model = {"models/humans/mafia/male_08.mdl", "models/humans/mafia/male_02.mdl", "models/humans/mafia/male_04.mdl", "models/humans/mafia/male_06.mdl", "models/humans/mafia/male_07.mdl"},
description = [[Vous faites partis de la mafia. Vous obéissez aux ordres du parrain.Attention à la police.]],
weapons = {"idcard", "weapon_fists"},
command = "mafia",
max = 6,
salary = 550,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
category = "Illégals"
})
TEAM_PARRAIN = DarkRP.createJob("Parrain ", {
color = Color(1, 1, 1, 255),
model = {"models/vito.mdl"},
description = [[Vous dirigez la mafia.Attention à la police.]],
weapons = {"idcard", "weapon_fists"},
command = "parrain",
max = 1,
salary = 650,
admin = 0,
vote = true,
hasLicense = false,
candemote = true,
category = "Illégals",
})
TEAM_YAKUZA = DarkRP.createJob("Yakuza", {
color = Color(1, 1, 1, 255),
model = {"models/SD/Players/[dbs_grappler_2].mdl"},
description = [[Vous faites partis des yakuza. Vous obéissez a votre chef.Attention à la police.]],
weapons = {"idcard", "weapon_fists"},
command = "yakuza",
max = 6,
salary = 550,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
category = "Illégals"
})
TEAM_CHEFYAKUZA = DarkRP.createJob("Chef Yakuza ", {
color = Color(1, 1, 1, 255),
model = {"models/SD/Players/[dbs_grappler].mdl"},
description = [[Vous dirigez les yakuza.Attention à la police.]],
weapons = {"idcard", "weapon_fists"},
command = "cyakuza",
max = 1,
salary = 650,
admin = 0,
vote = true,
hasLicense = false,
candemote = true,
category = "Illégals",
})
TEAM_WEED = DarkRP.createJob("Cultivateur de weed", {
color = Color(111, 111, 111, 255),
model = {"models/sire/workingjoe.mdl"},
description = [[Vous cultivez de la weed pour la revendre.Attention à la police.]],
weapons = {"idcard", "weapon_fists", "sent_tablet", "sent_bong", "sent_messure"},
command = "weed",
max = 3,
salary = 550,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
category = "Illégals"
})
TEAM_COCAINE = DarkRP.createJob("Fabricant de cocaine", {
color = Color(111, 111, 111, 255),
model = {"models/player/scientist.mdl"},
description = [[Vous fabriquez de la cocaïne pour la revendre.Attention à la police.]],
weapons = {"idcard", "weapon_fists"},
command = "cocaine",
max = 3,
salary = 550,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
category = "Illégals"
})
TEAM_ESPION = DarkRP.createJob("Espion", {
color = Color(255, 255, 255, 255),
model = {"models/player/snake/snake.mdl"},
description = [[Vous espionnez pour votre employeur légal ou illégal.Attention à ne pas vous faire attrapez, sa pourrait mal finir.]],
weapons = {"idcard", "weapon_fists"},
command = "spy",
max = 2,
salary = 550,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
category = "Civils"
})
TEAM_MERCENAIRE = DarkRP.createJob("Mercenaire ", {
color = Color(1, 1, 1, 255),
model = {"models/norpo/ArkhamOrigins/Assassins/Deathstroke_ValveBiped.mdl"},
description = [[Vous pouvez être embauché par tous les métiers illégaux et vous devez écoutez leur ordres.]],
weapons = {"idcard", "weapon_fists"},
command = "mercenaire",
max = 2,
salary = 550,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
category = "Illégals"
})
TEAM_PSYCHO = DarkRP.createJob("Psychopathe ", {
color = Color(1, 1, 1, 255),
model = {"models/players/mj_dbd_pig.mdl"},
description = [[Vous êtes un psychopathe. Vous ne craignez rien.]],
weapons = {"idcard", "weapon_fists"},
command = "psycho",
max = 2,
salary = 550,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
category = "Illégals",
})
TEAM_RAID2 = DarkRP.createJob("Raid2", {
color = Color(0, 255, 255, 255),
model = {"models/auditor/r6s/rook/chr_gign_lifeline_balaclava.mdl"},
description = [[Vous êtes chargé de la sécurité de la ville et de la protection de ses habitants. Vous obéissez aux ordres du chef du raid. Vous pouvez délivrer des licences d'armes.]],
weapons = {"arrest_stick", "unarrest_stick", "stunstick", "door_ram", "weaponchecker", "idcard", "weapon_fists", "cw_p99", "cw_mp5", "vc_spikestrip_wep", "weapon_stungun", "handcuffs", "cw_ar15","realistic_hook","keypad_cracker"},
command = "raid2",
max = 6,
salary = 2000,
admin = 0,
vote = false,
hasLicense = true,
candemote = true,
category = "Gouvernement",
chief = true,
PlayerLoadout = function(ply) ply:SetArmor(150) end,
})
TEAM_RAID = DarkRP.createJob("RAID", {
color = Color(34, 0, 17, 255),
model = {"models/auditor/r6s/rook/chr_gign_lifeline_balaclava.mdl"},
description = [[Vous êtes chargé de la sécurité de la ville et de la protection de ses habitants. Vous obéissez aux ordres du chef du raid.]],
weapons = {"arrest_stick", "unarrest_stick", "stunstick", "door_ram", "weaponchecker", "idcard", "weapon_fists", "cw_p99", "cw_mp5", "vc_spikestrip_wep", "weapon_stungun", "handcuffs", "cw_ar15", "realistic_hook", "keypad_cracker"},
command = "raid",
max = 6,
salary = 2000,
admin = 0,
vote = true,
hasLicense = true,
candemote = true,
category = "Gouvernement",
chief = true,
PlayerSpawn = function(ply)
ply:SetArmor(150)
end
})
TEAM_CRAID = DarkRP.createJob(" Chef Raid ", {
color = Color(0, 255, 255, 255),
model = {"models/player/r6s_doc.mdl"},
description = [[Vous êtes chargé de la sécurité de la ville et de la protection de ses habitants. Vous obéissez aux ordres du commissaire et dirigez les policiers.Vous pouvez délivrer des licences d'armes.]],
weapons = {"arrest_stick", "unarrest_stick", "stunstick", "door_ram", "weaponchecker", "idcard", "weapon_fists", "cw_p99", "cw_mp5", "vc_spikestrip_wep", "weapon_stungun", "handcuffs", "cw_ar15","realistic_hook","keypad_cracker"},
command = "craid",
max = 1,
salary = 2300,
admin = 0,
vote = true,
hasLicense = true,
candemote = true,
category = "Gouvernement",
chief = true,
PlayerLoadout = function(ply) ply:SetArmor(200) end,
})
TEAM_DRIVER = DarkRP.createJob("Chauffeur de bus", {
color = Color(220, 118, 51, 255),
model = {"models/player/Suits/male_02_shirt_tie.mdl"},
description = [[Vous faites le tour de la ville avec le bus.]],
weapons = {"idcard", "weapon_fists"},
command = "busdriver",
max = 2,
salary = 1450,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
category = "Services"
})
TEAM_TDRIVER = DarkRP.createJob("Chauffeur de taxi", {
color = Color(220, 118, 51, 255),
model = {"models/player/Suits/male_04_shirt_tie.mdl"},
description = [[Vous faites le tour de la ville avec le bus.]],
weapons = {"idcard", "weapon_fists"},
command = "taxidriver",
max = 2,
salary = 1450,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
category = "Services"
})
TEAM_GARDE = DarkRP.createJob("garde du maire", {
color = Color(0, 255, 255, 255),
model = {"models/players/mj_tew_seb.mdl"},
description = [[Vous êtes chargé de la sécurité du maire.]],
weapons = {"weaponchecker","idcard", "weapon_fists", "weapon_stungun"},
command = "garde",
max = 4,
salary = 1700,
admin = 0,
vote = false,
hasLicense = true,
category = "Gouvernement",
})
TEAM_DGUN = DarkRP.createJob("Marchand noir ", {
color = Color(1, 1, 1, 255),
model = {"models/players/mj_re4_leon_mafia.mdl"},
description = [[Vous vendez des armes illégales. Attention à la police.]],
weapons = {"idcard", "weapon_fists"},
command = "darkgun",
max = 2,
salary = 550,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
category = "Illégals",
})
-- Agendas
DarkRP.createAgenda("Agenda Mafieux", {TEAM_PARRAIN}, {TEAM_MAFIA})
DarkRP.createAgenda("Agenda Yakuza", {TEAM_CHEFYAKUZA}, {TEAM_YAKUZA})
DarkRP.createAgenda("Police agenda", {TEAM_MAIRE, TEAM_LIEUTENANT, TEAM_COMMISSAIRE, TEAM_CRAID}, {TEAM_POLICE, TEAM_RAID})
--[[---------------------------------------------------------------------------
Define which team joining players spawn into and what team you change to if demoted
---------------------------------------------------------------------------]]
GAMEMODE.DefaultTeam = TEAM_CITOYEN
--[[---------------------------------------------------------------------------
Define which teams belong to civil protection
Civil protection can set warrants, make people wanted and do some other police related things
---------------------------------------------------------------------------]]
GAMEMODE.CivilProtection = {
[TEAM_POLICE] = true,
[TEAM_MAIRE] = true,
[TEAM_CHIEF] = true,
[TEAM_LIEUTENANT] = true,
[TEAM_RAID] = true,
[TEAM_CRAID] = true,
}
--[[---------------------------------------------------------------------------
Jobs that are hitmen (enables the hitman menu)
---------------------------------------------------------------------------]]
DarkRP.addHitmanTeam(TEAM_HITMAN)
Anyone can help me please ?
Maybe put TEAM_POLICE to the other custom police jobs and trust me it wont break your files.
I dont even understand why people use darkrpmodification for this anyways. Just edit the core files even if it says Dont touch them but who cares.
i try to put TEAM_POLICE to my other custom jobs but it doesn't work.
--[[---------------------------------------------------------------------------
Define which team joining players spawn into and what team you change to if demoted
---------------------------------------------------------------------------]]
GAMEMODE.DefaultTeam = TEAM_CITIZEN
--[[---------------------------------------------------------------------------
Define which teams belong to civil protection
Civil protection can set warrants, make people wanted and do some other police related things
---------------------------------------------------------------------------]]
GAMEMODE.CivilProtection = {
[TEAM_POLICE] = true,
[TEAM_CHIEF] = true,
[TEAM_ARMED] = true,
[TEAM_SAS] = true,
[TEAM_MIFIVE] = true,
[TEAM_MAYOR] = true,
}
--[[---------------------------------------------------------------------------
Jobs that are hitmen (enables the hitman menu)
---------------------------------------------------------------------------]]
DarkRP.addHitmanTeam(TEAM_HITMAN)
DarkRP.addHitmanTeam(TEAM_ASSASSIN)
DarkRP.addHitmanTeam(TEAM_TRIADBOSS)
thanks men
only thing that looks off would be agendas in your jobs.lua file instead of agendas.lua but not sure if that would cause anything? do you have any errors in the server console?
No i don't have any erros in the server console.
Sorry, you need to Log In to post a reply to this thread.