02.01.2015, 12:11
(
Последний раз редактировалось Facerafter; 02.01.2015 в 14:53.
)
Try this
This code would require to always have a ID filled in.
So if you want to check your owns stats you would have to fill in your own ID.
pawn Код:
CMD:stats(playerid,params[])
{
new string[128],pname[MAX_PLAYER_NAME];
if(sscanf(params, "u", id)) return SendClientMessage(playerid, -1, "/Stats [ID]");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid,0xFF000080,"Player has not logged in the server!");
{
GetPlayerName(id, pname, sizeof(pname));
format(string, sizeof(string), "Account: %s\nMoney: $%d\nKills: %d\nDeaths: %d",pname,GetPlayerMoney(id),pInfo[id][Kills],pInfo[id][Deaths]);
ShowPlayerDialog(playerid, dstats, DIALOG_STYLE_MSGBOX, "Account Stats", string, "Close", "");
}
return 1;
}
So if you want to check your owns stats you would have to fill in your own ID.