[Ajuda] status
#10

Alterei o seu cуdigo a fim de tentar resolver o problema existente .



Fiz testes e o mesmo funcionou devidamente:


pawn Код:
CMD:stats(playerid, params[])
{
    if(isnull(params)) return SendClientMessage(playerid, Cinza, "{FF0000}<!> {C3C3C3} stats <playerID>");
    new pID = strval(params);
    if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, Vermelho, "PlayerID desconectado ou nгo existe!");
    ShowStats(pID);
    return true;
}



stock ShowStats(playerid)
{
    new idg = PlayerInfo[playerid][idgang];
    new LinhaDialog[128];
    static TotalDialog[450];
    TotalDialog[0] = EOS;
    new JogadorNome[25];
    GetPlayerName(playerid, JogadorNome, sizeof(JogadorNome));
    format(LinhaDialog, 128, "%s's Stats:\n\n", JogadorNome);
    strcat(TotalDialog, LinhaDialog);
    format(LinhaDialog, 128, "Level: %d\nKills: %d\nDeaths: %d\nK/D: %d\n\n", PlayerInfo[playerid][Level], PlayerInfo[playerid][Kills], PlayerInfo[playerid][Deaths], floatround(floatdiv(PlayerInfo[playerid][Kills], PlayerInfo[playerid][Deaths]), floatround_floor));
    strcat(TotalDialog, LinhaDialog);
    format(LinhaDialog, 128, "Duels Ganhos: %d\nDuels Perdidos: %d\nRace Points: %d\n\n", PlayerInfo[playerid][DuelsWon], PlayerInfo[playerid][DuelsLost], PlayerInfo[playerid][RacePoints]);
    strcat(TotalDialog, LinhaDialog);
    format(LinhaDialog, 128, "Gang: %s\nLider: %s\nGangs Kills: %d\nGang Deaths: %d", Gang[idg][gangname], Gang[idg][Lider], Gang[idg][Kills], Gang[idg][Deaths]);
    strcat(TotalDialog, LinhaDialog);
    #define DialogStats 256  //Modifique se o ID de dialog jб estiver sendo usado.
    ShowPlayerDialog(playerid, DialogStats, DIALOG_STYLE_MSGBOX, "Status", TotalDialog, "OK", "");
    return true;
}


Espero ter ajudado .
Reply


Messages In This Thread
status - by Lucas_HenryK - 15.01.2015, 13:29
Re: status - by DiegoLeo - 15.01.2015, 13:35
Re: status - by ReyMysterio - 15.01.2015, 13:36
Re: status - by DiegoLeo - 15.01.2015, 13:38
Re: status - by Lucas_HenryK - 15.01.2015, 13:38
Re: status - by ReyMysterio - 15.01.2015, 13:41
Re: status - by DiegoLeo - 15.01.2015, 13:43
Re: status - by Bruno13 - 15.01.2015, 15:10
Re: status - by Lucas_HenryK - 15.01.2015, 18:47
Re: status - by rjjj - 16.01.2015, 14:28

Forum Jump:


Users browsing this thread: 1 Guest(s)