Changement de job

  • Initiateur de la discussion itchi259
  • Date de début
  • Initiateur de la discussion
itchi259

itchi259

Geek
Messages
36
Score réaction
1
Points
45
Bonjour voila je reviens demander de l'aide sur le forum de mtx car j'ai un problème, quand les personne change de jobs sur mon serveur il ne spawn pas la ou j'ai défini les spawn de chaques jobs, enfaite quand ils change de job les joueur reste a la même position pouvez vous m'aider ? (voici le fichier job) :
--[[---------------------------------------------------------------------------
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_CITIZEN = DarkRP.createJob("Citoyen", {
color = Color(82, 184, 73, 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.md",
"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 = [[Vous incarner un simple citoyen.]],
weapons = {},
command = "citoyen",
max = 0,
salary = 5,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
category = "Citizen",
PlayerSpawn = function(ply)
ply:SetMaxHealth(100)
ply:SetHealth(100)
end,
})

TEAM_POLICE = DarkRP.createJob("Policier", {
color = Color(25, 94, 158, 255),
model = {
"models/nypd/male_02.mdl",
"models/nypd/male_04.mdl",
"models/nypd/male_05.mdl",
"models/nypd/male_05.mdl",
"models/nypd/male_07.mdl",
"models/nypd/male_08.mdl",
"models/nypd/male_09.mdl",
},
description = [[Vous devez proteger les habitants ainsi que faire respecter la lois !]],
weapons = {"weapon_deagle2"},
command = "gendarmes",
max = 6,
salary = 250,
admin = 0,
vote = true,
hasLicense = true,
candemote = true,
chief = true,
ammo = {
["pistol"] = 90
},
PlayerSpawn = function(ply)
ply:SetMaxHealth(100)
ply:SetHealth(100)
ply:SetArmor(50)
end,
})

TEAM_MAYOR = DarkRP.createJob("President", {
color = Color(199, 45, 45, 255),
model = {
"models/player/breen.mdl",
"models/player/donald_trump.mdl"
},
description = [[Vous incarner le président.]],
weapons = {},
command = "president",
max = 1,
salary = 500,
admin = 0,
vote = true,
hasLicense = true,
candemote = false,
mayor = true,
PlayerSpawn = function(ply)
ply:SetMaxHealth(100)
ply:SetHealth(100)
ply:SetArmor(100)
end,
PlayerDeath = function(ply, weapon, killer)
ply:teamBan()
ply:changeTeam(GAMEMODE.DefaultTeam, true)
DarkRP.notifyAll(0, 4, "")
end,
PlayerDeath = function(ply, weapon, killer)
ply:teamBan()
ply:changeTeam(GAMEMODE.DefaultTeam, true)
DarkRP.notifyAll(0, 4, "")
end,
})

TEAM_STAFF = DarkRP.createJob("Staff", {
color = Color(94, 69, 194, 255),
model = {
"models/player/daftpunk/daft_gold.mdl",
"models/player/daftpunk/daft_silver.mdl",
"models/katazuro/defalt_playermodel.mdl",
"models/aileri/bmkennen/blood_moon_kennen.mdl",
"models/avengers/iron man/mark7_player.mdl",
"models/avengers/iron man/mark7_player.mdl,"
},
description = [[Ce job ne sert que aux admin ou moderateur qui sont en session de moderation]],
weapons = {},
command = "Staff",
max = 0,
salary = 0,
admin = 1,
vote = false,
hasLicense = false,
candemote = false,
mayor = true,
chief = true,
medic = true,
cook = true,
hobo = true,
PlayerSpawn = function(ply)
ply:SetMaxHealth(100)
ply:SetHealth(100)
ply:SetArmor(0)
end,
})

TEAM_GUN = DarkRP.createJob("Vendeur d'armes", {
color = Color(199, 137, 77, 255),
model = {"models/player/monk.mdl"},
description = [[Vous vendez des armes.]],
weapons = {},
command = "vendeur",
max = 4,
salary = 200,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
PlayerSpawn = function(ply)
ply:SetMaxHealth(100)
ply:SetHealth(100)
ply:SetArmor(35)
end,
})

TEAM_GANG = DarkRP.createJob("Chef Gangster", {
color = Color(204, 204, 204, 255),
model = {"models/fearless/02.mdl"},
description = [[Vous ette le chef des Gangster, vos hommes doivent vous obéir.]],
weapons = {},
command = "chefgangster",
max = 1,
salary = 100,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
PlayerSpawn = function(ply)
ply:SetMaxHealth(100)
ply:SetHealth(100)
ply:SetArmor(0)
end,
PlayerDeath = function(ply, weapon, killer)
ply:teamBan()
ply:changeTeam(GAMEMODE.DefaultTeam, true)
DarkRP.notifyAll(0, 4, "")
end
})

TEAM_POLICE = DarkRP.createJob("Commissaire", {
color = Color(21, 42, 153, 255),
model = {"models/player/police_agent/commissaire_09.mdl"},
description = [[Vous êtes le comissaire, vous diriger les gendarmes]],
weapons = {"weapon_pumpshotgun2", "weapon_deagle2"},
command = "comissaire",
max = 1,
salary = 350,
admin = 0,
vote = true,
hasLicense = true,
candemote = false,
chief = true,
ammo = {
["buckshot"] = 90,
["pistol"] = 0
},
PlayerSpawn = function(ply)
ply:SetMaxHealth(100)
ply:SetHealth(100)
ply:SetArmor(150)
end,
PlayerDeath = function(ply, weapon, killer)
ply:teamBan()
ply:changeTeam(GAMEMODE.DefaultTeam, true)
DarkRP.notifyAll(0, 4, "")
end,
})

TEAM_MEDIC = DarkRP.createJob("Medecins", {
color = Color(166, 49, 194, 255),
model = {"models/player/kleiner.mdl"},
description = [[Vous soignez les gens SAUF si ils sont en pleine action (braquage ect...)]],
weapons = {"med_kit"},
command = "medecins",
max = 3,
salary = 100,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
medic = true,
PlayerSpawn = function(ply)
ply:SetMaxHealth(100)
ply:SetHealth(100)
ply:SetArmor(0)
end,
})

TEAM_GANG = DarkRP.createJob("Gangster", {
color = Color(186, 186, 186, 255),
model = {"models/player/group03/male_01.mdl"},
description = [[Vous faites partie d'un gang.]],
weapons = {},
command = "gangs",
max = 5,
salary = 100,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
PlayerSpawn = function(ply)
ply:SetMaxHealth(100)
ply:SetHealth(100)
ply:SetArmor(0)
end,
})

TEAM_GANG = DarkRP.createJob("SDF", {
color = Color(161, 94, 44, 255),
model = {"models/jessev92/player/l4d/m9-hunter.mdl"},
description = [[Vous ette un sdf.]],
weapons = {},
command = "sdf",
max = 3,
salary = 1,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
hobo = true,
PlayerSpawn = function(ply)
ply:SetMaxHealth(50)
ply:SetHealth(50)
end,
PlayerDeath = function(ply, weapon, killer)
ply:teamBan()
ply:changeTeam(GAMEMODE.DefaultTeam, true)
DarkRP.notifyAll(0, 4, "")
end,
})

TEAM_POLICE = DarkRP.createJob("Agent de securite", {
color = Color(184, 159, 78, 255),
model = {
"models/player/guard_pack/guard_08.mdl",
"models/player/guard_pack/guard_07.mdl",
"models/player/guard_pack/guard_05.mdl",
"models/player/guard_pack/guard_04.mdl",
"models/player/guard_pack/guard_03.mdl",
"models/player/guard_pack/guard_01.mdl"
},
description = [[Vous devez proteger votre employeur.]],
weapons = {},
command = "securiter",
max = 5,
salary = 100,
admin = 0,
vote = true,
hasLicense = true,
candemote = true,
PlayerSpawn = function(ply)
ply:SetMaxHealth(100)
ply:SetHealth(100)
ply:SetArmor(100)
end,
})

TEAM_POLICE = DarkRP.createJob("SWAT", {
color = Color(45, 57, 176, 255),
model = {"models/piket_playermodel/piket_playermodel.mdl"},
description = [[Vous incarner le role d'un swat]],
weapons = {"weapon_m42", "weapon_deagle2"},
command = "swat",
max = 5,
salary = 100,
admin = 0,
vote = true,
hasLicense = true,
candemote = true,
chief = true,
PlayerSpawn = function(ply)
ply:SetMaxHealth(100)
ply:SetHealth(100)
ply:SetArmor(150)
end
})

TEAM_GANG = DarkRP.createJob("Mafieux", {
color = Color(0, 0, 0, 255),
model = {
"models/fearless/mafia02.mdl",
"models/fearless/mafia04.mdl",
"models/fearless/mafia06.mdl",
"models/fearless/mafia09.mdl"
},
description = [[Vous faites membres d'un cartel]],
weapons = {},
command = "mafieux",
max = 5,
salary = 100,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
PlayerSpawn = function(ply)
ply:SetMaxHealth(100)
ply:SetHealth(100)
ply:SetArmor(0)
end,
})

TEAM_GANG = DarkRP.createJob("Parrain", {
color = Color(0, 0, 0, 255),
model = {"models/characters/gallaha.mdl"},
description = [[Vous ettes le parrain]],
weapons = {},
command = "parrain",
max = 1,
salary = 250,
admin = 0,
vote = true,
hasLicense = false,
candemote = false,
PlayerDeath = function(ply, weapon, killer)
ply:teamBan()
ply:changeTeam(GAMEMODE.DefaultTeam, true)
DarkRP.notifyAll(0, 4, "")
end,
})

TEAM_GANG = DarkRP.createJob("MS13", {
color = Color(0, 0, 0, 255),
model = {
"models/ms13/slow_1.mdl",
"models/ms13/slow_2.mdl"
},
description = [[vous faites partit d'un gang, vous ette fidèles a votre chef.]],
weapons = {},
command = "ms",
max = 5,
salary = 100,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
PlayerSpawn = function(ply)
ply:SetMaxHealth(100)
ply:SetHealth(100)
ply:SetArmor(0)
end,
})

TEAM_GANG = DarkRP.createJob("Chef des MS13", {
color = Color(0, 0, 0, 255),
model = {"models/ms13/slow_3.mdl"},
description = [[Vous diriger vos membres.]],
weapons = {},
command = "chefms",
max = 1,
salary = 100,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
PlayerSpawn = function(ply)
ply:SetMaxHealth(100)
ply:SetHealth(100)
ply:SetArmor(0)
end,
})

TEAM_GANG = DarkRP.createJob("Yakuza", {
color = Color(168, 149, 82, 255),
model = {
"models/sd/players/[dbs_brawler]-head_brawler_dbs.mdl",
"models/sd/players/[dbs_brawler_2]-head_brawler_dbs.mdl"
},
description = [[vous faites partit d'un gang, vous ette fidèles a votre chef.]],
weapons = {},
command = "yakuza",
max = 5,
salary = 100,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
PlayerSpawn = function(ply)
ply:SetMaxHealth(100)
ply:SetHealth(100)
ply:SetArmor(0)
end,
})

TEAM_GANG = DarkRP.createJob("Chef Yakuza", {
color = Color(168, 149, 82, 255),
model = {"models/sd/players/[dbs_quick]-head_quick_dbs.mdl"},
description = [[vous faites partit d'un gang, vous ette fidèles a votre chef.]],
weapons = {},
command = "chefyakuza",
max = 1,
salary = 100,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
PlayerSpawn = function(ply)
ply:SetMaxHealth(100)
ply:SetHealth(100)
ply:SetArmor(0)
end,
})

TEAM_GANG = DarkRP.createJob("Bloodz", {
color = Color(191, 11, 11, 255),
model = {"models/player/Group01/Female_01.mdl",},
description = [[Vous incarner un membre de gang.]],
weapons = {},
command = "bloodz",
max = 5,
salary = 100,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
PlayerSpawn = function(ply)
ply:SetMaxHealth(100)
ply:SetHealth(100)
ply:SetArmor(0)
end,
})

TEAM_GANG = DarkRP.createJob("Chef bloodz", {
color = Color(191, 22, 22, 255),
model = {"models/player/Group01/Female_01.mdl"},
description = [[Vous ette le chef du gang des bloodz.]],
weapons = {},
command = "chefbloodz",
max = 1,
salary = 100,
admin = 0,
vote = true,
hasLicense = false,
candemote = false,
PlayerSpawn = function(ply)
ply:SetMaxHealth(100)
ply:SetHealth(100)
ply:SetArmor(30)
end,
PlayerDeath = function(ply, weapon, killer)
ply:teamBan()
ply:changeTeam(GAMEMODE.DefaultTeam, true)
DarkRP.notifyAll(0, 4, "")
end,
})

TEAM_GANG = DarkRP.createJob("Cripz", {
color = Color(34, 85, 85, 255),
model = {"models/player/Group01/Female_01.mdl"},
description = [[Vous incarner un membre de gang]],
weapons = {},
command = "cripz",
max = 5,
salary = 100,
admin = 0,
vote = false,
hasLicense = false,
candemote = true,
PlayerSpawn = function(ply)
ply:SetMaxHealth(100)
ply:SetHealth(100)
ply:SetArmor(0)
end,
})

TEAM_GANG = DarkRP.createJob("Chef Cripz", {
color = Color(34, 85, 85, 255),
model = {"models/player/Group01/Female_01.mdl"},
description = [[Vous diriger le gang des cripz.]],
weapons = {},
command = "chefcripz",
max = 1,
salary = 100,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
PlayerSpawn = function(ply)
ply:SetMaxHealth(100)
ply:SetHealth(100)
ply:SetArmor(30)
end,
PlayerDeath = function(ply, weapon, killer)
ply:teamBan()
ply:changeTeam(GAMEMODE.DefaultTeam, true)
DarkRP.notifyAll(0, 4, "")
end,
})

TEAM_POLICE = DarkRP.createJob("Sniper SWAT", {
color = Color(17, 85, 51, 255),
model = {"models/msf/soldier2.mdl"},
description = [[Vous incarner un tireur d'elite du SWAT.]],
weapons = {"ls_sniper", "weapon_deagle2"},
command = "sniperswat",
max = 2,
salary = 300,
admin = 0,
vote = true,
hasLicense = true,
candemote = true,
chief = true,
PlayerSpawn = function(ply)
ply:SetMaxHealth(100)
ply:SetHealth(100)
ply:SetArmor(100)
end,
PlayerDeath = function(ply, weapon, killer)
ply:teamBan()
ply:changeTeam(GAMEMODE.DefaultTeam, true)
DarkRP.notifyAll(0, 4, "")
end,
c
})
--[[---------------------------------------------------------------------------
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)
 
  • Initiateur de la discussion
itchi259

itchi259

Geek
Messages
36
Score réaction
1
Points
45
Merci d'avance.
 
  • Banni
WabelHD

WabelHD

Geek suprême
Messages
262
Score réaction
59
Points
130
/garrysmod/addons/darkrpmodification-master/lua/darkrp_config/settings.lua
|
\/
l.122-123
-- norespawn - Enable/Disable that people don't have to respawn when they change job.
GM.Config.norespawn = true
tu change (il me semble que de base c'est true tu met en false donc)
 
  • Initiateur de la discussion
itchi259

itchi259

Geek
Messages
36
Score réaction
1
Points
45
oui mais sela le faisait deja au début (quand j'est fait les premiers jobs)
 
  • Banni
WabelHD

WabelHD

Geek suprême
Messages
262
Score réaction
59
Points
130
itchi259 à dit:
oui mais sela le faisait deja au début (quand j'est fait les premiers jobs)
Lit mon message!
 
  • Initiateur de la discussion
itchi259

itchi259

Geek
Messages
36
Score réaction
1
Points
45
merci et une deuxieme petite question :
ou esque que l'on mes les dossier m9k pour avoir les armes ?
 
  • Initiateur de la discussion
itchi259

itchi259

Geek
Messages
36
Score réaction
1
Points
45
Merci beaucoup !
 
  • J'aime
Réactions: FalkioGMR
ally

ally

Geek suprême
Messages
337
Score réaction
64
Points
100
Je pense pas qu'il voulait dire pour vendre des armes.
Je penses qu'il veut mettre le m9k sur son serveur.
Si c'est le cas met le met le m9k dans la collection de ton serveur
 
  • Initiateur de la discussion
itchi259

itchi259

Geek
Messages
36
Score réaction
1
Points
45
Je met lesdossier m9k dans shipment ou le fichier qui est dedans ?
 
  • Initiateur de la discussion
itchi259

itchi259

Geek
Messages
36
Score réaction
1
Points
45
Ouai c bon j'ai trouver merci
 
Unknown baguette

Unknown baguette

Helpeur Divin
Messages
2 734
Score réaction
1 162
Points
400
Résolu stp ^^
 
  • Initiateur de la discussion
itchi259

itchi259

Geek
Messages
36
Score réaction
1
Points
45
Comment je fait ?
 
Unknown baguette

Unknown baguette

Helpeur Divin
Messages
2 734
Score réaction
1 162
Points
400
Tout en haut à droite, y à marqué "outil de discussion" tu défille et y à écrit éditer le titre après tu choisis le Préfixe "résolu"
 
  • Initiateur de la discussion
itchi259

itchi259

Geek
Messages
36
Score réaction
1
Points
45
ok merci
 
Discord d'entraide
Rejoignz-nous sur Discord