Quote:
Originally Posted by Yaa
PHP код:
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
PlayerTextDrawColor(playerid, Textdraw[playerid][id], idtag);
}
}
return 1;
}
|
I already tried and didn't work.
Quote:
Originally Posted by NaS
You might want to also add break; into the loop, it doesn't have to continue after the color was found.
Furthermore, your colors miss an Alpha value.
Hex format for colors is RRGGBBAA.
You can also just remove the idtag variable (and every line it is used) and uncomment PlayerTextDrawColor(...), then it'll work as expected.
|
It works, I didn't know it was necessary to use transparency.
Thanks for the suggestion about the break... I didn't thought about that.
If I remove idtag it won't work, as I need to return something