23.04.2015, 17:20
Код:
case CHECKPOINT_HARVEST: { new vehicleid = GetPlayerVehicleID(playerid); CheckP[playerid] = 0; if(vehicleid >= 155 && vehicleid <= 158) { if(Harvesting[playerid] > 0) { gPlayerCheckpointStatus[playerid] = CHECKPOINT_HARVEST; Harvesting[playerid] += 1; if(Harvesting[playerid] != 28) { SendClientMessage(playerid,COLOR_GRAD3,"[HINT]: Head to the next checkpoint."); } // farm check if(Harvesting[playerid] == 2) { SetPlayerCheckpoint(playerid,-1370.9534,-1483.5564,102.1333,5.0); } // farm check else if(Harvesting[playerid] == 3) { SetPlayerCheckpoint(playerid,-1358.5763,-1503.1222,102.3323,5.02); } // farm check else if(Harvesting[playerid] == 4) { SetPlayerCheckpoint(playerid,-1365.5188,-1519.2660,102.4613,5.0); } // farm check else if(Harvesting[playerid] == 5) { SetPlayerCheckpoint(playerid,-1367.1089,-1544.0913,102.4136,5.0); } // farm check else if(Harvesting[playerid] == 6) { SetPlayerCheckpoint(playerid,-1358.9913,-1555.9219,102.4460,5.0); } // farm check else if(Harvesting[playerid] == 7) { SetPlayerCheckpoint(playerid,-1355.6049,-1578.1782,102.4907,5.0); } // farm check else if(Harvesting[playerid] == 8) { SetPlayerCheckpoint(playerid,-1365.6514,-1596.2019,102.4908,5.0); } // farm check else if(Harvesting[playerid] == 9) { SetPlayerCheckpoint(playerid,-1378.5776,-1604.9301,102.4908,5.0); } // farm check else if(Harvesting[playerid] == 10) { SetPlayerCheckpoint(playerid,-1397.8253,-1594.3827,102.4276,5.0); } // farm check else if(Harvesting[playerid] == 11) { SetPlayerCheckpoint(playerid,-1398.1288,-1566.4194,102.0638,5.0); } // farm check else if(Harvesting[playerid] == 12) { SetPlayerCheckpoint(playerid,-1397.7042,-1543.2629,101.9672,5.0); } // farm check else if(Harvesting[playerid] == 13) { SetPlayerCheckpoint(playerid,-1404.3562,-1484.2096,101.8919,5.0); } // farm check else if(Harvesting[playerid] == 14) { SendClientMessage(playerid,COLOR_BLUE,"[INFO]: You have completed your harvest and gained $550."); GivePlayerCash(playerid,550); Harvesting[playerid] = 0; DisablePlayerCheckpoint(playerid); gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE; SetVehicleToRespawn(GetPlayerVehicleID(playerid)); JobDelay[playerid] = 900; GameDrawForPlayer(playerid,"~w~Mission ~g~Passed ~n~~y~+$550",2000); } } } else {//warning 217: loose indentation here SendClientMessage(playerid,COLOR_GREEN,"You are not in a Harvester."); } }