Chat tags for deathrun?

So I have a deathrun server and I have tried using chat tags but all it does is says runner or death next to their names.

So can anyone help me out here and tell me if there is one so it says the prefix like admin/mod ect.

Uhh… There is one by Mr. Gash… It doesn’t need to be for deathrun. As long as its serverside.

[editline]30th June 2013[/editline]

Yea… Here we go:


if SERVER then
	AddCSLuaFile( "tags.lua" )
end

local cWhite = Color( 255, 255, 255 )
local cBlack = Color( 0, 0, 0 )
local cRed = Color( 255, 0, 0 )
local cGreen = Color( 0, 255, 0 )
local cBlue = Color( 0, 0, 255 )
local cLightBlue = Color( 0, 255, 255 )

local CTags = {}

-- CTags[Number] = { "Tag of group", "group-name", Color( of, the, tag ) }
CTags[1] = { "Super Admin", "superadmin", cRed }
CTags[2] = { "Admin", "admin", cGreen }
CTags[3] = { "Donor", "donor", cBlue }
CTags[4] = { "Guest", "user", cWhite }
CTags[5] = { "Dev", "dev", cBlack }
CTags[6] = { "Owner", "owner", cLightBlue }

local function ChatTags( a, b, c, d )

	local C = {}

	if d then
		table.insert( C, Color( 255, 30, 40 ) )
		table.insert( C, "*DEAD* " )
	end

	if c then
		table.insert( C, Color( 30, 160, 40 ) )
		table.insert( C, "(TEAM) " )
	end

	if a:IsValid() then

		for _,v in pairs( CTags ) do
			if a:IsUserGroup( v[2] ) then
				table.insert( C, cWhite )
				table.insert( C, "[" )

				table.insert( C, v[3] )
				table.insert( C, v[1] )

				table.insert( C, cWhite )
				table.insert( C, "] " )
			end
		end

		table.insert( C, team.GetColor( a:Team() ) )
		table.insert( C, a:Nick() )
	else
		table.insert( C, "Console" )
	end

	table.insert( C, Color( 255, 255, 255 ) )
	table.insert( C, ": "..b )

	chat.AddText( unpack( C ) )

	return true

end
hook.Add( "OnPlayerChat", "___ChatTags", ChatTags )

put it in lua/autorun and name it tags.lua

(Chat tags from Mr. Gash <3)