Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerEnterCheckpoint(playerid)
- {
- if(DeliverMoney[playerid] == 1 && IsPlayerInRangeOfPoint(playerid, 10, -2227.4868,2327.0056,7.5469))
- {
- new Rob = BankRobber[playerid]-1, string[128];
- DisablePlayerCheckpoint(playerid);
- BankRobbersCount --;
- format(BankRobbers[Rob], MAX_PLAYER_NAME, "");
- DeliverMoney[playerid] = 0;
- //
- foreach(Player, i)
- {
- if(BankRobber[i] || PlayerInfo[i][pFac] == 1)
- {
- if(Rob == 0) TextDrawHideForPlayer(i, Textdraw1);
- else if(Rob == 1) TextDrawHideForPlayer(i, Textdraw2);
- else if(Rob == 2) TextDrawHideForPlayer(i, Textdraw3);
- else if(Rob == 3) TextDrawHideForPlayer(i, Textdraw4);
- else if(Rob == 4) TextDrawHideForPlayer(i, Textdraw5);
- }
- }
- GiveDodMoney(playerid, 10000);
- format(string, sizeof(string), "** %s has delivered their stolen money and claimed $10,000. **", RPN(playerid));
- SendRobberyMessage(COLOR_LIME, string);
- SendCopMessage(COLOR_LIME, string);
- BankRobber[playerid] = 0;
- TotalStolen ++;
- //
- if(BankRobbersCount == 0)
- {
- TextDrawHideForAll(Textdraw0);
- TextDrawHideForAll(Textdraw1);
- TextDrawHideForAll(Textdraw2);
- TextDrawHideForAll(Textdraw3);
- TextDrawHideForAll(Textdraw4);
- TextDrawHideForAll(Textdraw5);
- // BankRobbery = 0;
- RobberyStarted = 0;
- format(string, sizeof(string), "** The bank robbery has ended, $%d were stolen and $%d were saved. **", TotalStolen*10000, (TotalRobbers*10000-(TotalStolen*10000)));
- SendClientMessageToAll(COLOR_YELLOW, string);
- TotalRobbers = 0;
- new copsonline;
- foreach(Player, i)
- {
- if(IsACop(i)) copsonline++;
- }
- foreach(Player, i)
- {
- if(IsACop(i))
- {
- new Saved = (TotalRobbers*10000-(TotalStolen*10000));
- GiveDodMoney(i, Saved/copsonline);
- format(string, sizeof(string), "** You have received your cut from the saved money. ($%d)", Saved/copsonline);
- SendClientMessage(i, COLOR_LIME, string);
- }
- }
- }
- }
- else if(CP[playerid] == 1337 && IsPlayerInRangeOfPoint(playerid,7.0,2696.0520,-2225.8101,13.2554)) //isplayerinrangeofpoint check is for a huge exploit fix - 6/15/10
- {
- new string[128];
- if(IsPlayerInAnyVehicle(playerid))
- {
- PlayerInfo[playerid][pJackSkill] ++;
- if(PlayerInfo[playerid][pJackSkill] == 50) { SendClientMessage(playerid, COLOR_YELLOW, "* Your Car Jack Skill is now Level 2, you will now earn more Money and have a quicker Reload Time."); }
- else if(PlayerInfo[playerid][pJackSkill] == 100) { SendClientMessage(playerid, COLOR_YELLOW, "* Your Car Jack Skill is now Level 3, you will now earn more Money and have a quicker Reload Time."); }
- else if(PlayerInfo[playerid][pJackSkill] == 200) { SendClientMessage(playerid, COLOR_YELLOW, "* Your Car Jack Skill is now Level 4, you will now earn more Money and have a quicker Reload Time."); }
- else if(PlayerInfo[playerid][pJackSkill] == 400) { SendClientMessage(playerid, COLOR_YELLOW, "* Your Car Jack Skill is now Level 5, you will now earn more Money and have a quicker Reload Time."); }
- if(DayRespect == 1)
- {
- PlayerInfo[playerid][pJackSkill] ++;
- }
- new level = PlayerInfo[playerid][pJackSkill];
- if(level >= 0 && level <= 49)
- {
- new rand = random(sizeof(SELLCAR1));
- format(string, sizeof(string), "* You sold a car for $%d.", SELLCAR1[rand]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- PlayerInfo[playerid][pMoney] = PlayerInfo[playerid][pMoney]+SELLCAR1[rand];
- GivePlayerMoney(playerid, SELLCAR1[rand]);
- }
- else if(level >= 50 && level <= 99)
- {
- new rand = random(sizeof(SELLCAR2));
- format(string, sizeof(string), "* You sold a car for $%d.", SELLCAR2[rand]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- PlayerInfo[playerid][pMoney] = PlayerInfo[playerid][pMoney]+SELLCAR2[rand];
- GivePlayerMoney(playerid, SELLCAR2[rand]);
- }
- else if(level >= 100 && level <= 199)
- {
- new rand = random(sizeof(SELLCAR3));
- format(string, sizeof(string), "* You sold a car for $%d.", SELLCAR3[rand]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- PlayerInfo[playerid][pMoney] = PlayerInfo[playerid][pMoney]+SELLCAR3[rand];
- GivePlayerMoney(playerid, SELLCAR3[rand]);
- }
- else if(level >= 200 && level <= 399)
- {
- new rand = random(sizeof(SELLCAR4));
- format(string, sizeof(string), "* You sold a car for $%d.", SELLCAR4[rand]);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- PlayerInfo[playerid][pMoney] = PlayerInfo[playerid][pMoney]+SELLCAR4[rand];
- GivePlayerMoney(playerid, SELLCAR4[rand]);
- }
- else if(level >= 400)
- {
- new money = 6000;
- format(string, sizeof(string), "* You sold a car for $%d.", money);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- PlayerInfo[playerid][pMoney] = PlayerInfo[playerid][pMoney]+money;
- GivePlayerMoney(playerid, money);
- }
- GameTextForPlayer(playerid, "~y~Sold the car", 2500, 1);
- CP[playerid] = 0;
- DisablePlayerCheckpoint(playerid);
- DestroyVehicle(GetPlayerVehicleID(playerid));
- }
- else GameTextForPlayer(playerid, "Not in a car", 5000, 1);
- }
- if(CP[playerid] == 2424)
- {
- new
- andro = CreateVehicle(592, 1871.6700, -2285.5400, 714.2615, 270.0000, 1, 1, -1),
- airport = random(2),
- destination[24],
- string[128],
- Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- FlightPosition[playerid][0] = x;
- FlightPosition[playerid][1] = y;
- FlightPosition[playerid][2] = z;
- PutPlayerInVehicle(playerid, andro, 0);
- FlightStarted[playerid] = 1;
- switch (airport)
- {
- case 0:
- {
- SetPlayerCheckpoint(playerid, -1462.8226, 30.5481, 14.1484, 15.0);
- destination = "San Fierro Airport";
- }
- case 1:
- {
- SetPlayerCheckpoint(playerid, 1477.2936, 1664.1234, 10.8125, 15.0);
- destination = "Las Venturas Airport";
- }
- }
- CP[playerid] = 2425;
- format(string, sizeof(string), "* %s enters the plane and starts it up.", RPN(playerid));
- SendClientMessage(playerid, COLOR_PURPLE, string);
- SendClientMessage(playerid, COLOR_PURPLE, "* 20 minutes later, the passengers board the plane.");
- format(string, sizeof(string), "Your destination is %s. Land the plane into the checkpoint on the runway.", destination);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- return 1;
- }
- else if(CP[playerid] == 2425)
- {
- new string[128];
- if (GetVehicleModel(GetPlayerVehicleID(playerid)) != 592) return SendClientMessage(playerid, COLOR_GREY, "Hold on there! Where's your plane?");
- CP[playerid] = 0;
- DisablePlayerCheckpoint(playerid);
- format(string, sizeof(string), "* %s switches the landing gear off, announcing that the flight has arrived to it's destination.", RPN(playerid));
- SendClientMessage(playerid, COLOR_PURPLE, string);
- SendClientMessage(playerid, COLOR_YELLOW, "Please wait while the passengers get off the plane.");
- SetTimerEx("GetOff", 30000, false, "d", playerid);
- TogglePlayerControllable(playerid, 0);
- new Float:x, Float:y, Float:z;
- GetVehiclePos(GetPlayerVehicleID(playerid), x, y, z);
- SetVehiclePos(GetPlayerVehicleID(playerid), x, y, z);
- return 1;
- }
- else if(CP[playerid] == 2426)
- {
- if (GetVehicleModel(GetPlayerVehicleID(playerid)) != 592) return SendClientMessage(playerid, COLOR_GREY, "Hold on there! Where's your plane?");
- DestroyVehicle(GetPlayerVehicleID(playerid));
- GiveDodMoney(playerid, 12800);
- FlightCooldown[playerid] = 1200;
- SendClientMessage(playerid, COLOR_YELLOW, "You've received $12,800 for the mission. Good job.");
- CP[playerid] = 0;
- DisablePlayerCheckpoint(playerid);
- FlightStarted[playerid] = 0;
- return 1;
- }
- else if(CP[playerid] == 1997 && IsPlayerInRangeOfPoint(playerid,5,2696.0520,-2225.8101,13.2554)) // Car Jacker
- {
- new Float:Health;
- GetVehicleHealth(GetPlayerVehicleID(playerid), Health);
- //if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_GREY, "You are not in a car.");
- //if (GetVehicleModel(GetPlayerVehicleID(playerid)) => 400) return SendClientMessage(playerid, COLOR_GREY, "You are not in a car.");
- // if(IsPlayerInAnyVehicle(playerid))
- // if(IsPlayerInRangeOfPoint(playerid,5,2696.0520,-2225.8101,13.2554)) // Car Jacker
- // {
- if(Health >= 900)
- {
- GiveDodMoney(playerid, 1200);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You've sold the car to the crane and gained $1200.");
- SetVehicleToRespawn(GetPlayerVehicleID(playerid));
- }
- else
- {
- GiveDodMoney(playerid, 500);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* You've sold the car to the crane and gained $500.");
- SetVehicleToRespawn(GetPlayerVehicleID(playerid));
- }
- return 1;
- }
- if(CP[playerid] == 1) // Drivers License Test
- {
- if(IsPlayerInRangeOfPoint(playerid,5,980.1932,-1407.9902,13.0956)) // Checkpoint 1
- {
- SetPlayerCheckpoint(playerid,1009.3680,-1407.4510,13.0299,5);
- }
- else if(IsPlayerInRangeOfPoint(playerid,5,1009.3680,-1407.4510,13.0299)) // Checkpoint 2
- {
- SetPlayerCheckpoint(playerid,1035.6870,-1407.1594,13.1585,5);
- }
- else if(IsPlayerInRangeOfPoint(playerid,5,1035.6870,-1407.1594,13.1585)) // Checkpoint 3
- {
- SetPlayerCheckpoint(playerid,1058.1282,-1412.7396,13.3948,5);
- }
- else if(IsPlayerInRangeOfPoint(playerid,5,1058.1282,-1412.7396,13.3948)) // Checkpoint 4
- {
- SetPlayerCheckpoint(playerid,1059.2937,-1435.7738,13.3568,5);
- }
- else if(IsPlayerInRangeOfPoint(playerid,5,1059.2937,-1435.7738,13.3568)) // Checkpoint 5
- {
- SetPlayerCheckpoint(playerid,1056.1156,-1456.7148,13.3670,5);
- }
- else if(IsPlayerInRangeOfPoint(playerid,5,1056.1156,-1456.7148,13.3670)) // Checkpoint 6
- {
- SetPlayerCheckpoint(playerid,1012.2074,-1438.6262,13.5469,5);
- }
- else if(IsPlayerInRangeOfPoint(playerid,5,1012.2074,-1438.6262,13.5469)) // Checkpoint 7
- {
- SetPlayerCheckpoint(playerid,1026.7972,-1443.0872,13.5546,5);
- }
- else if(IsPlayerInRangeOfPoint(playerid,5,1026.7972,-1443.0872,13.5546)) // Checkpoint 8
- {
- SetPlayerCheckpoint(playerid,1026.6116,-1433.3167,13.5469,5);
- }
- else if(IsPlayerInRangeOfPoint(playerid,5,1026.6116,-1433.3167,13.5469)) // Checkpoint 9
- {
- SetPlayerCheckpoint(playerid,1004.7498,-1439.7341,13.5469,5);
- }
- else if(IsPlayerInRangeOfPoint(playerid,5,1004.7498,-1439.7341,13.5469)) // Checkpoint 10
- {
- SetPlayerCheckpoint(playerid,967.4974,-1443.5815,13.5041,5);
- }
- else if(IsPlayerInRangeOfPoint(playerid,5,967.4974,-1443.5815,13.5041)) // Checkpoint 12
- {
- new Float:Health;
- GetVehicleHealth(GetPlayerVehicleID(playerid), Health);
- if(Health > 900)
- {
- DisablePlayerCheckpoint(playerid);
- PlayerInfo[playerid][pCarLic] = 1;
- LicenseTest[playerid] = 0;
- CP[playerid] = 0;
- SetVehicleToRespawn(GetPlayerVehicleID(playerid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Driving Center: You have successfully passed the test and received your license.");
- }
- else
- {
- DisablePlayerCheckpoint(playerid);
- LicenseTest[playerid] = 0;
- CP[playerid] = 0;
- SetVehicleToRespawn(GetPlayerVehicleID(playerid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Driving Center: You have damaged your vehicle hardly, therefore you failed the test.");
- }
- }
- }
- else DisablePlayerCheckpoint(playerid);
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveRaceCheckpoint(playerid)
- {
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment