How to get playerid from dialog
#1

I create this command:
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;
}
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.
Reply
#2

Someone please??
Reply
#3

https://forum.sa-mp.com/showpost.php...42&postcount=5
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)