Bank Robbery Failed
#1

Well when i rob the bank and it say go to Hideout to complete robbery. so i goto hideout and leave the red checkpoint in the bank after i leave it say Robbery Cancelled. but it already says goto hideout so it means i need to go in hideout to complete. but my script is bug. after it say goto hideout and leave the Red checkpoint in bank so i can go to hideout. but it cancelled.

My Code

Код:
				case MISSION_TYPE_BANK_ROBBERY_1:
				{


				if (PlayerInfo[i][pHoldup] > 0)
				{


				if (PlayerInfo[i][pHoldup] > 70)
				{
				GameTextForPlayer(i,"~w~ROBBERY IN PROGRESS~n~~y~STAY IN THE~n~~r~RED CHECKPOINT", 5000, 3);
				}//OPENING SAFE

				if (PlayerInfo[i][pHoldup] == 70 || PlayerInfo[i][pHoldup] == 65 || PlayerInfo[i][pHoldup] == 60 || PlayerInfo[i][pHoldup] == 55 || PlayerInfo[i][pHoldup] == 50 || PlayerInfo[i][pHoldup] == 45
				|| PlayerInfo[i][pHoldup] == 40 || PlayerInfo[i][pHoldup] == 35 || PlayerInfo[i][pHoldup] == 30 || PlayerInfo[i][pHoldup] == 25 || PlayerInfo[i][pHoldup] == 20 || PlayerInfo[i][pHoldup] == 15 || PlayerInfo[i][pHoldup] == 10 || PlayerInfo[i][pHoldup] == 5)
				{
				PlayerInfo[i][pHoldupAmount] += RobberyCash;
				}

				if (PlayerInfo[i][pHoldup] > 2)// && PlayerInfo[i][pHoldup] <= 70
				{
				PlayerInfo[i][pHoldup] --;
				//format(string, sizeof(string), "~w~ROBBERY IN PROGRESS~n~~y~ROBBED $%d",PlayerInfo[i][pHoldupAmount]);
				//GameTextForPlayer(i,string, 5000, 3);
				GameTextForPlayer(i,"~w~ROBBERY IN PROGRESS~n~~y~STAY IN THE~n~~r~RED CHECKPOINT", 5000, 3);
				PlayerInfo[i][pHoldupAmount] += RobberyCash;
				}

				if (PlayerInfo[i][pHoldup] == 2)
				{
			 	new Houseid = PlayerInfo[i][pLastOutSideID];

				HouseData[Houseid][h_Robberies] ++;
				HouseData[Houseid][h_RobWaitTime] = 60;
				PlayerInfo[i][pHoldupWaitTime] = 60;

				format(string, sizeof(string), "%s",HouseInfo[Houseid][h_HouseIntName]);
				strmid(PlayerInfo[i][pHoldupVictim], string, 0, 128, 128);


				switch (CURRENT_GAMEMODE)
				{
					case LOS_SANTOS:
					{
					SetPlayerRaceCheckpoint(i, 2, 1105.455688, -306.720001, 73.992187, 0.0, 0.0, 0.0,4);//Robbery Hide Out in Hilltop Farm
					strmid(PlayerInfo[i][pHideout], "Hilltop Farm", 0, 256, 256);

					PlayerInfo[i][pGPSX] = 1105.455688;
					PlayerInfo[i][pGPSY] = -306.720001;
					PlayerInfo[i][pGPSZ] = 73.992187;
					PlayerInfo[i][pGPS] = 1;

					}

					case LAS_VENTURAS:
					{
					SetPlayerRaceCheckpoint(i, 2, -154.040054, 2727.959228, 61.906562, 0.0, 0.0, 0.0,4);//Robbery Hide Out in Las Payasadas
					strmid(PlayerInfo[i][pHideout], "Las Payasadas", 0, 256, 256);

					PlayerInfo[i][pGPSX] = -154.040054;
					PlayerInfo[i][pGPSY] = 2727.959228;
					PlayerInfo[i][pGPSZ] = 61.906562;
					PlayerInfo[i][pGPS] = 1;
					}

					case SAN_FIERRO:
					{
					SetPlayerRaceCheckpoint(i, 2,-2078.076660, -2555.937988, 30.421875, 0.0, 0.0, 0.0,4);//Robbery Hide Out in Angel Pine
                    strmid(PlayerInfo[i][pHideout], "Angel Pine", 0, 256, 256);

					PlayerInfo[i][pGPSX] = -2078.076660;
					PlayerInfo[i][pGPSY] = -2555.937988;
					PlayerInfo[i][pGPSZ] = 30.421875;
					PlayerInfo[i][pGPS] = 1;


					}

				}

				GameTextForPlayer(i,"~y~BRING THE SAFE TO THE~n~~r~RED CHECKPOINT", 5000, 3);
 				ShowTextDrawMenu(i, TD_MENU_INFO,"~g~Bank Robbery", 8, 0);
    			format(string, sizeof(string), "~w~You Have Successfully Robbed The Safe~n~From ~p~%s~n~~w~Bring The Safe To Your Hideout In ~p~%s~n~Enter The ~r~Checkpoint ~w~To Collect The Money~n~~w~You Have ~g~4 Hours ~w~To Reach Your Hideout",PlayerInfo[i][pHoldupVictim],PlayerInfo[i][pHideout]);//~n~~w~Loose The ~b~Police ~w~To Lower Your Wanted Level~n~~w~Press ~y~2 ~w~For Robbery Information
				ShowTextDrawMenuItems(i, 0, string, " ", " ",0);

				TextDrawSetString(StatsDisplay[i], "~b~Bank Robbery ~w~- ~g~Get To Hideout");
				TextDrawShowForPlayer(i, StatsDisplay[i]);

				//format(string, sizeof(string), "Crime: Robbery");
				//ReportCrimeTOPolice(i,string);

				PlayerInfo[i][pHoldupHour] = 4;
				PlayerInfo[i][pHoldupMinute] = 0;
				PlayerInfo[i][pHoldup] = 1;

				PlayerInfo[i][pMission] = MISSION_TYPE_BANK_ROBBERY_1;
				}



				}

				}//End Of Bank Mission Check



				case MISSION_TYPE_BANK_ROBBERY_2:
				{

				if (PlayerInfo[i][pHoldup] == 1)
				{


				if (PlayerInfo[i][pHoldupHour] >= 0 && PlayerInfo[i][pHoldupMinute] > 0)
				{
				PlayerInfo[i][pHoldupMinute] --;
				}

				if (PlayerInfo[i][pHoldupHour] > 0 && PlayerInfo[i][pHoldupMinute] == 0)
				{
				PlayerInfo[i][pHoldupHour] --;
				PlayerInfo[i][pHoldupMinute] = 59;
				}

				if (PlayerInfo[i][pHoldupHour] == 0 && PlayerInfo[i][pHoldupMinute] == 1)
				{
				GameTextForPlayer(i,"MISSION FAILED", 5000, 3);
				SendClientMessage(i,COLOR_SERVER_HELP_MSG, "Bank Robbery Failed");

				PlayerInfo[i][pHoldup] = 0;
				PlayerInfo[i][pHoldupHour] = 0;
				PlayerInfo[i][pHoldupMinute] = 0;
				PlayerInfo[i][pHoldupAmount] = 0;
				PlayerInfo[i][pMission] = 0;
				PlayerInfo[i][pRaceCheckpoint] = 0;
				DisablePlayerRaceCheckpoint(i);
				TextDrawHideForPlayer(i, StatsDisplay[i]);
				}


				}


				}//End Of Bank Mission Check




			}//End Of Switch
		}
	}
}
Reply
#2

BUMP !
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)