TopScoreCreate
#6

hi,
ive created 2 texdraws that are shown to all players (a top 2 board )
The 2 players with the most kills currently playing in the server shall be displayed.
But the texdraw only shows my name,kills and rank.
Im listed in both texdraws but i want that the player with the most kills is shown in the first td and the second best killer in the second td.
How to do that with the given code?
Pls help.


pawn Код:
new TotalScores[3];
new PlayerScore[2];
for(new player;player<MAX_PLAYERS;player++)
{
PlayerScore[0]=kills[playerid]; //kills
for(new place;place<sizeof(TotalScores);place++)
    {
        if(PlayerScore[0]>TotalScores[place])
        {
            strins(TotalScores,PlayerScore,place);
            place=sizeof(TotalScores);
        }
    }


new stringa[80];
GetPlayerName(playerid, stringa, sizeof(stringa));
format(stringa, sizeof(stringa), "~r~1.  ~w~%s  ~r~%d ~w~Kills  ~y~%s", stringa,kills[playerid],RankName[pRank[playerid]]);
TextDrawShowForPlayer(playerid,Top52);
TextDrawSetString(Text:Top52, stringa);
new stringb[80];
GetPlayerName(playerid, stringb, sizeof(stringb));
format(stringb, sizeof(stringb), "~r~2.  ~w~%s  ~r~%d ~w~Kills  ~y~%s", stringb,kills[playerid],RankName[pRank[playerid]]);
TextDrawShowForPlayer(playerid,Top53);
TextDrawSetString(Text:Top53, stringb);

}
Reply


Messages In This Thread
TopScoreCreate - by BlackWolf120 - 06.01.2011, 05:27
Re: TopScoreCreate - by DarrenThayer - 06.01.2011, 08:21
Re: TopScoreCreate - by Joe Staff - 06.01.2011, 08:36
Re: TopScoreCreate - by DarrenThayer - 06.01.2011, 08:39
Re: TopScoreCreate - by BlackWolf120 - 06.01.2011, 18:21
Re: TopScoreCreate - by BlackWolf120 - 08.01.2011, 22:37
Re: TopScoreCreate - by MadeMan - 08.01.2011, 23:48
Re: TopScoreCreate - by BlackWolf120 - 10.01.2011, 18:10
Re: TopScoreCreate - by BlackWolf120 - 11.01.2011, 16:43
Re: TopScoreCreate - by BlackWolf120 - 14.01.2011, 17:58

Forum Jump:


Users browsing this thread: 6 Guest(s)