28.03.2011, 06:02
Код:
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; }