pawn Код:
dcmd_stats(playerid,params[])
{
new str[512], pDeaths, player1, h, m, s;
if(!strlen(params)) player1 = playerid;
else player1 = strval(params);
if(!IsPlayerConnected(player1)) return SendClientMessage(playerid, red, "ERROR: Player Not Connected!");
TotalGameTime(player1, h, m, s);
if(AccInfo[player1][Deaths] == 0) pDeaths = 1;
else pDeaths = AccInfo[player1][Deaths];
format(str, sizeof(str), "Player Statistics\n\t%s (ID: %d)", PlayerName2(player1), player1);
format(str, sizeof(str), "%s\tSkinID: %d\n", str, GetPlayerSkin(player1));
format(str, sizeof(str), "%s\tScore: %d\n", str, GetPlayerScore(player1));
format(str, sizeof(str), "%s\tKills: %d\n", str, AccInfo[player1][Kills]);
format(str, sizeof(str), "%s\tDeaths: %d\n", str, AccInfo[player1][Deaths]);
format(str, sizeof(str), "%s\tRatio: %d\n", str, Float:AccInfo[player1][Kills]/Float:pDeaths);
format(str, sizeof(str), "%s\tMoney: $%d\n", str, GetPlayerMoney(player1));
format(str, sizeof(str), "%s\tPing: $%d\n", str, GetPlayerPing(player1));
format(str, sizeof(str), "%s\tTime Login: %d hours %d minutes %d seconds\n", str, h, m, s);
ShowPlayerDialog(playerid, 8435, DIALOG_STYLE_MSGBOX, "Player Statistics", str, "OK", "");
return 1;
}