12.05.2018, 14:15
I have a system made. I just don't know how to make 5 random missions.
https://pastebin.com/TdkXxWFw
https://pastebin.com/TdkXxWFw
I do not know how to do it exactly.
https://pastebin.com/i07Wqm3X |
CMD:z(playerid, params[]) { if(MissionStatus[playerid] == 0) { new LoadText[1000]; // dialog text buffer LoadText = "Commadity\tPoint\tPrize"; // the dialog headers ShuffleDeepArray(MisLocations); // random the order of array for (new i = 0; i < 5; i++) // pick only first 5 missions randomly { format(LoadText, 1000, "%s\n{008000}%s\t{FFFF00}%s\t{FF0000}%d $", LoadText, MisLocations[i][Commadity], MisLocations[i][LoadName], MisLocations[i][Pay]); } ShowPlayerDialog(playerid, DIALOG_MISSION, DIALOG_STYLE_TABLIST_HEADERS, "MISSION", LoadText, "OK", "Cancel"); } else { SendClientMessage(playerid, COLOR_RED, "/cancel !"); } return 1; }