Probleme metier et lua

  • Initiateur de la discussion
nocilex

nocilex

Bambi
Messages
20
Score réaction
0
Points
40
Bonjour. j'ai un probléme avec les métier. Des que j'enrajoute, il y a un erreur lua. Pourtant tous est bon. Fichier :



--[[---------------------------------------------------------------------------

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 jobs under the following line:

---------------------------------------------------------------------------]]



TEAM_CITIZEN = DarkRP.createJob("Citoyen", {

color = Color(20, 150, 20, 255),

model = {

"models/player/Group01/Female_01.mdl",

"models/player/Group01/Female_02.mdl",

"models/player/Group01/Female_03.mdl",

"models/player/Group01/Female_04.mdl",

"models/player/Group01/Female_06.mdl",

"models/player/group01/male_01.mdl",

"models/player/Group01/Male_02.mdl",

"models/player/Group01/male_03.mdl",

"models/player/Group01/Male_04.mdl",

"models/player/Group01/Male_05.mdl",

"models/player/Group01/Male_06.mdl",

"models/player/Group01/Male_07.mdl",

"models/player/Group01/Male_08.mdl",

"models/player/Group01/Male_09.mdl"

},

description = [[]],

weapons = {"weapon_arc_atmcard","weapon_keycard"},

command = "citizen",

max = 0,

salary = 0,

admin = 0,

vote = false,

hasLicense = false,

candemote = false,

category = "Citizens",

})



TEAM_JUGE = DarkRP.createJob("Juge", {

color = Color(95, 68, 173, 255),

model = {"models/player/gman_high.mdl"},

description = [[]],

weapons = {"weapon_arc_atmcard","weapon_keycard"},

command = "juge",

max = 1,

salary = 20,

admin = 0,

vote = true,

hasLicense = false,

candemote = true,

-- CustomCheck

medic = false,

chief = false,

mayor = false,

hobo = false,

cook = false,

category = "Civil Protection",

})



TEAM_MAYOR = DarkRP.createJob("Maire", {

color = Color(150, 20, 20, 255),

model = {"models/player/breen.mdl","models/obama/obama.mdl"},

description = [[]],

weapons = {"weapon_arc_atmcard","weapon_keycard"},

command = "mayor",

max = 1,

salary = GAMEMODE.Config.normalsalary * 1.89,

admin = 0,

vote = true,

hasLicense = false,

mayor = true,

category = "Civil Protection",

PlayerDeath = function(ply, weapon, killer)

ply:teamBan()

ply:changeTeam(GAMEMODE.DefaultTeam, true)

if killer:IsPlayer() then

DarkRP.notifyAll(0, 4, "Le maire a ete tue. Il y a plus de maire en fonction.")

else

DarkRP.notifyAll(0, 4, "Le maire a ete tue. Il y a plus de maire en fonction.")

end

end

})



TEAM_POLICE = DarkRP.createJob("Policier non confirmée", {

color = Color(25, 25, 170, 255),

model = {

"models/nypd/male_02.mdl",

"models/nypd/male_04.mdl",

"models/nypd/male_05.mdl",

"models/nypd/male_06.mdl",

"models/nypd/male_07.mdl",

"models/nypd/male_08.mdl",

"models/nypd/male_09.mdl"

},

description = [[policier]],

weapons = {"arrest_stick", "unarrest_stick", "weapon_p2282", "stunstick", "door_ram", "weaponchecker","policebadge","weapon_arc_atmcard","weapon_keycard"},

command = "cp",

max = 4,

salary = GAMEMODE.Config.normalsalary * 1.45,

admin = 0,

vote = true,

hasLicense = true,

ammo = {

["pistol"] = 60,

},

category = "Civil Protection",

})



