[Help] GAMEMODE.DefaultTeam is running a lua error even when it is correct

Post Reply
PARG
New to forums
New to forums
Posts: 1
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Tue Jun 28, 2016 10:08 pm

[Help] GAMEMODE.DefaultTeam is running a lua error even when it is correct

Post by PARG »

[ERROR] A runtime error has occurred in "lua/darkrp_customthings/jobs.lua" on line -1.
The best help I can give you is this:

GAMEMODE.DefaultTeam is not set to an existing job.

Hints:
- This may happen when you disable the default citizen job. Make sure you update GAMEMODE.DefaultTeam to the new default team.
- GAMEMODE.DefaultTeam may be set to a job that does not exist anymore. Did you remove the job you had set to default?
- The error being in jobs.lua is a guess. This is usually right, but the problem might lie somewhere else.

The responsibility for the error above lies with (the authors of) one (or more) of these files:
jobs.lua, settings.lua, disabled_defaults.lua or any of your other custom files.
------- End of Simplerr error -------


the defaultteam is set and I checked and made sure that the job's code was correct
Gamemode.DefaultTeam = TEAM_CR

TEAM_CR = DarkRP.createJob("Clone Recruit (Needs Training!)", {
color = Color(0, 0, 0, 255),
model = {"models/player/asgclonewars/clone_cadet/clone_cadet.mdl"},
description = [[You are a clone recruit get training, and become a clone trooper. Get out there soldier!]],
weapons = {"weapon_752_dc15strainingnodmg"},
command = "cr",
max = 0,
salary = 5,
admin = 0,
PlayerSpawn = function(ply) ply:SetArmor(15) end,
category = "Clone",})

and I changed the citizen team to be enabled and I opened it and none of my custom jobs where working only the citizen team was please help D:

Also here are my jobs.lua

local GAMEMODE = GAMEMODE or GM

--[[---------------------------------------------------------------------------
DarkRP custom jobs
------------------------------------------------------------------------------]]

--EOD Troopers

TEAM_EODCO = DarkRP.createJob("EOD Commander", {
color = Color(255, 162, 0, 255),
model = {"models/npc/asgclonewars/eod_commander/eod_commander.mdl"},
description = [[You are the EOD Commander. Make sure that the troops disarm the bombs and mines in order to avoid more clone casualties.]],
weapons = {"weapon_752_dc17","weapon_752_dlt19","weapon_swrc_det","climb_swep2","repair_tool"},
command = "eodco",
max = 1,
salary = 50,
admin = 0,
PlayerSpawn = function(ply) ply:SetHealth(500) ply:SetMaxHealth(500) ply:SetArmor(200) end,
category = "EOD",})

TEAM_EOD = DarkRP.createJob("EOD Trooper", {
color = Color(255, 162, 0, 255),
model = {"models/player/asgclonewars/eod_trooper/eod_trooper.mdl"},
description = [[You are the EOD Trooper. Disarm bombs to help save lives, and cripple the separatists attacks!]],
weapons = {"weapon_752_dc17","weapon_752_dc15a","climb_swep2","repair_tool"},
command = "eod",
max = 6,
salary = 15,
admin = 0,
PlayerSpawn = function(ply) ply:SetArmor(150) end,
category = "EOD",})


--EOD Troopers

--Clone Troopers


TEAM_CR = DarkRP.createJob("Clone Recruit (Needs Training!)", {
color = Color(0, 0, 0, 255),
model = {"models/player/asgclonewars/clone_cadet/clone_cadet.mdl"},
description = [[You are a clone recruit get training, and become a clone trooper. Get out there soldier!]],
weapons = {"weapon_752_dc15strainingnodmg"},
command = "cr",
max = 0,
salary = 5,
admin = 0,
PlayerSpawn = function(ply) ply:SetArmor(15) end,
category = "Clone",})

TEAM_CT = DarkRP.createJob("Clone Trooper", {
color = Color(0, 0, 0, 255),
model = {"models/player/trooper/cctrooper.mdl"},
description = [[You are a clone trooper. Keep training, and get out there soldier!]],
weapons = {"weapon_752_dc15s"},
command = "clone",
max = 0,
salary = 10,
admin = 0,
PlayerSpawn = function(ply) ply:SetArmor(75) end,
category = "Clone",})


--Clone Troopers

