SA-MP Forums Archive
Textdraw box doesnt get cut at end of text - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Textdraw box doesnt get cut at end of text (/showthread.php?tid=321519)



Textdraw box doesnt get cut at end of text - thimo - 27.02.2012

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


Re: Textdraw box doesnt get cut at end of text - T0pAz - 27.02.2012

What do you mean by stop after my text?


Re: Textdraw box doesnt get cut at end of text - thimo - 27.02.2012

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


Re: Textdraw box doesnt get cut at end of text - T0pAz - 27.02.2012

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?


Re: Textdraw box doesnt get cut at end of text - thimo - 27.02.2012

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


Re: Textdraw box doesnt get cut at end of text - thimo - 27.02.2012

Nothing i didnt set the text size.. .Thats all i got...


Re: Textdraw box doesnt get cut at end of text - thimo - 27.02.2012

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


Re: Textdraw box doesnt get cut at end of text - T0pAz - 27.02.2012

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


Re: Textdraw box doesnt get cut at end of text - thimo - 27.02.2012

Example for this textdraw please? Thanks


Re: Textdraw box doesnt get cut at end of text - thimo - 28.02.2012

Can anyone make an example? Please