Jump to content

outPutColoredMessage? DaFuq?


'LinKin

Recommended Posts

Hello,

I've seen some stuff like this

outputColoredMessage ( "|C_PLAY|TITLE |C_1|This is coloured somehow |C_2| Another Colour now." ) 

Just wondering, what's that..?

I've browsed on google, looking after some MTA:Wiki feedback. But found nothing...

Can someone tell me how it works? because I've tried to put one line like this in a script I made, but it doesn't output anything in the chatbox.

For example; where do you define the colors for:

|C_PLAY|

|C_1|

|C_2|

Thanks.

Link to comment

It's defined function - same as "getPlayerFromNamePart" in example below :

function getPlayerFromNamePart(name) 
    if name then  
        for i, player in ipairs(getElementsByType("player")) do 
            if string.find(getPlayerName(player):lower(), tostring(name):lower(), 1, true) then 
                return player  
            end 
        end 
    end 
    return false 
end 

u can use it later in next functions . Just u have to define what's "outputColoredMessage".

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