new TimeAfterBankJob = 0; new BankJobPlayer = 999; new BankJobTime = -1; new BankDeliverTime = -1;
CMD:robbank(playerid, params[])
{
if(PlayerInfo[playerid][pLevel] < 3)// depends on you if you want to change level of player to rob the bank
{
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, 2308.2947, -4.9122, 26.7422))// Change it if you want
{
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 >= 3))
{
SendClientMessage(playerid,COLOR_GREY," There must be at least 3 Law Enforcement Officials online.");
return 1;
}
new string[128];
format(string, 256, "You have started the robbery, you must stay inside the bank for %d minutes.", BANK_JOB_TIME/2);
SendClientMessage(playerid, COLOR_WHITE, string);
if(PlayerInfo[MAX_PLAYERS][pWantedLevel] <= 1)
{
PlayerInfo[MAX_PLAYERS][pWantedLevel] += 5;
}
else if(PlayerInfo[MAX_PLAYERS][pWantedLevel] >= 2)
{
PlayerInfo[MAX_PLAYERS][pWantedLevel] = 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;
return 1;
}
Timer:CarCheck[30000]()
{
new string[128];
new BankJobMinutes;
new BankDeliverMinutes;
if(BankJobPlayer != 999)
{
BankJobMinutes = BankJobTime / 2;
if(BankDeliverTime == -1 && !IsPlayerInRangeOfPoint(BankJobPlayer, 30.0, 1431.04, -990.12, 1639.78))
{
format(string, 256, "City Alert: The Bank Robbery attempt has failed!");
SendClientMessageToAll(COLOR_LIGHTBLUE, string);
StopPlayerHoldingObject(BankJobPlayer);
BankJobPlayer = 999;
BankJobTime = -1;
BankDeliverTime = -1;
TimeAfterBankJob = 0;
}
if(BankDeliverTime == -1 && IsPlayerInRangeOfPoint(BankJobPlayer, 30.0, 1431.04, -990.12, 1639.78))
{
format(string, sizeof(string), "~y~%d minutes left", BankJobMinutes);
GameTextForPlayer(BankJobPlayer, string, 5000, 1);
if(BankJobTime > 0) BankJobTime --;
if(BankJobTime == 0)
{
BankDeliverTime = BANK_DELIVER_TIME;
BankDeliverMinutes = BankDeliverTime / 2;
CP[BankJobPlayer] = 10;
SetPlayerCheckpoint(BankJobPlayer,-2187.0906,2414.6802,5.1563,2.5);
format(string, 256, "You have just finished packing money into your briefcase. You have %d minutes to take it to the red marker on your map!", BankDeliverMinutes);
SendClientMessage(BankJobPlayer, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* %s finishes packing money into their briefcase.", PlayerName(BankJobPlayer));
ProxDetector(30.0, BankJobPlayer, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetPlayerHoldingObject(BankJobPlayer, 1550, 1, -0.029999, -0.159999, -0.019999, -180.000000, 85.000000, -10.000000);
}
}
}
|
C:\Users\Harold\Desktop\tmp_fm_LAsRPUPDATED\gamemo des\tmp_fm_tmp_fm_tmp_fm_NG-RP.pwn(57496) : warning 217: loose indentation C:\Users\Harold\Desktop\tmp_fm_LAsRPUPDATED\gamemo des\tmp_fm_tmp_fm_tmp_fm_NG-RP.pwn(88913) : warning 217: loose indentation C:\Users\Harold\Desktop\tmp_fm_LAsRPUPDATED\gamemo des\tmp_fm_tmp_fm_tmp_fm_NG-RP.pwn(88920) : warning 217: loose indentation C:\Users\Harold\Desktop\tmp_fm_LAsRPUPDATED\gamemo des\tmp_fm_tmp_fm_tmp_fm_NG-RP.pwn(88929) : warning 217: loose indentation C:\Users\Harold\Desktop\tmp_fm_LAsRPUPDATED\gamemo des\tmp_fm_tmp_fm_tmp_fm_NG-RP.pwn(8898 : error 017: undefined symbol "TIME_BETWEEN_BANKJOBS"C:\Users\Harold\Desktop\tmp_fm_LAsRPUPDATED\gamemo des\tmp_fm_tmp_fm_tmp_fm_NG-RP.pwn(88993) : error 017: undefined symbol "TIME_BETWEEN_BANKJOBS" C:\Users\Harold\Desktop\tmp_fm_LAsRPUPDATED\gamemo des\tmp_fm_tmp_fm_tmp_fm_NG-RP.pwn(89035) : error 017: undefined symbol "BANK_JOB_TIME" C:\Users\Harold\Desktop\tmp_fm_LAsRPUPDATED\gamemo des\tmp_fm_tmp_fm_tmp_fm_NG-RP.pwn(89052) : error 017: undefined symbol "BANK_JOB_TIME" C:\Users\Harold\Desktop\tmp_fm_LAsRPUPDATED\gamemo des\tmp_fm_tmp_fm_tmp_fm_NG-RP.pwn(89057) : error 021: symbol already defined: "CarCheck" C:\Users\Harold\Desktop\tmp_fm_LAsRPUPDATED\gamemo des\tmp_fm_tmp_fm_tmp_fm_NG-RP.pwn(8905 : error 021: symbol already defined: "@yT_30000_CarCheck"C:\Users\Harold\Desktop\tmp_fm_LAsRPUPDATED\gamemo des\tmp_fm_tmp_fm_tmp_fm_NG-RP.pwn(89082) : error 017: undefined symbol "BANK_DELIVER_TIME" C:\Users\Harold\Desktop\tmp_fm_LAsRPUPDATED\gamemo des\tmp_fm_tmp_fm_tmp_fm_NG-RP.pwn(8908 : error 017: undefined symbol "PlayerName"C:\Users\Harold\Desktop\tmp_fm_LAsRPUPDATED\gamemo des\tmp_fm_tmp_fm_tmp_fm_NG-RP.pwn(89094) : error 030: compound statement not closed at the end of file (started at line 89059) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 9 Errors. |
#define TIME_BETWEEN_BANKJOBS 600 //Change the 600
#define BANK_JOB_TIME 50 //Change the 50
#define BANK_DELIVER_TIME 600 // Change the 600
new PlayerName[24];
GetPlayerName(playerid, pname, 24);
|
1. I really hope that isn't NG-RP's leaked script.
2. Define TIME_BETWEEN_BANKJOBS, BANK_JOB_TIME and BANK_DELIVER_TIME pawn Код:
pawn Код:
|
C:\Users\Harold\Desktop\tmp_fm_LAsRPUPDATED\gamemo des\tmp_fm_tmp_fm_tmp_fm_NG-RP.pwn(57496) : warning 217: loose indentation
|
1. I really hope that isn't NG-RP's leaked script.
2. Define TIME_BETWEEN_BANKJOBS, BANK_JOB_TIME and BANK_DELIVER_TIME pawn Код:
pawn Код:
|