/stats (DIALOG)
#1

I want to change that /stats will be shown in a dialog box. Its from the Lux Admin Script

Код:
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));
	SendClientMessage(playerid, green, string);
	format(string, sizeof(string), "Kills: [%d] | Deaths: [%d] | Ratio: [%0.2f] | Money: [$%d] | Time: [%d] hrs [%d] mins [%d] secs |", 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, COLOR_MESSAGE_RED, "* Sorry, Player Not Connected!");
}
Thanks a lot
Reply


Messages In This Thread
/stats (DIALOG) - by AwokenNeoX - 05.02.2017, 22:07
Re: /stats (DIALOG) - by Juonis - 05.02.2017, 22:26
Re: /stats (DIALOG) - by AwokenNeoX - 05.02.2017, 22:49
Re: /stats (DIALOG) - by haikalbintang - 06.02.2017, 00:57
Re: /stats (DIALOG) - by AwokenNeoX - 06.02.2017, 12:13
Re: /stats (DIALOG) - by haikalbintang - 06.02.2017, 14:05

Forum Jump:


Users browsing this thread: 1 Guest(s)