27.07.2012, 13:49
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/stats", cmdtext, true, 10) == 0)
{
new DIALOG_STATS;
new str[256];
new money;
new name;
new score;
new weapon[32];
new playerweapon;
money = PlayerInfo[playerid][pMoney],
name = PlayerInfo[playerid][pName],
score = PlayerInfo[playerid][pScore],
weapon = PlayerInfo[playerid][pWeapon];
GetWeaponName(playerweapon, weapon, sizeof(weapon));
format(str, sizeof(str), "Name:[ %s ]\nMoney: [ %d ]\nScore: [ %d ]\nWeapon: [ %s ]", name,money,score,weapon);
ShowPlayerDialog(playerid, DIALOG_STATS, DIALOG_STYLE_MSGBOX , "PlayerStats", str, "Close", "");
return 1;
}
}