03.04.2015, 08:23
(
Последний раз редактировалось CalvinC; 03.04.2015 в 09:58.
)
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:
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; }