Error rep if you help me
#5

pawn Код:
CMD:destroyflares(playerid, params[])
{
    if(IsACop(playerid) || AdminDuty[playerid] == 1 && PlayerInfo[playerid][pAdmin] >= 2 || PlayerInfo[playerid][pAdmin] >= 5) {
        if(IsPlayerInAnyVehicle(playerid) && AdminDuty[playerid] == 0)
            return SendClientMessage(playerid, COLOR_GREY, "You must be on foot to use this command.");

        if(GetPVarInt(playerid, "EventToken") == 1 || (PlayerInfo[playerid][pJailTime] > 0 && PlayerInfo[playerid][pJailed] < 6) && AdminDuty[playerid] == 0)
            return SendClientMessage(playerid, COLOR_WHITE, "You can't do this right now.");

        if(PlayerInfo[playerid][pRank] < 5 && PlayerInfo[playerid][pFaction] != 2 && AdminDuty[playerid] == 0)
            return  SendClientMessage(playerid, COLOR_GREY, "You need to be at least rank 5 to use this command.");

        new
            szMessage[128];

        for(new i; i < sizeof(g_PoliceFlares); i++)
                {
            DestroyDynamicObject(g_PoliceFlares[i][sObjectID]);
            g_PoliceFlares[i][sX] = 0;
            g_PoliceFlares[i][sY] = 0;
            g_PoliceFlares[i][sZ] = 0;
            g_PoliceFlares[i][sObjectID] = INVALID_OBJECT_ID;
        }
        format(szMessage, sizeof(szMessage), "HQ: All flares have been destroyed by %s.", GetPlayerNameEx(playerid));
        SendLawEnforcementMessage(COLOR_DEPT_RADIO, szMessage);
        SendRadioMessage(3, COLOR_DEPT_RADIO, szMessage);
        SendRadioMessage(5, COLOR_DEPT_RADIO, szMessage);
    } else SendClientMessage(playerid, COLOR_GREY, "You're not a law enforcement officer.");
    return true;
}
Reply


Messages In This Thread
Error rep if you help me - by Kaaashi - 30.06.2014, 17:48
Re: Error rep if you help me - by Kaaashi - 30.06.2014, 17:54
Re: Error rep if you help me - by iSkate - 30.06.2014, 17:59
Re: Error rep if you help me - by Kaaashi - 30.06.2014, 18:04
Re : Error rep if you help me - by Clad - 30.06.2014, 18:09
Re: Error rep if you help me - by Kaaashi - 01.07.2014, 04:41
Re: Error rep if you help me - by Laurey - 01.07.2014, 04:58
Re: Error rep if you help me - by Kaaashi - 01.07.2014, 05:03
Re: Error rep if you help me - by Laurey - 01.07.2014, 05:06
Re: Error rep if you help me - by Kaaashi - 01.07.2014, 05:08

Forum Jump:


Users browsing this thread: 4 Guest(s)