Stats in Dialog
#9

Its not updating the time and money properly.


Quote:

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's Statistics -|",PlayerName2(player1));
new statstring[200];
format(statstring, sizeof(statstring), "Kills: [%d] \nDeaths: [%d] \nRatio: [%0.2f] \nMoney: [$%d] \nTime: [%d] hrs [%d] mins [%d] secs ", AccInfo[player1][Kills], AccInfo[player1][Deaths], Float:AccInfo[player1][Kills]/FloatDeaths,GetPlayerMoney(player1), h, m, s);
ShowPlayerDialog(playerid,9999,0,string,statstring ,"Close","");
return 0;
} else
return SendClientMessage(playerid, red, "ERROR: Player Not Connected!");
}

Reply


Messages In This Thread
Stats in Dialog - by kbalor - 22.06.2012, 07:50
Re: Stats in Dialog - by [MM]RoXoR[FS] - 22.06.2012, 08:22
Re: Stats in Dialog - by kbalor - 22.06.2012, 09:11
Re: Stats in Dialog - by [MM]RoXoR[FS] - 22.06.2012, 09:17
Re: Stats in Dialog - by kbalor - 22.06.2012, 10:04
Re: Stats in Dialog - by nilanjay - 22.06.2012, 10:08
Re: Stats in Dialog - by kbalor - 22.06.2012, 11:00
Re: Stats in Dialog - by kbalor - 22.06.2012, 16:32
Re: Stats in Dialog - by kbalor - 22.06.2012, 16:35
Re: Stats in Dialog - by Emmet_ - 22.06.2012, 16:45

Forum Jump:


Users browsing this thread: 1 Guest(s)