Ulysses Stuff > Suggestions

Chat prefixes/tags/titles/names

<< < (2/2)

JamminR:
Psst. Megiddo. Stop waking up posts from 2012.
:P

MrPresident:
He didn't. :D As far as I can tell.

JamminR:
Oops.
Psst. Hey, Dimstar, no need to wake up posts from 2012.
(Though, admittedly, your post does answer a question...even if it was over a year ago asked)

MrPresident:
The only thing I can think of is people find these posts using the search feature (Either through the website or through a search engine). Ergo: You should be quite thrilled Jam! :D

Wully616:
I have this script on my server, no idea where I got it, but it seems to work fine except some of the colours of the ranks come out white. I haven't really tried investigating it because it hasn't bothered me before.



prefix.lua in garrysmod/addons/ulx/lua/ulx/modules/cl


--- Code: ---    function insertChatTags(ply, msg)
            if ply:IsValid() then
                    local ply_team = ply:Team()
                    local team_name = team.GetName( ply_team )
                   
                    --local h,s,v = ColorToHSV( team.GetColor( ply_team ) )
                    --local comp_col = HSVToColor( 180-h, s, v )
                   
                   
                    --PHX-Server specifics
                    if ( team_name == "Leader Builder" ) then

                            comp_col = Color(55,126,206)
                    elseif ( team_name == "Admin Builder" ) then

                            comp_col = Color(79,115,158)       
                    elseif ( team_name == "Wullys Builder" ) then
 
                            comp_col = Color(0,178,255)
                    elseif ( team_name == "Ultimate Builder" ) then

                            comp_col = Color(121,0,221)
                    elseif ( team_name == "Precision Builder" ) then

                            comp_col = Color(0,147,12)
                    elseif ( team_name == "Loyal Builder" ) then

                            comp_col = Color(173,0,23)
                    elseif ( team_name == "Creative Builder" ) then

                            comp_col = Color(0,13,132)
                    elseif ( team_name == "Novice Builder" ) then

                            comp_col = Color(255,242,0)
                    elseif ( team_name == "Bronze Builder" ) then

                            comp_col = Color(135,81,0)   
                    elseif ( team_name == "Silver Builder" ) then

                            comp_col = Color(135,135,135)   
                    elseif ( team_name == "Gold Builder" ) then
                         
                            comp_col = Color(237,197,0)   
                    elseif ( team_name == "Respected" ) then
                            comp_col = Color(169,186,198)                               
                    elseif ( team_name == "user" ) then   
                            comp_col = Color(100,100,100)
                            team_name = "New Builder"
                    else
                            comp_col = Color(255, 255, 255)
                    end
                   
                   
                    chat.AddText( team.GetColor( ply_team ), "[",comp_col, team_name,team.GetColor( ply_team ), "] ", ply:GetName(), color_white, ": ", msg )
                    return true
            end
    end
     
    hook.Add( "OnPlayerChat", "ulx_chattags", insertChatTags )

--- End code ---

Navigation

[0] Message Index

[*] Previous page

Go to full version