01.04.2010, 10:34
hi i have this statse command
And i wanna to make to show in dialog not in messages something like this
but that dosent work
pawn Код:
dcmd_stats(playerid,params[])
{
new string[128];
new pDeaths;
new player1, h, m, s;
if(!strlen(params)) player1 = playerid;
else player1 = strval(params);
if(IsPlayerConnected(player1))
{
TotalGameTime(player1, h, m, s);
if(AccInfo[player1][Deaths] == 0) pDeaths = 1;
else pDeaths = AccInfo[player1][Deaths];
format(string, sizeof(string), "|- %s Statistika -|",PlayerName2(player1));
SendClientMessage(playerid, green, string);
format(string, sizeof(string), "Ubojstava: [%d] | Umiranja: [%d] | Ratio: [%0.2f] | Novci: [$%d] | Vrijeme: [%d] sati [%d] min [%d] sec |", AccInfo[player1][Kills], AccInfo[player1][Deaths], Float:AccInfo[player1][Kills]/Float:pDeaths,GetPlayerMoney(player1), h, m, s);
return SendClientMessage(playerid, green, string);
} else
return SendClientMessage(playerid, red, "Igrac nije na serveru!");
}
pawn Код:
ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"Statistika",string,"OK","Odustani");