Jump to content

Problem With Chat Color =( pls help


h1ama3d

Recommended Posts

Hello ..

I have a problem in My Script ..

I want to use colors in chat

By using this code ..

function onChat ( message, messageType ) 
    if messageType == 0 then 
        local root = getRootElement() 
        cancelEvent() 
        outputChatBox ("#ffff00".. getPlayerName ( source ) .. ": #ff00ff" .. message, root, 255, 0, 0, true ) 
    end 
end 
addEventHandler ( "onPlayerChat", getRootElement(), onChat ) 

But it does not work ..

This is what shown when i use the chat

PIS17741.jpg

there is two messages :(

how to hide to original mesage?

Please help me

(Sorry for the bad English)

Edited by Guest
Link to comment
Hi h1ama3d ,

You have to find another onPlayerChat and delete the addEventHandler( "onPlayerChat", ... )

or place a return at the top of the function

i have created a new script

And i put the code inside ..

But the same problem

Please try the code and explore the error ..

Thank you

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