26.05.2015, 02:33
Quote:
i see what you mean, how would i go about showing them all the stats i listed without making multiple dialogs?
|
PHP код:
CMD:stats(playerid,params[])
{
new id;
new PlayerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
new string[1028], tmp[50];
sscanf(params, "u", id);
if (isnull(params))
{
format(string, sizeof(string), "_Statistics for '%s'_", PlayerName);
SendClientMessage(playerid, LIME, string);
format(tmp, sizeof(tmp), "General Stats\n");
strcat(string, tmp);
format(tmp, sizeof(tmp), "Money: %d\n", GetPlayerCash(playerid));
strcat(string, tmp);
format(tmp, sizeof(tmp), "Score: $%d\n", GetPlayerScore(playerid));
strcat(string, tmp);
format(tmp, sizeof(tmp), "Total Kills: %d\n", pInfo[playerid][pKills]);
strcat(string, tmp);
format(tmp, sizeof(tmp), "Total Deaths: %d\n", pInfo[playerid][pDeaths]);
strcat(string, tmp);
format(tmp, sizeof(tmp), "Moneybags Found: %0.2f\n", pInfo[playerid][pMoneyBags]);
strcat(string, tmp);
format(tmp, sizeof(tmp), "Total Times Farted: %s\n", pInfo[playerid][pFarts]);
strcat(string, tmp);
format(tmp, sizeof(tmp),, "Spontaneous Combustions: %s\n", pInfo[playerid][pFartExp]);
strcat(string, tmp);
.... continue
new name[128];
format(name, sizeof(name), "{FF6666}Player Stats for %s", PlayerName);
ShowPlayerDialog(playerid, STATS_DIALOG, DIALOG_STYLE_MSGBOX, name, string, "Okay","");
}