some problem with textdraw string...
#1

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;
}
Reply
#2

Help please...
Reply
#3

anyone can help?
Reply
#4

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]);
Reply
#5

Nvm.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)