Hi Facepunch community,
I got a darkrp server on Nfoserver, everything is working, but the problem is that when someone change his job, it sometimes make my server simply crash. It's pretty random, and can happen everytimes. My jobs are in jobsrelated.lua
It mostly crash when someone change to a police job, like swat,sas, etc.
If someone could help me, pls.
------------------------------------------------------------------------------------------
Here is my jobrelated.lua :
-- People often copy jobs. When they do, the GM table does not exist anymore.
-- This line makes the job code work both inside and outside of gamemode files.
-- You should not copy this line into your code.
local GAMEMODE = GAMEMODE or GM
/*--------------------------------------------------------
Default teams. Please do not edit this file. Please use the darkrpmod addon instead.
--------------------------------------------------------*/
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"},
command = "citizen",
max = 0,
salary = GAMEMODE.Config.normalsalary,
admin = 0,
vote = false,
hasLicense = false,
candemote = false
})
TEAM_POLICE = DarkRP.createJob("Policier", {
color = Color(25, 25, 170, 255),
model = {
"models/player/uk_police/uk_police_01.mdl",
"models/player/uk_police/uk_police_02.mdl",
"models/player/uk_police/uk_police_03.mdl",
"models/player/uk_police/uk_police_04.mdl",
"models/player/uk_police/uk_police_05.mdl",
"models/player/uk_police/uk_police_06.mdl",
"models/player/uk_police/uk_police_07.mdl",
"models/player/uk_police/uk_police_08.mdl",
"models/player/uk_police/uk_police_09.mdl",
},
description = [[]],
weapons = {"arrest_stick", "unarrest_stick", "fas2_glock20", "stunstick", "door_ram", "weaponchecker", "weapon_arc_atmcard", "handcuffs"},
command = "police",
max = 4,
salary = GAMEMODE.Config.normalsalary * 1.45,
admin = 0,
vote = false,
hasLicense = true,
ammo = {
["pistol"] = 60,
}
})
TEAM_GANG = DarkRP.createJob("Gangster", {
color = Color(75, 75, 75, 255),
model = {
"models/player/Group03/Female_01.mdl",
"models/player/Group03/Female_02.mdl",
"models/player/Group03/Female_03.mdl",
"models/player/Group03/Female_04.mdl",
"models/player/Group03/Female_06.mdl",
"models/player/group03/male_01.mdl",
"models/player/Group03/Male_02.mdl",
"models/player/Group03/male_03.mdl",
"models/player/Group03/Male_04.mdl",
"models/player/Group03/Male_05.mdl",
"models/player/Group03/Male_06.mdl",
"models/player/Group03/Male_07.mdl",
"models/player/Group03/Male_08.mdl",
"models/player/Group03/Male_09.mdl"},
description = [[]],
weapons = {"weapon_arc_atmcard","keypad_cracker","lockpick"},
command = "gangster",
max = 5,
salary = GAMEMODE.Config.normalsalary,
admin = 0,
vote = false,
hasLicense = false
})
TEAM_MOB = DarkRP.createJob("Chef des Gangsters", {
color = Color(25, 25, 25, 255),
model = "models/player/gman_high.mdl",
description = [[]],
weapons = {"lockpick", "unarrest_stick","weapon_arc_atmcard", "keypad_cracker"},
command = "mobboss",
max = 2,
salary = GAMEMODE.Config.normalsalary * 1.34,
admin = 0,
vote = false,
hasLicense = false
})
TEAM_SAMOURAI = DarkRP.createJob("Samourai", {
color = Color(25, 25, 25, 255),
model = "models/blacklist/merc1.mdl",
description = [[]],
weapons = {"fas2_machete", "weapon_arc_atmcard"},
command = "samourai",
max = 2,
salary = 70,
admin = 0,
vote = false,
hasLicense = false,
})
TEAM_GUN = DarkRP.createJob("Dealer d'armes", {
color = Color(255, 140, 0, 255),
model = "models/player/monk.mdl",
description = [[]],
weapons = {"weapon_arc_atmcard"},
command = "gundealer",
max = 2,
salary = GAMEMODE.Config.normalsalary,
admin = 0,
vote = false,
hasLicense = false
})
TEAM_MEDIC = DarkRP.createJob("Medecin", {
color = Color(47, 79, 79, 255),
model = "models/player/kleiner.mdl",
description = [[]],
weapons = {"med_kit", "weapon_arc_atmcard"},
command = "medic",
max = 3,
salary = GAMEMODE.Config.normalsalary,
admin = 0,
vote = false,
hasLicense = false,
medic = true
})
TEAM_CHIEF = DarkRP.createJob("Chef de police", {
color = Color(0,55,255),
model = "models/player/combine_soldier_prisonguard.mdl",
description = [[]],
weapons = {"arrest_stick", "unarrest_stick", "fas2_deagle", "stunstick", "door_ram", "weaponchecker", "weapon_arc_atmcard", "handcuffs"},
command = "chief",
max = 1,
salary = GAMEMODE.Config.normalsalary * 1.67,
admin = 0,
vote = false,
hasLicense = true,
chief = true,
NeedToChangeFrom = TEAM_POLICE,
ammo = {
["pistol"] = 60,
}
})
TEAM_MAYOR = DarkRP.createJob("Maire", {
color = Color(150, 20, 20, 255),
model = "models/player/breen.mdl",
description = [[]],
weapons = {"fas2_p226", "weapon_arc_atmcard"},
command = "mayor",
max = 1,
salary = 200,
admin = 0,
vote = true,
hasLicense = false,
mayor = true
})
TEAM_HOBO = DarkRP.createJob("Clochard", {
color = Color(80, 45, 0, 255),
model = "models/player/corpse1.mdl",
description = [[]],
weapons = {"weapon_bugbait"},
command = "hobo",
max = 5,
salary = 0,
admin = 0,
vote = false,
hasLicense = false,
candemote = false,
hobo = true
})
TEAM_ADMIN = DarkRP.createJob("Administrateur", {
color = Color(25, 25, 170, 255),
model = "models/player/anon/anon.mdl","models/weapons/arms/anon_arms.mdl",
description = [[Admin]],
weapons = {"weapon_arc_atmcard"},
command = "aod",
max = 2,
salary = 1,
admin = 1,
vote = false,
hasLicense = true
})
TEAM_MOD = AddExtraTeam("Moderateur", {
color = Color(25, 25, 170, 255),
model = "models/player/leet.mdl",
description = [[]],
weapons = {"weapon_arc_atmcard"},
command = "mod",
max = 4,
salary = 1,
admin = 0,
vote = false,
hasLicense = false,
customCheck = function(ply) return CLIENT or
table.HasValue({"superadmin", "modapp", "mod"}, ply:GetNWString("usergroup"))
end,
CustomCheckFailMsg = "Vous devez avoir le rank Moderateur pour choisir ce job !",
})
TEAM_POLICE = AddExtraTeam("S.A.S", {
color = Color(0,55,255),
model = "models/player/gasmask.mdl",
description = [[]],
weapons = {"arrest_stick", "unarrest_stick", "fas2_mp5sd6", "stunstick", "door_ram", "weaponchecker", "weapon_arc_atmcard", "fas2_glock20", "handcuffs"},
command = "sas",
max = 2,
salary = 85,
admin = 0,
vote = false,
hasLicense = true,
})
TEAM_POLICE = AddExtraTeam("S.A.S Medecin", {
color = Color(0,55,255),
model = "models/player/gasmask.mdl",
description = [[]],
weapons = {"arrest_stick", "unarrest_stick", "fas2_mp5sd6", "stunstick", "door_ram", "weaponchecker", "weapon_arc_atmcard", "fas2_glock20", "handcuffs", "fas2_ifak"},
command = "sasmedecin",
max = 1,
salary = 85,
admin = 0,
vote = false,
hasLicense = true,
})
TEAM_POLICE = DarkRP.createJob("S.A.S LEADER", {
color = Color(0,55,255),
model = {"models/player/riot.mdl"},
description = [[]],
weapons = {"weapon_arc_atmcard", "arrest_stick", "unarrest_stick", "stunstick" , "weaponchecker" , "door_ram" , "fas2_m4a1" , "fas2_mp5sd6", "fas2_glock20", "handcuffs"},
command = "sasleader",
max = 1,
salary = 100,
admin = 0,
vote = false,
hasLicense = true,
})
TEAM_POLICE = DarkRP.createJob("S.W.A.T", {
color = Color(25, 25, 170, 255),
model = {"models/player/swat.mdl"},
desc
I think this is your problem:
"Default teams. Please do not edit this file. Please use the darkrpmod addon instead."
You can get the addon here: [URL="https://github.com/FPtje/darkrpmodification"]https://github.com/FPtje/darkrpmodification[/URL]
Sorry, you need to Log In to post a reply to this thread.