Errors with compiling
#1

Hey, Im getting those errors :

Код:
C:\Documents and Settings\Lisa\Bureaublad\Kopie van MCRP.pwn(11703) : error 017: undefined symbol "i"
C:\Documents and Settings\Lisa\Bureaublad\Kopie van MCRP.pwn(11705) : error 017: undefined symbol "i"
C:\Documents and Settings\Lisa\Bureaublad\Kopie van MCRP.pwn(11707) : error 017: undefined symbol "i"
C:\Documents and Settings\Lisa\Bureaublad\Kopie van MCRP.pwn(11707) : error 017: undefined symbol "i"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

4 errors
Line 11703:
Код:
	if(PlayerInfo[i][pGCMuted] == 2 && PlayerInfo[i][pGCMutedTime] < 1)
11705:
Код:
		    PlayerInfo[i][pGCMuted] = 0;
11707:
Код:
	if(PlayerInfo[i][pGCMuted] > 1) PlayerInfo[i][pGCMutedTime]--;
hole codE:
Код:
public OnPlayerEnterCheckpoint(playerid)
{
	if(GetPVarInt(playerid,"IsInArena") >= 0)
	{
	    new arenaid = GetPVarInt(playerid, "IsInArena");
	    if(PaintBallArena[arenaid][pbGameType] == 4 || PaintBallArena[arenaid][pbGameType] == 5)
	    {
	        SendAudioToPlayer(playerid, 23, 100, 0);
	    }
	    return 1;
	}
	if(GetPVarInt(playerid,"TrackCar") != 0)
	{
	    PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
	    DisablePlayerCheckpoint(playerid);
		DeletePVar(playerid, "TrackCar");
		return 1;
	}
	for(new h = 0; h < MAX_POINTS; h++)
	{
		if(Points[h][Type] == 3 && GetPVarInt(playerid, "CrateDeliver") == 1 && IsPlayerInRangeOfPoint(playerid, 6.0, 2166.3772,-1675.3829,15.0859))
		{
			new string[128];
		    if(GetPVarInt(playerid, "tpDrugRunTimer") != 0)
	    	{
			   	format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s (ID %d) is possibly teleport drugrunning.", GetPlayerNameEx(playerid), playerid);
			   	ABroadCast( COLOR_YELLOW, string, 2 );
			   	format(string, sizeof(string), "%s (ID %d) is possibly teleport drugrunning.", GetPlayerNameEx(playerid), playerid);
			   	Log("logs/hack.log", string);
			}
			DisablePlayerCheckpoint(playerid);
			new level = PlayerInfo[playerid][pSmugSkill];
   			if(level >= 0 && level <= 20)
			{
			    SendClientMessageEx(playerid, COLOR_LIGHTBLUE,"* You received $1250 for delivering the Drug Crates.");
				GivePlayerCash(playerid, 1250);
			}
			else if(level >= 21 && level <= 50)
			{
			    SendClientMessageEx(playerid, COLOR_LIGHTBLUE,"* You received $1500 for delivering the Drug Crates.");
				GivePlayerCash(playerid, 1500);
			}
			else if(level >= 51 && level <= 100)
			{
			    SendClientMessageEx(playerid, COLOR_LIGHTBLUE,"* You received $2000 for delivering the Drug Crates.");
				GivePlayerCash(playerid, 2000);
			}
			else if(level >= 101 && level <= 200)
			{
			    SendClientMessageEx(playerid, COLOR_LIGHTBLUE,"* You received $3000 for delivering the Drug Crates.");
				GivePlayerCash(playerid, 3000);
			}
			else if(level >= 201)
			{
			    SendClientMessageEx(playerid, COLOR_LIGHTBLUE,"* You received $4000 for delivering the Drug Crates.");
				GivePlayerCash(playerid, 4000);
			}
			DeletePVar(playerid, "CrateDeliver");
			PlayerInfo[playerid][pCrates] = 0;
			Points[h][Stock] += 10;
			PlayerInfo[playerid][pSmugSkill]++;
			format(string, sizeof(string), " POT AVAILABLE: %d/1000.", Points[h][Stock]);
			UpdateDynamic3DTextLabelText(Points[h][TextLabel], COLOR_YELLOW, string);
			return 1;
		}
		else if(Points[h][Type] == 4 && GetPVarInt(playerid, "CrateDeliver") == 2 && IsPlayerInRangeOfPoint(playerid, 6.0, 2354.2808,-1169.2959,28.0066))
		{
			new string[128];
		    if(GetPVarInt(playerid, "tpDrugRunTimer") != 0)
	    	{
			   	format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s (ID %d) is possibly teleport drugrunning.", GetPlayerNameEx(playerid), playerid);
			   	ABroadCast( COLOR_YELLOW, string, 2 );
			   	format(string, sizeof(string), "%s (ID %d) is possibly teleport drugrunning.", GetPlayerNameEx(playerid), playerid);
			   	Log("logs/hack.log", string);
			}
			DisablePlayerCheckpoint(playerid);
			new level = PlayerInfo[playerid][pSmugSkill];
			if(level >= 0 && level <= 20)
			{
			    SendClientMessageEx(playerid, COLOR_LIGHTBLUE,"* You received $1250 for delivering the Drug Crates.");
				GivePlayerCash(playerid, 1250);
			}
			else if(level >= 21 && level <= 50)
			{
			    SendClientMessageEx(playerid, COLOR_LIGHTBLUE,"* You received $1500 for delivering the Drug Crates.");
				GivePlayerCash(playerid, 1500);
			}
			else if(level >= 51 && level <= 100)
			{
			    SendClientMessageEx(playerid, COLOR_LIGHTBLUE,"* You received $2000 for delivering the Drug Crates.");
				GivePlayerCash(playerid, 2000);
			}
			else if(level >= 101 && level <= 200)
			{
			    SendClientMessageEx(playerid, COLOR_LIGHTBLUE,"* You received $3000 for delivering the Drug Crates.");
				GivePlayerCash(playerid, 3000);
			}
			else if(level >= 201)
			{
			    SendClientMessageEx(playerid, COLOR_LIGHTBLUE,"* You received $4000 for delivering the Drug Crates.");
				GivePlayerCash(playerid, 4000);
			}
			DeletePVar(playerid, "CrateDeliver");
			PlayerInfo[playerid][pCrates] = 0;
			Points[h][Stock] += 10;
			PlayerInfo[playerid][pSmugSkill]++;
			format(string, sizeof(string), " CRACK AVAILABLE: %d/1000.", Points[h][Stock]);
			UpdateDynamic3DTextLabelText(Points[h][TextLabel], COLOR_YELLOW, string);
			return 1;
		}
		else if(Points[h][Type] == 2 && GetPVarInt(playerid, "MatDeliver") == Points[h][MatPoint] && IsPlayerInRangeOfPoint(playerid, 6.0, Points[h][Pointx], Points[h][Pointy], Points[h][Pointz]))
		{
			if(GetPVarInt(playerid, "Packages") > 0)
			{
				new string[128];
				if(GetPVarInt(playerid, "tpMatRunTimer") != 0)
			    {
			    	format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s (ID %d) is possibly teleport matrunning.", GetPlayerNameEx(playerid), playerid);
			    	ABroadCast( COLOR_YELLOW, string, 2 );
			    	format(string, sizeof(string), "%s (ID %d) is possibly teleport matrunning.", GetPlayerNameEx(playerid), playerid);
			    	Log("logs/hack.log", string);
				}
				new payout = (25)*(GetPVarInt(playerid, "Packages"));

				if(PlayerInfo[playerid][pDonateRank] == 1)
				{
				    PlayerInfo[playerid][pMats] += 500;
					SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* The factory gave you 500 materials for your 15 materials packages.");
					SendClientMessageEx(playerid, COLOR_YELLOW,"Bronze VIP: You received 1.5x more materials than normal.");

				}
				else if(PlayerInfo[playerid][pDonateRank] == 2 || PlayerInfo[playerid][pDonateRank] == 3)
				{
				    PlayerInfo[playerid][pMats] += 650;
					SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* The factory gave you 650 materials for your 20 materials packages.");
					SendClientMessageEx(playerid, COLOR_YELLOW,"Silver & Gold VIP: You received 2x more materials than normal.");

				}
				else if(PlayerInfo[playerid][pDonateRank] >= 4)
				{
				    PlayerInfo[playerid][pMats] += 1000;
					SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* The factory gave you 1000 materials for your 25 materials packages.");
					SendClientMessageEx(playerid, COLOR_YELLOW,"Platinum VIP: You received 2.5x more materials than normal.");

				}
				else
				{
    				PlayerInfo[playerid][pMats] += 250;
					SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* The factory gave you 250 materials for your 10 materials packages.");
				}

				DeletePVar(playerid, "Packages");
				DeletePVar(playerid, "MatDeliver");
				DisablePlayerCheckpoint(playerid);
				for(new p = 0; p < sizeof(FamilyInfo); p++)
				{
					if(strcmp(Points[h][Owner], FamilyInfo[p][FamilyName], true) == 0)
					{
						FamilyInfo[p][FamilyBank] = FamilyInfo[p][FamilyBank]+(payout/3);
						//SendClientMessageEx(playerid, COLOR_WHITE, " Family owner recieved 50 percent of the cost.");
					}
				}
				return 1;
			}
		}
		else if(GetPVarInt(playerid, "MatDeliver") == 333 && IsPlayerInRangeOfPoint(playerid, 6.0, -330.44, -467.54, 0.85))
		{
			if(GetPVarInt(playerid, "Packages") > 0)
			{
				new vehicle = GetPlayerVehicleID(playerid);
				if(IsABoat(vehicle))
				{
					if(PlayerInfo[playerid][pDonateRank] == 1)
					{
				    	PlayerInfo[playerid][pMats] += 675;
						SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* The factory gave you 675 materials for your 23 materials packages.");
						SendClientMessageEx(playerid, COLOR_YELLOW,"Bronze VIP: You received 1.5x more materials than normal.");
					}
					else if(PlayerInfo[playerid][pDonateRank] == 2 || PlayerInfo[playerid][pDonateRank] == 3)
					{
				    	PlayerInfo[playerid][pMats] += 900;
						SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* The factory gave you 900 materials for your 30 materials packages.");
						SendClientMessageEx(playerid, COLOR_YELLOW,"Silver & Gold VIP: You received 2x more materials than normal.");

					}
					else if(PlayerInfo[playerid][pDonateRank] >= 4)
					{
				    	PlayerInfo[playerid][pMats] += 625;
						SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* The factory gave you 1125 materials for your 38 materials packages.");
						SendClientMessageEx(playerid, COLOR_YELLOW,"Platinum VIP: You received 2.5x more materials than normal.");

					}
					else
					{
						PlayerInfo[playerid][pMats] += 450;
						SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* The factory gave you 450 materials for your 15 materials packages.");
					}

					DeletePVar(playerid, "Packages");
					DeletePVar(playerid, "MatDeliver");
					DisablePlayerCheckpoint(playerid);
				}
				else
				{
					GameTextForPlayer(playerid, "~r~You are not in a boat!", 3000, 1);
					return 1;
				}
				if(GetPVarInt(playerid, "tpMatRunTimer") != 0)
			    {
					new string[128];
			    	format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s (ID %d) is possibly teleport matrunning.", GetPlayerNameEx(playerid), playerid);
			    	ABroadCast( COLOR_YELLOW, string, 2 );
			    	format(string, sizeof(string), "%s (ID %d) is possibly teleport matrunning.", GetPlayerNameEx(playerid), playerid);
			    	Log("logs/hack.log", string);
				}
				return 1;
			}
		}
		else if(GetPVarInt(playerid, "MatDeliver") == 444 && IsPlayerInRangeOfPoint(playerid, 6.0, -1872.879760, 1416.312500, 7.180089))
		{
			if(GetPVarInt(playerid, "Packages") > 0)
			{
				if(PlayerInfo[playerid][pDonateRank] == 1)
				{
				    PlayerInfo[playerid][pMats] += 1500;
					SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* The factory gave you 450 materials for your 18 materials packages.");
					SendClientMessageEx(playerid, COLOR_YELLOW,"Bronze VIP: You received 1.5x more materials than normal.");

				}
				else if(PlayerInfo[playerid][pDonateRank] == 2 || PlayerInfo[playerid][pDonateRank] == 3)
				{
				    PlayerInfo[playerid][pMats] += 2000;
					SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* The factory gave you 600 materials for your 24 materials packages.");
					SendClientMessageEx(playerid, COLOR_YELLOW,"Silver & Gold VIP: You received 2x more materials than normal.");

				}
				else if(PlayerInfo[playerid][pDonateRank] >= 4)
				{
				    PlayerInfo[playerid][pMats] += 2500;
					SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* The factory gave you 750 materials for your 30 materials packages.");
					SendClientMessageEx(playerid, COLOR_YELLOW,"Platinum VIP: You received 2.5x more materials than normal.");

				}
				else
				{
			    	PlayerInfo[playerid][pMats] += 1000;
					SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* The factory gave you 1000 materials for your 12 materials packages.");
				}

				DeletePVar(playerid, "Packages");
				DeletePVar(playerid, "MatDeliver");
				DisablePlayerCheckpoint(playerid);
				if(GetPVarInt(playerid, "tpMatRunTimer") != 0)
			    {
					new string[128];
			    	format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s (ID %d) is possibly teleport matrunning.", GetPlayerNameEx(playerid), playerid);
			    	ABroadCast( COLOR_YELLOW, string, 2 );
			    	format(string, sizeof(string), "%s (ID %d) is possibly teleport matrunning.", GetPlayerNameEx(playerid), playerid);
			    	Log("logs/hack.log", string);
				}
				return 1;
			}
		}
	}
	if(GetPVarInt(playerid, "TruckDeliver") > 0 && gPlayerCheckpointStatus[playerid] != CHECKPOINT_RETURNTRUCK)
	{
	    new vehicleid = GetPlayerVehicleID(playerid);
	    if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
	    {
	        SendClientMessageEx(playerid, COLOR_WHITE, "You are not in a Truck!");
	        return 1;
	    }
	    if(TruckUsed[playerid] != INVALID_VEHICLE_ID && vehicleid != TruckUsed[playerid])
	    {
	        SendClientMessageEx(playerid, COLOR_WHITE, "This is not your Truck with the goods you are suppose to deliver!");
	        return 1;
	    }

		if(!IsAtTruckDeliveryPoint(playerid))
 		{// In the case the player finds a way to exploit the checkpoint to different location
			CancelTruckDelivery(playerid);
			SendClientMessageEx(playerid, COLOR_REALRED, "ERROR: Wrong checkpoint entered. Truck delivery canceled completely.");
			return 1;
   		}

		if(GetPVarInt(playerid, "tpTruckRunTimer") != 0)
		{
  			new string[128];
			format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s (ID %d) is possibly teleport truckrunning.", GetPlayerNameEx(playerid), playerid);
  			ABroadCast( COLOR_YELLOW, string, 2 );
    		format(string, sizeof(string), "%s (ID %d) is possibly teleport truckrunning.", GetPlayerNameEx(playerid), playerid);
	    	Log("logs/hack.log", string);
		}
		new truckdeliver = GetPVarInt(playerid, "TruckDeliver");
		TruckContents[vehicleid] = 0;

		if(truckdeliver >= 1 && truckdeliver <= 3)
		{
			SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You delivered the food & beverages, return the truck to the San Fierro Docks to collect your pay.");
		}
		else if(truckdeliver >= 4 && truckdeliver <= 6)
		{
			SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You delivered the clothing, return the truck to the San Fierro Docks to collect your pay.");
		}
		else if(truckdeliver == 7)
		{
			SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You delivered the materials, return the truck to the San Fierro Docks to collect your pay.");
		}
		else if(truckdeliver >= 8 && truckdeliver <= 10)
		{
			SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You delivered the 24/7 items, return the truck to the San Fierro Docks to collect your pay.");
		}
		else if(truckdeliver >= 11 && truckdeliver <= 15)
		{
			SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You delivered the weapons, return the truck to the San Fierro Docks to collect your pay.");
		}
		else if(truckdeliver >= 16 && truckdeliver <= 20)
		{
			SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You delivered the drugs, return the truck to the San Fierro Docks to collect your pay.");
		}
		else if(truckdeliver >= 21 && truckdeliver <= 25)
		{
			SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You delivered the illegal materials, return the truck to the San Fierro Docks to collect your pay.");
		}
		DisablePlayerCheckpoint(playerid);

		gPlayerCheckpointStatus[playerid] = CHECKPOINT_RETURNTRUCK;
		SetPlayerCheckpoint(playerid, -1548.087524, 123.590423, 3.554687, 5);
		GameTextForPlayer(playerid, "~w~Waypoint set ~r~San Fierro Docks", 5000, 1);
		SendClientMessageEx(playerid, COLOR_WHITE, "HINT: Return to the San Fierro Docks (see checkpoint on radar).");

		SetPVarInt(playerid, "tpTruckRunTimer", 30);
		SetTimerEx("OtherTimerEx", 1000, false, "ii", playerid, TYPE_TPTRUCKRUNTIMER);
		return 1;
	}
	// Pizza Delivery
	if(GetPVarInt(playerid, "Pizza") > 0 && IsPlayerInRangeOfPoint(playerid, 5.0, HouseInfo[GetPVarInt(playerid, "Pizza")][hExteriorX], HouseInfo[GetPVarInt(playerid, "Pizza")][hExteriorY], HouseInfo[GetPVarInt(playerid, "Pizza")][hExteriorZ]))
	{
	    new string[128];
		if (GetPVarInt(playerid, "tpPizzaTimer") != 0)
		{
			format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s (ID %d) is possibly teleport pizzarunning.", GetPlayerNameEx(playerid), playerid);
  			ABroadCast( COLOR_YELLOW, string, 2 );
    		format(string, sizeof(string), "%s (ID %d) is possibly teleport pizzarunning.", GetPlayerNameEx(playerid), playerid);
	    	Log("logs/hack.log", string);
		}
		DestroyProgressBar(PizzaBar[playerid]);
		format(string, sizeof(string), "You have delivered the pizza to the destination! You have made $%d.", (GetPVarInt(playerid, "pizzaTimer") * 70));
		Tax -= (GetPVarInt(playerid, "pizzaTimer") * 70);
		SaveStuff();
		GivePlayerCash(playerid, floatround((GetPVarInt(playerid, "pizzaTimer") * 70), floatround_round));
		SendClientMessageEx(playerid, COLOR_WHITE, string);
		SetPVarInt(playerid, "Pizza", 0);
		DisablePlayerCheckpoint(playerid);

	}
	if(GetPVarInt(playerid, "Finding")>=1)
	{
	    DeletePVar(playerid, "Finding");
	    DisablePlayerCheckpoint(playerid);
	    GameTextForPlayer(playerid, "~w~Reached destination", 5000, 1);
	}
	if(TaxiCallTime[playerid] > 0 && TaxiAccepted[playerid] < 999)
	{
		TaxiAccepted[playerid] = 999;
		GameTextForPlayer(playerid, "~w~Reached destination", 5000, 1);
		TaxiCallTime[playerid] = 0;
		DisablePlayerCheckpoint(playerid);
	}
	if(PlayerInfo[i][pGCMuted] == 2 && PlayerInfo[i][pGCMutedTime] < 1)
		{
		    PlayerInfo[i][pGCMuted] = 0;
		}
	if(PlayerInfo[i][pGCMuted] > 1) PlayerInfo[i][pGCMutedTime]--;
	else if(EMSCallTime[playerid] > 0 && EMSAccepted[playerid] < 999)
	{
	    if(GetPVarInt(EMSAccepted[playerid], "Injured") == 1)
	    {
	    	SendEMSQueue(EMSAccepted[playerid],2);
	    	EMSAccepted[playerid] = 999;
	    	GameTextForPlayer(playerid, "~w~Reached destination", 5000, 1);
	    	EMSCallTime[playerid] = 0;
	    	DisablePlayerCheckpoint(playerid);
		}
		else
		{
            EMSAccepted[playerid] = 999;
		    GameTextForPlayer(playerid, "~r~Patient has died", 5000, 1);
		    EMSCallTime[playerid] = 0;
	    	DisablePlayerCheckpoint(playerid);
		}
	}
	else if(BusCallTime[playerid] > 0 && BusAccepted[playerid] < 999)
	{
		BusAccepted[playerid] = 999;
		GameTextForPlayer(playerid, "~w~Reached destination", 5000, 1);
		BusCallTime[playerid] = 0;
		DisablePlayerCheckpoint(playerid);
	}
	else if(MedicCallTime[playerid] > 0 && MedicAccepted[playerid] < 999)
	{
		MedicAccepted[playerid] = 999;
		GameTextForPlayer(playerid, "~w~Reached patient", 5000, 1);
		MedicCallTime[playerid] = 0;
		DisablePlayerCheckpoint(playerid);
	}
	/*else if(CP[playerid] == 1)
	{
		if(IsPlayerInAnyVehicle(playerid))
		{
		    for(new d = 0 ; d < MAX_PLAYERVEHICLES; d++)
	    	{
		    	if(IsPlayerInVehicle(playerid, PlayerVehicleInfo[playerid][d][pvId]))
		    	{
		    	    SendClientMessageEx(playerid, COLOR_GRAD2, "You cannot sell this car");
		    	    DisablePlayerCheckpoint(playerid);
		    	    CP[playerid] = 0;
		    	    return 1;
		    	}
			}
			PlayerInfo[playerid][pJackSkill] ++;
			new mypoint = -1;
			for (new i=0; i<MAX_POINTS; i++)
			{
				if(strcmp(Points[i][Name], "Auto Export Company", true) == 0)
				{
					mypoint = i;
				}
			}
			if(PlayerInfo[playerid][pJackSkill] == 50)
			{ SendClientMessageEx(playerid, COLOR_YELLOW, "* Your Car Jack Skill is now Level 2, you will earn more Money and quicker Reload Time."); }
			else if(PlayerInfo[playerid][pJackSkill] == 100)
			{ SendClientMessageEx(playerid, COLOR_YELLOW, "* Your Car Jack Skill is now Level 3, you will earn more Money and quicker Reload Time."); }
			else if(PlayerInfo[playerid][pJackSkill] == 200)
			{ SendClientMessageEx(playerid, COLOR_YELLOW, "* Your Car Jack Skill is now Level 4, you will earn more Money and quicker Reload Time."); }
			else if(PlayerInfo[playerid][pJackSkill] == 400)
			{ SendClientMessageEx(playerid, COLOR_YELLOW, "* Your Car Jack Skill is now Level 5, you will earn more Money and quicker Reload Time."); }
			new level = PlayerInfo[playerid][pJackSkill];
			if(level >= 0 && level <= 50)
			{
				new rand = random(sizeof(SELLCAR1));
				new duh = GetPlayerVehicleID(playerid);
				format(string, sizeof(string), "You sold a car for $%d, your reload time is 20 minutes.", SELLCAR1[rand]);
				SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
				GivePlayerCash(playerid, SELLCAR1[rand]);
				CP[playerid] = 0;
				DisablePlayerCheckpoint(playerid);
				PlayerInfo[playerid][pCarTime] = 1200;
				SetVehicleToRespawn(duh);
				for(new i = 0; i < sizeof(FamilyInfo); i++)
				{
					if(strcmp(Points[mypoint][Owner], FamilyInfo[i][FamilyName], true) == 0)
					{
						FamilyInfo[i][FamilyBank] = FamilyInfo[i][FamilyBank]+(SELLCAR1[rand]/2);
					}
				}
			}
			else if(level >= 51 && level <= 100)
			{
				new rand = random(sizeof(SELLCAR2));
				new duh = GetPlayerVehicleID(playerid);
				format(string, sizeof(string), "You sold a car for $%d, your reload time is 18 minutes.", SELLCAR2[rand]);
				SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
				GivePlayerCash(playerid, SELLCAR2[rand]);
				PlayerInfo[playerid][pCarTime] = 1080;
				CP[playerid] = 0;
				DisablePlayerCheckpoint(playerid);
				SetVehicleToRespawn(duh);
				for(new i = 0; i < sizeof(FamilyInfo); i++)
				{
					if(strcmp(Points[mypoint][Owner], FamilyInfo[i][FamilyName], true) == 0)
					{
						FamilyInfo[i][FamilyBank] = FamilyInfo[i][FamilyBank]+(SELLCAR2[rand]/2);
					}
				}
			}
			else if(level >= 101 && level <= 200)
			{
				new rand = random(sizeof(SELLCAR3));
				new duh = GetPlayerVehicleID(playerid);
				format(string, sizeof(string), "You sold a car for $%d, your reload time is 16 minutes.", SELLCAR3[rand]);
				SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
				GivePlayerCash(playerid, SELLCAR3[rand]);
				PlayerInfo[playerid][pCarTime] = 960;
				CP[playerid] = 0;
				DisablePlayerCheckpoint(playerid);
				SetVehicleToRespawn(duh);
				for(new i = 0; i < sizeof(FamilyInfo); i++)
				{
					if(strcmp(Points[mypoint][Owner], FamilyInfo[i][FamilyName], true) == 0)
					{
						FamilyInfo[i][FamilyBank] = FamilyInfo[i][FamilyBank]+(SELLCAR3[rand]/2);
					}
				}
			}
			else if(level >= 201 && level <= 400)
			{
				new rand = random(sizeof(SELLCAR4));
				new duh = GetPlayerVehicleID(playerid);
				format(string, sizeof(string), "You sold a car for $%d, your reload time is 14 minutes.", SELLCAR4[rand]);
				SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
				GivePlayerCash(playerid, SELLCAR4[rand]);
				PlayerInfo[playerid][pCarTime] = 840;
				CP[playerid] = 0;
				DisablePlayerCheckpoint(playerid);
				SetVehicleToRespawn(duh);
				for(new i = 0; i < sizeof(FamilyInfo); i++)
				{
					if(strcmp(Points[mypoint][Owner], FamilyInfo[i][FamilyName], true) == 0)
					{
						FamilyInfo[i][FamilyBank] = FamilyInfo[i][FamilyBank]+(SELLCAR4[rand]/2);
					}
				}
			}
			else if(level >= 401)
			{
				new money = 6000;
				new duh = GetPlayerVehicleID(playerid);
				format(string, sizeof(string), "You sold a car for $%d, your reload time is 12 minutes.", money);
				SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
				GivePlayerCash(playerid, money);
  				PlayerInfo[playerid][pCarTime] = 720;
 				CP[playerid] = 0;
				DisablePlayerCheckpoint(playerid);
				SetVehicleToRespawn(duh);
				for(new i = 0; i < sizeof(FamilyInfo); i++)
				{
					if(strcmp(Points[mypoint][Owner], FamilyInfo[i][FamilyName], true) == 0)
					{
						FamilyInfo[i][FamilyBank] = FamilyInfo[i][FamilyBank]+(money/2);
					}
				 }
			}
			GameTextForPlayer(playerid, "~y~Sold the car", 2500, 1);
			CP[playerid] = 0;
			DisablePlayerCheckpoint(playerid);
			new duh = GetPlayerVehicleID(playerid);
			if(GetVehicleModel(duh)==525&&IsTrailerAttachedToVehicle(duh))
			{
				SetVehicleToRespawn(GetVehicleTrailer(duh));
			}
			else
			{
				SetVehicleToRespawn(duh);
			}
		}
		else
		{
			GameTextForPlayer(playerid, "Not in a car", 5000, 1);
		}
	}*/
	else
	{
		switch (gPlayerCheckpointStatus[playerid])
		{
			case CHECKPOINT_HOME:
			{
				PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
				new i = hInviteHouse[playerid];
				DisablePlayerCheckpoint(playerid);
				gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
    			Streamer_UpdateEx(playerid, HouseInfo[i][hInteriorX],HouseInfo[i][hInteriorY],HouseInfo[i][hInteriorZ]);
				SetPlayerInterior(playerid,HouseInfo[i][hHInteriorWorld]);
				if(HouseInfo[i][hCustomInterior] == 1)
				{
				    TogglePlayerControllable(playerid, 0);
			        GameTextForPlayer(playerid, "Objects loading...", 4000, 5);
				    SetPVarInt(playerid, "Loading..Interior", 1);
				    SetTimerEx("SafeLoadObjects", 4000, 0, "d", playerid);
		        }
				SetPlayerPos(playerid,HouseInfo[i][hInteriorX],HouseInfo[i][hInteriorY],HouseInfo[i][hInteriorZ]);
				GameTextForPlayer(playerid, "~w~Welcome Home", 5000, 1);
				PlayerInfo[playerid][pInt] = HouseInfo[i][hHInteriorWorld];
				PlayerInfo[playerid][pLocal] = i+6000;
				PlayerInfo[playerid][pVW] = i+6000;
				SetPlayerVirtualWorld(playerid, i+6000);
				hInviteOffer[playerid] = 999;
				hInviteHouse[playerid] = INVALID_HOUSE_ID;
			}
			case CHECKPOINT_LOADTRUCK:
			{
			    if(IsPlayerInRangeOfPoint(playerid, 6, -1572.767822, 81.137527, 3.554687))
			    {
				    new vehicleid = GetPlayerVehicleID(playerid);
	   				if(IsATruckerCar(vehicleid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
		    		{
				    	PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
				    	DisablePlayerCheckpoint(playerid);
				    	gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
						TogglePlayerControllable(playerid, 0);
						SetPVarInt(playerid, "IsFrozen", 1);
						ShowPlayerDialog(playerid,DIALOG_LOADTRUCK,DIALOG_STYLE_LIST,"What do you want to transport?","{00F70C}Legal goods {FFFFFF}(no risk but also no bonuses)\n{FF0606}Illegal goods {FFFFFF}(risk of getting caught but a bonus)","Select","Cancel");
					}
					else return SendClientMessageEx(playerid, COLOR_GREY, "You are not driving a San Fierro Docks Truck!");
				}
			}
			case CHECKPOINT_RETURNTRUCK:
			{
			    if(!IsPlayerInRangeOfPoint(playerid, 6, -1548.087524, 123.590423, 3.554687))
			    {// In the case the player finds a way to exploit the checkpoint to different location
                    CancelTruckDelivery(playerid);
                    SendClientMessageEx(playerid, COLOR_REALRED, "ERROR: Wrong checkpoint entered. Truck delivery canceled completely.");
					return 1;
			    }
 				if(GetPVarInt(playerid, "tpTruckRunTimer") != 0)
				{
  					new string[128];
					format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s (ID %d) is possibly teleport truckrunning.", GetPlayerNameEx(playerid), playerid);
  					ABroadCast( COLOR_YELLOW, string, 2 );
    				format(string, sizeof(string), "%s (ID %d) is possibly teleport truckrunning.", GetPlayerNameEx(playerid), playerid);
	    			Log("logs/hack.log", string);
				}
   				new vehicleid = GetPlayerVehicleID(playerid);
				if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
	    		{
	        		SendClientMessageEx(playerid, COLOR_WHITE, "You are not in a Truck!");
	        		return 1;
	    		}
	    		if(TruckUsed[playerid] != INVALID_VEHICLE_ID && vehicleid != TruckUsed[playerid])
	    		{
	        		SendClientMessageEx(playerid, COLOR_WHITE, "This is not the Truck you used, return the Truck you used in order to receive your pay!");
	        		return 1;
	    		}

			    PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
			    DisablePlayerCheckpoint(playerid);
			    gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;

			    SetVehicleToRespawn(vehicleid);

   				new string[128], payment;
				new level = PlayerInfo[playerid][pTruckSkill];
				if(level >= 0 && level <= 50) payment = 7000;
				else if(level >= 51 && level <= 100) payment = 8250;
				else if(level >= 101 && level <= 200) payment = 9500;
				else if(level >= 201 && level <= 400) payment = 10750;
				else if(level >= 401) payment = 12000;

				Tax -= payment;
				SaveStuff();
				GivePlayerCash(playerid, payment);
    			format(string, sizeof(string), "* You were paid $%d for delivering the goods and returning the truck.", payment);
			    SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);

                new truckdeliver = GetPVarInt(playerid, "TruckDeliver");
				if(truckdeliver == 11)
				{
				    SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You were also given a free 9mm as a bonus for taking the risk of transporting illegal weapons.");
				    GivePlayerValidWeapon(playerid, 22, 60000);
				}
				else if(truckdeliver == 12)
				{
				    SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You were also given a free Shotgun as a bonus for taking the risk of transporting illegal weapons.");
				    GivePlayerValidWeapon(playerid, 25, 60000);
				}
				else if(truckdeliver == 13)
				{
				    SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You were also given a free MP5 as a bonus for taking the risk of transporting illegal weapons.");
				    GivePlayerValidWeapon(playerid, 29, 60000);
				}
				else if(truckdeliver == 14)
				{
				    SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You were also given a free Deagle as a bonus for taking the risk of transporting illegal weapons.");
				    GivePlayerValidWeapon(playerid, 24, 60000);
				}
				else if(truckdeliver == 15)
				{
   					new randomweapon = Random(1, 3);
    				if(randomweapon == 1)
					{
    					SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You were also given a free AK-47 as a bonus for taking the risk of transporting illegal weapons.");
    					GivePlayerValidWeapon(playerid, 30, 60000);
    				}
    				if(randomweapon == 2)
					{
    					SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You were also given a free M4 as a bonus for taking the risk of transporting illegal weapons.");
    					GivePlayerValidWeapon(playerid, 31, 60000);
    				}
				}
				else if(truckdeliver == 16)
				{
				    SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You were also given 2 pot & 1 crack as a bonus for taking the risk of transporting illegal drugs.");
				    PlayerInfo[playerid][pPot] += 2;
				    PlayerInfo[playerid][pCrack] += 1;
				}
				else if(truckdeliver == 17)
				{
				    SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You were also given 4 pot & 2 crack as a bonus for taking the risk of transporting illegal drugs.");
				    PlayerInfo[playerid][pPot] += 4;
				    PlayerInfo[playerid][pCrack] += 2;
				}
				else if(truckdeliver == 18)
				{
				    SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You were also given 6 pot & 3 crack as a bonus for taking the risk of transporting illegal drugs.");
				    PlayerInfo[playerid][pPot] += 6;
				    PlayerInfo[playerid][pCrack] += 3;
				}
				else if(truckdeliver == 19)
				{
				    SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You were also given 8 pot & 4 crack as a bonus for taking the risk of transporting illegal drugs.");
				    PlayerInfo[playerid][pPot] += 8;
				    PlayerInfo[playerid][pCrack] += 4;
				}
				else if(truckdeliver == 20)
				{
				    SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You were also given 10 pot & 5 crack as a bonus for taking the risk of transporting illegal drugs.");
				    PlayerInfo[playerid][pPot] += 10;
				    PlayerInfo[playerid][pCrack] += 5;
				}
				else if(truckdeliver == 21)
				{
				    SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You were also given 25 materials as a bonus for taking the risk of transporting illegal materials.");
					PlayerInfo[playerid][pMats] += 25;
				}
				else if(truckdeliver == 22)
				{
				    SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You were also given 50 materials as a bonus for taking the risk of transporting illegal materials.");
					PlayerInfo[playerid][pMats] += 50;
				}
				else if(truckdeliver == 23)
				{
				    SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You were also given 100 materials as a bonus for taking the risk of transporting illegal materials.");
					PlayerInfo[playerid][pMats] += 100;
				}
				else if(truckdeliver == 24)
				{
				    SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You were also given 150 materials as a bonus for taking the risk of transporting illegal materials.");
					PlayerInfo[playerid][pMats] += 150;
				}
				else if(truckdeliver == 25)
				{
				    SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You were also given 200 materials as a bonus for taking the risk of transporting illegal materials.");
					PlayerInfo[playerid][pMats] += 200;
				}

                PlayerInfo[playerid][pTruckSkill]++;
				TruckUsed[playerid] = INVALID_VEHICLE_ID;
				DeletePVar(playerid, "TruckDeliver");

				new mypoint = -1;
				for (new i=0; i<MAX_POINTS; i++)
				{
					if(strcmp(Points[i][Name], "San Fierro Docks", true) == 0)
					{
						mypoint = i;
					}
				}
				for(new i = 0; i < sizeof(FamilyInfo); i++)
				{
					if(strcmp(Points[mypoint][Owner], FamilyInfo[i][FamilyName], true) == 0)
					{
						Tax -= 200;
						SaveStuff();
						FamilyInfo[i][FamilyBank] = FamilyInfo[i][FamilyBank]+(200);
					}
			 	}
			}
			case CHECKPOINT_HITMAN:
			{
			    PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
			    DisablePlayerCheckpoint(playerid);
			    gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
			    SendClientMessageEx(playerid, COLOR_GRAD2, "  Type /enter to enter the HQ.");
			}
			case CHECKPOINT_HITMAN2:
			{
			    PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
			    DisablePlayerCheckpoint(playerid);
			    gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
			    SendClientMessageEx(playerid, COLOR_GRAD2, "  Type /enter to enter the HQ.");
			}
			case CHECKPOINT_HITMAN3:
			{
			    PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
			    DisablePlayerCheckpoint(playerid);
			    gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
			    SendClientMessageEx(playerid, COLOR_GRAD2, "  Type /order to get your weaponry.");
			}
		}
	}
	DisablePlayerCheckpoint(playerid);
	return 1;
}
Reply
#2

change the [i] in these lines to [playerid]
Reply
#3

thanks, repped
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)