Displaying Stats.
#7

Код:
CMD:mystats(playerid, params[])
{
	if(IsInZone[playerid] == 1) return SendClientMessage(playerid, COLOR_RED, SERVER_BOT SERVER_ZONE);
	new string[7][256];
	new Stats[900];
	if(GetPVarInt(playerid, "Logged") == 1)
	{
 	new Float:health; GetPlayerHealth(playerid, health);
 	new Float:armour; GetPlayerArmour(playerid, armour);
 	format(string[0], 128, "Name: %s\nHealth: %.0f\nArmour: %.0f\nMoney: %i\nScore: %i\nKills: %i\nDeaths: %i\nLevel: %i\n", GetName(playerid), health, armour, GetPlayerMoney(playerid), GetPlayerScore(playerid), GetPVarInt(playerid, "Kills"), GetPVarInt(playerid, "Deaths"), GetPVarInt(playerid, "Level"));
 	format(string[1], 128, "Zones entered: %i\n Times muted: %i\n",GetPVarInt(playerid, "Zones"), GetPVarInt(playerid, "Muted"));
	format(Stats, sizeof Stats, "\n%s\n%s",string[0],string[1]);// Note, Just add a new format.
	ShowPlayerDialog(playerid, DIALOG_VIEWSTATS, DIALOG_STYLE_MSGBOX, "Account Management",Stats, "Ok", "Cancel");
    }
	return 1;
}
edit it
Reply


Messages In This Thread
Displaying Stats. - by TheYoungCapone - 28.03.2011, 00:36
Re: Displaying Stats. - by mprofitt - 28.03.2011, 00:37
Re: Displaying Stats. - by TheYoungCapone - 28.03.2011, 00:42
Re: Displaying Stats. - by -Rebel Son- - 28.03.2011, 01:56
Re: Displaying Stats. - by TheYoungCapone - 28.03.2011, 03:07
Re: Displaying Stats. - by TheYoungCapone - 28.03.2011, 03:50
Re: Displaying Stats. - by -Rebel Son- - 28.03.2011, 06:02

Forum Jump:


Users browsing this thread: 1 Guest(s)