How I can do custom jobs. For a gamemode.

See I want to have custom jobs for a game mode I am currently working on. I am really loving coding and loving the learning experience.

I’m not to far into it but I have a full VGUI.

I want to make custom jobs. They don’t have to be relevant to be in my menus to select them to become them yet.

I simply want to just get custom jobs working. So I would like it to be kind of simular to darkrp, but not as much.

Can you tell me how I could go about setting up custom teams?

AddExtraTeam( “<NAME OF THE CLASS>”, Color(<red>, <Green>, <blue>, 255), “<Player model>” , [[<the description(it can have enters)>]], { “<first extra weapon>”,"<second extra weapon>", etc…}, “<chat command to become this class (WITHOUT THE “/” OR “VOTE”!)>”, <maximum amount of this team>, <the salary he gets>, 0/1/2 = public /admin only / superadmin only, <1/0/true/false Do you have to vote to become it>, TEAM: Which team you need to be to become this team)

I scammed darkrp and I cannot find code where it links this code to be recognized and know what it means.

like how it knows AddExtraTeam means to add another team ettc. I know DarkRP fairly well and lua scripting also. I just have my places I get stuck and that im not good in.

Well, every function is a function somewhere. Any gamemode function has been declared somewhere else. I suggest taking a program like WinGrep and doing a search for that function in the gamemode files and you
should find what you’re looking for.

Enjoy coding! :buddy:

Thank you, still any other help would be lovely to addon.

Terror, it’s in the shared file, believe me. It’s probably at the top, maybe not - but it’s in there.

The thing which you copy pasted into your thread, is the “how to use”, with comments.

Ah, screw it. I’ma download DarkRP and find it for you… hold on


I was right, top of the file:

[lua]RPExtraTeams = {}
function AddExtraTeam( Name, color, model, Description, Weapons, command, maximum_amount_of_this_class, Salary, admin, Vote, Haslicense, NeedToChangeFrom)
if not Name or not color or not model or not Description or not Weapons or not command or not maximum_amount_of_this_class or not Salary or not admin or Vote == nil then
local text = "One of the custom teams is wrongly made! Attempt to give name of the wrongly made team!(if it’s nil then I failed):
" … tostring(Name)
hook.Add(“PlayerSpawn”, “TeamError”, function(ply)
if ply:IsAdmin() then ply:ChatPrint("WARNING: "…text) end
local CustomTeam = {name = Name, model = model, Des = Description, Weapons = Weapons, command = command, max = maximum_amount_of_this_class, salary = Salary, admin = admin or 0, Vote = tobool(Vote), NeedToChangeFrom = NeedToChangeFrom, Haslicense = Haslicense}
table.insert(RPExtraTeams, CustomTeam)
team.SetUp(#RPExtraTeams, Name, color)
local Team = #RPExtraTeams
if SERVER then
timer.Simple(0.1, function(CustomTeam) AddTeamCommands(CustomTeam) end, CustomTeam)
return Team

There it is. Have fun

Well, there was this addon for gmod that automatically creates player classes. I’m not “really” into Lua coding, and the addon sometimes does not work.

Here it is:

And also, Busymonkey, how do u add that syntax highligter on a post?

Class makers have nothing to do with actually registering them. Also use [lua] tags for the syntax.

[lua ][/lua ] tags (without the spaces)

Someone doesn’t know about [noparse][noparse][/noparse][/noparse] tags :smile:



Me testing [noparse] tags :confused: They didnt do anything? (o.O)

Well, anyways; @ OP:

Have you solved your problem?