SA-MP Forums Archive
PlayerTextDrawTextSize box problem - 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: PlayerTextDrawTextSize box problem (/showthread.php?tid=364954)



PlayerTextDrawTextSize box problem - SomebodyAndMe - 01.08.2012

Hey, i'm making a speedometer for my include that's being released within a month or 2.

But I'm having some issues with the box size, I'm trying to make it like a big box with multiple information in it.

Do I have to use \n in the format with multiple lines, or is there a different way to do this?

Current codes:

Some pieces are commented because of some testing ingame

pawn Код:
new PlayerText:playerZone[MAX_PLAYERS];
new PlayerText:playerSpeed[MAX_PLAYERS];
new PlayerText:playerHealth[MAX_PLAYERS];
new PlayerText:playerFuel[MAX_PLAYERS];
new PlayerText:playerHeight[MAX_PLAYERS];


    playerZone[playerid] = CreatePlayerTextDraw(playerid, 460.00, 380.00, " ");
    PlayerTextDrawSetOutline(playerid, playerZone[playerid], 1);
    PlayerTextDrawUseBox(playerid, playerZone[playerid], 1);
    PlayerTextDrawBoxColor(playerid, playerZone[playerid], 0x00000066);
    PlayerTextDrawTextSize(playerid, playerZone[playerid], 640, 480);

    playerSpeed[playerid] = CreatePlayerTextDraw(playerid, 460.00, 390.00, " ");
    PlayerTextDrawSetOutline(playerid, playerSpeed[playerid], 1);
    //PlayerTextDrawUseBox(playerid, playerSpeed[playerid], 1);
    //PlayerTextDrawBoxColor(playerid, playerSpeed[playerid], 0x00000066);
   
    playerHealth[playerid] = CreatePlayerTextDraw(playerid, 460.00, 400.00, " ");
    PlayerTextDrawSetOutline(playerid, playerHealth[playerid], 1);
    //PlayerTextDrawUseBox(playerid, playerHealth[playerid], 1);
//  PlayerTextDrawBoxColor(playerid, playerHealth[playerid], 0x00000066);
   
    playerFuel[playerid] = CreatePlayerTextDraw(playerid, 460.00, 410.00, " ");
    PlayerTextDrawSetOutline(playerid, playerFuel[playerid], 1);
    //PlayerTextDrawUseBox(playerid, playerFuel[playerid], 1);
//  PlayerTextDrawBoxColor(playerid, playerFuel[playerid], 0x00000066);
   
    playerHeight[playerid] = CreatePlayerTextDraw(playerid, 459.00, 420.00, " ");
    PlayerTextDrawSetOutline(playerid, playerHeight[playerid], 1);
    //PlayerTextDrawUseBox(playerid, playerHeight[playerid], 1);
//  PlayerTextDrawBoxColor(playerid, playerHeight[playerid], 0x00000066);
So how can I make like a big box, where everything fits in it?


Re: PlayerTextDrawTextSize box problem - Virtual1ty - 01.08.2012

Quote:
Originally Posted by SomebodyAndMe
Посмотреть сообщение
Hey, i'm making a speedometer for my include that's being released within a month or 2.

But I'm having some issues with the box size, I'm trying to make it like a big box with multiple information in it.

Do I have to use \n in the format with multiple lines, or is there a different way to do this?

Current codes:
....

So how can I make like a big box, where everything fits in it?
In GameTexts and TextDraws you use ~n~ to make a new line, but you don't have to, use TextDrawLetterSize in combination with TextDrawTextSize for a box resized just the way you want it, you can also use Zamaroht's TextDraw Editor if you aren't already.


Re: PlayerTextDrawTextSize box problem - SomebodyAndMe - 01.08.2012

Thanks. Very useful.