03.12.2010, 18:55
I did so.
Sorry, do not know much English
Sorry, do not know much English
PHP код:
dcmd_stats(playerid,params[]) {
new string[128], pDeaths, player1, h, m, s;
new string1[128];
if(!strlen(params)) player1 = playerid;
else player1 = strval(params);
if(IsPlayerConnected(player1)) {
TotalGameTime(player1, h, m, s);
if(GetPVarInt(player1, "Deaths") == 0) pDeaths = 1; else pDeaths = GetPVarInt(player1, "Deaths");
format(string1, sizeof(string1), " Stats %s ",PlayerName2(player1));
format(string, sizeof(string), " Kills: %d \n Deaths: %d \n Ratio: %0.2f \n Money: $%d \n Time: %d hrs %d mins %d secs ", GetPVarInt(player1,"Kills"), GetPVarInt(player1,"Deaths"), Float:GetPVarInt(player1,"Kills")/Float:pDeaths,GetPlayerMoney(player1), h, m, s);
return ShowPlayerDialog(playerid,991,DIALOG_STYLE_MSGBOX, string1, string,"Ok","Close");
} else return ShowPlayerDialog(playerid,990,DIALOG_STYLE_MSGBOX, "Message server", "Player Not Connected","Ok","Close");
}

