some problem with textdraw string... - 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)
+--- Thread: some problem with textdraw string... (
/showthread.php?tid=517750)
some problem with textdraw string... -
DavidBilla - 06.06.2014
Well, so basically what this does is,it gets the kills of all players in the server and displays it.
When i display it through SendClientMessage,it displays the kills of all players,but if i link the textdraw string to that function only the last players name and kills is shown.
pawn Код:
stock DisplayTopKills()
{
foreach(Player,i)
{
new name[MAX_PLAYER_NAME];
SortArray(name,Kills);
{
new str[128];
GetPlayerName(i,name,sizeof(name));
format(str,sizeof(str),"%s : ~y~%i",name[i],Kills[i]);
SendClientMessageToAll(-1,str);
TextDrawShowForAll(DisplayBox);
TextDrawShowForAll(Topkills);
TextDrawShowForAll(Topdata);
TextDrawSetString(Topdata,str);
}
}
return 1;
}
Re: some problem with textdraw string... -
DavidBilla - 06.06.2014
Help please...
Re: some problem with textdraw string... -
DavidBilla - 08.06.2014
anyone can help?
Re: some problem with textdraw string... -
Konstantinos - 08.06.2014
Because it formats for the last player only. You should insert the previous text:
pawn Код:
format(str, sizeof (str), "%s%s : ~y~%i", str, name[i], Kills[i]);
Re: some problem with textdraw string... -
Koala818 - 08.06.2014
Nvm.