--BDA Trooper

TEAM_BDA = DarkRP.createJob("BDA Trooper", {
color = Color(0, 0, 0, 255),
model = {"models/player/tcg/starwars/assassin/moros/assassinmoros.mdl"},
description = [[You are an elite trooper!]],
weapons = {"weapon_752_dc15s","gauss_rifle","weapon_752_dc17","weapon_752_dlt19"},
command = "bda",
max = 0,
salary = 10,
admin = 0,
PlayerSpawn = function(ply) ply:SetHealth(350) ply:SetMaxHealth(350) ply:SetArmor(150) end,
category = "Clone",})

--BDA Trooper


--Medics

TEAM_MEDIC = DarkRP.createJob("Clone Medic", {
color = Color(255, 0, 0, 255),
model = {"models/player/testm/cmedic.mdl"},
description = [[You are a clone medic, keep your brothers healthy. Be ready, to go in the front lines to save more lives!]],
weapons = {"weapon_fists","med_kit","weapon_752_dc15s","darkrp_defibrillator"},
command = "medic",
max = 4,
salary = 10,
admin = 0,
PlayerSpawn = function(ply) ply:SetArmor(50) end,
category = "Medics",})

TEAM_MEDICCO = DarkRP.createJob("Medic Commander", {
color = Color(255, 0, 0, 255),
model = {"models/player/medicc/cmedic c.mdl"},
description = [[You are a clone medic, keep your brothers healthy. Be ready, to go in the front lines to save more lives! Keep your clones up to date on medical treatments.]],
weapons = {"weapon_fists","med_kit","weapon_752_dc15a","weapon_752_dc17","darkrp_defibrillator"},
command = "medicco",
max = 1,
salary = 50,
admin = 0,
PlayerSpawn = function(ply) ply:SetHealth(300) ply:SetMaxHealth(300) ply:SetArmor(100) end,
category = "Medics",})

--Medics


--212th

