SA-MP Forums Archive
Multi Coloured "SendClientMessage" - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Multi Coloured "SendClientMessage" (/showthread.php?tid=352173)



Multi Coloured "SendClientMessage" - vIBIENNYx - 18.06.2012

Okay, what I have is this..

pawn Код:
stock AdminStatusToName(playerid)
{
    new status[128];
    switch(astatus[playerid])
    {
        case 0:
        {
            status = "{0xCC333333}Roleplaying";
        }
        case 1:
        {
            status = "{0x33663333}Administrating";
        }
        case 2:
        {
            status = "{0xFFCC9999}Away from Keyboard";
        }
    }
    return status;
}
^^ That was used to TRY and change the colour of a part of a string, this is the string code

pawn Код:
command(admins, playerid, params[])
{
    new str[128], found = 0;
    if(loggedin[playerid] == 0) return SendClientMessage(playerid, 0x66666666, "You must be logged in perform commands");
    SendClientMessage(playerid, 0xFFFFFFFF, "-------- Admins Online -------");
    for(new i = 0; i != MAX_PLAYERS; i++)
    {
        if(PVar[i][alevel] > 0)
        {
           
            format(str, sizeof(str), "%s, %s (ID %d) - %s.", AdminLevelToName(i), RemoveUnderScore(i), i, AdminStatusToName(i));
            SendClientMessage(playerid, 0xFFFFFFFF, str);
            found = 1;
        }
    }
    if(found == 0)
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "There are no admins online");
    }
    SendClientMessage(playerid, 0xFFFFFFFF, "-----------------------------------");
    return 1;
}



Re: Multi Coloured "SendClientMessage" - FUNExtreme - 18.06.2012

You can't do it after you format it...

The colours are part of the string you format


Re: Multi Coloured "SendClientMessage" - vIBIENNYx - 18.06.2012

Quote:
Originally Posted by FUNExtreme
Посмотреть сообщение
You can't do it after you format it...

The colours are part of the string you format
Just edited main post, it's during the formatting.


Re: Multi Coloured "SendClientMessage" - FUNExtreme - 18.06.2012

Quote:
Originally Posted by vIBIENNYx
Посмотреть сообщение
Just edited main post, it's during the formatting.
Well, what you tried should work.. It doesn't?

EDIT: Embed colours look like this {FFFFFF}, there is no alpha channel