PlayerTextDrawTextSize box problem
#1

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?
Reply
#2

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.
Reply
#3

Thanks. Very useful.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)