PivityGmodStore

💼 Adding Custom Job Info

Intro

EdgeF4 has support for custom job information that will be shown in the F4 menu when viewing details about a specific job. This feature is really useful if you need to show things such as requirements for a specific job, etc. See the animation below for reference.


Rank Requirement

One of the available extra job information options is to show what rank that is required to become a certain job. This can be added by adding the field rankRequired to the job in the DarkRP configuration. The field shall be set to a text (string) with the required team name, that is encapsulated with quotation marks. See the example below.

Example:

TEAM_THIEF = DarkRP.createJob("Thief", {
color = Color(0, 0, 0, 255),
model = "models/player/robber.mdl",
description = [[You are a thief.]],
weapons = {"lockpick"},
command = "thief",
max = 2,
salary = 65,

rankRequired = "Donator",
})

Result: [Requirement] Donator Required


Level Requirement

Another of the available extra job information options is to show what level that is required to become a certain job. This can be added by adding the field level to the job in the DarkRP configuration. The field shall be set to the number of the level that is required to become the job. See the example below.

Example:

TEAM_THIEF = DarkRP.createJob("Thief", {
color = Color(0, 0, 0, 255),
model = "models/player/robber.mdl",
description = [[You are a thief.]],
weapons = {"lockpick"},
command = "thief",
max = 2,
salary = 65,

level = 10,
})

Result: [Requirement] Level 10


Custom Text Info

Another of the available extra job information options is to show a custom text information field for a specific job. This can be added by adding the field jobInfo to the job in the DarkRP configuration. The field shall be set to a text (string) with the custom information, that is encapsulated with quotation marks. See the example below.

Example:

TEAM_THIEF = DarkRP.createJob("Thief", {
color = Color(0, 0, 0, 255),
model = "models/player/robber.mdl",
description = [[You are a thief.]],
weapons = {"lockpick"},
command = "thief",
max = 2,
salary = 65,

jobInfo = "This is custom info.",
})

Result: [Info] This is custom info.


Combining Extra Job Information

You can also combine multiple different extra job information options by simply stacking them in the DarkRP configuration in the same way as shown in the previous examples. See the new example below.

TEAM_THIEF = DarkRP.createJob("Thief", {
color = Color(0, 0, 0, 255),
model = "models/player/robber.mdl",
description = [[You are a thief.]],
weapons = {"lockpick"},
command = "thief",
max = 2,
salary = 65,

rankRequired = "Donator",
level = 10,
jobInfo = "This is custom info.",
})

Result:

  1. [Requirement] Donator Required
  2. [Requirement] Level 10
  3. [Info] This is custom info.

Can't find what you're looking for?

Contact support