CMD:reports(playerid,params[]) { #pragma unused params if(adlvl[playerid] >= 1) { new ReportCount; for(new i; i < MAX_REPORTS; i++) if(strcmp(Reports[i], "<none>", true)) { ReportCount++; SendClientMessage(playerid, COLOR_WHITE, Reports[i]); } if(ReportCount == 0) SendClientMessage(playerid, COLOR_WHITE, "There have been no reports"); } else SendClientMessage(playerid, COLOR_RED, "ERROR: You need to be level 1/Help moderator to use this command"); return 1; }
CMD:report(playerid, params[]) { new sstring[256], giveplayerid, reason[128], playername[25], giveplayer[25], string[128]; if (sscanf(params, "us[128]", giveplayerid, reason)) return SendClientMessage(playerid, COLOR_WHITE, "Usage: /report [playerid] [reason]"); if (!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COLOR_RED, "Error: Inactive player id!"); GetPlayerName(playerid, playername, MAX_PLAYER_NAME); GetPlayerName(giveplayerid, giveplayer, MAX_PLAYER_NAME); format(sstring, sizeof(sstring), "%s reported player %s(%d) for %s.\r\n", playername, giveplayer, giveplayerid, reason); SendMessageToAdmins(COLOR_ORANGE, sstring); format(string, 128, "Your report regarding %s(%d) has been sent to server admins.", giveplayer, giveplayerid); SendClientMessage(playerid, COLOR_YELLOW, string); return 1; }
Uh, You're showing us the /reports command...
you need to show the /report && /reports command Otherwise 1 is useless without the other |
You don't even have any code that adds the report to a list there isn't anything wrong with your system it is simply not even coded. This is definitely some downloaded gamemode because you don't have the knowledge to even see the simplest of issues as this is read some tutorials.
|
Reports[] = {
ReportID[MAX_REPORTS];
PlayerReported[MAX_PLAYER_NAME],
ReportedPlayer[MAX_PLAYER_NAME],
ReportReason[128],
};
CMD:reports(playerid,params[])
{
#pragma unused params
if(adlvl[playerid] >= 1) {
new ReportCount;
for(new i; i < MAX_REPORTS; i++) if(strcmp(Reports[i], "<none>", true)) {
ReportCount =1;
SendClientMessage(playerid, COLOR_WHITE, Reports[i]);
}
if(ReportCount == 0)
SendClientMessage(playerid, COLOR_WHITE, "There have been no reports");
}
else
SendClientMessage(playerid, COLOR_RED, "ERROR: You need to be level 1/Help moderator to use this command");
return 1;
}