Dialog:DIALOG_REPORT_CHEATER(playerid, response, listitem, inputtext[]) {
if(!response)
return true;
if(Iter_Count(Reports) >= MAX_REPORTS) return SCM(playerid, COLOR_LGREEN, "There are too many reports in queue. Please wait...");
if(Iter_Contains(ServerAdmins, playerid)) return SCM(playerid, COLOR_WHITE, "YOu are an admin, you can't use this command.");
if(!Iter_Count(ServerAdmins)) return SCM(playerid, COLOR_GREY, "There are no admins connected.");
if(PlayerInfo[playerid][pReportMute] > gettime()) return SCMF(playerid, COLOR_LGREEN, "You need to wait %d seconds before using this command again.", (PlayerInfo[playerid][pReportMute] - gettime()));
if(isnull(inputtext)) return Dialog_Show(playerid, DIALOG_REPORT_CHEATER, DIALOG_STYLE_INPUT, "Report type: Cheater", "Scrie mai jos numele sau id-ul jucatorului care foloseste cheats:", "Select", "Close");
new userid = INVALID_PLAYER_ID;
if(!IsPlayerLogged(userid))
return Dialog_Show(playerid, DIALOG_REPORT_CHEATER, DIALOG_STYLE_INPUT, "Report type: Cheater", "Scrie mai jos numele sau id-ul jucatorului care foloseste cheats:\n{AFAFAF}* Jucatorul nu este conectat.", "Select", "Close");
if(userid == playerid)
return Dialog_Show(playerid, DIALOG_REPORT_CHEATER, DIALOG_STYLE_INPUT, "Report type: Cheater", "Scrie mai jos numele sau id-ul jucatorului care foloseste cheats:\n{AFAFAF}* Nu poti sa iti dai singur report.", "Select", "Close");
if(Iter_Contains(ServerAdmins, userid))
return Dialog_Show(playerid, DIALOG_REPORT_CHEATER, DIALOG_STYLE_INPUT, "Report type: Cheater", "Scrie mai jos numele sau id-ul jucatorului care foloseste cheats:\n{AFAFAF}* Nu poti sa raportezi un admin.", "Select", "Close");
new id = (Iter_Count(Reports) + 1);
ReportInfo[id][reportID] = playerid;
ReportInfo[id][reportPlayer] = userid;
ReportInfo[id][reportType] = REPORT_TYPE_CHEATER;
ReportInfo[id][reportTimer] = defer ExpirationReport(id);
format(ReportInfo[id][reportText], 128, "%s is maybe using cheats.", GetName(userid));
Iter_Add(Reports, id);
SCM(playerid, COLOR_YELLOW, "Jucatorul a fost raportat cu succes catre admini! Daca se suspecteaza ca foloseste cheats, o sa fie sanctionat in cel mai scurt timp posibil!");
SendAdmin(COLOR_DARKNICERED, "Report by %s (ID: %d, Level: %d): %s", GetName(playerid), playerid, PlayerInfo[playerid][pLevel], ReportInfo[id][reportText]);
PlayerInfo[playerid][pReportMute] = (gettime() + 120);
return true;
}
Ai uitat să pui cele două paranteze pătrate in header-ul „Dialog:”.
P.S.: Data viitoare pune codul in code-block, te rog.
Din câte am înțeles de aici, foreach și YSI nu ar trebui folosite împreună. Încearcă să adaugi un comment (//) la #include <foreach> și apoi vezi dacă mai ai aceste warning-uri.