30.05.2014, 23:11
What are you trying to do, put it in a dialog?
?
pawn Код:
#define DIALOGID_STATS 100
dcmd_stats(playerid,params[]) {
new string[180], pDeaths, player1, h, m, s;
if(!strlen(params)) player1 = playerid;
else player1 = strval(params);
if(IsPlayerConnected(player1)) {
TotalGameTime(player1, h, m, s);
if(PlayerInfo[player1][Deaths] == 0) pDeaths = 1; else pDeaths = PlayerInfo[player1][Deaths];
format(string, sizeof(string), "| %s's Stats: Kills: %d | Deaths: %d | Ratio: {38F709}%0.2f |Money: {38F709}$%d | Time: %d hrs %d mins %d secs |",PlayerName2(player1), PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths], Float:PlayerInfo[player1][Kills]/Float:pDeaths,GetPlayerMoney(player1), h, m, s);
return ShowPlayerDialog(playerid, DIALOGID_STATS, "Stats", string, "OK", "");
} else return SendClientMessage(playerid, red, "Player is not connected.");
}