SA-MP Forums Archive
How to get playerid from dialog - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: How to get playerid from dialog (/showthread.php?tid=663238)



How to get playerid from dialog - qRazor - 25.01.2019

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.


Re: How to get playerid from dialog - qRazor - 26.01.2019

Someone please??


Re: How to get playerid from dialog - Kane - 27.01.2019

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