Textdraw update - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Textdraw update (
/showthread.php?tid=219190)
Textdraw update -
BlackWolf120 - 31.01.2011
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
Re: Textdraw update -
iMonk3y - 31.01.2011
pawn Код:
TextDrawSetString(Text:RoundEndStats1, string);
//TextDrawSetString should be above TextDrawShowForAll
TextDrawShowForAll(RoundEndStats1);
Re: Textdraw update -
BlackWolf120 - 31.01.2011
thx for ur answer but thats not the problem
Re: Textdraw update -
iMonk3y - 31.01.2011
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..