06.06.2014, 15:44
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.
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;
}