Title in Middle
#1

Is there any possibility to move the title in middle like this.

Код:
format(string, sizeof(string), "\t{008A2E}%s's {CCCCCC}Statistics",PlayerName2(player1));
Reply
#2

im sorry what title?
Reply
#3

Quote:
Originally Posted by Jonny5
Посмотреть сообщение
im sorry what title?
Here

Код:
dcmd_stats(playerid,params[])
{
    new string[256];
    new pDeaths;
    new player1, h, m, s;

    if(!strlen(params)) player1 = playerid;
    else player1 = strval(params);

    if(IsPlayerConnected(player1))
    {
        TotalGameTime(player1, h, m, s);
        if(AccInfo[player1][Deaths] == 0) pDeaths = 1;
        else pDeaths = AccInfo[player1][Deaths];
        format(string, sizeof(string), "\t{008A2E}%s's {CCCCCC}Statistics",PlayerName2(player1));
        new statstring[256];
        format(statstring, sizeof(statstring), "{99CCFF}Admin Level:  %d \n\nScore:  %d \n\nKills:  %d \n\nDeaths:  %d \n\nRatio:  %0.2f \n\nMoney:  $%d \n\nTime:  %d Hours  %d Minutes and  %d Seconds ", AccInfo[player1][Level], GetPlayerScore(playerid), AccInfo[player1][Kills], AccInfo[player1][Deaths], Float:AccInfo[player1][Kills]/Float:pDeaths, GetPlayerMoney(player1), h, m, s);
        ShowPlayerDialog(playerid,12767,DIALOG_STYLE_MSGBOX,string,statstring ,"Close","");
        return 0;
    } else
    return SendClientMessage(playerid, red, "ERROR: Player Not Connected!");
}
/t Let Lists In The Middle Or Let's say it is a TAB

When i add \t nothing happen. it dont move.
Reply
#4

pawn Код:
format(string, sizeof(string), "___________{008A2E}%s's {CCCCCC}Statistics___________",PlayerName2(player1));
Ingenious!
Reply
#5

You mean random messages on screen?
Reply
#6

Quote:
Originally Posted by Grand_Micha
Посмотреть сообщение
pawn Код:
format(string, sizeof(string), "___________{008A2E}%s's {CCCCCC}Statistics___________",PlayerName2(player1));
Ingenious!
thats one way

the other is with the format

this page "for printf" but will work for format
explains the different ways to pad a formatted string


http://www.codingunit.com/printf-for...rmatted-output

know the dialog title can only be 64 will help.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)