- Initiateur de la discussion
H
Hugo Martin
Nouveau né
- Messages
- 8
- Score réaction
- 4
- Points
- 15
Bonjour,
J'ai un problème avec les jobs.lua.
Voici ce que ça me met ingame :
There is 1 Lua problem!
Please check your console for more information!
Voici ce que ça me met sur la console :
Lua Error:
[ERROR] addons/darkrpmodification/lua/darkrp_customthings/jobs.lua:270: unexpected symbol near '}'
1. unknown - addons/darkrpmodification/lua/darkrp_customthings/jobs.lua:0
Voici mon script :
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_CITOYEN = DarkRP.createJob("Citoyen", {
color = Color(17, 102, 102, 255),
model = {
"models/humans/group02/tale_03.mdl",
"models/humans/group02/tale_04.mdl",
"models/humans/group02/tale_05.mdl",
"models/humans/group02/tale_07.mdl",
"models/player/suits/male_04_open_tie.mdl",
"models/mark2580/ff/alyx_ff_v9_pushreplika_player.mdl",
"models/player/suits/male_07_shirt.mdl",
"models/humans/group02/tale_09.mdl",
"models/humans/group02/temale_01.mdl",
"models/humans/group02/temale_02.mdl",
"models/humans/group02/temale_07.mdl",
"models/mark2580/ff/alyx_ff_v9_pushreplika_npc.mdl"
},
description = [[Vous êtes une personne lambda qui fait sa vie en ville.]],
weapons = {"weapon_fists"},
command = "citoyen",
max = 0,
salary = 7,
admin = 0,
vote = false,
hasLicense = false,
candemote = false
}),
TEAM_SDF = DarkRP.createJob("SDF", {
color = Color(110, 47, 47, 255),
model = {
"models/minson97/bo2/harper/harper.mdl",
"models/minson97/bo2/harper/harper_arm.mdl",
"models/minson97/bo2/harper/harper_colossus.mdl"
},
description = [[Vous faites la manche dans la rue a la recherche d'argent.]],
weapons = {"weapon_fists", "weapon_bugbait"},
command = "sdf",
max = 3,
salary = 0,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
hobo = true
}),
TEAM_GARDEDUCORPS = DarkRP.createJob("Garde du Corps", {
color = Color(110, 53, 53, 255),
model = {
"models/player/portal/male_02_security.mdl",
"models/player/portal/male_01_security.mdl",
"models/player/portal/male_03_security.mdl",
"models/player/portal/male_04_security.mdl",
"models/player/portal/male_05_security.mdl",
"models/player/portal/male_06_security.mdl",
"models/player/portal/male_07_security.mdl",
"models/player/portal/male_08_security.mdl",
"models/player/portal/male_09_security.mdl"
},
description = [[Vous faites la manche dans la rue a la recherche d'argent]],
weapons = {"weapon_fists", "m9k_usp"},
command = "sdf",
max = 4,
salary = 10,
admin = 0,
vote = false,
hasLicense = true,
candemote = true,
ammo = {
["m9k_ammo_pistol"] = 25
},
PlayerSpawn = function(ply)
ply:SetArmor(15)
end
}),
TEAM_GARDEDUMAIRE = DarkRP.createJob("Garde du Maire", {
color = Color(5, 3, 3, 255),
model = {"models/player/smith.mdl"},
description = [[Vous protéger le maire/dictateur au péril de votre vie.]],
weapons = {"weapon_fists", "m9k_m92beretta"},
command = "gardeducorps",
max = 2,
salary = 15,
admin = 0,
vote = false,
hasLicense = true,
candemote = true
}),
TEAM_MAIRE = DarkRP.createJob("Maire", {
color = Color(69, 40, 40, 255),
model = {"models/fearless/mayor1.mdl"},
description = [[Vous dirigez la ville et les forces de l'ordres.]],
weapons = {"weapon_fists", "m9k_colt1911", "stunstick"},
command = "maire",
max = 1,
salary = 50,
admin = 0,
vote = true,
hasLicense = true,
candemote = true,
mayor = true,
PlayerDeath = function(ply, weapon, killer)
ply:teamBan()
ply:changeTeam(GAMEMODE.DefaultTeam, true)
DarkRP.notifyAll(0, 4, "Le maire est mort")
end
}),
TEAM_VOLEUR = DarkRP.createJob("Voleur", {
color = Color(87, 30, 133, 255),
model = {
"models/player/darkrp/villian/villianvicki.mdl",
"models/player/group01/cookies114.mdl"
},
description = [[Vous cambriolez des maisons et voler des voitures.]],
weapons = {"weapon_fists", "lockpick"},
command = "voleur",
max = 2,
salary = 0,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
PlayerDeath = function(ply, weapon, killer)
ply:teamBan()
ply:changeTeam(GAMEMODE.DefaultTeam, true)
DarkRP.notifyAll(0, 4, "Un voleur est mort")
end
}),
TEAM_AVOCAT = DarkRP.createJob("Avocat", {
color = Color(5, 4, 4, 255),
model = {
"models/player/suits/male_09_closed_coat_tie.mdl",
"models/player/suits/male_01_closed_tie.mdl"
},
description = [[Vous défendez votre client dans une audition.]],
weapons = {"weapon_fists"},
command = "avocat",
max = 2,
salary = 30,
admin = 0,
vote = true,
hasLicense = false,
candemote = true
}),
TEAM_JUGE = DarkRP.createJob("Juge", {
color = Color(102, 1, 1, 255),
model = {},
description = [[Vous départagez l’accusé et l'accusateur.]],
weapons = {"weapon_fists"},
command = "juge",
max = 1,
salary = 35,
admin = 0,
vote = true,
hasLicense = false,
candemote = true
}),
TEAM_MEDECIN = DarkRP.createJob("Medecin", {
color = Color(28, 122, 74, 255),
model = {"models/player/p_kleiner.mdl"},
description = [[Vous soignez des patients.]],
weapons = {"weapon_fists", "med_kit"},
command = "medecin",
max = 2,
salary = 20,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
medic = true,
hobo = true
}),
TEAM_POMPIER = DarkRP.createJob("Pompier", {
color = Color(194, 21, 21, 255),
model = {
"models/player/paramed/pompier_homme2.mdl",
"models/player/paramed/pompier_homme4.mdl",
"models/player/paramed/pompier_homme7.mdl",
"models/player/paramed/pompier_homme1.mdl"
},
description = [[Vous secourez des personnes et éteignez des feux.]],
weapons = {"weapon_fists", "med_kit", "weapon_extinguisher"},
command = "pompier",
max = 3,
salary = 17,
admin = 0,
vote = false,
hasLicense = false,
candemote = true
}),
TEAM_DOUANIER = DarkRP.createJob("Douanier", {
color = Color(27, 51, 184, 255),
model = {
"models/player/kerry/class_d_1.mdl",
"models/player/kerry/class_d_2.mdl",
"models/player/kerry/class_d_5.mdl"
},
description = [[Vous faites des contrôles dans les rues.]],
weapons = {"weapon_fists", "m9k_sig_p229r", "arrest_stick", "unarrest_stick", "stunstick"},
command = "douanier",
max = 2,
salary = 8,
admin = 0,
vote = true,
hasLicense = true,
candemote = true,
PlayerDeath = function(ply, weapon, killer)
ply:teamBan()
ply:changeTeam(GAMEMODE.DefaultTeam, true)
DarkRP.notifyAll(0, 4, "Un douanier est mort.")
end
}),
TEAM_POLICIER = DarkRP.createJob("Policier", {
color = Color(47, 35, 181, 255),
model = {
"models/player/politi_1/male_06.mdl",
"models/player/politi_1/male_09.mdl",
"models/player/politi_1/male_04.mdl",
"models/player/politi_1/male_01.mdl"
},
description = [[Vous luttez contre la criminalité et protéger les citoyens en ville.]],
weapons = {"weapon_fists", "arrest_stick", "unarrest_stick", "stunstick", "m9k_sig_p229r"},
command = "policier",
max = 5,
salary = 13,
admin = 0,
vote = false,
hasLicense = true,
candemote = true,
ammo = {
["item_ammo_pistol"] = 30
},
PlayerSpawn = function(ply)
ply:SetMaxHealth(100)
ply:SetHealth(100)
ply:SetArmor(25)
end,
PlayerDeath = function(ply, weapon, killer)
ply:teamBan()
ply:changeTeam(GAMEMODE.DefaultTeam, true)
DarkRP.notifyAll(0, 4, "Un policier est mort")
end
})
})--[[---------------------------------------------------------------------------
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_MAYOR] = true,
}
--[[---------------------------------------------------------------------------
Jobs that are hitmen (enables the hitman menu)
---------------------------------------------------------------------------]]
DarkRP.addHitmanTeam(TEAM_MOB)
Je ne comprends pas ce qui se passe j'ai fait les codes avec the coding beast.
J'ai un problème avec les jobs.lua.
Voici ce que ça me met ingame :
There is 1 Lua problem!
Please check your console for more information!
Voici ce que ça me met sur la console :
Lua Error:
[ERROR] addons/darkrpmodification/lua/darkrp_customthings/jobs.lua:270: unexpected symbol near '}'
1. unknown - addons/darkrpmodification/lua/darkrp_customthings/jobs.lua:0
Voici mon script :
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_CITOYEN = DarkRP.createJob("Citoyen", {
color = Color(17, 102, 102, 255),
model = {
"models/humans/group02/tale_03.mdl",
"models/humans/group02/tale_04.mdl",
"models/humans/group02/tale_05.mdl",
"models/humans/group02/tale_07.mdl",
"models/player/suits/male_04_open_tie.mdl",
"models/mark2580/ff/alyx_ff_v9_pushreplika_player.mdl",
"models/player/suits/male_07_shirt.mdl",
"models/humans/group02/tale_09.mdl",
"models/humans/group02/temale_01.mdl",
"models/humans/group02/temale_02.mdl",
"models/humans/group02/temale_07.mdl",
"models/mark2580/ff/alyx_ff_v9_pushreplika_npc.mdl"
},
description = [[Vous êtes une personne lambda qui fait sa vie en ville.]],
weapons = {"weapon_fists"},
command = "citoyen",
max = 0,
salary = 7,
admin = 0,
vote = false,
hasLicense = false,
candemote = false
}),
TEAM_SDF = DarkRP.createJob("SDF", {
color = Color(110, 47, 47, 255),
model = {
"models/minson97/bo2/harper/harper.mdl",
"models/minson97/bo2/harper/harper_arm.mdl",
"models/minson97/bo2/harper/harper_colossus.mdl"
},
description = [[Vous faites la manche dans la rue a la recherche d'argent.]],
weapons = {"weapon_fists", "weapon_bugbait"},
command = "sdf",
max = 3,
salary = 0,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
hobo = true
}),
TEAM_GARDEDUCORPS = DarkRP.createJob("Garde du Corps", {
color = Color(110, 53, 53, 255),
model = {
"models/player/portal/male_02_security.mdl",
"models/player/portal/male_01_security.mdl",
"models/player/portal/male_03_security.mdl",
"models/player/portal/male_04_security.mdl",
"models/player/portal/male_05_security.mdl",
"models/player/portal/male_06_security.mdl",
"models/player/portal/male_07_security.mdl",
"models/player/portal/male_08_security.mdl",
"models/player/portal/male_09_security.mdl"
},
description = [[Vous faites la manche dans la rue a la recherche d'argent]],
weapons = {"weapon_fists", "m9k_usp"},
command = "sdf",
max = 4,
salary = 10,
admin = 0,
vote = false,
hasLicense = true,
candemote = true,
ammo = {
["m9k_ammo_pistol"] = 25
},
PlayerSpawn = function(ply)
ply:SetArmor(15)
end
}),
TEAM_GARDEDUMAIRE = DarkRP.createJob("Garde du Maire", {
color = Color(5, 3, 3, 255),
model = {"models/player/smith.mdl"},
description = [[Vous protéger le maire/dictateur au péril de votre vie.]],
weapons = {"weapon_fists", "m9k_m92beretta"},
command = "gardeducorps",
max = 2,
salary = 15,
admin = 0,
vote = false,
hasLicense = true,
candemote = true
}),
TEAM_MAIRE = DarkRP.createJob("Maire", {
color = Color(69, 40, 40, 255),
model = {"models/fearless/mayor1.mdl"},
description = [[Vous dirigez la ville et les forces de l'ordres.]],
weapons = {"weapon_fists", "m9k_colt1911", "stunstick"},
command = "maire",
max = 1,
salary = 50,
admin = 0,
vote = true,
hasLicense = true,
candemote = true,
mayor = true,
PlayerDeath = function(ply, weapon, killer)
ply:teamBan()
ply:changeTeam(GAMEMODE.DefaultTeam, true)
DarkRP.notifyAll(0, 4, "Le maire est mort")
end
}),
TEAM_VOLEUR = DarkRP.createJob("Voleur", {
color = Color(87, 30, 133, 255),
model = {
"models/player/darkrp/villian/villianvicki.mdl",
"models/player/group01/cookies114.mdl"
},
description = [[Vous cambriolez des maisons et voler des voitures.]],
weapons = {"weapon_fists", "lockpick"},
command = "voleur",
max = 2,
salary = 0,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
PlayerDeath = function(ply, weapon, killer)
ply:teamBan()
ply:changeTeam(GAMEMODE.DefaultTeam, true)
DarkRP.notifyAll(0, 4, "Un voleur est mort")
end
}),
TEAM_AVOCAT = DarkRP.createJob("Avocat", {
color = Color(5, 4, 4, 255),
model = {
"models/player/suits/male_09_closed_coat_tie.mdl",
"models/player/suits/male_01_closed_tie.mdl"
},
description = [[Vous défendez votre client dans une audition.]],
weapons = {"weapon_fists"},
command = "avocat",
max = 2,
salary = 30,
admin = 0,
vote = true,
hasLicense = false,
candemote = true
}),
TEAM_JUGE = DarkRP.createJob("Juge", {
color = Color(102, 1, 1, 255),
model = {},
description = [[Vous départagez l’accusé et l'accusateur.]],
weapons = {"weapon_fists"},
command = "juge",
max = 1,
salary = 35,
admin = 0,
vote = true,
hasLicense = false,
candemote = true
}),
TEAM_MEDECIN = DarkRP.createJob("Medecin", {
color = Color(28, 122, 74, 255),
model = {"models/player/p_kleiner.mdl"},
description = [[Vous soignez des patients.]],
weapons = {"weapon_fists", "med_kit"},
command = "medecin",
max = 2,
salary = 20,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
medic = true,
hobo = true
}),
TEAM_POMPIER = DarkRP.createJob("Pompier", {
color = Color(194, 21, 21, 255),
model = {
"models/player/paramed/pompier_homme2.mdl",
"models/player/paramed/pompier_homme4.mdl",
"models/player/paramed/pompier_homme7.mdl",
"models/player/paramed/pompier_homme1.mdl"
},
description = [[Vous secourez des personnes et éteignez des feux.]],
weapons = {"weapon_fists", "med_kit", "weapon_extinguisher"},
command = "pompier",
max = 3,
salary = 17,
admin = 0,
vote = false,
hasLicense = false,
candemote = true
}),
TEAM_DOUANIER = DarkRP.createJob("Douanier", {
color = Color(27, 51, 184, 255),
model = {
"models/player/kerry/class_d_1.mdl",
"models/player/kerry/class_d_2.mdl",
"models/player/kerry/class_d_5.mdl"
},
description = [[Vous faites des contrôles dans les rues.]],
weapons = {"weapon_fists", "m9k_sig_p229r", "arrest_stick", "unarrest_stick", "stunstick"},
command = "douanier",
max = 2,
salary = 8,
admin = 0,
vote = true,
hasLicense = true,
candemote = true,
PlayerDeath = function(ply, weapon, killer)
ply:teamBan()
ply:changeTeam(GAMEMODE.DefaultTeam, true)
DarkRP.notifyAll(0, 4, "Un douanier est mort.")
end
}),
TEAM_POLICIER = DarkRP.createJob("Policier", {
color = Color(47, 35, 181, 255),
model = {
"models/player/politi_1/male_06.mdl",
"models/player/politi_1/male_09.mdl",
"models/player/politi_1/male_04.mdl",
"models/player/politi_1/male_01.mdl"
},
description = [[Vous luttez contre la criminalité et protéger les citoyens en ville.]],
weapons = {"weapon_fists", "arrest_stick", "unarrest_stick", "stunstick", "m9k_sig_p229r"},
command = "policier",
max = 5,
salary = 13,
admin = 0,
vote = false,
hasLicense = true,
candemote = true,
ammo = {
["item_ammo_pistol"] = 30
},
PlayerSpawn = function(ply)
ply:SetMaxHealth(100)
ply:SetHealth(100)
ply:SetArmor(25)
end,
PlayerDeath = function(ply, weapon, killer)
ply:teamBan()
ply:changeTeam(GAMEMODE.DefaultTeam, true)
DarkRP.notifyAll(0, 4, "Un policier est mort")
end
})
})--[[---------------------------------------------------------------------------
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_MAYOR] = true,
}
--[[---------------------------------------------------------------------------
Jobs that are hitmen (enables the hitman menu)
---------------------------------------------------------------------------]]
DarkRP.addHitmanTeam(TEAM_MOB)
Je ne comprends pas ce qui se passe j'ai fait les codes avec the coding beast.