16.08.2013, 18:20
Trying to make this for quite a while but failing.
How do I get other player stats but it just stays in the dialog?
Here is my /stats cmd.
How do I get other player stats but it just stays in the dialog?
Here is my /stats cmd.
pawn Код:
CMD:stats(playerid, params[])
{
new money = PlayerInfo[playerid][pMoney];
new score = PlayerInfo[playerid][pScores];
new admin = PlayerInfo[playerid][pAdminLevel];
new vip = PlayerInfo[playerid][pVIPlevel];
new kills = PlayerInfo[playerid][pKills];
new Deaths = PlayerInfo[playerid][pDeaths];
new Kicks = PlayerInfo[playerid][pKicks];
new Warns = PlayerInfo[playerid][pWarns];
new string[500];
format(string,sizeof(string), "{0099FF}Money: %d\nLevel: %d", money,score);
format(string,sizeof(string), "{00AAFF}%s\nAdmin: %d\nVIP: %d", string, admin, vip);
format(string,sizeof(string), "{00AAFF}%s\nKills: %d\nDeaths: %d", string, kills, Deaths);
format(string,sizeof(string), "{00AAFF}%s\nKicks: %d\nWarns: %d", Kicks, Warns);
ShowPlayerDialog(playerid, D_STATS, DIALOG_STYLE_MSGBOX, "Your stats", string, "Close", "");
return 1;
}