Problem with stats
#6

Something like this would be needed.

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],string3[128], finalstring[700];
    format(string,sizeof(string), "{0099FF}Money: %d\nLevel: %d", money,score);
    strins(finalstring, string,0,sizeof(string));
    format(string,sizeof(string), "{00AAFF}%s\nAdmin: %d\nVIP: %d\n", string, admin, vip);
    strins(finalstring, string,sizeof(string)+1,sizeof(string2));
    format(string2,sizeof(string2), "{00AAFF}%s\nKills: %d\nDeaths: %d\n", string, kills, Deaths);
    strins(finalstring, string,sizeof(string)+1,sizeof(string2));
    format(string3,sizeof(string3), "{00AAFF}%s\nKicks: %d\nWarns: %d\n", Kicks, Warns);
    strins(finalstring, string,sizeof(string2)+1,sizeof(string3));
    ShowPlayerDialog(playerid, D_STATS, DIALOG_STYLE_MSGBOX, "Your stats", finalstring, "Close", "");
    return 1;
}
It inserts each 'string' into 'finalstring' and then sends that as the dialog text.
Reply


Messages In This Thread
Problem with stats - by Pawnie - 31.08.2013, 15:59
Re: Problem with stats - by Tom1412 - 31.08.2013, 16:09
Re: Problem with stats - by knackworst - 31.08.2013, 16:14
Re: Problem with stats - by EiresJason - 31.08.2013, 16:14
Re: Problem with stats - by Dragonsaurus - 31.08.2013, 16:16
Re: Problem with stats - by EiresJason - 31.08.2013, 16:22
Re: Problem with stats - by Pawnie - 31.08.2013, 23:37
Re : Problem with stats - by PakPak - 01.09.2013, 00:05

Forum Jump:


Users browsing this thread: 1 Guest(s)