SA:MP server /report command - 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: SA:MP server /report command (
/showthread.php?tid=391368)
SA:MP server /report command -
GLE - 10.11.2012
How to create /report command with dialog? I use zcmd gamemode.
/report that sends an message to the admins, and admins can see this message, please help me.
Re: SA:MP server /report command - Emmet_ - 10.11.2012
pawn Код:
CMD:report(playerid, params[])
{
ShowPlayerDialog(playerid, 1571, DIALOG_STYLE_INPUT, "Report", "Type your report below to report it to the administrators online.", "Report", "Cancel");
return 1;
}
And after the first { in OnDialogResponse, paste this code:
pawn Код:
if (dialogid == 1571 && response && inputtext[0])
{
new playername[24], string[128 + 36];
GetPlayerName(playerid, playername, sizeof(playername));
format(string, sizeof(string), "Report from %s: %s", playername, string);
for (new i = 0; i < MAX_PLAYERS; i ++)
{
if (IsPlayerConnected(i) && PlayerInfo[i][pAdmin]) SendClientMessage(i, 0xFFFF00FF, string);
}
SendClientMessage(playerid, 0xFFFF00FF, "Thank you for submitting your report; it will be reviewed shortly.");
return 1;
}
Re: SA:MP server /report command -
GLE - 10.11.2012
Thanks!