Jump to content

Chat color


ViRuZGamiing

Recommended Posts

Posted

Hi,

How can I remove the chat color? I want everyone to write in White and the Name also in white.

Thanks.

"If debugging is the process of removing software bugs, then programming must be the process of putting them in."

Posted

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.

"If debugging is the process of removing software bugs, then programming must be the process of putting them in."

  • Moderators
Posted

freeroam running?

Then freeroam also outputs.

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

Posted

So just this is enough;

function nametagColorChange ( thePlayer ) 
    setPlayerNametagColor ( thePlayer, 255, 255, 255) 
end 
  
addEventHandler ( "onResourceStart", nametagColorChange) 

"If debugging is the process of removing software bugs, then programming must be the process of putting them in."

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...