25.01.2019, 22:23
(
Last edited by qRazor; 26/01/2019 at 12:06 PM.
)
I create this command:
How i can get the playerid of player who sent report? I mean on public OnDialogResponse, i want to make like when admin select an item from DIALOG_REPORTS to do something, but i need playerid, something like listitem = playerid who sent report.
HTML Code:
CMD:reports(playerid, params[]) { new DialogTitle[32], string[128], DialogContain[500]; format(DialogTitle, sizeof(DialogTitle), "Report System: there are %d reports", Iter_Count(Reports)); foreach(Reports, i) { if(HaveReport[i] != 0 && ReportType[i] != 0) { new reptype = ReportType[i]; switch(reptype) { //1 dm, 2 cheater, 3 blocked, 4 deal, 5 another case 1: format(string, sizeof(string), "%s (id: %s) - reported for DM", GetName(i), i); case 2: format(string, sizeof(string), "%s (id: %s) - reported for cheats", GetName(i), i); case 3: format(string, sizeof(string), "%s (id: %s) - is blocked / he don't see nothing", GetName(i), i); case 4: format(string, sizeof(string), "%s (id: %s) - wants to make a deal, he need a staf member", GetName(i), i); case 5: format(string, sizeof(string), "%s (id: %s) - have another problem(click to see it)", GetName(i), i); } strcat(DialogContain, string); } } ShowPlayerDialog(playerid, DIALOG_REPORTS, DIALOG_STYLE_LIST, DialogTitle, DialogContain, "Select", "Cancel"); return 1; }