05.03.2012, 06:29
Ok, Here is my /reports bug..
When ever anyone does /report . and i /ar (report id) or /tr (report id)
The server restarts.
Please help me, Please reply a fixed one of it.
When ever anyone does /report . and i /ar (report id) or /tr (report id)
The server restarts.
Please help me, Please reply a fixed one of it.
pawn Код:
stock SendReportToQue(reportfrom, report[])
{
new bool:breakingloop = false, newid = INVALID_REPORT_ID;
for(new i=0;i<MAX_REPORTS;i++)
{
if(!breakingloop)
{
if(Reports[i][HasBeenUsed] == 0)
{
breakingloop = true;
newid = i;
}
}
}
if(newid != INVALID_REPORT_ID)
{
strmid(Reports[newid][Report], report, 0, strlen(report), 128);
Reports[newid][ReportFrom] = reportfrom;
Reports[newid][TimeToExpire] = 5;
Reports[newid][HasBeenUsed] = 1;
Reports[newid][BeingUsed] = 1;
Reports[newid][ReportExpireTimer] = SetTimerEx("ReportTimer", 60000, 0, "d", newid);
new string[128];
format(string, sizeof(string), "Report from [%i] %s (RID: %i): %s", reportfrom, GetPlayerNameEx(reportfrom), newid, (report));
ABroadCast(COLOR_REPORT,string,2);
}
else
{
ClearReports();
SendReportToQue(reportfrom, report);
}
if(PlayerInfo[reportfrom][pDonateRank] == 4)
{
new string[128];
format(string, sizeof(string), "~r~Priority Report: ~g~%d", newid);
foreach(Player, i)
{
if(PlayerInfo[i][pAdmin] >= 2)
{
GameTextForPlayer(i, string, 1500, 1);
}
}
}
}