23.06.2013, 03:59
Me dк um doce agora :]
pawn Код:
stock TopPlayersOnline(playerid)
{
static TopDoScore[1000];
while(Percorrido < 10) {
for(new i; i < 500; i++) if(IsPlayerConnected(i)) {
if(GetPlayerScore(i) > Valor_Maximo[Percorrido] && TopFoi[i] == false) {
GetPlayerName(i,PlayerMelhor[Percorrido],24);
Valor_Maximo[Percorrido] = GetPlayerScore(i);
TopFoi[i] = true;
}
}
Percorrido++;
}
for(new a; a < 500; a++) if(IsPlayerConnected(a)) TopFoi[a] = false;
Percorrido = 0;
for(new i; i < 10;i++) {
if(PlayerMelhor[i][0] != EOS) {
format(string_format,128,"{FF00FF}[ %d ] {FFFFFF}- {00FF00}%s {FFFFFF}| {FF0000}Score: %d\n",i+1,PlayerMelhor[i],Valor_Maximo[i]);
strcat(TopDoScore, string_format);
//SendClientMessage(playerid,0xC9170EFF,string_format);
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
Valor_Maximo[i] = -1;
}
}
ShowPlayerDialog(playerid, DIALOG_Rank, DIALOG_STYLE_MSGBOX, "{FF0000}Rank Dos Jogadores {00FF00}Online", TopDoScore, "Fechar", "");
}