3D Text Labels
#4

The problem is the string! If you try to get the hex color as a string. It wont ever work for you anywhere.

You need to get the integer value of the hex color from the string first using the function below.

pawn Код:
stock hexstr(string[]) // By ******
{
    new ret,val,i;
    if (string[0] == '0' && (string[1] == 'x' || string[1] == 'X')) i = 2;
    while (string[i])
    {
        ret <<= 4;
        val = string[i++] - '0';
        if (val > 0x09) val -= 0x07;
        if (val > 0x0F) val -= 0x20;
        if (val < 0x01) continue;
        if (val < 0x10) ret += val;
    }
    return ret;
}
EDIT:

Quote:
Originally Posted by cessil
Посмотреть сообщение
I don't see any script that changes the colour of the text, like an Update3DTextLabelText
That function can easily be made! Deleting a 3DTextLabel and Creating it again with the given color , with the same name.
Reply


Messages In This Thread
3D Text Labels - by 2KY - 17.11.2012, 03:28
Re: 3D Text Labels - by cessil - 17.11.2012, 03:50
Re: 3D Text Labels - by 2KY - 17.11.2012, 16:04
Re: 3D Text Labels - by Ballu Miaa - 17.11.2012, 16:35
Re: 3D Text Labels - by 2KY - 17.11.2012, 16:39

Forum Jump:


Users browsing this thread: 1 Guest(s)