/getstats ID in dialog?
#3

I've defined string size to 128. 500 is usless because the strings aren't that long.
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[128], string2[128];
    format(string,sizeof(string), "{0099FF}Money: %d\nLevel: %d", money,score);
    format(string2,sizeof(string2), "{00AAFF}%s\nAdmin: %d\nVIP: %d", string, admin, vip);
    strcat(string,string2);
    format(string2,sizeof(string2), "{00AAFF}%s\nKills: %d\nDeaths: %d", string, kills, Deaths);
    strcat(string,string2);
    format(string2,sizeof(string2), "{00AAFF}%s\nKicks: %d\nWarns: %d", Kicks, Warns);
    strcat(string,string2);
    ShowPlayerDialog(playerid, D_STATS, DIALOG_STYLE_MSGBOX, "Your stats", string, "Close", "");
    #pragma unused params
    return 1;
}
Reply


Messages In This Thread
/getstats ID in dialog? - by Pawnie - 16.08.2013, 18:20
Re: /getstats ID in dialog? - by CrazyChoco - 16.08.2013, 18:24
Re: /getstats ID in dialog? - by iZN - 16.08.2013, 18:30
Re: /getstats ID in dialog? - by RedJohn - 16.08.2013, 19:15
Re: /getstats ID in dialog? - by CrazyChoco - 16.08.2013, 19:17

Forum Jump:


Users browsing this thread: 2 Guest(s)