Interesting issue..(go have a look please)
#2

First you need to create "tickets" in your array, and then make the ticketvalue and reason a 3D array with the size of your max amount of tickets.

Then:
Код:
// When he receives a ticket, increase the array by 1
pInfo[playerid][tickets] ++;

CMD:mytickets(playerid, params[])
{
    new tickett[168 * 4], strcatstring[168];
    // Multiply by the amount of max tickets that can be displayed
    for(new i = 0; i < pInfo[playerid][tickets]; i ++)
    {
        format(strcatstring, sizeof(strcatstring), "Ticket Value: %d\tTicket Reason:%s", pInfo[playerid][ticketvalue][i], pInfo[playerid][reason][i]);
        strcat(tickett, strcatstring);
        // strcat inserts the "strcatstring" that we just formatted, into the "tickett" array which we're gonna display
    }
    Dialog_Show(id, tickett, DIALOG_STYLE_MSGBOX, "My Tickets", tickett, "OK", "");
    return 1;
}
Reply


Messages In This Thread
Interesting issue..(go have a look please) - by trablon - 03.04.2015, 05:59
Re: Interesting issue..(go have a look please) - by CalvinC - 03.04.2015, 08:23
Re: Interesting issue..(go have a look please) - by trablon - 03.04.2015, 11:03

Forum Jump:


Users browsing this thread: 1 Guest(s)