Jump to content

Chat color


ViRuZGamiing

Recommended Posts

I'm now using this code i've made but it doesn't work;

function chatPrefix( message, messageType ) 
    if messageType == 0 then 
            local playerTeam = aclGroupGetName("Admin")   
            if playerTeam then 
            local r, g, b = getTeamColor ( playerTeam ) 
            local theName = getAccountName (getPlayerAccount (source)) 
            outputChatBox( "[CR]".. theName ..": " .. message, getRootElement(), r, g, b, true ) 
            outputServerLog("CHAT: "..theName..": "..message) 
            cancelEvent() 
            else 
            local theName = getAccountName (getPlayerAccount (source)) 
            outputChatBox( theName ..": " .. message, getRootElement(), 255, 255,255, true ) 
            outputServerLog("CHAT: "..theName..": "..message) 
            cancelEvent() 
            end 
    end 
end 
addEventHandler( "onPlayerChat", getRootElement(), chatPrefix )   
  
  
function blockChatMessage() 
    cancelEvent() 
end 
  
addEventHandler( "onPlayerChat", getRootElement(), blockChatMessage ) 

I outputs my message twice in chat in once in color and once in white.. No [CR] infront of my name also.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...