#7

Dalkgamler here
pawn Код:
CMD:robbank(playerid, params[])
{
    if(BankRobStatus==1)
    {
        SendClientMessage(playerid, COLOR_GREY, "Bank Robberies are currently DISABLED at THIS TIME or has been RECENTLY robbed!");
        return 1;
    }
   
    if(PlayerInfo[playerid][pLevel] < 3)

    {
        SendClientMessage(playerid, COLOR_GREY, "   You must be a level 3 or higher to be able to rob the bank.");
        return 1;

    }
    if(IsACop(playerid))

    {
        SendClientMessage(playerid, COLOR_GREY, "   Law Enforcement Officials cannot rob the bank.");
        return 1;

    }
    if(!IsPlayerInRangeOfPoint(playerid, 3.0,1431.5999755859,-956.40002441406,7.8000001907349))
    {
        SendClientMessage(playerid, COLOR_GREY, "   You are not at the bank safe.");
        return 1;

    }
    if(TimeAfterBankJob < TIME_BETWEEN_BANKJOBS)

    {
        new bjt;
        new string[128];
        bjt = TIME_BETWEEN_BANKJOBS - TimeAfterBankJob;
        format(string, sizeof(string), "   You must wait %d hours before making the next bank robbery attempt.", bjt);
        SendClientMessage(playerid, COLOR_GREY, string);
        return 1;

    }
    if(BankJobPlayer < 999 && BankJobPlayer != playerid)

    {
        SendClientMessage(playerid, COLOR_GREY, "   Someone is already robbing the bank.");
        return 1;

    }
    if(BankJobPlayer == playerid)

    {
        new string[128];
        format(string, 256, "   You're already robbing the bank! %d minutes left.", BankJobTime / 2);
        SendClientMessage(playerid, COLOR_GREY, string);
        return 1;

    }
    new Cops = 0;
    for(new i = 0; i < MAX_PLAYERS; i++)

    {
        if(IsACop(i))

        {
            Cops += 1;

        }

    }
    if(!(Cops >= 0))

    {
        SendClientMessage(playerid,COLOR_GREY,"   There must be at least 6 Law Enforcement Officials online.");
        return 1;

    }
    new string[128];
    new giveplayerid;
    format(string, 256, "You have started the robbery, you must stay inside the bank for %d minutes.", BANK_JOB_TIME);
    SetPlayerColor(playerid, COLOR_TWRED);
    SetPlayerToTeamColor(playerid);
    SendClientMessage(playerid, COLOR_WHITE, string);
    if(PlayerInfo[MAX_PLAYERS][pWantedLevel] <= 1)

    {
        WantedPoints[giveplayerid] += 6;

    }
    else if(PlayerInfo[MAX_PLAYERS][pWantedLevel] >= 2)

    {
        WantedPoints[giveplayerid] += 6;

    }
    SetPlayerCriminal(playerid, 999, "Bank Robbery");
    format(string, 256, "City Alert: The Los Santos Bank is being robbed!");
    SendClientMessageToAll(COLOR_LIGHTBLUE, string);
    BankJobTime = BANK_JOB_TIME;
    BankJobPlayer = playerid;
    SetTimer("BankRobReset", 5400000, false);
    BankRobStatus = 1;
    return 1;

}
Reply


Messages In This Thread
Bug - by McFellow - 26.07.2012, 21:52
Re: Bug - by McFellow - 26.07.2012, 22:49
Re: Bug - by [KHK]Khalid - 26.07.2012, 22:53
Re: Bug - by McFellow - 27.07.2012, 10:19
AW: Bug - by dalkgamler - 27.07.2012, 10:23
Re: Bug - by Alexis1999 - 27.07.2012, 10:32
Re: Bug - by McFellow - 27.07.2012, 10:35
Re: Bug - by McFellow - 27.07.2012, 10:39
Re: Bug - by Devilxz97 - 27.07.2012, 10:39
Re: Bug - by McFellow - 27.07.2012, 10:44

Forum Jump:


Users browsing this thread: 1 Guest(s)