Textdraw box doesnt get cut at end of text
#1

So my textdraw box doesnt stop after my text... I tried changing the size of the string. But it still is not cutting.

Anyone occuring the same? :S if yes tell me how you fixed it :S
Reply
#2

What do you mean by stop after my text?
Reply
#3

Well this:


Uploaded with ImageShack.us
it shows the Fine text but after that it keeps showing the box
While it has to be cut off when there isnt any text :S
Reply
#4

Quote:
Originally Posted by thimo
Посмотреть сообщение
Well this:


Uploaded with ImageShack.us
it shows the Fine text but after that it keeps showing the box
While it has to be cut off when there isnt any text :S
I don't think it anchored to the text. Could you provide the code?
Reply
#5

The creating:
pawn Код:
//Fineboard
    Fineboard[playerid] = TextDrawCreate(500.0, 200.0, " ");
    TextDrawUseBox(Fineboard[playerid], 1);
    TextDrawBoxColor(Fineboard[playerid], 0x00000066);
    TextDrawFont(Fineboard[playerid], 2);
The setting:
pawn Код:
public GlobalTimer(playerid)
{
    for(new a = 0; a < MAX_PLAYERS; a++)
    {
        if(IsPlayerConnected(a))
        {
            SavePlayer(a);
            //Location viewer
            new Zone[MAX_ZONE_NAME], string[128], string2[5]; //setup local variables
            GetPlayer2DZone(a, Zone, MAX_ZONE_NAME); //Get players zone
            format(string, sizeof(string), "%s", Zone); // Setup the format
            TextDrawSetString(APlayerData[a][Location], string); // set the textdraw to string
            //Fines textdraw HERE ITS GETTING SET
            if(APlayerData[a][Fines] > 0)
            {
                TextDrawShowForPlayer(a, Fineboard[a]);
                format(string2, sizeof(string2), "Fines: $%i", APlayerData[a][Fines]);
                TextDrawSetString(Fineboard[a], string2);
            }
        }
    }
    return 1;
}
That is the code. This problem also happends at my speedometer
Reply
#6

Nothing i didnt set the text size.. .Thats all i got...
Reply
#7

How to set it then? I saw the wiki about it ... But i dont understand how it works :S
Reply
#8

You need to set a text size for textdraw background to assume it's size.
Reply
#9

Example for this textdraw please? Thanks
Reply
#10

Can anyone make an example? Please
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)