Skip to main content

Architecting the Social Hierarchy

Jobs represent the core mechanical foundation of the DarkRP gamemode. By correctly configuring your jobs.lua registry, you can define a unique social landscape ranging from government officials and medical staff to specialized criminal syndicates and community-specific lore roles. This guide walk you through the technical implementation of new roles while ensuring your changes are preserved across server updates.

Difficulty

Intermediate

Time

8 Minutes

Technical File Infrastructure

To ensure your custom content is not overwritten during official gamemode updates, you must implement all modifications within the DarkRP Modification addon.
  • Storage Path: /garrysmod/addons/darkrpmodification/lua/darkrp_customthings/jobs.lua

Anatomy of a Job Registry Entry

Every role in the city is defined by a specific Lua table. Below is the technical structure for a standard Law Enforcement role.
TEAM_POLICE = DarkRP.createJob("Civil Protection", {
   color = Color(25, 25, 170, 255),
   model = {"models/player/police.mdl"},
   description = [[The protector of the city. Maintain the peace and enforce the law.]],
   weapons = {"arrest_stick", "stunstick", "door_ram"},
   command = "cp",
   max = 4,
   salary = 65,
   admin = 0,
   vote = true,
   hasLicense = true,
   category = "Civil Protection",
})

Strategic Variable Breakdown

  • color: Defines the hex color of the job name in the scoreboard and chat.
  • model: Specifies the character model used by the player. You can include multiple models in the array to allow for randomized appearances.

Implementing Exclusive VIP Roles

To monetize your server or reward dedicated community members, you can restrict specific high-tier jobs to authorized user groups using a customCheck logic block.
   customCheck = function(ply) return ply:GetUserGroup() == "vip" or ply:IsAdmin() end,
   CustomCheckFailMsg = "This specialized role requires a VIP or Staff rank!"

Syntax Integrity Alert

The jobs.lua file is extremely sensitive to formatting errors. A single missing comma (,) or an unclosed bracket (}) will cause the entire script to fail. This results in the “Loot Drought” equivalent for DarkRP, where the F4 menu fails to open and every player is forcefully defaulted to the “Citizen” job. Always use a technical editor with Lua syntax highlighting and verify your console for errors after saving.

Need Extra Help?

If you encounter any issues, our support team is ready to assist:

Save on Your Hosting

Ready to get a new server? Use code KB20 at checkout for 20% off your first month!

Last Updated: January 2026 | GMod: Job market updated.