30.03.2014, 12:28
Try:
pawn Код:
CMD:stats (playerid, params[])
{
new str[300], giveid, AdminRank[20];
if (sscanf(params, "u", giveid)) return SendClientMessage(playerid, 0x6FFF00FF, "{F07F1D}USAGE: {BBFF00}/stats <ID>" );
if (giveid == INVALID_PLAYER_ID) return SendClientMessage(playerid, -1, ""RED"ERROR: "GREY"Invalid player ID!");
switch (PlayerInfo[giveid][Admin])
{
case 0: AdminRank = "Regular Player";
case 1: AdminRank = "Moderator";
case 2: AdminRank = "Administrator";
case 3: AdminRank = "Head Administrator";
case 4: AdminRank = "Server Owner";
}
format(str, sizeof(str), "{%06x}%s(%d) Statistics:\n\n\"STEELBLUE\"> Registration Date: "GREY"%s\n\"STEELBLUE\"> Status: \"GREY\"Level %d\n\"STEELBLUE\"> Online Time: \"GREY\"%d hours and %d minutes\"STEELBLUE\"> EXP: \"GREY\"%d\n\"STEELBLUE\"> Cash: \"GREY\"$%d\n\"STEELBLUE\"> Kills: "GREY"%d\n\"STEELBLUE\">
Deaths: \"GREY\"%d\n\"STEELBLUE\"> Weapon Set: \"GREY\"%s", (GetPlayerColor(giveid) >>> 8), GetName(giveid), giveid, PlayerInfo[giveid][RegOn], AdminRank, PlayerInfo[giveid][Hours], PlayerInfo[giveid][Minutes], GetPlayerScore(giveid), GetPlayerMoney(giveid), PlayerInfo[giveid][Kills], PlayerInfo[giveid][Deaths], WeaponSet);
ShowPlayerDialog(playerid, DIALOG_STATS, DIALOG_STYLE_MSGBOX, ""RED"Statistics", str, "OK", "");
return 1;
}