TEAM_212THCO = DarkRP.createJob("212th Commander", {
color = Color(253, 192, 0, 255),
model = {"models/player/testccc/ccody.mdl"},
description = [[You are a 212th's Commander. Lead your troops to the front lines, under the command of the Republic, or the Jedi generals.]],
weapons = {"weapon_fists","weapon_752_dc15a","weapon_752_dc17"},
command = "212thco",
max = 1,
salary = 50,
admin = 0,
PlayerSpawn = function(ply) ply:SetHealth(500) ply:SetMaxHealth(500) ply:SetArmor(150) end,
category = "212th",})

TEAM_212THCAPT = DarkRP.createJob("212th Captain", {
color = Color(253, 192, 0, 255),
model = {"models/player/sgg/starwars/clonetrooper_212nd.mdl"},
description = [[You are a 212th's Captain. Help your commander lead your brothers to the front lines, and fight the droid army in honor!]],
weapons = {"weapon_fists","weapon_752_dc15a","weapon_752_dc17"},
command = "212thcapt",
max = 1,
salary = 25,
admin = 0,
PlayerSpawn = function(ply) ply:SetHealth(300) ply:SetMaxHealth(300) ply:SetArmor(200) end,
category = "212th",})

TEAM_212TH = DarkRP.createJob("212th Trooper", {
color = Color(253, 192, 0, 255),
model = {"models/player/212th/c212th trooper.mdl"},
description = [[You are a 212th's Commander. Follow your brothers to the front lines, and fight the droid army in honor!]],
weapons = {"weapon_fists","weapon_752_dc15a"},
command = "212th",
max = 7,
salary = 15,
admin = 0,
PlayerSpawn = function(ply) ply:SetHealth(125) ply:SetMaxHealth(125) ply:SetArmor(100) end,
category = "212th",})


--212th


--104th

TEAM_104THCO = DarkRP.createJob("104th Commander", {
color = Color(60, 95, 118, 255),
model = {"models/player/wolffe/ccgi wolffe.mdl"},
description = [[You are 104th's Commander. Lead your troops ]],
weapons = {"weapon_fists","climb_swep2","weapon_752_dc15a","weapon_752_dc17"},
command = "104thco",
max = 1,
salary = 50,
admin = 0,
PlayerSpawn = function(ply) ply:SetHealth(500) ply:SetMaxHealth(500) ply:SetArmor(200) end,
category = "104th",})

TEAM_104THCAPT = DarkRP.createJob("104th Captain", {
color = Color(60, 95, 118, 255),
model = {"models/player/104thlt/c104thlt.mdl"},
description = [[You are 104th's Captain. Help your commander lead the troops. Keep an eye on the troops and your surroundings.]],
weapons = {"weapon_fists","climb_swep2","weapon_752_dc15a","weapon_752_dc17"},
command = "104thcapt",
max = 1,
salary = 25,
admin = 0,
PlayerSpawn = function(ply) ply:SetHealth(350) ply:SetMaxHealth(350) ply:SetArmor(100) end,
category = "104th",})

TEAM_104TH = DarkRP.createJob("104th Trooper", {
color = Color(60, 95, 118, 255),
model = {"models/player/testgr/c104th trooper.mdl"},
description = [[You are a 104th's Trooper. Follow your Commander, and Captain into combat and fight on the front lines.]],
weapons = {"weapon_fists","climb_swep2","weapon_752_dc15a"},
command = "104th",
max = 7,
salary = 15,
admin = 0,
PlayerSpawn = function(ply) ply:SetHealth(125) ply:SetMaxHealth(125) ply:SetArmor(100) end,
category = "104th",})


--104th


--Shock


TEAM_CGCO = DarkRP.createJob("Shock Commander", {
color = Color(255, 0, 0, 255),
model = {"models/player/fox/ccfox.mdl"},
description = [[You are a Shock Commander. Lead your troops. Arrest clones who break rules.]],
weapons = {"weapon_fists","climb_swep2","weapon_752_dc15a","weapon_752_dc17","arrest_stick","unarrest_stick","stunstick","weapon_cuff_elastic"},
command = "cgco",
max = 1,
salary = 50,
admin = 0,
PlayerSpawn = function(ply) ply:SetHealth(500) ply:SetMaxHealth(500) ply:SetArmor(200) end,
category = "Shock",})

TEAM_CGCAPT = DarkRP.createJob("Shock Captain", {
color = Color(255, 0, 0, 255),
model = {"models/player/deviss/ccdeviss.mdl"},
description = [[You are the Shock Captain. Help your commander control the troops.]],
weapons = {"weapon_fists","climb_swep2","weapon_752_dc15a","weapon_752_dc17","arrest_stick","unarrest_stick","stunstick","weapon_cuff_elastic"},
command = "cgcapt",
max = 1,
salary = 25,
admin = 0,
PlayerSpawn = function(ply) ply:SetHealth(350) ply:SetMaxHealth(350) ply:SetArmor(100) end,
category = "Shock",})

TEAM_CGSGT = DarkRP.createJob("Shock Sergeant", {
color = Color(255, 0, 0, 255),
model = {"models/player/csf/csf.mdl"},
description = [[You are a Shock Trooper Sergeant. Keep an eye on the Republic's troops! Follow your commanders orders.]],
weapons = {"weapon_fists","climb_swep2","weapon_752_dc15a","weapon_752_dc17","arrest_stick","unarrest_stick","stunstick","weapon_cuff_elastic"},
command = "cgsgt",
max = 3,
salary = 20,
admin = 0,
PlayerSpawn = function(ply) ply:SetHealth(150) ply:SetMaxHealth(150) ply:SetArmor(100) end,
category = "Shock",})

TEAM_CG = DarkRP.createJob("Shock Trooper", {
color = Color(255, 0, 0, 255),
model = {"models/player/cguard/cgi cguard.mdl"},
description = [[You are a Shock Trooper. Keep all the clones in check, and save VIP.]],
weapons = {"weapon_fists","climb_swep2","weapon_752_dc15a","stunstick","weapon_cuff_elastic"},
command = "cg",
max = 4,
salary = 15,
admin = 0,
PlayerSpawn = function(ply) ply:SetArmor(100) end,
category = "Shock",})


--Shock


--Galatic Marines

TEAM_GMCO = DarkRP.createJob("Commander Bacara", {
color = Color(213, 0, 255, 255),
model = {"models/player/sgg/starwars/clonetrooper_bacara.mdl"},
description = [[You are the Galactic Marine Commander. Lead your troops to the front lines, be an example for clones to follow!]],
weapons = {"weapon_752_dc15a","weapon_fists","weapon_752_dc15sa","weapon_752_dc15s","stunstick","climb_swep2","weapon_avpflamer","commando_knife"},
command = "gmco",
max = 1,
salary = 60,
admin = 0,
PlayerSpawn = function(ply) ply:SetHealth(500) ply:SetMaxHealth(500) ply:SetArmor(200) end,
category = "Galactic Marines",})

TEAM_GMCAPT = DarkRP.createJob("Galactic Marine Captain", {
color = Color(255, 0, 250, 255),
model = {"models/player/asgclonewars/custom_marine/custom_marine.mdl"},
description = [[You are Galactic Marine Captain. Help your commander lead the troops, and in combat.]],
weapons = {"weapon_752_dc17","weapon_fists","weapon_lasermgun","weapon_752_dc15a","climb_swep2"},
command = "gmcapt",
max = 1,
salary = 25,
admin = 0,
PlayerSpawn = function(ply) ply:SetHealth(300) ply:SetMaxHealth(300) ply:SetArmor(100) end,
category = "Galactic Marines",})


--Galatic Marines


--Jedi

TEAM_Kenobi = DarkRP.createJob("Obi-Wan Kenobi", {
color = Color(131, 76, 0, 255),
model = {"models/player/b4p/b4p_obiwan/obiwan.mdl"},
description = [[You are Obi-Wan Kenobi. You lead 212th along with Commander Cody.]],
weapons = {"weapon_lightsaber","climb_swep2"},
command = "obiwan",
max = 1,
salary = 15,
admin = 0,
PlayerSpawn = function(ply) ply:SetHealth(5500) ply:SetMaxHealth(5500) ply:SetArmor(250) end,
category = "Jedi",})

TEAM_PADAWAN = DarkRP.createJob("Padawan", {
color = Color(116, 67, 0, 255),
model = {"models/animus/padawanv2/v2_padawan_03.mdl","models/animus/padawanv2/v2_padawan_04.mdl","models/animus/padawanv2/v2_padawan_05.mdl","models/animus/padawanv2/v2_padawan_07.mdl","models/animus/padawanv2/v2_padawan_09.mdl"},
description = [[You are a Padawan. Find a Jedi Master to train you, in order to become a Jedi Knight.]],
weapons = {"weapon_lightsaber"},
command = "padawan",
max = 4,
salary = 1,
admin = 0,
PlayerSpawn = function(ply) ply:SetHealth(750) ply:SetMaxHealth(750) end,
category = "Jedi",})

TEAM_JediKnight = DarkRP.createJob("Jedi Knight", {
color = Color(116, 67, 0, 255),
model = {"models/animus/jedirobesv2/v2_jedirobes_07.mdl","models/animus/jedirobesv2/v2_jedirobes_03.mdl","models/animus/jedirobesv2/v2_jedirobes_04.mdl","models/animus/jedirobesv2/v2_jedirobes_05.mdl","models/animus/jedirobesv2/v2_jedirobes_09.mdl"},
description = [[You are a Jedi Knight under the Jedi counsel. Help bring peace to the galaxy, and to the force. Listen to Jedi Grand Masters, and Masters, they are wiser than most.]],
weapons = {"weapon_lightsaber","climb_swep2","weapon_fists"},
command = "jediknight",
max = 4,
salary = 1,
admin = 0,
PlayerSpawn = function(ply) ply:SetHealth(1500) ply:SetMaxHealth(1500) ply:SetArmor(50) end,
category = "Jedi",})




--Jedi


--Admiral

TEAM_ADM = DarkRP.createJob("Admiral", {
color = Color(0, 62, 255, 255),
model = {"models/player/scifi_bill.mdl"},
description = [[This is a Rank and job for the Game Masters.]],
weapons = {"weapon_752_dc17","weapon_fists","gmod_tool","weapon_physgun"},
command = "admiral",
max = 3,
salary = 35,
admin = 0,
category = "Staff",})


--Admiral


--41st Trooper

TEAM_41STCO = DarkRP.createJob("41st Commander", {
color = Color(12, 78, 5, 255),
model = {"models/player/testg/cgi gree.mdl"},
description = [[You are a 41st Commander, work with your captain to keep the troops alive and fighting on the front lines.]],
weapons = {"weapon_fists","climb_swep2","weapon_752_dc15a","weapon_752_dc17"},
command = "41stco",
max = 1,
salary = 50,
admin = 0,
PlayerSpawn = function(ply) ply:SetHealth(500) ply:SetMaxHealth(500) ply:SetArmor(200) end,
category = "41st",})

TEAM_41STCAPT = DarkRP.createJob("41st Captain", {
color = Color(12, 78, 5, 255),
model = {"models/player/nines/nines.mdl"},
description = [[You are a 41st Captain. Follow your commanders orders. Keep the troops alive and fighting on the front lines.]],
weapons = {"weapon_fists","climb_swep2","weapon_752_dc15a","weapon_752_dc17"},
command = "41stcapt",
max = 1,
salary = 25,
admin = 0,
PlayerSpawn = function(ply) ply:SetHealth(350) ply:SetMaxHealth(350) ply:SetArmor(100) end,
category = "41st",})

TEAM_41ST = DarkRP.createJob("41st Trooper", {
color = Color(12, 78, 5, 255),
model = {"models/player/41st/c41st.mdl"},
description = [[You are a 41st Trooper. Follow your commanders orders, and work with your brothers in the front lines to secure victory, for the Republic!]],
weapons = {"weapon_fists","weapon_752_dc15a"},
command = "41st",
max = 7,
salary = 15,
admin = 0,
PlayerSpawn = function(ply) ply:SetHealth(125) ply:SetMaxHealth(125) ply:SetArmor(100) end,
category = "41st",})

--41st

--501st Trooper

TEAM_501STCAPT = DarkRP.createJob("501st Captain", {
color = Color(0, 76, 255, 255),
model = {"models/player/test/rex.mdl"},
description = [[You are a 501st Captain, work with your Commander to keep the troops fighting on the front lines.]],
weapons = {"weapon_fists","climb_swep2","weapon_752_dc17dual"},
command = "501stcapt",
max = 1,
salary = 50,
admin = 0,
PlayerSpawn = function(ply) ply:SetHealth(350) ply:SetMaxHealth(350) ply:SetArmor(100) end,
category = "501st",})

TEAM_501STCO = DarkRP.createJob("501st Commander", {
color = Color(0, 76, 255, 255),
model = {"models/player/501stlt/c501stlt.mdl"},
description = [[You are a 501st Commmander. Follow your generals orders. Work with the 501st captain to keep the troops alive]],
weapons = {"weapon_fists","climb_swep2","weapon_752_dc15a","weapon_752_dc17"},
command = "501stco",
max = 1,
salary = 25,
admin = 0,
PlayerSpawn = function(ply) ply:SetHealth(500) ply:SetMaxHealth(500) ply:SetArmor(200) end,
category = "501st",})

TEAM_501ST = DarkRP.createJob("501st Trooper", {
color = Color(0, 76, 255, 255),
model = {"models/player/501st/c501st.mdl"},
description = [[You are a 501st Trooper. Follow your commanders orders. For the Republic!]],
weapons = {"weapon_fists","weapon_752_dc15a"},
command = "501st",
max = 8,
salary = 15,
admin = 0,
PlayerSpawn = function(ply) ply:SetHealth(125) ply:SetMaxHealth(125) ply:SetArmor(100) end,
category = "501st",})

TEAM_501STMEDIC = DarkRP.createJob("501st Medic", {
color = Color(0, 76, 255, 255),
model = {"models/player/501st/c501st.mdl"},
description = [[You are a 501st Trooper. Follow your commanders orders. For the Republic!]],
weapons = {"weapon_fists","weapon_752_dh17","med_kit","darkrp_defibrillator"},
command = "501stmedic",
max = 1,
salary = 15,
admin = 0,
PlayerSpawn = function(ply) ply:SetHealth(125) ply:SetMaxHealth(125) ply:SetArmor(100) end,
category = "501st",})


--501st Trooper


--91st Troopers

TEAM_91STCO = DarkRP.createJob("91st Commander", {
color = Color(151, 60, 0, 255),
model = {"models/player/ponds/ponds.mdl"},
description = [[You are a 91st Commander, work with your captain to keep the troops alive and fighting on the front lines.]],
weapons = {"weapon_fists","climb_swep2","weapon_752_dc15a","weapon_752_dc17"},
command = "91stco",
max = 1,
salary = 50,
admin = 0,
PlayerSpawn = function(ply) ply:SetHealth(500) ply:SetMaxHealth(500) ply:SetArmor(200) end,
category = "91st",})

TEAM_91STCAPT = DarkRP.createJob("91st Captain", {
color = Color(151, 60, 0, 255),
model = {"models/player/91lt/91lt.mdl"},
description = [[You are a 91st Captain. Follow your commanders orders. Keep the troops alive and fighting on the front lines.]],
weapons = {"weapon_fists","climb_swep2","weapon_752_dc15a","weapon_752_dc17"},
command = "91stcapt",
max = 1,
salary = 25,
admin = 0,
PlayerSpawn = function(ply) ply:SetHealth(350) ply:SetMaxHealth(350) ply:SetArmor(100) end,
category = "91st",})

TEAM_91ST = DarkRP.createJob("91st Trooper", {
color = Color(151, 60, 0, 255),
model = {"models/player/91st/91st.mdl"},
description = [[You are a 91st Trooper. Follow your commanders orders, and work with your brothers in the front lines to secure victory, for the Republic!]],
weapons = {"weapon_fists","weapon_752_dc15a"},
command = "91st",
max = 7,
salary = 15,
admin = 0,
PlayerSpawn = function(ply) ply:SetHealth(125) ply:SetMaxHealth(125) ply:SetArmor(100) end,
category = "91st",})


--91st Troopers


--Senate Commando

TEAM_SC = DarkRP.createJob("Senate Commando", {
color = Color(29, 0, 255, 255),
model = {"models/player/asgclonewars/senate_commando/senate_commando.mdl"},
description = [[You are a senate commando. Protect the highest rank on, ship with you life.]],
weapons = {"weapon_752_dc15a","weapon_752_kyd21","omnishield","weapon_cuff_elastic"},
command = "senate",
max = 4,
salary = 50,
admin = 0,
PlayerSpawn = function(ply) ply:SetHealth(750) ply:SetMaxHealth(750) ply:SetArmor(250) end,
category = "Senate Commando",})

TEAM_SCCO = DarkRP.createJob("Senate Commando Commander", {
color = Color(29, 0, 255, 255),
model = {"models/player/asgclonewars/senate_commando/senate_commando.mdl"},
description = [[You are a senate commando Commander. Protect the highest rank on, ship with you life.]],
weapons = {"weapon_752_dc15a","weapon_752_kyd21","omnishield","weapon_cuff_elastic"},
command = "senateco",
max = 1,
salary = 100,
admin = 0,
PlayerSpawn = function(ply) ply:SetHealth(1500) ply:SetMaxHealth(1500) ply:SetArmor(250) end,
category = "Senate Commando",})

-- Senate Commando



-- Commando

TEAM_COMMANDO = DarkRP.createJob("Commando", {
color = Color(0, 0, 0, 255),
model = {"models/player/sgg/starwars/clone_commando.mdl"},
description = [[Just a Commando. Join a commando squad in order to better the republic.]],
weapons = {"weapon_752_dc15sa","weapon_752_dc17m_br","weapon_swrc_det","commando_knife","climb_swep2"},
command = "commando",
max = 5,
salary = 200,
admin = 0,
PlayerSpawn = function(ply) ply:SetHealth(500) ply:SetMaxHealth(500) ply:SetArmor(100) end,
category = "Commandos",})

TEAM_COMMANDOGREGOR = DarkRP.createJob("Clone Commando Gregor", {
color = Color(0, 0, 0, 255),
model = {"models/player/star wars/gregor/clone_commando_gregor.mdl"},
description = [[A highly elite clone commando]],
weapons = {"weapon_752_dc15sa","weapon_752_dc17m_br","weapon_swrc_det","commando_knife","climb_swep2","weapon_752_e60r"},
command = "commandog",
max = 5,
salary = 200,
admin = 0,
PlayerSpawn = function(ply) ply:SetHealth(500) ply:SetMaxHealth(500) ply:SetArmor(100) end,
category = "Commandos",})

-- Commando



-- Pilots

TEAM_PILOT = DarkRP.createJob("Pilot", {
color = Color(67, 146, 82, 255),
model = {"models/player/sgg/starwars/clonetrooper_pilot.mdl"},
description = [[Pilots help turn the tides of battle from the air. They have permission to fly ships of all kinds.]],
weapons = {"weapon_fists","weapon_752_de10"},
command = "pilot",
max = 3,
salary = 50,
admin = 0,
PlayerSpawn = function(ply) ply:SetArmor(75) end,
category = "Pilots",})
--
TEAM_PILOTCAPT = DarkRP.createJob("Pilot Captain", {
color = Color(67, 146, 82, 255),
model = {"models/player/sgg/starwars/clonetrooper_pilot.mdl","models/player/scifi_female_02.mdl"},
description = [[Pilots help turn the tides of battle from the air. They have permission to fly ships of all kinds. You lead the other pilots.]],
weapons = {"weapon_fists","weapon_752_de10","repair_tool"},
command = "pilotcapt",
max = 1,
salary = 100,
admin = 0,
PlayerSpawn = function(ply) ply:SetArmor(100) end,
category = "Pilots",})


--Pilots


--ARF

TEAM_ARFCO = DarkRP.createJob("ARF Commander", {
color = Color(139, 130, 130, 255),
model = {"models/player/tcg/starwars/arf/commander/arfcommander.mdl","models/player/wraith/wraith.mdl"},
description = [[You are commander of ARF. Lead your troops and take out the CIS Droids. Lead your soilders into battle!]],
weapons = {"climb_swep2","weapon_fists","dc17grapple","weapon_752_dc15a","weapon_camo"},
command = "arfco",
max = 1,
salary = 250,
admin = 0,
PlayerSpawn = function(ply) ply:SetHealth(500) ply:SetMaxHealth(500) ply:SetArmor(250) end,
category = "ARF",})

TEAM_ARFCAPT = DarkRP.createJob("ARF Captain", {
color = Color(139, 130, 130, 255),
model = {"models/player/tcg/starwars/arf/captain/arfcaptain.mdl","models/player/wraith/wraith.mdl"},
description = [[Work with your Commander, help lead troops. Also help spot objectives.]],
weapons = {"climb_swep2","weapon_fists","dc17grapple","weapon_752_dc15a","weapon_camo"},
command = "arfcapt",
max = 1,
salary = 200,
admin = 0,
PlayerSpawn = function(ply) ply:SetHealth(350) ply:SetMaxHealth(350) ply:SetArmor(200) end,
category = "ARF",})

TEAM_ARF = DarkRP.createJob("ARF Trooper", {
color = Color(139, 130, 130, 255),
model = {"models/player/tcg/starwars/arf/arftrooper.mdl","models/player/41a/41a.mdl"},
description = [[This is an ARF Trooper.]],
weapons = {"climb_swep2","weapon_fists","dc17grapple","weapon_752_dc15s","weapon_camo"},
command = "arf",
max = 6,
salary = 100,
admin = 0,
PlayerSpawn = function(ply) ply:SetHealth(125) ply:SetMaxHealth(125) ply:SetArmor(100) end,
category = "ARF",})

--ARF

--327th Star Corps

TEAM_327THSC = DarkRP.createJob("327th Star Corps", {
color = Color(139, 130, 130, 255),
model = {"models/player/tcg/starwars/arf/arftrooper.mdl","models/player/41a/41a.mdl"},
description = [[327th Star Corps Trooper.]],
weapons = {"climb_swep2","weapon_fists","dc17grapple","weapon_752_dc15s","weapon_camo"},
command = "327thsc",
max = 6,
salary = 100,
admin = 0,
PlayerSpawn = function(ply) ply:SetHealth(125) ply:SetMaxHealth(125) ply:SetArmor(100) end,
category = "327th",})

--327th Star Corps
--[[---------------------------------------------------------------------------
Define which team joining players spawn into and what team you change to if demoted
---------------------------------------------------------------------------]]
GAMEMODE.DefaultTeam = TEAM_CR
--[[---------------------------------------------------------------------------
Jobs that are hitmen (enables the hitman menu)
---------------------------------------------------------------------------]]
Oneleg
Staff
Staff
Posts: 225
Joined: Sat Apr 05, 2014 10:48 pm

Re: [Help] GAMEMODE.DefaultTeam is running a lua error even when it is correct

Post by Oneleg »

A simple work-around to this would be changing TEAM_CR to TEAM_CITIZEN and making TEAM_CITIZEN the default. Also make sure to disable the default Citizen in the DarkRP Configuration if you use this work-around.
Post Reply