15.10.2013, 10:42
i don't now how to fit this into the textdraw.
here is the code
do any body know how to fix this in the above code?
thank you.
here is the code
pawn Код:
public UpDateTextDraw(playerid)
{
new
playerScores[MAX_PLAYERS][rankingEnum],
index
;
for(new i; i != MAX_PLAYERS; ++i)
{
if(IsPlayerConnected(i) && !IsPlayerNPC(i))
{
playerScores[index][player_Score] = GetPlayerScore(i);
playerScores[index++][player_ID] = i;
}
}
GetPlayerHighestScores(playerScores, 0, index);
new
score_Text[256] = "~n~",
player_Name[20]
;
for(new i; i < 5; ++i)
{
if(i < index)
{
GetPlayerName(playerScores[i][player_ID], player_Name, sizeof(player_Name));
format(score_Text, sizeof(score_Text), "%s~n~~b~%d. ~w~%s ~r~%d", score_Text, i + 1, player_Name, playerScores[i][player_Score]);
}
else
format(score_Text, sizeof(score_Text), "%s~n~~b~%d.", score_Text, i + 1);
}
TextDrawSetString(text_Top5[1], score_Text);
TextDrawShowForAll(text_Top5[1]);
TextDrawShowForAll(text_Top5[0]);
return 1;
}
thank you.