Textdraw for ScoreBoard !!problems!!
#1

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

Try using \t
Reply
#3

thx for ur answer

what do u mean by using \t ?

to write \t in front of all the %d's and %s's ?
Reply
#4

~n~

Try use
Reply
#5

~n~ is for a new line
Reply
#6

any ideas guys?
Reply
#7

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

yeah, thats a good trick
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
Reply
#9

ok, thx alot guys
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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)