[Ajuda] Variavel
#2

pawn Code:
public MostrarRankGRANA(playerid)
{
    new
        aname[MAX_PLAYER_NAME],
        playerScores[MAX_PLAYERS][rankingEnum],
        index
    ;
    for(new i; i != MAX_PLAYERS; ++i)
    {
        if(IsPlayerConnected(i) && !IsPlayerNPC(i) && pAdmin[i] == 0)
        {
            GetPlayerName(i, aname, sizeof(aname));
            format(file2, sizeof(file2), PASTA_CONTAS, aname);
            playerScores[index][player_Score] = (GetPlayerGrana(i)+dini_Int(file2, "SaldoBancario"));
            playerScores[index++][player_ID] = i;
        }
    }  
    GetPlayerHighestGrana(playerScores, 0, index);  
    new
        score_Text[1000] = "",
        player_Name[MAX_PLAYER_NAME]
    ;
    for(new i; i < 5; ++i)
    {
        if(i < index)
        {
            GetPlayerName(playerScores[i][player_ID], player_Name, sizeof(player_Name));
            format(score_Text, sizeof(score_Text), "%s\n{FFFFFF}» {00A600}%dє{FFFFFF} Lugar -> {0CC6F5}%s {FFFFFF}- Grana {00A600}$%d", score_Text, i + 1, player_Name, playerScores[i][player_Score]);
        }
        else
        {
            format(score_Text, sizeof(score_Text), "%s\n{FFFFFF}» {FF0000}%dє{FFFFFF} Lugar ->  {FFB85C}Ninguem", score_Text, i + 1);
        }
     }
     ShowPlayerDialog(playerid, 2742, DIALOG_STYLE_MSGBOX, "{FFFFFF}Top 5{00A600} Grana", score_Text, "Fechar", "");
     return true;
}
Reply


Messages In This Thread
Variavel - by Geremias1533 - 15.01.2019, 20:45
Re: Variavel - by InsaneBR - 15.01.2019, 21:17
Re: Variavel - by Geremias1533 - 15.01.2019, 23:21

Forum Jump:


Users browsing this thread: 1 Guest(s)