/stats help
#1

Can someone please explain why is that when I do /stats it only show Total Time logged except the other first stats come?

Код:
CMD:stats(playerid,params[])
{
    SendClientMessage(playerid, whitestamp, "{FFFF00}Usage: /stats <PlayerID>");
    new id, h, m, d;
    new pName[24], pName2[24];
    GetPlayerName(playerid, pName, sizeof(pName)), GetPlayerName(id, pName2, sizeof(pName));
    sscanf(params, "u", id);
    if (isnull(params))
    {
        new seconds = gettime() - pInfo[playerid][ConnectedTime] + pInfo[playerid][TotalSecs];
        format(Jstring, sizeof(Jstring), "{ffd700}%s (ID:%d)\n\n",  pName, playerid);
        format(Jstring, sizeof(Jstring), "Score: %d\n", GetPlayerScore(playerid));
        format(Jstring, sizeof(Jstring), "Money: $%d\n", GetPlayerMoney(playerid));
        format(Jstring, sizeof(Jstring), "Kills: %d\n", pInfo[playerid][Kills]);
        format(Jstring, sizeof(Jstring), "Deaths: %d\n", pInfo[playerid][Deaths]);
        format(Jstring, sizeof(Jstring), "Ratio: %0.2f\n", Float:pInfo[playerid][Kills]/Float:pInfo[playerid][Deaths]);
        format(Jstring, sizeof(Jstring), "Total Time Logged in: %s\n", ConvertTime(seconds,m,h,d));
        return ShowPlayerDialog(playerid,DIALOG_STATS,DIALOG_STYLE_MSGBOX,"Player Stats",Jstring,"Close","");
    }
    else if(IsPlayerConnected(id))
    {
        new seconds = gettime() - pInfo[id][ConnectedTime] + pInfo[id][TotalSecs];
        format(Jstring, sizeof(Jstring), "{ffd700}%s (ID:%d) {A9C4E4}\n\nScore: %d\nMoney: $%d\nKills: %d\nDeaths: %d\nRatio: %0.2f\nTime Logged In: %s", pName2, id, GetPlayerScore(id), GetPlayerMoney(id), pInfo[id][Kills], pInfo[id][Deaths], Float:pInfo[id][Kills]/Float:pInfo[id][Deaths], ConvertTime(seconds,m,h,d));
        return ShowPlayerDialog(playerid,DIALOG_STATS,DIALOG_STYLE_MSGBOX,"Player Stats",Jstring,"Close","");
    }
    else return ShowPlayerDialog(playerid, DIALOG_STATS2, DIALOG_STYLE_MSGBOX,"Player Stats", "Player is not connected", "Close", "");
}
Reply


Messages In This Thread
/stats help - by kbalor - 30.09.2013, 18:17
Re: /stats help - by Pottus - 30.09.2013, 18:25
Re: /stats help - by kbalor - 30.09.2013, 18:36
Re: /stats help - by Pottus - 30.09.2013, 18:44
Re: /stats help - by kbalor - 30.09.2013, 18:50
Re: /stats help - by Pottus - 30.09.2013, 18:52
Re: /stats help - by kbalor - 30.09.2013, 18:59
Re: /stats help - by kbalor - 30.09.2013, 20:41
Re: /stats help - by Dragonsaurus - 30.09.2013, 21:10
Re: /stats help - by kbalor - 30.09.2013, 21:15

Forum Jump:


Users browsing this thread: 2 Guest(s)