Text Draw Color not changes
#1

Hello,on player request class I want to make that there will show different text on each skin.

So here my script
Код:
new Text:Title;

public OnPlayerRequestClass(playerid, classid)
{
    new classtitle[32];

    // Text Draws
    Title = TextDrawCreate(237.000000, 309.000000, "   ");
    TextDrawBackgroundColor(Title, 255);
    TextDrawFont(Title, 2);
    TextDrawLetterSize(Title, 0.529999, 1.800000);
    TextDrawSetOutline(Title, 0);
    TextDrawSetProportional(Title, 1);
    TextDrawSetShadow(Title, 1);

// When Selecting Skin
    switch(classid)
    {
       case 0:
       {     
       format(classtitle,sizeof(classtitle),"Grove Families");
       TextDrawSetString(Title,classtitle);
       TextDrawShowForPlayer(playerid,Title);
       // Here is my Color
       TextDrawColor(Title, COLOR_GROVE);
       }

}
But when in server am selecting ,text draw color beeing White,but should be green.Where is problem ?
Reply
#2

TextDrawSetString(Title, "~g~Grove Families");
Oh by the way, you will get problems when multiple players are in class selection at once.
Reply
#3

TextDrawColor must be before TextDrawShowForPlayer

pawn Код:
case 0:
{    
       format(classtitle,sizeof(classtitle),"Grove Families");
       TextDrawSetString(Title,classtitle);
       TextDrawColor(Title, COLOR_GROVE);
       TextDrawShowForPlayer(playerid,Title);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)