ULX Chattags

Hallo guys i just made a new chat tags script you need ULX admin mod installed.
put this lua script in your cl_init.lua made for all gamemodes:rock:

For more info add me on steam


need help please type over steam


local function AddToChat(msg)
	local col1 = Color(msg:ReadShort(), msg:ReadShort(), msg:ReadShort())

	local name = msg:ReadString()
	local ply = msg:ReadEntity()

	if name == "" then name = ply.DarkRPVars.rpname end

	local col2 = Color(msg:ReadShort(), msg:ReadShort(), msg:ReadShort())

local text = msg:ReadString()
	local rank_str, rank_col, bracket_col
	if ply:IsValid() and ply:IsPlayer() and ply:IsUserGroup("owner") then
        rank_str = "Server owner"
        rank_col = Color( 205, 92, 92 )
        bracket_col = Color( 200, 205, 50)
	elseif ply:IsValid() and ply:IsPlayer() and ply:IsUserGroup("headadmin") then
        rank_str = "HeadAdmin"
        rank_col = Color( 0, 0, 160 )
        bracket_col = Color( 50, 205, 50 )	
	elseif ply:IsValid() and ply:IsPlayer() and ply:IsUserGroup("moderator") then
        rank_str = "Mod"
        rank_col = Color( 51, 204, 255 )
        bracket_col = Color( 50, 205, 50 )
	elseif ply:IsValid() and ply:IsPlayer() and ply:IsUserGroup("respected") then
        rank_str = "Respected"
        rank_col = Color( 51, 204, 255 )
        bracket_col = Color( 50, 205, 50 )
	elseif ply:IsValid() and ply:IsPlayer() and ply:IsUserGroup("superadmin") then
        rank_str = "SA"
        rank_col = Color( 255, 69, 0 )
        bracket_col = Color( 50, 205, 50 )
    elseif ply:IsValid() and ply:IsPlayer() and ply:IsUserGroup("admin") then
        rank_str = "Admin"
        rank_col = Color( 128, 255, 0 )
        bracket_col = Color( 50, 205, 50 )
    elseif ply:IsValid() and ply:IsPlayer() and ply:IsUserGroup("vip") then
        rank_str = "VIP"
        rank_col = Color( 51, 204, 255 )
        bracket_col = Color( 50, 205, 50  )
	elseif ply:IsValid() and ply:IsPlayer() and ply:IsUserGroup("user") then
        rank_str = "User"
        rank_col = Color( 128, 255, 0 )
        bracket_col = Color( 50, 205, 50 )
    else
        rank_str = ""
        rank_col = Color( 255, 255, 255 )
    end
    if text and text ~= "" then
        chat.AddText(col1, name, bracket_col, bracket_col  and " [" or "", rank_col, rank_str, bracket_col, bracket_col and "] " or "", col2, ": "..text)
    end

    chat.PlaySound()
end
usermessage.Hook( "DarkRP_Chat", AddToChat )

-- To add more custom groups use this format
  --  elseif ply:IsValid() and ply:IsPlayer() and ply:IsUserGroup("GroupName") then
     --   rank_str = "Tags"
       -- rank_col = Color( 128, 255, 0 ) RED-GREEN-BLUE
       -- bracket_col = Color( 50, 205, 50 ) RED-GREEN-BLUE

Yeah, wrong section bro.
http://facepunch.com/forumdisplay.php?f=66

hmm thx :slight_smile:

[editline]9th July 2013[/editline]

how do i delete this thread

Only way I know: Talk to mod.

okay :slight_smile:

Funny thing, this is not meant for all gamemodes. This is only meant for DarkRP.

Does that mean it belongs in the darkrp help thread?

Cause… I mean… DarkRP posts are normally an edgy topic unless you want to get banned, or ur crying about floating money on your new home hosted dedicated server in the Help Thread.

EDIT: Yeah, sounded worse after I posted it, but not bad enough for me to regret posting