14.12.2015, 06:50
like this?
PHP Code:
#if defined USE_STATS
CMD:stats(playerid,params[]) {
new string[128], pDeaths, player1, h, m, s;
if(isnull(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 : Level:%d\nVIP:%d\nKills:%d\nDeaths:%d\nRatio:%0.2f\nMoney:$%d\nBank:$%d\nTime:%dhrs%dmins%dsecs | ",PlayerName2(player1),PlayerInfo[player1][Level],PlayerInfo[player1][Vip], PlayerInfo[player1][Kills], PlayerInfo[player1][Deaths],Float:PlayerInfo[player1][Kills]/Float:pDeaths,GetPlayerMoney(player1),PlayerInfo[player1][bank], h, m, s);
ShowPlayerDialog(playerid,6969,DIALOG_STYLE_MSGBOX,"Stats",string,"Ok","");
return SendClientMessage(playerid, green, string);
} else return SendClientMessage(playerid, red, "Player Not Connected!");
}
#endif/