DarkRP:Multiple model choices for jobs

From Serenity Servers Support

Adding jobs with multiple model choices, is pretty much standard by now. It can very easily be added into the game, simply by adding a model table instead of defining it.

Where you would normally use something like this:

model = "models/player/monk.mdl"

You should use a table, like this instead:

	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"
},

In practice it would look somewhat like this:

TEAM_DRUGDEALER = DarkRP.createJob("Drug Dealer", {
	color = Color(75, 75, 75, 255),
	model = {
		"models/player/Group03/Female_01.mdl",
		"models/player/Group03/Female_02.mdl",
		"models/player/group03/male_01.mdl",
		"models/player/Group03/Male_02.mdl"},
	description = [[Sell drugs to the lovely citizens in this fine town!]],
	weapons = {"weapon_deagle"}, --Lets give our dealer a weapon, in case the deal goes south.
	command = "drugdealer", 
	max = 2,
	salary = 45,
	admin = 0,
	vote = false,
	hasLicense = false
})

Banner
Promo