Quote:
Originally Posted by TokicMajstor
Just add code to remove that report under OnPlayerDiscconect, or show me your report command
|
The Report system work with command "/res" to resolve reports,I will leave here both commands
Код HTML:
CMD:res(playerid, params[])
{
new Player; eString[0] = EOS; new LittleCount[10]; new Reason[128];
//--------------------------------------------------------------------------
if(CosminInfo[playerid][Level] < 3) return SendError2(playerid, "{E4EDF4}You must to be Admin Level 3 to use that command", "{E4EDF4}Trebuie sa fi Admin Level 3 pentru a folosi comanda respectiva");
if(sscanf(params, "uS[50]", Player, Reason)) return SendUsage(playerid, "/Res [ID]");
if(Player == INVALID_PLAYER_ID) return SendError2(playerid, "{E4EDF4}Player is not connected", "{E4EDF4}Jucatorul nu este conectat");
if(CosminInfo[Player][ReportedBy] == -1) return SendError2(playerid, "{E4EDF4}This player has not been reported by anyone", "{E4EDF4}Acest jucator n-a fost raportat de nimeni");
//--------------------------------------------------------------------------
foreach(new i: Player) if(CosminInfo[i][ReportedBy] != -1 && i != Player) format(eString, sizeof(eString), "\n#{E4EDF4}%d {FF8000}%s {E4EDF4}reported {F81414}%s {E4EDF4}: %s", ReportStr, i, PlayerName(CosminInfo[i][ReportedBy]), PlayerName(i), 1);
//--------------------------------------------------------------------------
new Str[2500];
if(CosminInfo[playerid][Language] == 1) format(Str, sizeof(Str), "{3399FF}[REPORT]: {F81414}%s {E4EDF4}ti-a rezolvat report-ul pe {F81414}%s", PlayerName(playerid), PlayerName(Player));
else if(CosminInfo[playerid][Language] == 0) format(Str, sizeof(Str), "{3399FF}[REPORT]: {F81414}%s {E4EDF4}resolved your report on {F81414}%s", PlayerName(playerid), PlayerName(Player));
SendClientMessage(CosminInfo[Player][ReportedBy], -1, Str);
//--------------------------------------------------------------------------
ServerInfo[ServerReports]--; CosminInfo[Player][ReportedBy] = -1; format(ReportStr, sizeof(ReportStr), "%s", eString);
//--------------------------------------------------------------------------
format(LittleCount, 10, "%i", ServerInfo[ServerReports]);
//--------------------------------------------------------------------------
format(LittleCount, 10, "%i", ServerInfo[ServerReports]); TextDrawSetString(ReportInfo[1], LittleCount);
//--------------------------------------------------------------------------
foreach(new l: Player) if(CosminInfo[l][Level] >= 3)
{
if(ServerInfo[ServerReports] == 0) TextDrawHideForPlayer(l, ReportInfo[0]), TextDrawHideForPlayer(l, ReportInfo[1]);
else TextDrawShowForPlayer(l, ReportInfo[0]), TextDrawShowForPlayer(l, ReportInfo[1]);
}
//--------------------------------------------------------------------------
format(eString, sizeof(eString), "{3399FF}[ADMIN]: {F81414}%s {3399FF}has solved report id {F81414}#%d", PlayerName(playerid), Player); MessageToAdmins(COLOR_YELLOW, eString);
//--------------------------------------------------------------------------
return 1;
}
Код HTML:
CMD:report(playerid, params[])
{
if(CosminInfo[playerid][Level] >= 3 && CosminInfo[playerid][King] < 1) SendError2(playerid, "{E4EDF4}You can't make a report because you're an Admin", "{E4EDF4}Nu poti folosi comanda deoarece esti Admin");
{
new Player, Reason[128], LittleCounter[10], Str[2500];
//----------------------------------------------------------------------
if((gettime() - reTimer[playerid]) < 10) return SendError2(playerid, "{E4EDF4}You can use this command only once at every 10 seconds", "{E4EDF4}Poti folosi comanda o data la 10 secunde");
if(sscanf(params, "us[128]", Player, Reason)) return SendUsage(playerid, "/Report [ID] [Reason]");
if(Player == INVALID_PLAYER_ID) return SendError2(playerid, "{E4EDF4}Player is not connected", "{E4EDF4}Jucatorul nu este conectat");
if(Player == playerid && CosminInfo[playerid][AccRcon] == 0 && CosminInfo[playerid][ElPatron] < 1 && CosminInfo[playerid][King] < 1) return SendError2(playerid, "{E4EDF4}You can't report yourself", "{E4EDF4}Nu te poti raporta");
if(CosminInfo[playerid][Level] >= -1 && CosminInfo[Player][Level]) return SendError2(playerid, "{E4EDF4}You cannot report this administrator", "{E4EDF4}Acest jucator poate fi raportat doar pe forum: www.Olds.Ro");
if(CosminInfo[Player][ReportedBy] != -1)
{
format(Str, sizeof(Str), "{00FFFF}/Reports: {FF0000}%s(%d) {FF8000}tried to report {FF0000}%s(%d){FF8000}. Reason: {FF0000}%s, {FF8000}but it was already reported!", PlayerName(playerid), playerid, PlayerName(Player), Player, Reason);
//------------------------------------------------------------------
if(CosminInfo[playerid][Language] == 0) FormatMSG(playerid, -1, "{00FF40}/REPORT: %s(%d) a fost raportat adminilor online! (Motiv: %s)", PlayerName(Player), Player, Reason);
else if(CosminInfo[playerid][Language] == 1) FormatMSG(playerid, -1, "{00FF40}/REPORT: %s(%d) has been reported to the online administrators! (Reason: %s)", PlayerName(Player), Player, Reason);
//------------------------------------------------------------------
return MessageToAdmins(COLOR_ORANGE, Str);
}
format(ReportStr, sizeof(ReportStr), "%s\n{00FF40}#{E4EDF4}%d {FF8000}%s {E4EDF4}reported {F81414}%s {E4EDF4}: %s", ReportStr, Player, PlayerName(playerid), PlayerName(Player), Reason);
//----------------------------------------------------------------------
if(CosminInfo[playerid][Language] == 0) FormatMSG(playerid, -1, "{00FF40}/REPORT: %s(%d) a fost raportat adminilor online! (Motiv: %s)", PlayerName(Player), Player, Reason);
else if(CosminInfo[playerid][Language] == 1) FormatMSG(playerid, -1, "{00FF40}/REPORT: %s(%d) has been reported to the online administrators! (Reason: %s)", PlayerName(Player), Player, Reason);
//----------------------------------------------------------------------
format(Str, sizeof(Str), "{F81414}/Reports: {00FFFF}%s(%d) {00FF40}reported {00FFFF}%s(%d){00FF40}. Reason: {00FFFF}%s", PlayerName(playerid), playerid, PlayerName(Player), Player, Reason); MessageToAdmins(COLOR_YELLOW, Str);
//----------------------------------------------------------------------
ServerInfo[ServerReports]++; CosminInfo[Player][ReportedBy] = playerid;
//----------------------------------------------------------------------
format(LittleCounter, 10, "%i", ServerInfo[ServerReports]); TextDrawSetString(ReportInfo[1], LittleCounter); foreach(new i: Player) if(CosminInfo[i][Level] >= 3) TextDrawShowForPlayer(i, ReportInfo[0]), TextDrawShowForPlayer(i, ReportInfo[1]);
//----------------------------------------------------------------------
reTimer[playerid] = gettime();
}
return 1;
}