How to add custom job to existing team? (DarkRP)

So, i’m starting a new server with my friend and i’ve been editing the script. I made custom job called SWAT and i have tried to add it to Police team, so you can use police /g chat. Well, it doesn’t work. Here is part of the code from cl_init.lua


elseif string.sub(string.lower(text), 1, 3) == "/g " then
        HearMode = "group chat"
        local t = LocalPlayer():Team()
        playercolors = {}
        if t == TEAM_POLICE or t == TEAM_CHIEF or t == TEAM_MAYOR or t == TEAM_SWAT or t == TEAM_DETECTIVE then
            for k, v in pairs(player.GetAll()) do
                if v ~= LocalPlayer() then
                    local vt = v:Team()
                    if vt == TEAM_POLICE or vt == TEAM_CHIEF or vt == TEAM_MAYOR or vt == TEAM_SWAT or vt == TEAM_DETECTIVE then table.insert(playercolors, v) end
                end
            end

Also i try to add “Detective” to same group, too. I don’t know what file should i edit.

You might want to move on to cakescript, as it is much easier to do this on that.

Sorry, but we planned to use DarkRP. There is way to do this, i just wait that someone could answer. Also, there is no working Cakescript yet until G3 comes.

I thought there was a DarkRP help&support thread for these sort of threads?

I don’t think it matters.

I think it does. Almost everyone on facepunch hates DarkRP. Ask in the DarkRP thread, not here.

Everyone hates it because of the players, there is nothing wrong with script. Also, this is ROLEPLAYING thread. Noone ever helps me in Help&Support forum. I’m waiting just some help, not whining about how bad DarkRP is.

There’s a thread in the gamemodes section (I think) about DarkRP help and support.

Oh god, ok. Could moderator move this there or do i just make a new thread there?

I think it’s alright, everyone makes mistakes (including me:v:). At least, you should look for the thread somewhere in the lua or gamemodes section next time. It’s stickied.

I don’t like how it’s laid out either, the job system pisses me off a bunch, but yeah, mostly the players.

Ok, that’s it. Mode can lock this. People came here to flame about DarkRP and not to help. And i already found answer myself so lock this.

I was agreeing with you…

The DarkRP Help & Support thread used to be stickied to Roleplaying until the Roleplaying forum’s use was renovated. The DarkRP thread within Gamemode Releases would be the best place to post for support/bug reports.

Yeah, but it can be locked anyway. I solved it already. I don’t know how, i just pasted some commands to lua files.