Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerEnterDynamicCP(playerid, checkpointid)
- {
- new mis = MisID[playerid];
- if(checkpointid == ForkPlayerBoxCP[playerid])
- {
- DestroyDynamicCP(ForkPlayerBoxCP[playerid]);
- if(ForkPlayerWorking[playerid] == 1)
- {
- DestroyDynamicCP(ForkPlayerBoxCP[playerid]);
- new free = FoundFreeForkBox();
- if(free == -1)
- {
- ForkCheckTimer[playerid] = SetTimerEx("ReplayBoxCheck",1000,true,"d",playerid);
- return ShowInfoBox(playerid, 0x00000088, 7, "Couldn't find any crates at the moment please try again later.");
- }
- else
- {
- new vehicleid = ForkPlayerVehicle[playerid];
- new panels, doors, lights, tires;
- new bonnet,boot,ddoor,pdoor;
- GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
- decode_doors(doors, bonnet,boot,ddoor,pdoor);
- doors = encode_doors(bonnet, 4, ddoor, pdoor);
- UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
- ShowInfoBox(playerid, 0x00000088, 7, "Load the crates in your van using forklift.");
- ForkPlayerWorking[playerid] = 2;
- ForkBoxOwned[free] = playerid;
- ForkPlayerBoxSlot[playerid] = free;
- DestroyDynamicCP(ForkPlayerBoxCP[playerid]);
- ForkPlayerBoxCP[playerid] = CreateDynamicCP(BoxPos[free][0],BoxPos[free][1],BoxPos[free][2], 2.0,0,0,playerid,10000000.0);
- KillTimer(ForkCheckTimer[playerid]);
- ForkPlayerBox[playerid] = CreateDynamicObject(Box_Object,BoxPos[free][0],BoxPos[free][1],BoxPos[free][2]-0.5,0.0,0.0,0.0);
- }
- return 1;
- }
- if(ForkPlayerWorking[playerid] == 4)
- {
- DestroyDynamicCP(ForkPlayerBoxCP[playerid]);
- ForkPlayerWorking[playerid] = 0;
- ForkPlayerBoxLoaded[playerid] = 0;
- GiveServerMoney(playerid,5000);
- GivePlayerRP(playerid,50);
- WinnerText(playerid, "Payout $5000 ~n~+100 XP +50 RP");
- Info[playerid][XP] += 100;
- GivePlayerRP(playerid, 50);
- return 1;
- }
- if(ForkPlayerWorking[playerid] == 3)
- {
- new vehicleid = ForkPlayerVehicle[playerid];
- new panels, doors, lights, tires;
- new bonnet,boot,ddoor,pdoor;
- DestroyDynamicObject(ForkPlayerBox[playerid]);
- DestroyDynamicCP(ForkPlayerBoxCP[playerid]);
- ForkBoxOwned[ForkPlayerBoxSlot[playerid]] = -1;
- ForkPlayerBoxLoaded[playerid]++;
- for(new i;i<5;i++)
- {
- if(ForkPlayerBoxLoaded[playerid] == 5) break;
- if(IsValidDynamicObject(ForkPlayerVehBox[playerid][i]))
- {
- ForkPlayerVehBox[playerid][i] = CreateDynamicObject(1271,0.0,0.0,0.0,0.0,0.0,0.0);
- switch(i)
- {
- case 0: { AttachDynamicObjectToVehicle(ForkPlayerVehBox[playerid][i],vehicleid,-0.581375,0.153053,1.357012,0.000000,0.000000,0.000000); }
- case 1: { AttachDynamicObjectToVehicle(ForkPlayerVehBox[playerid][i],vehicleid,0.466183,0.153532,1.361523,0.000000,0.000000,0.000000); }
- case 2: { AttachDynamicObjectToVehicle(ForkPlayerVehBox[playerid][i],vehicleid,-0.553421,-1.468998,0.280163,0.000000,0.000000,0.000000); }
- case 3: { AttachDynamicObjectToVehicle(ForkPlayerVehBox[playerid][i],vehicleid,0.353253,-1.524713,0.290344,0.000000,0.000000,0.000000); }
- case 4: { AttachDynamicObjectToVehicle(ForkPlayerVehBox[playerid][i],vehicleid,-0.109051,-1.425510,0.959936,-0.800000,0.199999,-1.000000); }
- }
- break;
- }
- }
- if(ForkPlayerBoxLoaded[playerid] == 5)
- {
- vehicleid = AntiCheatGetVehicleID(playerid);
- GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
- decode_doors(doors, bonnet,boot,ddoor,pdoor);
- doors = encode_doors(bonnet, 0, ddoor, pdoor);
- UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
- new rand = random(3);
- ForkPlayerWorking[playerid] = 4;
- DestroyDynamicCP(ForkPlayerBoxCP[playerid]);
- ForkPlayerBoxCP[playerid] = CreateDynamicCP(BoxDeliverPos[rand][0],BoxDeliverPos[rand][1],BoxDeliverPos[rand][2], 2.0,0,0,playerid,10000000.0);
- ShowInfoBox(playerid, 0x00000088, 7, "Your van is full now, go to deliver the crates to the required destination.");
- return 1;
- }
- else
- {
- new Free = FoundFreeForkBox();
- if(Free != -1)
- {
- ForkPlayerWorking[playerid] = 2;
- ForkBoxOwned[Free] = playerid;
- ForkPlayerBoxSlot[playerid] = Free;
- DestroyDynamicCP(ForkPlayerBoxCP[playerid]);
- ForkPlayerBoxCP[playerid] = CreateDynamicCP(BoxPos[Free][0],BoxPos[Free][1],BoxPos[Free][2], 2.0,0,0,playerid,10000000.0);
- KillTimer(ForkCheckTimer[playerid]);
- ForkPlayerBox[playerid] = CreateDynamicObject(Box_Object,BoxPos[Free][0],BoxPos[Free][1],BoxPos[Free][2],0.0,0.0,0.0);
- return 1;
- }
- return ForkCheckTimer[playerid] = SetTimerEx("ReplayBoxCheck",1000,true,"d",playerid);
- }
- }
- }
- if (checkpointid == ParkingCP [playerid])
- {
- if (IsPlayerInAnyVehicle (playerid))
- {
- if (GetPlayerState (playerid) == PLAYER_STATE_DRIVER)
- {
- new findveh = -1;
- for(new i;i<MAX_VEHICLES;i++)
- {
- if(AntiCheatGetVehicleID(playerid) == vInfo[i][vehSessionID])
- {
- findveh = i;
- break;
- }
- }
- if (findveh != -1 && !IsPlayerUsingPlane (AntiCheatGetVehicleID (playerid)) &&
- !IsPlayerUsingBoat (AntiCheatGetVehicleID (playerid)) &&
- !IsPlayerUsingHeli (AntiCheatGetVehicleID (playerid)) &&
- GetVehicleModel (AntiCheatGetVehicleID (playerid)) != 432 &&
- GetVehicleModel (AntiCheatGetVehicleID (playerid)) != 425)
- {
- if (!strcmp (vInfo [findveh][vehOwner], GetName (playerid)) || isnull (vInfo[findveh][vehOwner]))
- {
- new string[128];
- new vehfind = -1;
- for(new i;i<MAX_VEHICLES;i++)
- {
- if(vInfo[i][vehHouse] == ParkingHouse[playerid])
- {
- vehfind = i;
- break;
- }
- }
- if(vehfind == -1)
- {
- ShowPlayerDialog(playerid, DIALOG_PARKING, 0, "Parking Vehicle", "Are you sure you want to park this vehicle?!", "Yes", "No");
- Parking[playerid] = 1;
- }
- else
- {
- format(string,sizeof(string),"Are you sure you want to park this vehicle?!\n Current saved vehicle: %s",GetVehicleName(GetVehicleModel(vInfo[vehfind][vehSessionID])));
- ShowPlayerDialog(playerid, DIALOG_PARKING, 0, "Parking Vehicle", string, "Yes", "No");
- Parking[playerid] = 1;
- }
- }
- else return SCM(playerid,red,"(!) This vehicle is owned by other player!");
- }
- else return SCM(playerid,red,"(!) This is not parkable vehicle.");
- }
- }
- return 1;
- }
- if(checkpointid == pCheckPoint[playerid])
- {
- if(TakingMis[playerid])
- {
- if(mis == 1)
- {
- if(MisPart[playerid][mis] == 0)
- {
- PlayerPlaySound(playerid, 1139, 0.0, 0.0, 10.0);
- DestroyDynamicCP(pCheckPoint[playerid]);
- ShowInfoBox(playerid, 0x00000088, 5, "Alright great! Deliver the drugs to Madd Dogg for your reward");
- MisPart[playerid][mis] = 1;
- SetPlayerMapIcon(playerid, 69 ,1245.8569,-767.3701,92.0477 , 36, 0, MAPICON_GLOBAL);
- pCheckPoint[playerid] = CreateDynamicCP(1245.8569,-767.3701,92.0477, 3.0 , -1 , -1 , playerid);
- return 1;
- }
- if(MisPart[playerid][mis] == 1)
- {
- PlayerPlaySound(playerid, 1137, 0.0, 0.0, 10.0);
- ShowInfoBox(playerid, 0x00000088, 5, "You have succesfully completed the mission and received your reward");
- MisPart[playerid][mis] = 0;
- FailMis(playerid);
- Info[playerid][XP] += 25;
- GivePlayerRP(playerid, 25);
- GiveServerMoney(playerid,2140);
- TextDrawShowForPlayer(playerid,MissionTD[0]);
- TextDrawShowForPlayer(playerid,MissionTD[1]);
- ShowTD(playerid);
- if(Info[playerid][Premium] == 2) GiveServerMoney(playerid,321);
- if(Info[playerid][Premium] == 3) GiveServerMoney(playerid,428);
- SavePlayerLog(playerid, "completed mission");
- if(Info[playerid][Premium] >= 1) {
- WinnerText(playerid, "+$2,140 ~n~+25 XP +25 RP~n~+Premium Bonus");
- Info[playerid][XP] += 25;
- }
- else {
- WinnerText(playerid, "+$2,140 ~n~+25 XP");
- }
- return 1;
- }
- }
- if(mis == 2)
- {
- if(MisPart[playerid][mis] == 0)
- {
- PlayerPlaySound(playerid, 1139, 0.0, 0.0, 10.0);
- MisPart[playerid][mis] = 1;
- DestroyDynamicCP(pCheckPoint[playerid]);
- SetPlayerMapIcon(playerid, 69 , 503.0461,-1358.5758,16.1252 , 36, 0, MAPICON_GLOBAL);
- pCheckPoint[playerid] = CreateDynamicCP(503.0461,-1358.5758,16.1252, 3.0 , -1 , -1 , playerid);
- }
- else if(MisPart[playerid][mis] == 1)
- {
- PlayerPlaySound(playerid, 1139, 0.0, 0.0, 10.0);
- MisPart[playerid][mis] = 2;
- DestroyDynamicCP(pCheckPoint[playerid]);
- SetPlayerMapIcon(playerid, 69 , 1356.2546,-1757.2971,13.5078 , 36, 0, MAPICON_GLOBAL);
- pCheckPoint[playerid] = CreateDynamicCP(1356.2546,-1757.2971,13.5078, 3.0 , -1 , -1 , playerid);
- }
- else if(MisPart[playerid][mis] == 2)
- {
- PlayerPlaySound(playerid, 1139, 0.0, 0.0, 10.0);
- ShowInfoBox(playerid, 0x00000088, 5, "Good Job! Deliver it to the Maze Bank for your reward");
- MisPart[playerid][mis] = 3;
- DestroyDynamicCP(pCheckPoint[playerid]);
- pCheckPoint[playerid] = CreateDynamicCP(1571.2587,-1326.5026,16.4844, 3.0 , -1 , -1 , playerid);
- SetPlayerMapIcon(playerid, 69 , 1571.2587,-1326.5026,16.4844 , 36 , 0, MAPICON_GLOBAL);
- }
- else if(MisPart[playerid][mis] == 3)
- {
- PlayerPlaySound(playerid, 1137, 0.0, 0.0, 10.0);
- ShowInfoBox(playerid, 0x00000088, 5, "You have succesfully completed the mission and received your reward");
- MisPart[playerid][mis] = 1;
- FailMis(playerid);
- Info[playerid][XP] += 25;
- GivePlayerRP(playerid, 25);
- GiveServerMoney(playerid,2480);
- TextDrawShowForPlayer(playerid,MissionTD[0]);
- TextDrawShowForPlayer(playerid,MissionTD[1]);
- ShowTD(playerid);
- if(Info[playerid][Premium] == 2) GiveServerMoney(playerid,372);
- if(Info[playerid][Premium] == 3) GiveServerMoney(playerid,496);
- SavePlayerLog(playerid, "completed mission");
- if(Info[playerid][Premium] >= 1) {
- WinnerText(playerid, "+$2,480 ~n~+25 XP +25 RP~n~+Premium Bonus");
- Info[playerid][XP] += 25;
- GivePlayerRP(playerid, 25);
- }
- else {
- WinnerText(playerid, "+$2,480 ~n~+25 XP +25 RP");
- }
- }
- }
- if(mis == 3)
- {
- if(MisPart[playerid][mis] == 0)
- {
- PlayerPlaySound(playerid, 1139, 0.0, 0.0, 10.0);
- ShowInfoBox(playerid, 0x00000088, 5, "Deliver the police evidence to the Junkyard");
- MisPart[playerid][mis] = 1;
- SetPlayerMapIcon(playerid, 69 ,2196.4507,-1978.0396,13.5525, 36, 0, MAPICON_GLOBAL);
- DestroyDynamicCP(pCheckPoint[playerid]);
- pCheckPoint[playerid] = CreateDynamicCP(2196.4507,-1978.0396,13.5525, 3.0 , -1 , -1 , playerid);
- }
- else if(MisPart[playerid][mis] == 1)
- {
- PlayerPlaySound(playerid, 1137, 0.0, 0.0, 10.0);
- ShowInfoBox(playerid, 0x00000088, 5, "You have succesfully completed the mission and received your reward");
- MisPart[playerid][mis] = 1;
- FailMis(playerid);
- Info[playerid][XP] += 25;
- GivePlayerRP(playerid, 25);
- GiveServerMoney(playerid,2230);
- TextDrawShowForPlayer(playerid,MissionTD[0]);
- TextDrawShowForPlayer(playerid,MissionTD[1]);
- ShowTD(playerid);
- if(Info[playerid][Premium] == 2) GiveServerMoney(playerid,334);
- if(Info[playerid][Premium] == 3) GiveServerMoney(playerid,446);
- SavePlayerLog(playerid, "completed mission");
- if(Info[playerid][Premium] >= 1) {
- WinnerText(playerid, "+$2,330 ~n~+25 XP +25 RP~n~+Premium Bonus");
- Info[playerid][XP] += 25;
- GivePlayerRP(playerid, 25);
- }
- else {
- WinnerText(playerid, "+$2,330 ~n~+25 XP +25 RP");
- }
- }
- }
- if(mis == 4)
- {
- if(MisPart[playerid][mis] == 0)
- {
- PlayerPlaySound(playerid, 1139, 0.0, 0.0, 10.0);
- ShowInfoBox(playerid, 0x00000088, 5, "Deliver the weapons to the Ammunation");
- DestroyDynamicCP(pCheckPoint[playerid]);
- MisPart[playerid][mis] = 1;
- SetPlayerMapIcon(playerid, 69 ,1364.5814,-1288.4098,13.5469, 36, 0, MAPICON_GLOBAL);
- pCheckPoint[playerid] = CreateDynamicCP(1364.5814,-1288.4098,13.5469, 3.0 , -1 , -1 , playerid);
- }
- else if(MisPart[playerid][mis] == 1)
- {
- PlayerPlaySound(playerid, 1137, 0.0, 0.0, 10.0);
- ShowInfoBox(playerid, 0x00000088, 5, "You have succesfully completed the mission and received your reward");
- MisPart[playerid][mis] = 1;
- FailMis(playerid);
- Info[playerid][XP] += 25;
- GivePlayerRP(playerid, 25);
- GiveServerMoney(playerid,2190);
- TextDrawShowForPlayer(playerid,MissionTD[0]);
- TextDrawShowForPlayer(playerid,MissionTD[1]);
- ShowTD(playerid);
- if(Info[playerid][Premium] == 2) GiveServerMoney(playerid,328);
- if(Info[playerid][Premium] == 3) GiveServerMoney(playerid,438);
- SavePlayerLog(playerid, "completed mission");
- if(Info[playerid][Premium] >= 1) {
- WinnerText(playerid, "+$2,190 ~n~+25 XP +25 RP~n~+Premium Bonus");
- Info[playerid][XP] += 25;
- GivePlayerRP(playerid, 25);
- }
- else {
- WinnerText(playerid, "+$2,190 ~n~+25 XP +25 RP");
- }
- }
- }
- if(mis == 5)
- {
- if(MisPart[playerid][mis] == 0)
- {
- PlayerPlaySound(playerid, 1139, 0.0, 0.0, 10.0);
- ShowInfoBox(playerid, 0x00000088, 5, "Deliver the drugs to the Drugs Cartel");
- DestroyDynamicCP(pCheckPoint[playerid]);
- MisPart[playerid][mis] = 1;
- SetPlayerMapIcon(playerid, 69 ,-2178.0286,-224.2853,36.5156, 36, 0, MAPICON_GLOBAL);
- pCheckPoint[playerid] = CreateDynamicCP(-2178.0286,-224.2853,36.5156, 3.0 , -1 , -1 , playerid);
- }
- else if(MisPart[playerid][mis] == 1)
- {
- PlayerPlaySound(playerid, 1137, 0.0, 0.0, 10.0);
- ShowInfoBox(playerid, 0x00000088, 5, "You have succesfully completed the mission and received your reward");
- MisPart[playerid][mis] = 1;
- FailMis(playerid);
- Info[playerid][XP] += 25;
- GivePlayerRP(playerid, 25);
- GiveServerMoney(playerid,6433);
- TextDrawShowForPlayer(playerid,MissionTD[0]);
- TextDrawShowForPlayer(playerid,MissionTD[1]);
- ShowTD(playerid);
- if(Info[playerid][Premium] == 2) GiveServerMoney(playerid,964);
- if(Info[playerid][Premium] == 3) GiveServerMoney(playerid,1286);
- SavePlayerLog(playerid, "completed mission");
- if(Info[playerid][Premium] >= 1) {
- WinnerText(playerid, "+$6,433 ~n~+25 XP +25 RP~n~+Premium Bonus");
- Info[playerid][XP] += 25;
- GivePlayerRP(playerid, 25);
- }
- else {
- WinnerText(playerid, "+$6,433 ~n~+25 XP");
- }
- }
- }
- }
- }
- if(checkpointid == DrugCP[playerid])
- {
- if(CalledDrug[playerid] == 1)
- {
- ShowPlayerDialog(playerid, DIALOG_CALLEDDRUGS, DIALOG_STYLE_LIST, "Drug Dealer", "Cocaine 25 Grams\t$120,000\nCocaine 50 Grams\t$200,000\nMarijuana 25 Grams\t$120,000\nMarijuana 50 Grams\t$200,000", "Buy", "Cancel");
- return 1;
- }
- }
- new string[128];
- for(new i; i < sizeof(ammuCP); i++) {
- if(checkpointid == ammuCP[i]) {
- ShowPlayerDialog(playerid, DIALOG_AMMU, DIALOG_STYLE_TABLIST_HEADERS, "Ammu Nation", "Category\tItems\nMelee\t2\nPistols\t3\nMicro SMGs\t3\nShotguns\t3\nThrown\t1\nArmour\t1\nRifles\t2\nAssault\t2\n", "Select", "Close");
- return 1;
- }
- }
- if(checkpointid == BuyCP[0]) {
- ShowPlayerDialog(playerid, DIALOG_BUYITEM, DIALOG_STYLE_TABLIST_HEADERS, "Cluck'n'Bell", "Name\tPrice\tHealth\nCluckin' Little Meal\t$2\t5HP\nCluckin' Huge Meal\t$5\t10HP\nCluckin' Big Meal\t$10\t25HP\nSalad Meal\t$10\t25HP\n", "Buy", "Close");
- return 1;
- }
- if(checkpointid == BuyCP[2]) {
- ShowPlayerDialog(playerid, DIALOG_BUYITEM, DIALOG_STYLE_TABLIST_HEADERS, "Burger Shot", "Name\tPrice\tHealth\nMoo Kids Meal\t$2\t5HP\nBeef Tower\t$5\t10HP\nMeat Stack\t$10\t25HP\nSalad Meal\t$10\t25HP\n", "Buy", "Close");
- return 1;
- }
- if(checkpointid == BuyCP[1]) {// -1 for both = collecting the pickup and it gets destroyed but deliver cp won't be created.
- ShowPlayerDialog(playerid, DIALOG_BUYITEM, DIALOG_STYLE_TABLIST_HEADERS, "Well Stack Pizza", "Name\tPrice\tHealth\nBuster\t$2\t5HP\nDouble D-Luxe\t$5\t10HP\nFull Rack\t$10\t25HP\nSalad Meal\t$10\t25HP\n", "Buy", "Close");
- return 1;
- }
- if(checkpointid == Marker[playerid])
- {
- if(InJob[playerid] == Securicar)
- {
- DestroyDynamicCP(Marker[playerid]);
- Marker[playerid] = -1;
- DestroyDynamicPickup(SecuriPickup[playerid]);
- PlayerPlaySound(playerid,1139,0.0,0.0,0.0);
- ApplyAnimation(playerid, "CARRY", "liftup", 4.1, 0, 0, 0, 0, 500, 1);
- SetPlayerAttachedObject(playerid,1, 1550, 6);//Right Hand
- new randomLocationa = random(sizeof(DeliverLocations));
- Securi[playerid] = randomLocationa;
- SecuriCP[playerid] = CreateDynamicCP(DeliverLocations[randomLocationa][0], DeliverLocations[randomLocationa][1], DeliverLocations[randomLocationa][2], 5.0, 0, 0, playerid, 10000000.0);
- ShowInfoBox(playerid, 0x00000088, 7, "Deliver the bag to the required destination.");
- return 1;
- }
- }
- if(checkpointid == SecuriCP[playerid])
- {
- if(InJob[playerid] == Securicar)
- {
- if(GetVehicleModel(AntiCheatGetVehicleID(playerid)) != 428) return ShowInfoBox(playerid, 0x00000088, 4, "This is not your job vehicle");
- DestroyDynamicCP(SecuriCP[playerid]);
- SecuriCP[playerid] = -1;
- /*GiveServerMoney(playerid,2000);
- Info[playerid][XP] += 100;
- GivePlayerRP(playerid, 100);
- WinnerText(playerid,"Payout $2000~n~+100 XP +100 RP");*/
- if(IsPlayerAttachedObjectSlotUsed(playerid, 1)) RemovePlayerAttachedObject(playerid, 1);
- new randomLocation4 = random(sizeof(BagsLocations));
- Bags[playerid] = randomLocation4;
- Marker[playerid] = CreateDynamicCP(BagsLocations[randomLocation4][0], BagsLocations[randomLocation4][1], BagsLocations[randomLocation4][2], 1.0, 0, 0, playerid, 10000000.0);
- SecuriPickup[playerid] = CreateDynamicPickup(1550, 1, BagsLocations[randomLocation4][0], BagsLocations[randomLocation4][1], BagsLocations[randomLocation4][2],-1,-1,playerid, 50.0);
- ShowInfoBox(playerid, 0x00000088, 7, "Go to collect the bag and deliver it to the required destination.");
- SecuriPayout[playerid] = 7500;
- if(Info[playerid][Premium] == 2)
- GiveServerMoney(playerid, SecuriPayout[playerid] + GetPrecentage(SecuriPayout[playerid], 15));
- else if(Info[playerid][Premium] == 3)
- GiveServerMoney(playerid, SecuriPayout[playerid] + GetPrecentage(SecuriPayout[playerid], 20));
- else GiveServerMoney(playerid, SecuriPayout[playerid]);
- if(Info[playerid][Premium] >= 1)
- {
- format(string, sizeof string, "Payout $%s~n~+100 XP +100 RP", cNumber(SecuriPayout[playerid]));
- Info[playerid][XP] += 100;
- GivePlayerRP(playerid, 100);
- }
- else
- {
- format(string, sizeof string, "Payout $%s~n~+50 XP +25 RP", cNumber(SecuriPayout[playerid]));
- Info[playerid][XP] += 50;
- GivePlayerRP(playerid, 50);
- }
- LevelUp(playerid);
- WinnerText(playerid, string);
- }
- return 1;
- }
- if(checkpointid == DeliverCP[playerid])
- {
- new vehicleid = AntiCheatGetVehicleID(playerid);
- if(InJob[playerid] == TowTruck)
- {
- if(GetVehicleModel(AntiCheatGetVehicleID(playerid)) == 525 && GetVehicleModel(GetVehicleTrailer(vehicleid)) == RandomVehicle[playerid])
- {
- AlreadyTowed[playerid] = 0;
- DestroyDynamicCP(DeliverCP[playerid]);
- DestroyDynamicMapIcon(vehIcon[playerid]);
- DeliverCP[playerid] = -1;
- new TrailerID = GetVehicleTrailer(vehicleid);
- DestroyVehicle(TrailerID);
- /*GiveServerMoney(playerid,3000);
- Info[playerid][XP] += 100;
- GivePlayerRP(playerid, 100);
- WinnerText(playerid,"Payout $3,000~n~+100 XP +100 RP");*/
- new randomLocation4 = random(sizeof(VehiclesLocations));
- new vehicleidz = randomEx(400,410);
- VehicleLocation[playerid] = randomLocation4;
- BrokenVehicles[playerid] = CreateVehicle(vehicleidz,VehiclesLocations[randomLocation4][0],VehiclesLocations[randomLocation4][1],VehiclesLocations[randomLocation4][2],VehiclesLocations[randomLocation4][3],-1,-1,0);
- vehIcon[playerid] = CreateDynamicMapIcon(VehiclesLocations[randomLocation4][0],VehiclesLocations[randomLocation4][1],VehiclesLocations[randomLocation4][2], 36, 0, _, _, playerid, 8000.0, MAPICON_GLOBAL);
- ShowInfoBox(playerid, 0x00000088, 5, "Hurry up! there's another broken vehicle it's marked as S icon in your mini-map.");
- isLocationAvailableT[VehicleLocation[playerid]] = true;
- isLocationAvailableT[randomLocation4] = false;
- TowTruckPayout[playerid] = 3000;
- if(Info[playerid][Premium] == 2)
- GiveServerMoney(playerid, TowTruckPayout[playerid] + GetPrecentage(TowTruckPayout[playerid], 15));
- else if(Info[playerid][Premium] == 3)
- GiveServerMoney(playerid, TowTruckPayout[playerid] + GetPrecentage(TowTruckPayout[playerid], 20));
- else GiveServerMoney(playerid, TowTruckPayout[playerid]);
- if(Info[playerid][Premium] >= 1)
- {
- format(string, sizeof string, "Payout $%s~n~+100 XP +100 RP", cNumber(TowTruckPayout[playerid]));
- Info[playerid][XP] += 100;
- GivePlayerRP(playerid, 100);
- }
- else
- {
- format(string, sizeof string, "Payout $%s~n~+50 XP +25 RP", cNumber(TowTruckPayout[playerid]));
- Info[playerid][XP] += 50;
- GivePlayerRP(playerid, 50);
- }
- LevelUp(playerid);
- WinnerText(playerid, string);
- }
- }
- return 1;
- }
- if(checkpointid == UniformCP[playerid])
- {
- if(InJob[playerid] == PizzaBoy)
- {
- if(GetPlayerSkin(playerid) != 155)
- {
- PickupCP[playerid] = CreateDynamicCP(379.8075,-119.0491,1001.4922,2.0, -1, 5, playerid, 100.0);
- ShowInfoBox(playerid, 0x00000088, 5, "Pickup the pizza order and deliver it to the required destination using pizzaboy bike.");
- SetPlayerSkin(playerid, 155);
- DestroyDynamicCP(UniformCP[playerid]);
- UniformCP[playerid] = -1;
- }
- }
- return 1;
- }
- if(checkpointid == PickupCP[playerid])
- {
- if(InJob[playerid] == PizzaBoy)
- {
- if(PizzaOrders[playerid] == 0)
- {
- if(GetPlayerSkin(playerid) == 155)
- {
- if(HoldingPizza[playerid] == 1) return SCM(playerid,red,"You already have a pizza order.");
- HoldingPizza[playerid] = 1;
- SetPlayerAttachedObject(playerid, 5,2814 , 1, 0.14, 0.343, 0.004, -0.8, 88.6, 96.4, 1.0, 1.0, 1.0);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
- ShowInfoBox(playerid, 0x00000088, 5, "Put the pizza order on the pizzaboy bike using LMB and deliver it to the customer.");
- DestroyDynamicCP(PickupCP[playerid]);
- //PickupCP[playerid] = -dd1;
- PizzaOrders[playerid] = 3;
- }
- else
- {
- ShowInfoBox(playerid, 0x00000088, 5, "You need the pizza uniform to pickup a pizza order get it fast.");
- UniformCP[playerid] = CreateDynamicCP(369.1347,-115.8160,1001.4922,2.0, -1, 5, playerid, 100.0);
- }
- }
- }
- return 1;
- }
- if(checkpointid == PizzaCP[playerid])
- {
- if(GetPlayerSkin(playerid) == 155 && DeliveringPizza[playerid] == 1 && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
- {
- if(PizzaOrders[playerid] > 1)
- {
- RemovePlayerAttachedObject(playerid,5);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
- DestroyDynamicCP(PizzaCP[playerid]);
- PizzaCP[playerid] = -1;
- new id = CustomerActorIDz[playerid];
- SetTimerEx("DeleteActor", 10 * 1000, 0, "i", id);
- PizzaOrders[playerid] --;
- new skinid = randomEx(1, 73);
- new randomLocation3 = random(sizeof(PizzaLocations));
- // while(!isLocationAvailableP[randomLocation3])
- randomLocation3 = random(sizeof(PizzaLocations));
- Pizza[playerid] = randomLocation3;
- isLocationAvailableP[Pizza[playerid]] = false;
- ActorCustomer[playerid] = CreateActor(skinid, PizzaLocations[randomLocation3][0], PizzaLocations[randomLocation3][1], PizzaLocations[randomLocation3][2], PizzaLocations[randomLocation3][3]);
- ApplyActorAnimation(ActorCustomer[playerid], "DEALER", "DEALER_IDLE", 4.1, 1, 1, 1, 1, 0);
- CustomerActorIDz[playerid] = ActorCustomer[playerid];
- GetXYInFrontOfActor(ActorCustomer[playerid], PizzaLocations[randomLocation3][0], PizzaLocations[randomLocation3][1], 1.0);
- PizzaCP[playerid] = CreateDynamicCP(PizzaLocations[randomLocation3][0], PizzaLocations[randomLocation3][1], PizzaLocations[randomLocation3][2], 1.0, 0, 0, playerid, 10000000.0);
- GivePizzaPayout(playerid);
- format(string,sizeof(string),"Pizza Orders :%d Player Skin:%d ",PizzaOrders[playerid],GetPlayerSkin(playerid));
- SendToAdmins(red,string);
- }
- else if(PizzaOrders[playerid] == 1)
- {
- RemovePlayerAttachedObject(playerid,5);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
- DestroyDynamicCP(PizzaCP[playerid]);
- PizzaCP[playerid] = -1;
- new id = CustomerActorIDz[playerid];
- SetTimerEx("DeleteActor", 10 * 1000, 0, "i", id);
- PizzaOrders[playerid] = 0;
- PlayerTextDrawHide(playerid,TimeTDP[playerid]);
- PlayerTextDrawHide(playerid,OrdersText[playerid]);
- KillTimer(PizzaTimer[playerid]);
- PickupCP[playerid] = CreateDynamicCP(379.8075,-119.0491,1001.4922,2.0, -1, 5, -1, 100.0);
- ShowInfoBox(playerid, 0x00000088, 7, "There's another pizza orders waiting for you to catch it hurry up.");
- DeliveringPizza[playerid] = 0;
- GivePizzaPayout(playerid);
- format(string,sizeof(string),"Pizza Orders :%d Player Skin:%d ",PizzaOrders[playerid],GetPlayerSkin(playerid));
- SendToAdmins(red,string);
- }
- }
- return 1;
- }
- /*if(checkpointid == BoxDeliverCP[playerid])
- {
- InJob[playerid] = NOJOB;
- GiveBurglarPayout(playerid);
- DestroyDynamicCP(BoxDeliverCP[playerid]);
- }
- for(new i = 0; i < MAX_BOX_COUNT; ++i)
- {
- if(checkpointid == BurglaryCP[playerid][i])
- {
- if(InJob[playerid] == Burglary)
- {
- if(HoldingzBox[playerid] == 1) return SCM(playerid,red,"You are already holding a box load it into the boxvile and come getthis one");
- if(CollectedBoxes[playerid] == 0 || CollectedBoxes[playerid] < 0)
- {
- HoldingzBox[playerid] = 1;
- // DestroyDynamicCP(BurglaryCP[playerid][i]);
- SetPlayerAttachedObject(playerid, 6,2969 , 1, 0.14, 0.343, 0.004, -0.8, 88.6, 96.4, 1.0, 1.0, 1.0);
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
- }
- }
- }
- return 1;
- }*/
- if(checkpointid == TruckerCP[playerid])
- {
- new vehicleid = AntiCheatGetVehicleID(playerid);
- if(InJob[playerid] == Trucker)
- {
- if(GetVehicleModel(AntiCheatGetVehicleID(playerid)) != 515 || GetVehicleModel(GetVehicleTrailer(vehicleid)) != 584)
- {
- FailTrucker(playerid);
- PlayerTextDrawHide(playerid,TimeTDT[playerid]);
- ShowInfoBox(playerid, 0x00000088, 5, "The Job is over you have lost the trailer.");
- }
- else if(GetVehicleModel(AntiCheatGetVehicleID(playerid)) == 515 && GetVehicleModel(GetVehicleTrailer(vehicleid)) == 584)
- {
- InJob[playerid] = NOJOB;
- KillTimer(TruckTimer[playerid]);
- DestroyDynamicCP(TruckerCP[playerid]);
- new TrailerID = GetVehicleTrailer(vehicleid);
- DestroyVehicle(TrailerID);
- TruckerCP[playerid] = -1;
- /*GiveServerMoney(playerid,7500);
- WinnerText(playerid,"Payout $7,500~n~+100 XP +100 RP");
- Info[playerid][XP] += 100;
- GivePlayerRP(playerid, 100);*/
- PlayerTextDrawHide(playerid,TimeTDT[playerid]);
- isLocationAvailableTr[TruckT[playerid]] = true;
- TruckerPayout[playerid] = 7500;
- if(Info[playerid][Premium] == 2)
- GiveServerMoney(playerid, TruckerPayout[playerid] + GetPrecentage(TruckerPayout[playerid], 15));
- else if(Info[playerid][Premium] == 3)
- GiveServerMoney(playerid, TruckerPayout[playerid] + GetPrecentage(TruckerPayout[playerid], 20));
- else GiveServerMoney(playerid, TruckerPayout[playerid]);
- if(Info[playerid][Premium] >= 1)
- {
- format(string, sizeof string, "Payout $%s~n~+100 XP +100 RP", cNumber(TruckerPayout[playerid]));
- Info[playerid][XP] += 100;
- GivePlayerRP(playerid, 100);
- }
- else
- {
- format(string, sizeof string, "Payout $%s~n~+50 XP +25 RP", cNumber(TruckerPayout[playerid]));
- Info[playerid][XP] += 50;
- GivePlayerRP(playerid, 50);
- }
- LevelUp(playerid);
- WinnerText(playerid, string);
- }
- }
- }
- if(checkpointid == PlayerMarker[playerid]) {
- if(GetVehicleModel(AntiCheatGetVehicleID(playerid)) == 462) {
- if(!IsValidObject(AttachedObject[playerid]) || !ObjectAttached[AttachedObject[playerid]]) {
- InJob[playerid] = NOJOB;
- new id = CustomerActorID[playerid];
- ApplyActorAnimation(id, "GRAVEYARD", "MRNF_LOOP", 4.1, 1, 1, 1, 1, 0);
- SetTimerEx("DeleteActor", 10 * 1000, 0, "i", id);
- DestroyDynamicCP(PlayerMarker[playerid]);
- KillTimer(DeliveryTimer[playerid]);
- if(IsValidObject(AttachedObject[playerid]))
- DestroyObject(AttachedObject[playerid]);
- if(IsValidObject(DroppedObject[playerid]))
- DestroyObject(DroppedObject[playerid]);
- PlayerMarker[playerid] = -1;
- ObjectAttached[AttachedObject[playerid]] = false;
- isLocationAvailable[PacketCustomer[playerid]] = true;
- ShowInfoBox(playerid, 0x00000088, 5, "The job is over, you have lost the packet!");
- }
- else if(ObjectAttached[AttachedObject[playerid]]) {
- InJob[playerid] = NOJOB;
- new id = CustomerActorID[playerid];
- ApplyActorAnimation(id, "GANGS", "DEALER_DEAL", 4.1, false, false, false, false, false);
- SetTimerEx("DeleteActor", 10 * 1000, 0, "i", id);
- SetTimerEx("ReApplyAnimation", 1500, 0, "i", id);
- KillTimer(DeliveryTimer[playerid]);
- DestroyDynamicCP(PlayerMarker[playerid]);
- DestroyObject(AttachedObject[playerid]);
- if(Info[playerid][Premium] == 2)
- GiveServerMoney(playerid, PacketPayout[playerid] + GetPrecentage(PacketPayout[playerid], 15));
- else if(Info[playerid][Premium] == 3)
- GiveServerMoney(playerid, PacketPayout[playerid] + GetPrecentage(PacketPayout[playerid], 20));
- else GiveServerMoney(playerid, PacketPayout[playerid]);
- Info[playerid][PostmanSkills]++;
- PlayerMarker[playerid] = -1;
- ObjectAttached[AttachedObject[playerid]] = false;
- isLocationAvailable[PacketCustomer[playerid]] = true;
- if(Info[playerid][Premium] >= 1) {
- format(string, sizeof string, "Payout $%s~n~+100 XP +100 RP", cNumber(PacketPayout[playerid]));
- Info[playerid][XP] += 100;
- GivePlayerRP(playerid, 100);
- }
- else {
- format(string, sizeof string, "Payout $%s~n~+50 XP +25 RP", cNumber(PacketPayout[playerid]));
- Info[playerid][XP] += 50;
- GivePlayerRP(playerid, 25);
- }
- LevelUp(playerid);
- WinnerText(playerid, string);
- mysql_format(mysql, string, sizeof string, "UPDATE `playersdata` SET `PostmanSkills` = %i WHERE `ID` = %i", Info[playerid][PostmanSkills], Info[playerid][ID]);
- mysql_tquery(mysql, string);
- }
- }
- }
- if(checkpointid == SkinCP)
- {
- cmd_skinsusingfor(playerid,"");
- }
- if(checkpointid == sCheckpoints[0]) {
- if(InSkydive[playerid] == 1) {
- format(string, sizeof(string), "{ff6347}%s has finished Skydive #1 and received a reward", GetName(playerid));
- SendClientMessageToAll(0x00FFFFFF, string);
- if(Info[playerid][Premium] >= 2) GiveServerMoney(playerid, 1233 + GetPrecentage(1233, 25));
- else GiveServerMoney(playerid, 1233);
- if(Info[playerid][Premium] >= 1) {
- WinnerText(playerid, "+$1,233 ~n~+100 XP +150 RP~n~+Premium Bonus");
- Info[playerid][XP] += 200;
- GivePlayerRP(playerid, 150);
- }
- else {
- WinnerText(playerid, "+$1,233 ~n~+100 XP +50 RP");
- Info[playerid][XP] += 100;
- GivePlayerRP(playerid, 50);
- }
- LevelUp(playerid);
- SpawnPlayerEx(playerid);
- new query[100];
- mysql_format(mysql, query, sizeof(query), "SELECT `Weapon`, `Ammo` FROM `Weapons` WHERE `ID` = %d", Info[playerid][ID]);
- mysql_tquery(mysql, query, "OnWeaponLoad", "i", playerid);
- InSkydive[playerid] = 0;
- Info[playerid][Skydive]++;
- }
- }
- if(checkpointid == sCheckpoints[1]) {
- if(InSkydive[playerid] == 1) {
- format(string, sizeof(string), "{ff6347}%s has finished Skydive #2 and received a reward", GetName(playerid));
- SendClientMessageToAll(0x00FFFFFF, string);
- if(Info[playerid][Premium] >= 2) GiveServerMoney(playerid, 1 + GetPrecentage(1666, 25));
- else GiveServerMoney(playerid, 1666);
- if(Info[playerid][Premium] >= 1) {
- WinnerText(playerid, "+$1,666 ~n~+100 XP +150 RP~n~+Premium Bonus");
- Info[playerid][XP] += 200;
- GivePlayerRP(playerid, 150);
- }
- else {
- WinnerText(playerid, "+$1,666 ~n~+100 XP +50 RP");
- Info[playerid][XP] += 100;
- GivePlayerRP(playerid, 50);
- }
- LevelUp(playerid);
- SpawnPlayerEx(playerid);
- new query[100];
- mysql_format(mysql, query, sizeof(query), "SELECT `Weapon`, `Ammo` FROM `Weapons` WHERE `ID` = %d", Info[playerid][ID]);
- mysql_tquery(mysql, query, "OnWeaponLoad", "i", playerid);
- InSkydive[playerid] = 0;
- Info[playerid][Skydive]++;
- }
- }
- if(checkpointid == sCheckpoints[2]) {
- if(InSkydive[playerid] == 1) {
- format(string, sizeof(string), "{ff6347}%s has finished Skydive #3 and received a reward", GetName(playerid));
- SendClientMessageToAll(0x00FFFFFF, string);
- if(Info[playerid][Premium] >= 2) GiveServerMoney(playerid, 1558 + GetPrecentage(1558, 25));
- else GiveServerMoney(playerid, 1558);
- if(Info[playerid][Premium] >= 1) {
- WinnerText(playerid, "+$1,558 ~n~+100 XP +150 RP~n~+Premium Bonus");
- Info[playerid][XP] += 200;
- GivePlayerRP(playerid, 150);
- }
- else {
- WinnerText(playerid, "+$1,558 ~n~+100 XP + 50 RP");
- Info[playerid][XP] += 100;
- GivePlayerRP(playerid, 50);
- }
- LevelUp(playerid);
- SpawnPlayerEx(playerid);
- new query[100];
- mysql_format(mysql, query, sizeof(query), "SELECT `Weapon`, `Ammo` FROM `Weapons` WHERE `ID` = %d", Info[playerid][ID]);
- mysql_tquery(mysql, query, "OnWeaponLoad", "i", playerid);
- InSkydive[playerid] = 0;
- Info[playerid][Skydive]++;
- }
- }
- if(checkpointid == pCheckpoints[0]) {
- if(InParkour[playerid] == 1) {
- if(GetVehicleModel(AntiCheatGetVehicleID(playerid)) == 556) {
- format(string, sizeof(string), "{ff6347}%s has finished Parkour #2 and received a reward", GetName(playerid));
- SendClientMessageToAll(0x00FFFFFF, string);
- DestroyVehicle(AntiCheatGetVehicleID(playerid));
- InParkour[playerid] = 0;
- Info[playerid][Parkour]++;
- if(Info[playerid][Premium] >= 2) GiveServerMoney(playerid, 870 + GetPrecentage(870, 25));
- else GiveServerMoney(playerid, 870);
- if(Info[playerid][Premium] >= 1) {
- WinnerText(playerid, "+$870 ~n~+100 XP +150 RP~n~+Premium Bonus");
- Info[playerid][XP] += 200;
- GivePlayerRP(playerid, 150);
- }
- else {
- WinnerText(playerid, "+$2,190 ~n~+100 XP +50 RP");
- Info[playerid][XP] += 100;
- GivePlayerRP(playerid, 50);
- }
- LevelUp(playerid);
- SpawnPlayerEx(playerid);
- new query[100];
- mysql_format(mysql, query, sizeof(query), "SELECT `Weapon`, `Ammo` FROM `Weapons` WHERE `ID` = %d", Info[playerid][ID]);
- mysql_tquery(mysql, query, "OnWeaponLoad", "i", playerid);
- }
- }
- }
- if(checkpointid == pCheckpoints[1]) {
- if(InParkour[playerid] == 1) {
- if(GetVehicleModel(AntiCheatGetVehicleID(playerid)) == 522) {
- new Float:x, Float:y, Float:z, Float:a;
- AntiCheatGetPos(playerid, x, y, z);
- GetPlayerFacingAngle(playerid, a);
- DestroyVehicle(AntiCheatGetVehicleID(playerid));
- new veh = CreateVehicle(481, x, y, z, a, 211, 211, 1, 0);
- PutPlayerInVehicle(playerid, veh, 0);
- }
- }
- }
- if(checkpointid == pCheckpoints[2]) {
- if(InParkour[playerid] == 1) {
- if(GetVehicleModel(AntiCheatGetVehicleID(playerid)) == 481) {
- new Float:x, Float:y, Float:z, Float:a;
- AntiCheatGetPos(playerid, x, y, z);
- GetPlayerFacingAngle(playerid, a);
- DestroyVehicle(AntiCheatGetVehicleID(playerid));
- new veh = CreateVehicle(522, x, y, z, a, 211, 1, 1, 0);
- PutPlayerInVehicle(playerid, veh, 0);
- }
- }
- }
- if(checkpointid == pCheckpoints[3]) {
- if(InParkour[playerid] == 1) {
- if(GetVehicleModel(AntiCheatGetVehicleID(playerid)) == 522) {
- format(string, sizeof(string), "{ff6347}%s has finished Parkour #4 and received a reward", GetName(playerid));
- SendClientMessageToAll(0x00FFFFFF, string);
- if(Info[playerid][Premium] >= 2) GiveServerMoney(playerid, 1040 + GetPrecentage(1040, 25));
- else GiveServerMoney(playerid, 1040);
- DestroyVehicle(AntiCheatGetVehicleID(playerid));
- if(Info[playerid][Premium] >= 1) {
- WinnerText(playerid, "+$1,040 ~n~+100 XP +150 RP~n~+Premium Bonus");
- Info[playerid][XP] += 200;
- GivePlayerRP(playerid, 150);
- }
- else {
- WinnerText(playerid, "+$1,040 ~n~+100 XP +50 RP");
- Info[playerid][XP] += 100;
- GivePlayerRP(playerid, 50);
- }
- LevelUp(playerid);
- InParkour[playerid] = 0;
- Info[playerid][Parkour]++;
- SpawnPlayerEx(playerid);
- new query[100];
- mysql_format(mysql, query, sizeof(query), "SELECT `Weapon`, `Ammo` FROM `Weapons` WHERE `ID` = %d", Info[playerid][ID]);
- mysql_tquery(mysql, query, "OnWeaponLoad", "i", playerid);
- }
- }
- }
- if(checkpointid == pCheckpoints[4]) {
- if(InParkour[playerid] == 1) {
- if(GetVehicleModel(AntiCheatGetVehicleID(playerid)) == 481) {
- format(string, sizeof(string), "{ff6347}%s has finished Parkour #5 and received a reward", GetName(playerid));
- SendClientMessageToAll(0x00FFFFFF, string);
- if(Info[playerid][Premium] >= 2) GiveServerMoney(playerid, 1114 + GetPrecentage(1114, 25));
- else GiveServerMoney(playerid, 1114);
- DestroyVehicle(AntiCheatGetVehicleID(playerid));
- if(Info[playerid][Premium] >= 1) {
- WinnerText(playerid, "+$1,114 ~n~+100 XP +150 RP~n~+Premium Bonus");
- Info[playerid][XP] += 200;
- GivePlayerRP(playerid, 150);
- }
- else {
- WinnerText(playerid, "+$1,114 ~n~+100 XP +50 RP");
- Info[playerid][XP] += 100;
- GivePlayerRP(playerid, 50);
- }
- LevelUp(playerid);
- InParkour[playerid] = 0;
- Info[playerid][Parkour]++;
- SpawnPlayerEx(playerid);
- new query[100];
- mysql_format(mysql, query, sizeof(query), "SELECT `Weapon`, `Ammo` FROM `Weapons` WHERE `ID` = %d", Info[playerid][ID]);
- mysql_tquery(mysql, query, "OnWeaponLoad", "i", playerid);
- }
- }
- }
- if(checkpointid == HeistStart)//heist
- {
- ShowPlayerDialog(playerid, DIALOG_LSHEIST, DIALOG_STYLE_LIST, "Los Santos Heist Missions", "Player Center\nJewerly Store\nPlane\n", "Select", "Close");
- }
- if(checkpointid == RobCP)//heist
- {
- if(InHeist[playerid][PCENTER ]== 1)
- {
- ApplyAnimation(playerid, "SHOP", "ROB_Loop_Threat", 4.0, 1, 0, 0, 0, 0);
- ApplyActorAnimation(RobActor, "ped","handsup",4.1,0,1,1,1,0);
- rCountAmount[playerid] = 10;
- rRobbingTimer[playerid] = SetTimerEx("rRobbingSeller", 10000, 0, "d", playerid);
- rCountTimer[playerid] = SetTimerEx("rRobTimer", 10000, 1, "i", playerid);
- }
- }
- if(checkpointid == KeypadCP[playerid])
- {
- Hack[playerid] = 1;
- }
- if(checkpointid == FarmerCP[playerid])
- {
- if(Harvested[playerid] != MAX_HARVEST)
- {
- if(InJob[playerid] == Farmer)
- {
- format(string,64,"~g~%d OUT OF~n~~g~10",Harvested[playerid]);
- GameTextForPlayer(playerid,string,3000,1);
- Harvested[playerid] += 1;
- DestroyDynamicCP(FarmerCP[playerid]);
- DestroyDynamicObject(FarmerObject[playerid]);
- FarmerCP[playerid] = -1;
- FarmerObject[playerid] = -1;//3ndko sex fe al host ?
- new randomLocation4 = random(sizeof(FarmerLocations));
- while(!isLocationAvailableF[randomLocation4])
- randomLocation4 = random(sizeof(FarmerLocations));
- isLocationAvailableF[randomLocation4] = false;
- FarmerCP[playerid] = CreateDynamicCP(FarmerLocations[randomLocation4][0], FarmerLocations[randomLocation4][1], FarmerLocations[randomLocation4][2], 3.0, 0, 0, playerid, 10000000.0);
- FarmerObject[playerid] = CreateDynamicObject(805,FarmerLocations[randomLocation4][0], FarmerLocations[randomLocation4][1], FarmerLocations[randomLocation4][2], 0.0, 0.0, 0.0);
- return 1;
- }
- }
- else if(Harvested[playerid] == MAX_HARVEST)
- {
- FailFarmer(playerid);
- FarmerPayout[playerid] = 3500;
- if(Info[playerid][Premium] == 2)
- GiveServerMoney(playerid, FarmerPayout[playerid] + GetPrecentage(FarmerPayout[playerid], 15));
- else if(Info[playerid][Premium] == 3)
- GiveServerMoney(playerid, FarmerPayout[playerid] + GetPrecentage(FarmerPayout[playerid], 20));
- else GiveServerMoney(playerid, FarmerPayout[playerid]);
- if(Info[playerid][Premium] >= 1)
- {
- format(string, sizeof string, "Payout $%s~n~+100 XP +100 RP", cNumber(FarmerPayout[playerid]));
- Info[playerid][XP] += 100;
- GivePlayerRP(playerid, 100);
- }
- else
- {
- format(string, sizeof string, "Payout $%s~n~+50 XP +25 RP", cNumber(FarmerPayout[playerid]));
- Info[playerid][XP] += 50;
- GivePlayerRP(playerid, 50);
- }
- LevelUp(playerid);
- WinnerText(playerid, string);
- }
- return 1;
- }
- if(checkpointid == LoadingPoint[playerid])
- {
- if(GetPVarInt(playerid, "LoadingCooldown") > gettime()) return 1;
- new vehicleid = GetPVarInt(playerid, "LastVehicleID");
- if(Vehicle_LoadedOres(vehicleid) >= VEHICLE_LIMIT) return SCM(playerid, red, "You can't load any more ores to this vehicle");
- if(Vehicle_LoadedOres(vehicleid) <= VEHICLE_LIMIT)
- {
- LoadedOres[vehicleid][ CarryingOre[playerid] ]++;
- format(string, sizeof(string), "Loaded %s", OreData[ CarryingOre[playerid] ][oreName]);
- SCM(playerid, green, string);
- OnePlayAnim(playerid, "CARRY", "putdwn05", 4.1, 0, 1, 1, 0, 0);
- Player_CleanUp(playerid, 1);
- return 1;
- }
- }
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- new vehicleid = AntiCheatGetVehicleID(playerid);
- for(new i; i < sizeof(DropPoints); i++)
- {
- if(checkpointid == DropPoints[i][PointCP])
- {
- new cash = Vehicle_GetOreValue(vehicleid);
- Info[playerid][MiningSkills]++;
- mysql_format(mysql, string, sizeof string, "UPDATE `playersdata` SET `MiningSkills` = %i WHERE `ID` = %i", Info[playerid][MiningSkills], Info[playerid][ID]);
- mysql_tquery(mysql, string);
- if(Info[playerid][Premium] >= 1) {
- format(string, sizeof(string), "Payout $%s~n~+100 XP +50 RP", cNumber(cash));
- Info[playerid][XP] += 100;
- GivePlayerRP(playerid, 50);
- }
- else {
- format(string, sizeof(string), "Payout $%s~n~+50 XP +25 RP", cNumber(cash));
- Info[playerid][XP] += 50;
- GivePlayerRP(playerid, 25);
- }
- LevelUp(playerid);
- WinnerText(playerid, string);
- if(Info[playerid][Premium] == 2)
- GiveServerMoney(playerid, cash + GetPrecentage(cash, 15));
- else if(Info[playerid][Premium] == 3)
- GiveServerMoney(playerid, cash + GetPrecentage(cash, 20));
- else GiveServerMoney(playerid, cash);
- Vehicle_CleanUp(vehicleid);
- for(new x; x < sizeof(DropPoints); x++)
- {
- if(IsValidDynamicMapIcon(PointIcons[playerid][x]))
- {
- DestroyDynamicMapIcon(PointIcons[playerid][x]);
- PointIcons[playerid][x] = -1;
- }
- TogglePlayerDynamicCP(playerid, DropPoints[x][PointCP], 0);
- }
- break;
- }
- }
- /*for(new i; i < sizeof(PoliceDepartments); i++) {
- if(checkpointid == PoliceDepartments[i][pdPickup]) {
- if(pTeam[playerid] != POLICE) {
- for(new pickups; pickups < sizeof(PoliceDepartments); pickups++)
- TogglePlayerDynamicCP(playerid, PoliceDepartments[pickups][pdPickup], 0);
- return 1;
- }
- if(!IsPoliceVehicle(vehicleid)) return ShowInfoBox(playerid, 0x00000088, 5, "You can't jail criminals with this vehicle");
- foreach(new criminal : Player) {
- if(!IsPlayerInVehicle(criminal, vehicleid)) continue;
- if(criminal == playerid) continue;
- if(!IsCuffed[criminal]) continue;
- CriminalCooldown[criminal] = 0;
- IsCuffed[criminal] = 0;
- CuffedBy[criminal] = INVALID_PLAYER_ID;
- if(LastCriminal[playerid] == criminal)
- LastCriminal[playerid] = INVALID_PLAYER_ID;
- //police_payout
- new payout = (5000 + (500 * GetPoliceHoods()));
- GiveServerMoney(playerid, payout);
- format(string, sizeof string, "Payout $%s", cNumber(payout));
- WinnerText(playerid, string);
- for(new pickups; pickups < sizeof(PoliceDepartments); pickups++)
- TogglePlayerDynamicCP(playerid, PoliceDepartments[pickups][pdPickup], 0);
- AntiCheatGetPos(criminal, LastPosX[criminal], LastPosY[criminal], LastPosZ[criminal]);
- AntiCheatGetArmour(criminal, LastArmour[criminal]);
- LastHealth[criminal] = 99.0;
- LastInterior[criminal] = 0;
- InJob[criminal] = NOJOB;
- if(Info[criminal][Premium] > 1) {
- new query[128], weaponid, ammo;
- for (new x = 0; x <= 12; x++) {
- AntiCheatGetWeaponData(criminal, x, weaponid, ammo);
- if(!weaponid || !ammo) continue;
- mysql_format(mysql, query, sizeof(query), "INSERT INTO `Weapons` (ID, Weapon, Ammo) VALUES (%d, %d, %d) ON DUPLICATE KEY UPDATE `Ammo` = %d", Info[criminal][ID], weaponid, ammo, ammo);
- mysql_tquery(mysql, query);
- }
- }
- ResetPlayerWeapons(criminal);
- RemovePlayerFromVehicle(criminal);
- SetPlayerSpecialAction(criminal, SPECIAL_ACTION_NONE);
- SetPlayerPos(criminal, 264.6288, 77.5742, 1001.0391);
- SetPlayerInterior(criminal, 6);
- SetPlayerHealth(criminal, 99.0);
- TogglePlayerControllable(criminal, 1);
- SetPlayerVirtualWorld(criminal, criminal);
- switch(GetPlayerWantedLevel(criminal)) {
- case 1: Info[criminal][Jailed] = 30; aywa ma ana 2olt mn el awel h3ml kda
- case 2: Info[criminal][Jailed] = 60;
- case 3: Info[criminal][Jailed] = 120;
- case 4: Info[criminal][Jailed] = 180;
- case 5: Info[criminal][Jailed] = 240;
- case 6: Info[criminal][Jailed] = 320;
- }
- JailTimer[criminal] = SetTimerEx("JailCountdown", 999, true, "i", criminal);
- }
- }
- }*/
- }
- if(checkpointid == CrusherCheckpoint)
- {
- if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SCM(playerid, red, "You must have a vehicle to use the crusher");
- if(!IsVehicleWanted(AntiCheatGetVehicleID(playerid))) return SCM(playerid, red, "Invalid vehicle model - check the wanted list");
- if(GetPVarInt(playerid, "LastCrusherVehicle") == GetVehicleModel(AntiCheatGetVehicleID(playerid))) return SCM(playerid, red, "You can't use the same vehicle twice");
- foreach(new i : ServerVehicles) {
- if(IsPlayerInVehicle(playerid, vInfo[i][vehSessionID])) {
- if(strcmp(vInfo[i][vehName], "-")) return SCM(playerid, red, "You can't export private vehicles");
- }
- }
- SetPVarInt(playerid, "LastCrusherVehicle", GetVehicleModel(AntiCheatGetVehicleID(playerid)));
- SetVehicleToRespawn(AntiCheatGetVehicleID(playerid));
- new money = randomEx(2500, 7500);
- if(Info[playerid][Premium] >= 1) {
- format(string, sizeof(string), "Payout $%s~n~+100 XP +50 RP", cNumber(money));
- Info[playerid][XP] += 100;
- GivePlayerRP(playerid, 50);
- }
- else {
- format(string, sizeof(string), "Payout $%s~n~+50 XP +25 RP", cNumber(money));
- Info[playerid][XP] += 50;
- GivePlayerRP(playerid, 25);
- }
- LevelUp(playerid);
- GiveServerMoney(playerid, money);
- WinnerText(playerid, string);
- return 1;
- }
- if(checkpointid == TrashCP[playerid])
- {
- if(!HasTrash[playerid]) return SCM(playerid, red, "You're not carrying a trash bag");
- new vehicleid = GetPVarInt(playerid, "LastVehicleID");
- if(LoadedTrash[vehicleid] >= TRASH_LIMIT) return SCM(playerid, red, "This vehicle is full, you can't load any more trash");
- LoadedTrash[vehicleid]++;
- OnePlayAnim(playerid, "GRENADE", "WEAPON_throwu", 4.1, 0, 0, 0, 0, 0);
- SCM(playerid, green, "You've collected a trash bag");
- if(TRASH_LIMIT - LoadedTrash[vehicleid] > 0)
- {
- format(string, sizeof(string), "You can load %d more trash bags to this vehicle", TRASH_LIMIT - LoadedTrash[vehicleid]);
- SCM(playerid, 0x2ECC71FF, string);
- }
- new driver = AntiCheatGetVehicleDriver(vehicleid);
- if(IsPlayerConnected(driver)) Trash_ShowCapacity(driver);
- Trash_ResetPlayer(playerid);
- return 1;
- }
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- for(new i; i < sizeof(FactoryData); i++)
- {
- if(checkpointid == FactoryData[i][FactoryCP])
- {
- new vehicleid = AntiCheatGetVehicleID(playerid), cash = LoadedTrash[vehicleid] * TRASH_BAG_VALUE, xp = LoadedTrash[vehicleid] * 5;
- if(LoadedTrash[vehicleid] > 4) {
- Info[playerid][TrashSkills]++;
- mysql_format(mysql, string, sizeof string, "UPDATE `playersdata` SET `TrashSkills` = %i WHERE `ID` = %i", Info[playerid][TrashSkills], Info[playerid][ID]);
- mysql_tquery(mysql, string);
- }
- if(Info[playerid][Premium] >= 1) {
- new premiumxp = xp * 2;
- format(string, sizeof(string), "Payout $%s~n~+%i XP", cNumber(cash), premiumxp);
- Info[playerid][XP] += premiumxp;
- }
- else {
- format(string, sizeof(string), "Payout $%s~n~+%i XP", cNumber(cash), xp);
- Info[playerid][XP] += xp;
- }
- LevelUp(playerid);
- WinnerText(playerid, string);
- if(Info[playerid][Premium] == 2)
- GiveServerMoney(playerid, cash + GetPrecentage(cash, 15));
- else if(Info[playerid][Premium] == 3)
- GiveServerMoney(playerid, cash + GetPrecentage(cash, 20));
- else GiveServerMoney(playerid, cash);
- FactoryData[i][FactoryCurrent] += LoadedTrash[vehicleid];
- LoadedTrash[vehicleid] = 0;
- Trash_ShowCapacity(playerid);
- format(string, sizeof(string), "Recycling Factory - %s\n\n{FFFFFF}Current Trash Bags: {F39C12}%d\n{FFFFFF}Bring trash here to earn money!", FactoryData[i][FactoryName], FactoryData[i][FactoryCurrent]);
- UpdateDynamic3DTextLabelText(FactoryData[i][FactoryLabel], 0x2ECC71FF, string);
- for(new x; x < sizeof(FactoryData); x++)
- {
- if(IsValidDynamicMapIcon(FactoryIcons[playerid][x]))
- {
- DestroyDynamicMapIcon(FactoryIcons[playerid][x]);
- FactoryIcons[playerid][x] = -1;
- }
- TogglePlayerDynamicCP(playerid, FactoryData[x][FactoryCP], 0);
- }
- break;
- }
- }
- }
- if(checkpointid == CenterCheckpoint) {
- ShowPlayerDialog(playerid, DIALOG_CENTER, DIALOG_STYLE_LIST, "Player Center", //Fight Styles,Property Reenew, House Renew, // box = 73482, kung fu = 94631, knee = 58433
- "{FFFFFF}Reset K/D - {FF0099}$2,000,000\n{FFFFFF}Set new skin - {FF0099}$250,000\n{FFFFFF}Name change - {FF0099}$1,500,000\n{FFFFFF}Start vote - {FF0099}$250,000\nFight Style Normal - {FF0099}Free\nFight Style Box - {FF0099}$73,482\nFight Style Kung Fu - {FF0099}$94,631\nFight Style Knee - {FF0099}$58,433", "Select", "Close");
- }
- /* if(checkpointid == bankcashCP)
- {
- new str[956];
- format(str, sizeof str, "Depoist\nWithdraw\nBank Money:%i$", Info[playerid][BankMoney]);
- ShowPlayerDialog(playerid,DIALOG_BANK, DIALOG_STYLE_LIST, "Play-SA Bank", "str", "Select","Cancel");
- }*/
- if(!IsPlayerInAnyVehicle(playerid))
- {
- for(new i; i < MAX_ROBBERIES; i++)
- {
- if(!RobberyData[i][Exists]) continue;
- if(checkpointid == RobberyData[i][Checkpoint])
- {
- SetPVarInt(playerid, "robberyID", i);
- if(!IsPlayerConnected(RobberyData[i][OccupiedBy]) && RobberyData[i][robTimer] == -1)
- {
- new title[64];
- format(title, sizeof(title), "{F1C40F}Robbery: {FFFFFF}%s", RobberyData[i][robName]);
- ShowPlayerDialog(playerid, DIALOG_ROBBERY, DIALOG_STYLE_MSGBOX, title, "Do you want to rob this place?", "Rob", "Close");
- }
- break;
- }
- }
- }//================================BOyka======================================== kona bn45or
- /*if(checkpointid == LotteryCP1)
- {
- new Cache:result, query[94], string[744];
- result = mysql_query(mysql, "SELECT `Type` FROM `Lottery` WHERE `Type` = 1 AND `PlayerName` = '-'");
- if(cache_num_rows()) {
- format(query, sizeof query, "{FFFFFF}Lottery for $1,000 with prize $90,000 {FFFF00}%i available tickets\n", cache_num_rows());
- strcat(string, query);
- }
- else strcat(string, "{FFFFFF}Lottery for $1,000 with prize $90,000\n");
- result = mysql_query(mysql, "SELECT `Type` FROM `Lottery` WHERE `Type` = 2 AND `PlayerName` = '-'");
- if(cache_num_rows()) {
- format(query, sizeof query, "{FFFFFF}Lottery for $5,000 with prize $45,000 {FFFF00}%i available tickets\n", cache_num_rows());
- strcat(string, query);
- }
- else strcat(string, "{FFFFFF}Lottery for $5,000 with prize $45,000\n");
- result = mysql_query(mysql, "SELECT `Type` FROM `Lottery` WHERE `Type` = 3 AND `PlayerName` = '-'");
- if(cache_num_rows()) {
- format(query, sizeof query, "{FFFFFF}Lottery for $10,000 with prize $90,000 {FFFF00}%i available tickets\n", cache_num_rows());
- strcat(string, query);
- }
- else strcat(string, "{FFFFFF}Lottery for $10,000 with prize $90,000\n");
- result = mysql_query(mysql, "SELECT `Type` FROM `Lottery` WHERE `Type` = 4 AND `PlayerName` = '-'");
- if(cache_num_rows()) {
- format(query, sizeof query, "{FFFFFF}Lottery for $50,000 with prize $4,500,000 {FFFF00}%i available tickets\n", cache_num_rows());
- strcat(string, query);
- }
- else strcat(string, "{FFFFFF}Lottery for $50,000 with prize $4,500,000\n");
- result = mysql_query(mysql, "SELECT `Type` FROM `Lottery` WHERE `Type` = 5 AND `PlayerName` = '-'");
- if(cache_num_rows()) {
- format(query, sizeof query, "{FFFFFF}Lottery for $100,000 with prize $9,000,000 {FFFF00}%i available tickets\n", cache_num_rows());
- strcat(string, query);
- }
- else strcat(string, "{FFFFFF}Lottery for $100,000 with prize $9,000,000\n");
- result = mysql_query(mysql, "SELECT `Type` FROM `Lottery` WHERE `Type` = 6 AND `PlayerName` = '-'");
- if(cache_num_rows()) {
- format(query, sizeof query, "{FFFFFF}Lottery for $500,000 with prize $22,500,000 {FFFF00}%i available tickets\n", cache_num_rows());
- strcat(string, query);
- }
- else strcat(string, "{FFFFFF}Lottery for $500,000 with prize $22,500,000\n");
- result = mysql_query(mysql, "SELECT `Type` FROM `Lottery` WHERE `Type` = 7 AND `PlayerName` = '-'");
- if(cache_num_rows()) {
- format(query, sizeof query, "{FFFFFF}Lottery for $1,000,000 with prize $45,000,000 {FFFF00}%i available tickets\n", cache_num_rows());
- strcat(string, query);
- }
- else strcat(string, "{FFFFFF}Lottery for $1,000,000 with prize $45,000,000\n");
- cache_delete(result);
- ShowPlayerDialog(playerid, DIALOG_LOTTO, DIALOG_STYLE_LIST, "Lottery", string, "Select", "Close");
- }*/
- if(checkpointid == ThiefPlace)
- {
- if(InJob[playerid] == ThiefF)
- {// Clothes = 50k, Guns = 100k, Food = 70k
- TogglePlayerControllable(playerid, 0);
- SetTimerEx("CheckingThiefF", 5000, 0, "d", playerid);
- GameTextForPlayer(playerid, "~g~Checking The Bag Goods Please Wait", 5000, 5);
- RemovePlayerMapIcon(playerid,69);
- }
- if(InJob[playerid] == ThiefC)
- {
- TogglePlayerControllable(playerid, 0);
- SetTimerEx("CheckingThiefC", 5000, 0, "d", playerid);
- RemovePlayerMapIcon(playerid,69);
- }
- if(InJob[playerid] == ThiefG)
- {
- TogglePlayerControllable(playerid, 0);
- SetTimerEx("CheckingThiefG", 5000, 0, "d", playerid);
- GameTextForPlayer(playerid, "~g~Checking The Bag Goods Please Wait", 5000, 5);
- RemovePlayerMapIcon(playerid,69);
- }
- }
- if(checkpointid == MarketPlace)//xDDD aro7 3la el farmer
- {
- ShowPlayerDialog(playerid, DIALOG_MARKET, DIALOG_STYLE_TABLIST_HEADERS, "Market","Name\tPrice\tProfit\nClothes\t$30,000\t$10,000\nGuns\t$40,000\t$15,000\nFood\t$$20,000\t$5,000\n", "Buy", "Cancel");
- }
- if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT && checkpointid == BossCP[playerid])
- {
- if(IsPlayerInRangeOfPoint(playerid, 7.0, -2144.2568,-247.9228,36.5156))
- {
- if(InJob[playerid] == CashC)
- {
- /*Info[playerid][CashCourierSkills]++;
- mysql_format(mysql, string, sizeof string, "UPDATE `playersdata` SET `CashCourierSkills` = %i WHERE `ID` = %i", Info[playerid][CashCourierSkills], Info[playerid][ID]);
- mysql_tquery(mysql, string);*/
- GiveServerMoney(playerid, 10000);
- GameTextForPlayer(playerid, "~g~PAYOUT $10000", 3000, 5);
- TogglePlayerDynamicCP(playerid, BossCP[playerid], 0);
- DestroyDynamicCP(BossCP[playerid]);
- RemovePlayerAttachedObject(playerid,1);
- DestroyActor(ActorBoss[playerid]);
- RemovePlayerMapIcon(playerid, 69);
- InJob[playerid] = NOJOB;
- SetPlayerWantedLevelEx(playerid, GetPlayerWantedLevel(playerid) + 2);
- }
- }
- }
- if(checkpointid == ClothesCP[playerid])
- {
- if(GetVehicleModel(AntiCheatGetVehicleID(playerid)) == 609)
- {
- if(InJob[playerid] == ClothesT)
- {
- TogglePlayerControllable(playerid, 0);
- SetTimerEx("ClothesPayout", 5000, 0, "d", playerid);
- GameTextForPlayer(playerid, "~g~Clearing The Goods Please Wait", 3000, 5);
- DestroyDynamicCP(ClothesCP[playerid]);
- }
- }
- }
- if(checkpointid == GunsCP[playerid])
- {
- if(GetVehicleModel(AntiCheatGetVehicleID(playerid)) == 482)
- {
- if(InJob[playerid] == GunsT)
- {
- TogglePlayerControllable(playerid, 0);
- SetTimerEx("GunsPayout", 5000, 0, "d", playerid);
- GameTextForPlayer(playerid, "~g~Clearing The Goods Please Wait", 5000, 5);//
- DestroyDynamicCP(GunsCP[playerid]);
- }
- }
- }
- if(checkpointid == FoodCP[playerid])
- {
- if(GetVehicleModel(AntiCheatGetVehicleID(playerid)) == 573)
- {
- if(InJob[playerid] == FoodT)
- {
- TogglePlayerControllable(playerid, 0);
- SetTimerEx("FoodPayout", 5000, 0, "d", playerid);
- GameTextForPlayer(playerid, "~g~Clearing The Goods Please Wait", 5000, 5);
- DestroyDynamicCP(FoodCP[playerid]);
- }
- }
- }
- // =================================================BOyka===============================================
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement