I use this.
Код:
forward ShowStats(playerid,targetid);
Код:
public ShowStats(playerid,targetid)
{
new admin = pInfo[targetid][pAdmin];
new vipp = pInfo[targetid][pVip];
new fvip[32];
if(freevip == 1) {fvip="{FFA200}Yes";}
else if(freevip == 0) {fvip="{FFA200}No";}
new kills = pInfo[targetid][pKills];
new deaths = pInfo[targetid][pDeaths];
new money[256];
format(money,sizeof(money),"{00D400}%s$",FormatNumber( pInfo[targetid][pMoney], 0, ',' ));
new level = pInfo[targetid][pLevel];
new ws = pInfo[targetid][pWs];
new muted[32];
if(pInfo[targetid][pMuted] >= 1) { muted = "{FF0000}Yes"; }
else if(pInfo[targetid][pMuted] == 0 ) { muted = "{00FF00}No"; }
new jailed[32];
if(pInfo[targetid][pJailed] >= 1) { jailed = "{FF0000}Yes"; }
else if(pInfo[targetid][pJailed] == 0 ) { jailed = "{00FF00}No"; }
new amute[32];
if(pInfo[targetid][pAdminMuted] >= 1) { amute = "{FF0000}Yes"; }
else if(pInfo[targetid][pAdminMuted] == 0 ) { amute = "{00FF00}No"; }
new aunmute[256];
format(aunmute,sizeof(aunmute),"{00D400}%s$",FormatNumber( pInfo[targetid][pAdminMutedPrice], 0, ',' ));
new string[2000];
format(string,sizeof(string),"{FFFFFF}Статистика на %s\n\nLevel: {FFA200}%d {FFFFFF}| Admin Level: {FF0000}%d {FFFFFF}| VIP: {FFA200}%d{FFFFFF} | Free VIP: %s {FFFFFF}| Kills: %d {FFFFFF}| Deaths: %d{FFFFFF}\nMoney: %s {FFFFFF}| Weapon Skill: %d {FFFFFF}| Muted: %s {FFFFFF}| Jailed: %s{FFFFFF} | Admin Muted: %s {FFFFFF}| Admin Unmute Price: %s",GetName(targetid),level,admin,vipp,fvip,kills,deaths,money,ws,muted,jailed,amute,aunmute);
ShowPlayerDialog(targetid,STATS,DIALOG_STYLE_MSGBOX,"{FFFFFF}Stats:",string,"OK","");
}
Код:
CMD:check(playerid, params[])
{
new giveplayerid;
if (sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, 0xFF0000AA, "Usage: /check <playerid/name>");
ShowStats(playerid,giveplayerid);
return 1;
}