/robbank command
#6

Add this to the top of your mode: (Under defines, includes, etc.. Where more variables should be)
pawn Код:
new alreadyrobbed[MAX_PLAYERS];
Change the command to this:
pawn Код:
if(strcmp(cmdtext, "/robbank", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(robbing[playerid] == 1) return SendClientMessage(playerid, 0xAFAFAFAA, "You Are Already Robbing The Bank!");
        if(alreadyrobbed[playerid] == 1) return SendClientMessage(playerid, 0xFFFFFFAA, "You Already Robbed The Bank Lately, Please Wait 1 Hour!");
        if(!IsPlayerInRangeOfPoint(playerid, 15.0, 2394.35,-1593.94,785.62)) return SendClientMessage(playerid, 0xAFAFAFAA, "You Are Not At The Bank!");
       
        SendClientMessage(playerid, 0xFFFF00AA "You Have Robbed The Los Santos Local Bank And Stole $500,000!");
        robbing[playerid] = 1;
        LoopingAnim(playerid,"ped", "ARRESTgun", 4.0, 0, 1, 1, 1, 0);
        GivePlayerMoney(playerid, 1000000);
        SendClientMessageToAll(0xFF9900AA, "||----------Breaking News----------||");
        SendClientMessageToAll(0x33CCFFAA, " The Los Santos Bank Has Been Robbed!");
        SendClientMessageToAll(0x33CCFFAA, " We Advise Everyone To Stay Away From The Area");
        SendClientMessageToAll(0x33CCFFAA, " Untill Further Notice.");
        SendClientMessageToAll(0xFF9900AA, "||----------Breaking News----------||");
    }
    return 1;
}
In OnPlayerConnect, add this:
pawn Код:
robbing[playerid] = false;
alreadyrobbed[playerid] = false;
Reply


Messages In This Thread
/robbank command - by Armando B - 02.08.2012, 11:51
Re: /robbank command - by McCurdy - 02.08.2012, 11:52
Re: /robbank command - by Armando B - 02.08.2012, 11:54
Re: /robbank command - by [MM]RoXoR[FS] - 02.08.2012, 11:56
Re: /robbank command - by Armando B - 02.08.2012, 12:00
Re: /robbank command - by oKzrh - 02.08.2012, 12:06

Forum Jump:


Users browsing this thread: 2 Guest(s)