TEAM_AGENTSECRET = DarkRP.createJob("Agent Secret", {

color = Color(20, 150, 20, 255),

model = {

"models/player/Group01/Female_01.mdl",

"models/player/Group01/Female_02.mdl",

"models/player/Group01/Female_03.mdl",

"models/player/Group01/Female_04.mdl",

"models/player/Group01/Female_06.mdl",

"models/player/group01/male_01.mdl",

"models/player/Group01/Male_02.mdl",

"models/player/Group01/male_03.mdl",

"models/player/Group01/Male_04.mdl",

"models/player/Group01/Male_05.mdl",

"models/player/Group01/Male_06.mdl",

"models/player/Group01/Male_07.mdl",

"models/player/Group01/Male_08.mdl",

"models/player/Group01/Male_09.mdl"

},

description = [[]],

weapons = {"arrest_stick", "weapon_p2282", "stunstick", "weaponchecker","weapon_arc_atmcard","weapon_keycard","policebadge","weapon_arc_atmcard","weapon_keycard"},

command = "agentsecret",

max = 3,

salary = 35,

admin = 0,

vote = true,

hasLicense = true,

candemote = true,

-- CustomCheck

medic = false,

chief = false,

mayor = false,

hobo = false,

cook = false,

category = "Civil Protection",

})



TEAM_POLICE2 = DarkRP.createJob(" *MVS* Policier confirmée", {

color = Color(25, 25, 170, 255),

model = {

"models/nypd/male_02.mdl",

"models/nypd/male_04.mdl",

"models/nypd/male_05.mdl",

"models/nypd/male_06.mdl",

"models/nypd/male_07.mdl",

"models/nypd/male_08.mdl",

"models/nypd/male_09.mdl"

},

description = [[policier]],

weapons = {"arrest_stick", "weapon_p2282", "stunstick", "weaponchecker","weapon_arc_atmcard","weapon_keycard","policebadge","weapon_arc_atmcard","weapon_keycard"},

command = "cp2",

max = 4,

salary = 32,

admin = 0,

vote = true,

hasLicense = true,

candemote = true,

-- CustomCheck

medic = false,

chief = false,

mayor = false,

hobo = false,

cook = false,

category = "Civil Protection",

})



TEAM_CHIEF = DarkRP.createJob(" *MVS* Gendarme", {

color = Color(20, 20, 255, 255),

model = "models/player/combine_soldier_prisonguard.mdl",

description = [[policier]],

weapons = {"arrest_stick", "unarrest_stick", "weapon_deagle2", "stunstick", "door_ram", "weaponchecker","policebadge","weapon_arc_atmcard","weapon_keycard"},

command = "chief",

max = 1,

salary = 30,

admin = 0,

vote = false,

hasLicense = true,

chief = true,

NeedToChangeFrom = TEAM_POLICE,

ammo = {

["pistol"] = 60,

},

category = "Civil Protection",

})



TEAM_ENFANTBIZZARE = DarkRP.createJob("Enfant Bizzare", {

color = Color(183, 30, 48, 255),

model = {"models/player/dewobedil/chucky/chucky.mdl","models/player/dewobedil/chucky/chucky_npc.mdl"},

description = [[]],

weapons = {},

command = "enfant",

max = 2,

salary = 30,

admin = 0,

vote = false,

hasLicense = false,

candemote = false,

-- CustomCheck

medic = false,

chief = false,

mayor = false,

hobo = false,

cook = false,

category = "enfant",

})



TEAM_BRAQuEUR = DarkRP.createJob("Braqueur", {

color = Color(48, 48, 48, 255),

model = {

"models/player/pd2_chains_p.mdl",

"models/player/pd2_dallas_p.mdl",

"models/player/pd2_hoxton_p.mdl",

"models/player/pd2_wolf_p.mdl",

"models/shaklin/payday2/pd2_chains.mdl",

"models/shaklin/payday2/pd2_dallas.mdl",

"models/shaklin/payday2/pd2_hoxton.mdl",

"models/shaklin/payday2/pd2_wolf.mdl",

"models/code_gs/robber/robberplayer.mdl"

},

description = [[]],

weapons = {"weapon_arc_atmcard","weapon_keycard","m9k_m4a1"},

command = "braqueur",

max = 5,

salary = 10,

admin = 0,

vote = false,

hasLicense = false,

candemote = false,

-- CustomCheck

medic = false,

chief = false,

mayor = false,

hobo = false,

cook = false,

category = "braqueur",

})



