DarkRP group chat help

I’m made two new classes for my DarkRP gamemode, I don’t know how to make it so TEAM_MAFIAL and TEAM_MAFIA to talk in a group chat or with an agenda, can anyone tell me where and/or how to script this without changing original files?

No flaming on how bad DarkRP is or anything please.

Well I think you can make custom agendas in the new DarkRP version. I am not sure tho.

Okay?

yh the new version of dark rp has a group chat and an agenda as well u do in mobboss /agenda i think

That’s not what I’m asking either…

Ok well you can either update, or be awkward and get someone else to help you with it.

Personally its always better to update and apply any changes you have to the updated version.

I’m on the svn version, Im just trying to make an agenda and group chat for a new mafia…

To make an agenda, you need to edit Shared.lua, the same place you put your classes. Check the bottom of the file for directions and examples.

As for the group chat, you will need to make changes to main.lua. Open that file and find
[lua]local function GroupMsg(ply, args)
if args == “” then return “” end
local DoSay = function(text)
if text == “” then return end
local t = ply:Team()
local audience = {}

            if t == TEAM_POLICE or t == TEAM_CHIEF or t == TEAM_MAYOR then
                    for k, v in pairs(player.GetAll()) do
                            local vt = v:Team()
                            if vt == TEAM_POLICE or vt == TEAM_CHIEF or vt == TEAM_MAYOR then table.insert(audience, v) end
                    end
            elseif t == TEAM_MOB or t == TEAM_GANG then
                    for k, v in pairs(player.GetAll()) do
                            local vt = v:Team()
                            if vt == TEAM_MOB or vt == TEAM_GANG then table.insert(audience, v) end
                    end
            end

            for k, v in pairs(audience) do
                    local col = team.GetColor(ply:Team())
                    TalkToPerson(v, col, LANGUAGE.group..ply:Nick(),Color(255,255,255,255), text, ply)
            end
    end
    return args, DoSay

end
AddChatCommand("/g", GroupMsg)
[/lua]
Between end and elseif, paste the following, and edit it for your teams.
[lua] elseif t == TEAM_MAFIAL or t == TEAM_MAFIA then
for k, v in pairs(player.GetAll()) do
local vt = v:Team()
if vt == TEAM_MAFIAL or vt == TEAM_MAFIA then table.insert(audience, v) end
end
[/lua]