report cmd - 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: report cmd (
/showthread.php?tid=640410)
report cmd -
Hiei - 02.09.2017
i want to create report cmd so this NOT IS Dialog
I want when player type /report reason) and send this to admin
anyone help me
Re: report cmd -
JaKe Elite - 02.09.2017
PHP код:
CMD:report(playerid, params[])
{
new string[128];
if(isnull(params) || strlen(params) < 1 || strlen(params) > 64)
return SendClientMessage(playerid, -1, "USAGE: /report [report text]");
format(string, sizeof(string), "* /report : %s (ID: %d) - (%s)", params);
for(new i; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
{
if(IsPlayerAdmin(i)) // Change this on the way how you detect if player is an admin
{
SendClientMessage(i, 0x33AA33FF, string);
}
}
SendClientMessage(playerid, -1, "Your report has been sent to admins.");
return 1;
}
Re: report cmd -
Hiei - 02.09.2017
Quote:
Originally Posted by JaKe Elite
PHP код:
CMD:report(playerid, params[])
{
new string[128];
if(isnull(params) || strlen(params) < 1 || strlen(params) > 64)
return SendClientMessage(playerid, -1, "USAGE: /report [report text]");
format(string, sizeof(string), "* /report : %s (ID: %d) - (%s)", params);
for(new i; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
{
if(IsPlayerAdmin(i)) // Change this on the way how you detect if player is an admin
{
SendClientMessage(i, 0x33AA33FF, string);
}
}
SendClientMessage(playerid, -1, "Your report has been sent to admins.");
return 1;
}
|
How to admin see this report
Re: report cmd -
Eduardof077 - 02.09.2017
Quote:
Originally Posted by Hiei
How to admin see this report
|
If the player have admin level or in staff team