SA-MP Forums Archive
[Help] Textdraws.. - 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: [Help] Textdraws.. (/showthread.php?tid=204508)



[Help] Textdraws.. - Lutsen - 29.12.2010

Hey, ive made something to get the 3players with the highest score in the dm, which will be shown in a textdraw.
I have it like this:
Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
    if (val < zdmcount[i])//;
    {
        val = zdmcount[i];
        id = i;
    }
}
GetPlayerName(id, stringg, sizeof(stringg));
format(stringg, sizeof(stringg), "%s Kills: %d", stringg,zdmcount[id]);
SendClientMessageToAll(COLOR_BLUE,stringg);
TextDrawShowForPlayer(i,Text:TextdrawZombo1);
TextDrawShowForPlayer(i,Text:TextdrawZombotp);
TextDrawSetString(Text:TextdrawZombo1, stringg);
And it works, the name and his kills will be shown in the textdraw, only problem is how to make a 2nd and 3rd top-player? who will be under him. Textdraws already made. But just a function how to find the next best players..


Respuesta: [Help] Textdraws.. - [M]xFire - 29.12.2010

pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
    if (val < zdmcount[i] && i != id)//;
    {
        val = zdmcount[i];
        id2 = i;
    }
}
=D Maybe this