SA-MP Forums Archive
CMD:ar 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: CMD:ar bug (/showthread.php?tid=296713)



CMD:ar bug - LS-Servers Scripting - 12.11.2011

Hey,

For some reason this command crashes the server and all the players:

pawn Код:
CMD:ar(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 1)
    {
        new string[128], reportid;
        if(sscanf(params, "d", reportid)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /ar [reportid]");

        if(reportid < 0 || reportid > 999) { SendClientMessageEx(playerid, COLOR_GREY, "   Report ID not below 0 or above 999!"); return 1; }
        if(Reports[reportid][BeingUsed] == 0)
        {
            SendClientMessageEx(playerid, COLOR_GREY, "   That report ID is not being used!");
            return 1;
        }
        if(!IsPlayerConnected(Reports[reportid][ReportFrom]))
        {
            SendClientMessageEx(playerid, COLOR_GREY, "   The reporter has disconnected !");
            Reports[reportid][ReportFrom] = 999;
            Reports[reportid][BeingUsed] = 0;
            return 1;
        }
        format(string, sizeof(string), "%s has accepted the report from %s (ID: %i, RID: %i).", GetPlayerNameEx(playerid), GetPlayerNameEx(Reports[reportid][ReportFrom]),Reports[reportid][ReportFrom],reportid);
        ABroadCast(COLOR_ORANGE, string, 2);
        AddReportToken(playerid); // Report Tokens
        format(string, sizeof(string), "%s has accepted your report and is reviewing it, you can /reply to send messages to the admin reviewing your report.", GetPlayerNameEx(playerid));
        SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, string);
        PlayerInfo[playerid][pAcceptReport]++;
        Reports[reportid][ReplyTimerr] = SetTimerEx("ReplyTimer", 30000, 0, "d", reportid);
        Reports[reportid][CheckingReport] = playerid;
        Reports[reportid][BeingUsed] = 0;
        Reports[reportid][TimeToExpire] = 0;
        strmid(Reports[reportid][Report], "None", 0, 4, 4);
    }
    return 1;
}



Re: CMD:ar bug - MadeMan - 12.11.2011

Try commenting some parts out to see what part is crashing.


Re: CMD:ar bug - LS-Servers Scripting - 12.11.2011

Okay thank you


Re: CMD:ar bug - SuperViper - 12.11.2011

Try NOT USING NGRP SCRIPT.


Re: CMD:ar bug - LS-Servers Scripting - 12.11.2011

Quote:
Originally Posted by SuperViper
Посмотреть сообщение
Try NOT USING NGRP SCRIPT.
It was used from NG:RP yes, but when you script for them for so long i think you are allowed.


Re: CMD:ar bug - seanny - 12.11.2011

Quote:
Originally Posted by LS-Servers Scripting
Посмотреть сообщение
It was used from NG:RP yes, but when you script for them for so long i think you are allowed.
Your also allowed if you have Permission and Evidence that Devin (the owner of NGRP) has given you permission, such as Images, Not chatlogs as logs are easily editable.