Trash Report Problem
#2

Advice, don't use NGRP script but here you go
pawn Код:
CMD:tr(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] >= 2)
    {
        new string[128], reportid;
        if(sscanf(params, "d", reportid)) return SendClientMessageEx(playerid, COLOR_WHITE,"USAGE: /tr [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), "AdmCmd: %s has trashed the report from %s.", GetPlayerNameEx(playerid), GetPlayerNameEx(Reports[reportid][ReportFrom]));
        ABroadCast(COLOR_ORANGE, string, 2);
        format(string, sizeof(string), "%s has marked your report invalid. It will not be reviewed. Please check /reporttips", GetPlayerNameEx(playerid));
        SendClientMessageEx(Reports[reportid][ReportFrom], COLOR_WHITE, string);
        PlayerInfo[playerid][pTrashReport]++;
        Reports[reportid][ReportFrom] = 999;
        Reports[reportid][BeingUsed] = 0;
        Reports[reportid][TimeToExpire] = 0;
        strmid(Reports[reportid][Report], "None", 0, 4, 4);
    }
    return 1;
}
Reply


Messages In This Thread
Trash Report Problem - by hejsan123 - 16.12.2012, 14:30
Re: Trash Report Problem - by Red_Dragon. - 16.12.2012, 14:43
Re: Trash Report Problem - by hejsan123 - 18.12.2012, 13:06

Forum Jump:


Users browsing this thread: 1 Guest(s)