01.01.2015, 23:24
Could you please try this code:
pawn Код:
CMD:stats(playerid, params[])
{
new id, pName[MAX_PLAYER_NAME], Dialog[500];
if(sscanf(params, "u", id))
{
GetPlayerName(playerid, pName, sizeof(pName));
format(Dialog, sizeof(Dialog), "Account: %s\nMoney: $%d\nKills: %d\nDeaths: %d", pName, GetPlayerMoney(playerid),pInfo[playerid][Kills],pInfo[playerid][Deaths]);
ShowPlayerDialog(playerid,dstats,DIALOG_STYLE_MSGBOX, pName, Dialog, "Close", "");
return 1;
}
if(!IsPlayerConnected(id)) return GameTextForPlayer(playerid, "~g~Player disconnected", 3000, 3);
GetPlayerName(id, pName, sizeof(pName));
format(Dialog, sizeof(Dialog), "Account: %s\nMoney: $%d\nKills: %d\nDeaths: %d", pName, GetPlayerMoney(id), pInfo[id][Kills], pInfo[id][Deaths]);
ShowPlayerDialog(playerid,dstats,DIALOG_STYLE_MSGBOX, pName, Dialog, "Close", "");
return 1;
}