DarkRP:CustomJobFields

From Official DarkRP Wiki
Revision as of 13:29, 2 April 2013 by FPtje (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Custom job fields

You can create custom jobs in DarkRP. However, there are many things to fiddle with. This page explains every single "field".

Example with all fields

Here's an example with all available fields filled in:

TEAM_Example = AddExtraTeam("Example team", {
	color = Color(255, 255, 255, 255),
	model = {
		"models/player/Group03/Female_01.mdl",
		"models/player/Group03/Female_02.mdl"
		},
	description = [[This text will serve as the description of
		this team.]],
	weapons = {"weapon_p2282"},
	command = "example",
	max = 3,
	salary = 45,
	admin = 0,
	vote = false,
	hasLicense = false,
	NeedToChangeFrom = TEAM_CITIZEN,
	help = "You are an example. Walk around and be exemplary.",
	customCheck = function(ply) return ply.DarkRPVars.money > 10000 end,
	modelScale = 1.2,
 
	CanPlayerSuicide = function(ply) return false end,
	PlayerCanPickupWeapon = function(ply, weapon) return true end,
	PlayerDeath = function(ply, weapon, killer) end,
	PlayerLoadout = function(ply) return true end,
	PlayerSelectSpawn = function(ply, spawn) end,
	PlayerSetModel = function(ply) return "models/player/Group03/Female_02.mdl" end,
	PlayerSpawn = function(ply) end,
	PlayerSpawnProp = function(ply, model) end,
	ShowSpare1 = function(ply) end,
	ShowSpare2 = function(ply) end
})

Field explanations