TEAM_DEPA = DarkRP.createJob("Dépanneur", {

color = Color(0, 0, 0, 255),

model = {"models/player/odessa.mdl"},

description = [[]],

weapons = {"weapon_arc_atmcard","weapon_keycard","weapon_scarrepair"},

command = "depa",

max = 4,

salary = 25,

admin = 0,

vote = false,

hasLicense = false,

candemote = true,

-- CustomCheck

medic = false,

chief = false,

mayor = false,

hobo = false,

cook = false,

category = "Civil Protection",

})



--[[---------------------------------------------------------------------------

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,

}
 
Zozo147

Zozo147

Helpeur Divin
Messages
1 814
Score réaction
848
Points
430
Allez dans darkrpmodification/darkrp_config/disabled_defaults.lua et desactivez les jobs par défaut que vous utilisez dans votre code comme par exemple je vois que vous utilisez "CITIZEN" donc dans darkrpmodification mettez false à la place de true donc Exemple :

Code:
DarkRP.disabledDefaults["jobs"] = { ["chief"] = true, ["citizen"] = false, ["cook"] = true, --Hungermod only ["cp"] = true, ["gangster"] = true, ["gundealer"] = true, ["hobo"] = true, ["mayor"] = true, ["medic"] = true, ["mobboss"] = true,
}
 
  • Initiateur de la discussion
nocilex

nocilex

Bambi
Messages
20
Score réaction
0
Points
40
Zozo147 à dit:
Allez dans darkrpmodification/darkrp_config/disabled_defaults.lua et desactivez les jobs par défaut que vous utilisez dans votre code comme par exemple je vois que vous utilisez "CITIZEN" donc dans darkrpmodification mettez false à la place de true donc Exemple :

Code:
DarkRP.disabledDefaults["jobs"] = { ["chief"] = true, ["citizen"] = false, ["cook"] = true, --Hungermod only ["cp"] = true, ["gangster"] = true, ["gundealer"] = true, ["hobo"] = true, ["mayor"] = true, ["medic"] = true, ["mobboss"] = true,
}
deja fais
 
  • Initiateur de la discussion
nocilex

nocilex

Bambi
Messages
20
Score réaction
0
Points
40
Zozo147 à dit:
Allez dans darkrpmodification/darkrp_config/disabled_defaults.lua et desactivez les jobs par défaut que vous utilisez dans votre code comme par exemple je vois que vous utilisez "CITIZEN" donc dans darkrpmodification mettez false à la place de true donc Exemple :

Code:
DarkRP.disabledDefaults["jobs"] = { ["chief"] = true, ["citizen"] = false, ["cook"] = true, --Hungermod only ["cp"] = true, ["gangster"] = true, ["gundealer"] = true, ["hobo"] = true, ["mayor"] = true, ["medic"] = true, ["mobboss"] = true,
}

Et j'ai l'impression que c'est a cose de lui

TEAM_BRAQuEUR = DarkRP.createJob("Braqueur", {
color = Color(48, 48, 48, 255),
model = {
"models/player/pd2_chains_p.mdl",
"models/player/pd2_dallas_p.mdl",
"models/player/pd2_hoxton_p.mdl",
"models/player/pd2_wolf_p.mdl",
"models/shaklin/payday2/pd2_chains.mdl",
"models/shaklin/payday2/pd2_dallas.mdl",
"models/shaklin/payday2/pd2_hoxton.mdl",
"models/shaklin/payday2/pd2_wolf.mdl",
"models/code_gs/robber/robberplayer.mdl"
},
description = [[]],
weapons = {"weapon_arc_atmcard","weapon_keycard","m9k_m4a1"},
command = "braqueur",
max = 5,
salary = 10,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
-- CustomCheck
medic = false,
chief = false,
mayor = false,
hobo = false,
cook = false,
category = "braqueur",
})

et je crois que c'est a cose des model qui vient du worshop
 
Zozo147

Zozo147

Helpeur Divin
Messages
1 814
Score réaction
848
Points
430
nocilex à dit:
Et j'ai l'impression que c'est a cose de lui

TEAM_BRAQuEUR = DarkRP.createJob("Braqueur", {
color = Color(48, 48, 48, 255),
model = {
"models/player/pd2_chains_p.mdl",
"models/player/pd2_dallas_p.mdl",
"models/player/pd2_hoxton_p.mdl",
"models/player/pd2_wolf_p.mdl",
"models/shaklin/payday2/pd2_chains.mdl",
"models/shaklin/payday2/pd2_dallas.mdl",
"models/shaklin/payday2/pd2_hoxton.mdl",
"models/shaklin/payday2/pd2_wolf.mdl",
"models/code_gs/robber/robberplayer.mdl"
},
description = [[]],
weapons = {"weapon_arc_atmcard","weapon_keycard","m9k_m4a1"},
command = "braqueur",
max = 5,
salary = 10,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
-- CustomCheck
medic = false,
chief = false,
mayor = false,
hobo = false,
cook = false,
category = "braqueur",
})

et je crois que c'est a cose des model qui vient du worshop
Pouvez-vous me passer l'erreur ? Et essayez de mettre en majuscule le u comme ça "TEAM_BRAQUEUR" ça peut-être ça le problème.
 
  • Initiateur de la discussion
nocilex

nocilex

Bambi
Messages
20
Score réaction
0
Points
40
Zozo147 à dit:
Pouvez-vous me passer l'erreur ? Et essayez de mettre en majuscule le u comme ça "TEAM_BRAQUEUR" ça peut-être ça le problème.
le probléme vient du worckshop, du skin
 
Zozo147

Zozo147

Helpeur Divin
Messages
1 814
Score réaction
848
Points
430
nocilex à dit:
le probléme vient du worckshop, du skin
Le problème est que vous voyez un ERROR quand vous prenez le métier ? Ou il y a une erreur marqué dans la console (excusez moi je suis un peu perdu ^^)
 
P

PCMalexis

Geek suprême
Messages
600
Score réaction
49
Points
125
Une erreur ? Pouvez vous la fournir
 
SGCAtlantis

SGCAtlantis

Psychopathe
Messages
2 408
Score réaction
443
Points
300
nocilex à dit:
le probléme vient du worckshop, du skin
non l erreur vient d' ici TEAM_BRAQuEUR = DarkRP.createJob("Braqueur", {
du moment ou tu a une minuscule 'u' dans le non de ton job ton fichier jobs est briser.
quand tu as une erreur de player models du worckshop ou autre au pire tu le voix en erreur le models

et au lien de poster tout ton fichier job il aurais mieux valu poster @Des que j'enrajoute, il y a un erreur lua. Pourtant tous est bon. Fichier :

alors poste ton erreur lua de la console ici
 
Yoh Sambre ♪

Yoh Sambre ♪

Shaman Fou
Messages
16 284
Score réaction
9 687
Points
1 845
La balise
Code:
 jamais respecté :oops:
 
binbin17

binbin17

Geek
Messages
67
Score réaction
6
Points
65
Supprimez Herobrine.
 
  • Initiateur de la discussion
nocilex

nocilex

Bambi
Messages
20
Score réaction
0
Points
40
SGCAtlantis à dit:
non l erreur vient d' ici TEAM_BRAQuEUR = DarkRP.createJob("Braqueur", {
du moment ou tu a une minuscule 'u' dans le non de ton job ton fichier jobs est briser.
quand tu as une erreur de player models du worckshop ou autre au pire tu le voix en erreur le models

et au lien de poster tout ton fichier job il aurais mieux valu poster @Des que j'enrajoute, il y a un erreur lua. Pourtant tous est bon. Fichier :

alors poste ton erreur lua de la console ici
oui mais c'est reparez et c'est a cose du workshop. Mais je comprend pas comment faire
 
Discord d'entraide
Rejoignz-nous sur Discord