SA-MP Forums Archive
/reports bug - 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)
+--- Thread: /reports bug (/showthread.php?tid=323254)



/reports bug - Paul_Saint - 05.03.2012

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.

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);
            }
        }
    }
}



Re: /reports bug - VIPAwesome - 05.03.2012

Man Stop Using NGRP Script.


Re: /reports bug - Supercop - 05.03.2012

Do you use Linux?

If yes, that's the problem, NGRP only works on Windows for some reason.