Textdraw update
#1

hi,

why this textdraw just doesnt change?
I want to show the scoreboard at the end of a round with the RoundKills and Deaths.

pawn Код:
new RoundDeaths[MAX_PLAYERS];
new RoundKills[MAX_PLAYERS];

//OnGameModeInit

My TextDraw is created here...

//OnPlayerDeath

RoundDeaths[playerid]++;
RoundKills[killerid]++;

//OnPlayerDisconnect

RoundDeaths[playerid] = 0;
RoundKills[playerid] = 0;

////My round changing function///
ShowScoreBoardOnEnd(playerid);

//my stock function

stock ShowScoreBoardOnEnd(playerid)
{
GetPlayerName(TotalPlayersEnd[0], string, sizeof(string));
format(string, sizeof(string), "~r~1.  ~w~%s    ~r~%d  ~b~%d", string,RoundsKills[playerid],RoundDeaths[playerid]);
TextDrawShowForAll(RoundEndStats1);
TextDrawSetString(Text:RoundEndStats1, string);
}
It just says my name but kills and deaths stay 0 and 0 all the time.
Wheres the problem?
Pls help once again
Reply
#2

pawn Код:
TextDrawSetString(Text:RoundEndStats1, string);
//TextDrawSetString should be above TextDrawShowForAll
TextDrawShowForAll(RoundEndStats1);
Reply
#3

thx for ur answer but thats not the problem
Reply
#4

Hope this helps

pawn Код:
stock ShowScoreBoardOnEnd(playerid)
{
    format(string, sizeof(string), "~r~1.  ~w~%s    ~r~%d  ~b~%d",PlayerName(playerid),RoundsKills[playerid],RoundDeaths[playerid]);
    TextDrawSetString(Text:RoundEndStats1, string);
    TextDrawShowForAll(RoundEndStats1);
}
pawn Код:
PlayerName( playerid )
{
    new name[MAX_PLAYER_NAME];
    GetPlayerName( playerid, name, sizeof( name ) );
    return name;
}
PS DO you want your textdraw show for all? Just wondering..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)