10.01.2017, 18:49
Hi, I have a problem with textdraws... With my function specifically.
Here we go, I made this function:
But, for some reason, the textdraw color doesn't change... I "refresh" the textdraw(Showing it again) but it still doesn't work.
Shall I use an enum for the array? Just like this
Thanks for reading, I hope someone help me
Here we go, I made this function:
PHP код:
#define red 1
#define green 2
#define yellow 3
#define purple 4
#define blue 5
#define orange 6
new ColorTag[][] =
{
{red, 0xFF0000},
{green, 0x00FF00},
{yellow, 0xFFFF00},
{purple, 0xBB00FF},
{blue, 0x0000FF},
{orange, 0xFFAA00}
};
PTextDrawColor(playerid, id, color)
{
new idtag;
for(new i; i < sizeof(ColorTag); i++)
{
if(color == ColorTag[i][0])
{
infoT[playerid][id][Color] = ColorTag[i][0];
//PlayerTextDrawColor(playerid, Textdraw[playerid][id], ColorTag[i][1]);
idtag = ColorTag[i][1];
printf("______________%i, %x", ColorTag[i][0], ColorTag[i][1]); //It shows perfectly the hex color, but it doesn't change color
}
}
return PlayerTextDrawColor(playerid, Textdraw[playerid][id], idtag);
}
Shall I use an enum for the array? Just like this
Thanks for reading, I hope someone help me
