/setspawn Not Working for DarkRP

I’m having some issues with /setspawn on my DarkRP gamemode.

I have made some custom classes not being able to set clases.

Here are the classes




 TEAM_US = DarkRP.createJob("US Basic Rifleman", {
	color = Color(25, 25, 170, 255),
	model = {"models/codmw2/codmw2h.mdl", "models/codmw2/codmw2.mdl", "models/codmw2/codmw2he.mdl", "models/codmw2/codmw2hexe.mdl", "models/codmw2/codmw2hexe.mdl", "models/codmw2/codmw2m.mdl"},
	description = [[]],
	weapons = {"fas2_m4a1", "fas2_dv2", "fas2_p226"},
	command = "AR",
	max = 20,
	salary = GAMEMODE.Config.normalsalary * 1.45,
	admin = 0,
	vote = false,
	hasLicense = true,
	
})

TEAM_US = DarkRP.createJob("US Basic Designated Rifleman", {
	color = Color(25, 25, 170, 255),
	model = {"models/codmw2/codmw2h.mdl", "models/codmw2/codmw2.mdl", "models/codmw2/codmw2he.mdl", "models/codmw2/codmw2hexe.mdl", "models/codmw2/codmw2hexe.mdl", "models/codmw2/codmw2m.mdl"},
	description = [[]],
	weapons = {"fas2_m14", "fas2_dv2", "fas2_p226"},
	command = "dmr",
	max = 4,
	salary = GAMEMODE.Config.normalsalary * 1.45,
	admin = 0,
	vote = false,
	hasLicense = true,
	
})

TEAM_US = DarkRP.createJob("US Basic Sniper", {
	color = Color(25, 25, 170, 255),
	model = {"models/codmw2/codmw2h.mdl", "models/codmw2/codmw2.mdl", "models/codmw2/codmw2he.mdl", "models/codmw2/codmw2hexe.mdl", "models/codmw2/codmw2hexe.mdl", "models/codmw2/codmw2m.mdl"},
	description = [[]],
	weapons = {"fas2_m24", "fas2_dv2", "fas2_p226"},
	command = "SNP",
	max = 2,
	salary = GAMEMODE.Config.normalsalary * 1.45,
	admin = 0,
	vote = false,
	hasLicense = true,




TEAM_Spetsnaz = DarkRP.createJob("Spetsnaz Basic Rifleman", {
	color = Color(255, 0, 0, 255),
	model = {"models/mw2guy/rus/gassoldier.mdl", "models/mw2guy/rus/soldier_a.mdl", "models/mw2guy/rus/soldier_c.mdl", "models/mw2guy/rus/soldier_d.mdl", "models/mw2guy/rus/soldier_e.mdl", "models/mw2guy/rus/soldier_f.mdl"},
	description = [[]],
	weapons = {"fas2_ak47", "fas2_dv2", "fas2_m1911"},
	command = "sar",
	max = 20,
	salary = GAMEMODE.Config.normalsalary * 1.45,
	admin = 0,
	vote = false,
	hasLicense = true,
	
})

TEAM_Spetsnaz = DarkRP.createJob("Spetsnaz Basic Designated Marksman", {
	color = Color(255, 0, 0, 255),
	model = {"models/mw2guy/rus/gassoldier.mdl", "models/mw2guy/rus/soldier_a.mdl", "models/mw2guy/rus/soldier_c.mdl", "models/mw2guy/rus/soldier_d.mdl", "models/mw2guy/rus/soldier_e.mdl", "models/mw2guy/rus/soldier_f.mdl"},
	description = [[]],
	weapons = {"fas2_sks", "fas2_dv2", "fas2_m1911"},
	command = "sdmr",
	max = 4,
	salary = GAMEMODE.Config.normalsalary * 1.45,
	admin = 0,
	vote = false,
	hasLicense = true,
	
})

TEAM_Spetsnaz = DarkRP.createJob("Spetsnaz Basic Sniper", {
	color = Color(255, 0, 0, 255),
	model = {"models/mw2guy/rus/gassoldier.mdl", "models/mw2guy/rus/soldier_a.mdl", "models/mw2guy/rus/soldier_c.mdl", "models/mw2guy/rus/soldier_d.mdl", "models/mw2guy/rus/soldier_e.mdl", "models/mw2guy/rus/soldier_f.mdl"},
	description = [[]],
	weapons = {"fas2_m24", "fas2_dv2", "fas2_m1911"},
	command = "sSNP",
	max = 2,
	salary = GAMEMODE.Config.normalsalary * 1.45,
	admin = 0,
	vote = false,
	hasLicense = true,

	

These are the classes above. whenever I do /setspawn “US” for example it says team US cannot be found.

I get this is a shit gamemode and im using this simpily as a base for my gamemode.

I would like some help!

Thank you

Have you tried /setspawn TEAM_US ?

Yes I have.

[editline]4th May 2014[/editline]

Also even changing the teams to the defaults like hobo or police. They still cannot be set. Just citizen

Pretty sure its cause you have multiple team_us and spetsnaz, Try doing like team
_us1 2 3 ect ect

You should use the teams number and not the teams name.

Thank you I will try this. I used to have it set as us1 and us2 etc. But that didnt work. Ill just do team_1 and so on.

-Edit: did not work.

No yo don’t add team at all. All you do is /setspawn 3(check f1 for the right command). Citizen is by default 1.

You should use the job’s command name. So TEAM_SPETSNAZ has the command “sSNP”, try using “/setspawn ssnp”. Like other people said, make your “TEAM_*” names unique, you can’t have the same team more than once.66

I will try this. Thanks

As cyber said all teams should have a unique name and not the same because it will confuse darkrp.

No need ro reply. Next time click the “Agree” icon, because your post had absolutely no value.