Textdraw for ScoreBoard !!problems!! -
BlackWolf120 - 04.02.2011
hi,
ive created a top score board that shows up after a round has ended.
Now theres one textdraw for every player.
It shows the name of the player, his amount of kills and deaths.
But theres one problem:
well, its a bit difficult to explain...
I want the numbers that show the kills and deaths of all the players to be exactly among each other.
Like this:
pawn Код:
Player1 2Kills 3Deaths
Player2 2Kills 3Deaths
Player3 2Kills 3Deaths
But with the texdraw ive created theres a problem as soon as the names of the players have a different length.
Like this:
pawn Код:
Tom 2Kills 3Deaths
Mike Thomson 2Kills 3Deaths
Snake of Death 2Kills 3Deaths
And this looks just ugly
![Sad](images/smilies/sad.gif)
So how can i prevent this little bug??
Id be happy about some tips.
pawn Код:
RoundEndStats1 = TextDrawCreate(3.000000, 156.000000, "1. --");
TextDrawBackgroundColor(RoundEndStats1, 255);
TextDrawFont(RoundEndStats1, 2);
TextDrawLetterSize(RoundEndStats1, 0.230000, 0.799999);
TextDrawColor(RoundEndStats1, -1);
TextDrawSetOutline(RoundEndStats1, 1);
TextDrawSetProportional(RoundEndStats1, 1);
TextDrawUseBox(RoundEndStats1, 1);
TextDrawBoxColor(RoundEndStats1, -926378346);
TextDrawTextSize(RoundEndStats1, 219.000000, -1.000000);
GetPlayerName(TotalPlayersEnd[0], string, sizeof(string));
format(string, sizeof(string), "~r~1. ~w~%s ~r~%d ~b~%d", name,kills[playerid],deaths[playerid]);//what should be changed/added here???
TextDrawShowForAll(RoundEndStats1);
regards....
Re: Textdraw for ScoreBoard !!problems!! -
Krx17 - 04.02.2011
Try using \t
Re: Textdraw for ScoreBoard !!problems!! -
BlackWolf120 - 04.02.2011
thx for ur answer
what do u mean by using \t ?
to write \t in front of all the %d's and %s's ?
Re: Textdraw for ScoreBoard !!problems!! -
Ricop522 - 04.02.2011
~n~
Try use
Re: Textdraw for ScoreBoard !!problems!! -
BlackWolf120 - 04.02.2011
~n~ is for a new line
Re: Textdraw for ScoreBoard !!problems!! -
BlackWolf120 - 01.03.2011
any ideas guys?
Re: Textdraw for ScoreBoard !!problems!! -
Stigg - 01.03.2011
Id use two textdraws side by side aligned to the right, 1 for players name and 2 for kills + Deaths.
That will keep it neat and tidy. Thats just what i'd do.
Re: Textdraw for ScoreBoard !!problems!! -
BlackWolf120 - 01.03.2011
yeah, thats a good trick
![Wink](images/smilies/wink.png)
But isnt there another solution so i dont have to do all the textdraws again?
a command like /t to kinda freeze the position of some textdraws elements or sth.?
id be so happy if someone can help me or at least tell me if sth. like this is even possible.
thx in advance
Re: Textdraw for ScoreBoard !!problems!! -
BlackWolf120 - 01.03.2011
ok, thx alot guys
![Tongue](images/smilies/razz.gif)
then ive got alot of work to do now
but if even a pro scripter like ****** says that this is hard and maybe even unpossible i think im supposed to change all my textdraws
thx again for ur help
regards.