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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Report command (
/showthread.php?tid=261059)
Report command -
bartje01 - 11.06.2011
Hey all. What's wrong with my report command?
It spams the chat with: Report Sended
pawn Code:
COMMAND:report(playerid,params[])
{
new report[100];
if(sscanf(params,"s",report)) return SendClientMessage(playerid,COLOR_GREY,"USAGE:/report [reason]");
for(new admins;PlayerInfo[admins][pAdminLevel] < MAX_PLAYERS; admins++)
{
format(String,sizeof(String),"Report From %s REPORT:{6EF83C}%s",Name[playerid],report);
SendClientMessage(admins,COLOR_ORANGE,String);
SendClientMessage(playerid,COLOR_ORANGE,"Report Sended!");
}
return 1;
}
Re: Report command -
arturo clark - 11.06.2011
pawn Code:
COMMAND:report(playerid,params[])
{
new report[100];
if(sscanf(params,"s[100]",report)) return SendClientMessage(playerid,COLOR_GREY,"USAGE:/report [reason]");
for(new admins;PlayerInfo[admins][pAdminLevel] < MAX_PLAYERS; admins++)
{
format(String,sizeof(String),"Report From %s REPORT:{6EF83C}%s",Name[playerid],report);
SendClientMessage(admins,COLOR_ORANGE,String);
SendClientMessage(playerid,COLOR_ORANGE,"Report Sended!");
break;
}
return 1;
}
This could help you.
Re: Report command -
Crimson - 11.06.2011
pawn Code:
COMMAND:report(playerid,params[])
{
new report[100];
if(sscanf(params,"s",report)) return SendClientMessage(playerid,COLOR_GREY,"USAGE:/report [reason]");
for(new admins;admins < MAX_PLAYERS; admins++)
{
format(String,sizeof(String),"Report From %s REPORT:{6EF83C}%s",Name[playerid],report);
SendClientMessage(admins,COLOR_ORANGE,String);
SendClientMessage(playerid,COLOR_ORANGE,"Report Sended!");
}
return 1;
}
Try this
Re: Report command -
bartje01 - 11.06.2011
Oh it did work but normal players are getting the report as well now
Re: Report command -
Markx - 11.06.2011
Change this line:
pawn Code:
for(new admins;admins < MAX_PLAYERS; admins++)
Re: Report command -
bartje01 - 11.06.2011
Oh I've fixed it. Thanks guys