Help with textdraws.
#4

Quote:
Originally Posted by Yaa
Посмотреть сообщение
PHP код:
PTextDrawColor(playerididcolor

    new 
idtag
    for(new 
isizeof(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(playeridTextdraw[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
Reply


Messages In This Thread
Help with textdraws. - by Whillyrez - 10.01.2017, 18:49
Re: Help with textdraws. - by Yaa - 10.01.2017, 19:49
Re: Help with textdraws. - by NaS - 10.01.2017, 20:02
Respuesta: Re: Help with textdraws. - by Whillyrez - 10.01.2017, 20:12
Re: Respuesta: Re: Help with textdraws. - by NaS - 10.01.2017, 20:15

Forum Jump:


Users browsing this thread: 1 Guest(s)