Help!!!!
#1

Код:
[14:00:44] [debug] Run time error 4: "Array index out of bounds"
[14:00:44] [debug]  Accessing element at negative index -1
[14:00:44] [debug] AMX backtrace:
[14:00:44] [debug] #0 00097c48 in ?? () from LS-RP.amx
[14:00:44] [debug] #1 00014a30 in public Streamer_OnPlayerEnterCP () from LS-RP.amx
[14:00:44] [debug] #2 native CallLocalFunction () [00471ef0] from samp-server.exe
[14:00:44] [debug] #3 000011c0 in public OnPlayerEnterCheckpoint () from LS_RP.amx
Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(GetPVarInt(playerid, "EventToken") == 1)
	{
	    if(EventKernel[EventFootRace] == 0 && IsPlayerInAnyVehicle(playerid))
	    {
			return SendClientMessageEx(playerid, COLOR_WHITE, "You cannot be inside vehicles and participate in this event at the same time.");
	    }
	    if(EventRCPT[RCPIdCurrent[playerid]] == 3 && PlayerInfo[playerid][pHydration] < 60) {
		    SendClientMessageEx(playerid, COLOR_WHITE, "You have entered a Watering Station checkpoint, you need to stay here in order to get rehydrated again.");
		    SendClientMessageEx(playerid, COLOR_WHITE, "You may choose to leave at any point or wait until you get the message of fully rehydrated.");
            SetPVarInt(playerid, "WSRCPTimerId", SetTimerEx("WateringStation", 4000, 1, "i", playerid));
            SetPVarInt(playerid, "InWaterStationRCP", 1);
            return 1;
		}
	    else if(EventRCPT[RCPIdCurrent[playerid]] == 4) {
			RCPIdCurrent[playerid] = 0;
			PlayerInfo[playerid][pHydration] -= 4;
			PlayerInfo[playerid][pRacePlayerLaps]++;
			if(PlayerInfo[playerid][pRacePlayerLaps] % 10 == 0) {
			    GiftPlayer(MAX_PLAYERS, playerid);
			}
			else if(PlayerInfo[playerid][pRacePlayerLaps] == 25) {
			    PlayerInfo[playerid][pEXPToken]++;
			    SendClientMessageEx(playerid, COLOR_YELLOW, "You have been given a Double EXP Token for completing 25 laps");
			}
			if(toglapcount == 0) {
				RaceTotalLaps++;
				Misc_Save();
			}
			new string[128];
			format(string, sizeof(string), "Lap successfully completed. Laps Completed: %d | Total Laps Completed: %d", PlayerInfo[playerid][pRacePlayerLaps], RaceTotalLaps, TotalJoinsRace);
			SendClientMessageEx(playerid, COLOR_WHITE, string);
		}
	    else {
	    	RCPIdCurrent[playerid]++;
            PlayerInfo[playerid][pHydration] -= 4;
		}
		new string[128];
        if(PlayerInfo[playerid][pHydration] > 60)
        {
			format(string, sizeof(string), "Hydration level normal(%d)", PlayerInfo[playerid][pHydration]);
			SendClientMessageEx(playerid, COLOR_GREEN, string);
		}
		else if(PlayerInfo[playerid][pHydration] < 61 && PlayerInfo[playerid][pHydration] > 30)
		{
		    format(string, sizeof(string), "Hydration level low(%d)", PlayerInfo[playerid][pHydration]);
			SendClientMessageEx(playerid, COLOR_YELLOW, string);
		}
		else if(PlayerInfo[playerid][pHydration] < 31 && PlayerInfo[playerid][pHydration] > 0)
		{
		    format(string, sizeof(string), "Hydration level very low(%d)", PlayerInfo[playerid][pHydration]);
			SendClientMessageEx(playerid, COLOR_RED, string);
		}
		else if(PlayerInfo[playerid][pHydration] < 0)
		{
		    SendClientMessageEx(playerid, COLOR_WHITE, "You have fallen to the ground due to being dehydrated, FDSA is going to rescue you and take you to the First Aid Station.");
            DeletePVar(playerid, "EventToken");
			SetPlayerHealth(playerid, 0);
		}
	    if(EventRCPT[RCPIdCurrent[playerid]] == 1) {
	        DisablePlayerCheckpoint(playerid);
			SetPlayerCheckpoint(playerid, EventRCPX[RCPIdCurrent[playerid]], EventRCPY[RCPIdCurrent[playerid]], EventRCPZ[RCPIdCurrent[playerid]], EventRCPS[RCPIdCurrent[playerid]]);
		}
		else if(EventRCPT[RCPIdCurrent[playerid]] == 4) {
		    DisablePlayerCheckpoint(playerid);
		    SetPlayerCheckpoint(playerid, EventRCPX[RCPIdCurrent[playerid]], EventRCPY[RCPIdCurrent[playerid]], EventRCPZ[RCPIdCurrent[playerid]], EventRCPS[RCPIdCurrent[playerid]]);
		} else {
		    DisablePlayerCheckpoint(playerid);
		    SetPlayerCheckpoint(playerid, EventRCPX[RCPIdCurrent[playerid]], EventRCPY[RCPIdCurrent[playerid]], EventRCPZ[RCPIdCurrent[playerid]], EventRCPS[RCPIdCurrent[playerid]]);
		}
		return 1;
	}
	if(PlayerInfo[playerid][Robbing] == 1)
	{
	    new string[128];
	    if(RobStatus[RobberID1] == playerid)
		{
		    RobStatus[RobberID1] = 200;
		    if(RobStatus[RobberID1] > 199 && RobStatus[RobberID2] > 199 && RobStatus[RobberID3] > 199 && RobStatus[RobberID4] > 199 && RobStatus[RobberID5] > 199)
			{
			    RobStatus[BeingRobbed] = 0;
			    RobStatus[BankReload] = 2; // Can't be robbed for 2 hours
			    RobStatus[Setup] = 0;
			    SendClientMessageToAll(COLOR_ORANGE, "** Vu cuop ngan hang da hoan thanh` **");
			    FinishRobbery();
			}
		}
		if(RobStatus[RobberID2] == playerid)
		{
		    RobStatus[RobberID2] = 200;
		    if(RobStatus[RobberID1] > 199 && RobStatus[RobberID2] > 199 && RobStatus[RobberID3] > 199 && RobStatus[RobberID4] > 199 && RobStatus[RobberID5] > 199)
			{
				RobStatus[BeingRobbed] = 0;
			    RobStatus[BankReload] = 2; // Can't be robbed for 2 hours
			    RobStatus[Setup] = 0;
			    SendClientMessageToAll(COLOR_ORANGE, "** Vu cuop ngan hang da hoan thanh` **");
			    FinishRobbery();
			}
		}
		if(RobStatus[RobberID3] == playerid)
		{
		    RobStatus[RobberID3] = 200;
		    if(RobStatus[RobberID1] > 199 && RobStatus[RobberID2] > 199 && RobStatus[RobberID3] > 199 && RobStatus[RobberID4] > 199 && RobStatus[RobberID5] > 199)
			{
			    RobStatus[BeingRobbed] = 0;
			    RobStatus[BankReload] = 2; // Can't be robbed for 2 hours
			    RobStatus[Setup] = 0;
			    SendClientMessageToAll(COLOR_ORANGE, "** Vu cuop ngan hang da hoan thanh` **");
			    FinishRobbery();
			}
		}
		if(RobStatus[RobberID4] == playerid)
		{
		    RobStatus[RobberID4] = 200;
		    if(RobStatus[RobberID1] > 199 && RobStatus[RobberID2] > 199 && RobStatus[RobberID3] > 199 && RobStatus[RobberID4] > 199 && RobStatus[RobberID5] > 199)
			{
			    RobStatus[BeingRobbed] = 0;
			    RobStatus[BankReload] = 2; // Can't be robbed for 2 hours
			    RobStatus[Setup] = 0;
			    SendClientMessageToAll(COLOR_ORANGE, "** Vu cuop ngan hang da hoan thanh` **");
			    FinishRobbery();
			}
		}
		if(RobStatus[RobberID5] == playerid)
		{
		    RobStatus[RobberID5] = 200;
		    if(RobStatus[RobberID1] > 199 && RobStatus[RobberID2] > 199 && RobStatus[RobberID3] > 199 && RobStatus[RobberID4] > 199 && RobStatus[RobberID5] > 199)
			{
			    RobStatus[BeingRobbed] = 0;
			    RobStatus[BankReload] = 2; // Can't be robbed for 2 hours
			    RobStatus[Setup] = 0;
			    SendClientMessageToAll(COLOR_ORANGE, "** Vu cuop ngan hang da hoan thanh` **");
			    FinishRobbery();
			}
		}
		RemovePlayerAttachedObject(playerid, 3 );
		format(string,sizeof(string),"Ban da den diem an toan va` tui' tien` cua ban la` $%d.",PlayerInfo[playerid][CashLoaded]);
		SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
		PlayerInfo[playerid][pCash] += PlayerInfo[playerid][CashLoaded];
		Tax -= PlayerInfo[playerid][CashLoaded];
		PlayerInfo[playerid][CashLoaded] = 0;
		PlayerInfo[playerid][Robbing] = 0;
		DisablePlayerCheckpoint(playerid);
	}
	if(GetPVarInt(playerid,"IsInArena") >= 0)
	{
	    new arenaid = GetPVarInt(playerid, "IsInArena");
	    if(PaintBallArena[arenaid][pbGameType] == 4 || PaintBallArena[arenaid][pbGameType] == 5)
	    {
	        //SendAudioToPlayer(playerid, 23, 100);
	    }
	    return 1;
	}
	else if(CP[playerid] == 123456)
 	{
 		if(GetPlayerState(playerid) != 1 || GetPlayerWeapon(playerid) != 6)
	 	{
	 		SendClientMessage(playerid, COLOR_GREY, "   Ban phai di bo va mang dung cu dao` vang`!");
		 	return 1;
	 	}
	 	CP[playerid] = 1234567;
	 	TogglePlayerControllable(playerid, false);
        GameTextForPlayer(playerid, "~w~Dang dao` vang`", 4500,3);
	    Loaded[playerid] = 1;
	    SetTimer("LoadPlayer", 4500, false);
	    PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
	 	ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
	 	DisablePlayerCheckpoint(playerid);
	 	SetPlayerCheckpoint(playerid,375.61, 851.12, 29.77,3.0);
 	}
	else if(CP[playerid] == 1234567)
	{
		if(GetPlayerState(playerid) != 1 || GetPlayerWeapon(playerid) != 6)
	 	{
	 		SendClientMessage(playerid, COLOR_GREY, "   Ban phai di bo va mang dung cu dao` vang`!");
		 	return 1;
	 	}
		CP[playerid] = 1234568;
		TogglePlayerControllable(playerid, false);
        GameTextForPlayer(playerid, "~w~Dang dao` vang`", 4500,3);
	    Loaded[playerid] = 1;
	    SetTimer("LoadPlayer", 4500, false);
		ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
		DisablePlayerCheckpoint(playerid);
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SetPlayerCheckpoint(playerid,391.14, 875.45, 24.57,3.0);
	}
	else if(CP[playerid] == 1234568)
	{
		if(GetPlayerState(playerid) != 1 || GetPlayerWeapon(playerid) != 6)
	 	{
	 		SendClientMessage(playerid, COLOR_GREY, "   Ban phai di bo va mang dung cu dao` vang`!");
		 	return 1;
	 	}
		CP[playerid] = 1234569;
		TogglePlayerControllable(playerid, false);
        GameTextForPlayer(playerid, "~w~Dang dao` vang`", 4500,3);
	    Loaded[playerid] = 1;
	    SetTimer("LoadPlayer", 4500, false);
		ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
		DisablePlayerCheckpoint(playerid);
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SetPlayerCheckpoint(playerid,594.72, 926.08, -37.48,3.0);
 	}
	else if(CP[playerid] == 1234569)
	{
		if(GetPlayerState(playerid) != 1 || GetPlayerWeapon(playerid) != 6)
	 	{
	 		SendClientMessage(playerid, COLOR_GREY, "   Ban phai di bo va mang dung cu dao` vang`!");
		 	return 1;
	 	}
		CP[playerid] = 12345691;
		TogglePlayerControllable(playerid, false);
        GameTextForPlayer(playerid, "~w~Dang dao` vang`", 4500,3);
	    Loaded[playerid] = 1;
	    SetTimer("LoadPlayer", 4500, false);
		ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
		DisablePlayerCheckpoint(playerid);
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SetPlayerCheckpoint(playerid,545.76, 920.07, -34.80,3.0);
	}
	else if(CP[playerid] == 12345691)
	{
		if(GetPlayerState(playerid) != 1 || GetPlayerWeapon(playerid) != 6)
	 	{
	 		SendClientMessage(playerid, COLOR_GREY, "   Ban phai di bo va mang dung cu dao` vang`!");
		 	return 1;
	 	}
		CP[playerid] = 12345692;
		TogglePlayerControllable(playerid, false);
        GameTextForPlayer(playerid, "~w~Dang dao` vang`", 4500,3);
	    Loaded[playerid] = 1;
	    SetTimer("LoadPlayer", 4500, false);
		ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
		DisablePlayerCheckpoint(playerid);
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SetPlayerCheckpoint(playerid,535.21, 840.26, -41.16,3.0);
	}
	else if(CP[playerid] == 12345692)
	{
		if(GetPlayerState(playerid) != 1 || GetPlayerWeapon(playerid) != 6)
	 	{
	 		SendClientMessage(playerid, COLOR_GREY, "   Ban phai di bo va mang dung cu dao` vang`!");
		 	return 1;
	 	}
		CP[playerid] = 12345693;
		TogglePlayerControllable(playerid, false);
        GameTextForPlayer(playerid, "~w~Dang dao` vang`", 4500,3);
	    Loaded[playerid] = 1;
	    SetTimer("LoadPlayer", 4500, false);
		ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
		DisablePlayerCheckpoint(playerid);
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SetPlayerCheckpoint(playerid,638.84, 856.19, -40.16,3.0);
	}
	else if(CP[playerid] == 12345693)
	{
		if(GetPlayerState(playerid) != 1 || GetPlayerWeapon(playerid) != 6)
	 	{
	 		SendClientMessage(playerid, COLOR_GREY, "   Ban phai di bo va mang dung cu dao` vang`!");
		 	return 1;
	 	}
		CP[playerid] = 12345694;
		TogglePlayerControllable(playerid, false);
        GameTextForPlayer(playerid, "~w~Dang dao` vang`", 4500,3);
	    Loaded[playerid] = 1;
	    SetTimer("LoadPlayer", 4500, false);
		ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
		DisablePlayerCheckpoint(playerid);
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SetPlayerCheckpoint(playerid,635.95, 826.35, -40.48,3.0);
	}
	else if(CP[playerid] == 12345694)
	{
		if(GetPlayerState(playerid) != 1 || GetPlayerWeapon(playerid) != 6)
	 	{
	 		SendClientMessage(playerid, COLOR_GREY, "   Ban phai di bo va mang dung cu dao` vang`!");
		 	return 1;
	 	}
		CP[playerid] = 12345695;
		TogglePlayerControllable(playerid, false);
        GameTextForPlayer(playerid, "~w~Dang dao` vang`", 4500,3);
	    Loaded[playerid] = 1;
	    SetTimer("LoadPlayer", 4500, false);
		ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
		DisablePlayerCheckpoint(playerid);
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SetPlayerCheckpoint(playerid,606.43, 868.17, -40.16,3.0);
	}
	else if(CP[playerid] == 12345695)
	{
		if(GetPlayerState(playerid) != 1 || GetPlayerWeapon(playerid) != 6)
	 	{
	 		SendClientMessage(playerid, COLOR_GREY, "   Ban phai di bo va mang dung cu dao` vang`!");
		 	return 1;
	 	}
		CP[playerid] = 12345696;
		TogglePlayerControllable(playerid, false);
        GameTextForPlayer(playerid, "~w~Dang dao` vang`", 4500,3);
	    Loaded[playerid] = 1;
	    SetTimer("LoadPlayer", 4500, false);
		ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
		DisablePlayerCheckpoint(playerid);
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SetPlayerCheckpoint(playerid,585.65, 873.86, -42.49,3.0);
	}
	else if(CP[playerid] == 12345696)
	{
		if(GetPlayerState(playerid) != 1 || GetPlayerWeapon(playerid) != 6)
	 	{
	 		SendClientMessage(playerid, COLOR_GREY, "   Ban phai di bo va mang dung cu dao` vang`!");
		 	return 1;
	 	}
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SendClientMessage(playerid, COLOR_GREY, "   Ban da dao` duoc 1 KG vang`.Hay lam` that. nhieu` roi` di buon vang`!");
		//PlayerInfo[playerid][pGun6] = 0;
		//TakeWeapon(playerid,6);
		PlayerInfo[playerid][pVang] += 1;
		CP[playerid] = 0;
		DisablePlayerCheckpoint(playerid);
	}
	if(CP[playerid] == 252000)
 	{
	 	CP[playerid] = 0;
	 	PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
	    SendClientMessage(playerid, COLOR_GREY, " Go /nhanviec de lam hop dong cong viec!");
	 	DisablePlayerCheckpoint(playerid);
 	}
	if(CP[playerid] == 252001)
 	{
	 	CP[playerid] = 0;
	 	PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
	 	PlayerInfo[playerid][pVang] += 5;
	    SendClientMessage(playerid, COLOR_GREY, " Ban da tron thoat thanh cong!");
	 	DisablePlayerCheckpoint(playerid);
 	}
 	if(CP[playerid] == 252002)
 	{
	 	CP[playerid] = 0;
	 	PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
	 	PlayerInfo[playerid][pCash] += 100000;
	 	PlayerInfo[playerid][pCigar] += 1;
	 	PlayerInfo[playerid][pRope] += 2;
	    SendClientMessage(playerid, COLOR_WHITE, " Ban da tron thoat thanh cong!");
	    SendClientMessage(playerid, COLOR_WHITE, " Ban nhan duoc 100,000$ + mot dieu xi ga va 2 day thung!");
	 	DisablePlayerCheckpoint(playerid);
 	}
 	if(CP[playerid] == 252003)
 	{
	 	CP[playerid] = 0;
	 	PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
	    SendClientMessage(playerid, COLOR_GREY, " Hay chay vao trong va go~ /nhanviec de lam hop dong cong viec!");
	 	DisablePlayerCheckpoint(playerid);
 	}
 	else if(CP[playerid] == 21)
 	{
 		if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 531)
	 	{
	 		SendClientMessage(playerid, COLOR_GREY, "   Ban khong o trong xe cay`TN!");
		 	return 1;
	 	}
	 	CP[playerid] = 31;
	 	PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
	 	DisablePlayerCheckpoint(playerid);
	 	SetPlayerCheckpoint(playerid,-205.9348,-1332.2749,10.4056,3.0);
 	}
	else if(CP[playerid] == 31)
	{
		if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 531)
		{
			SendClientMessage(playerid, COLOR_GREY, "   Ban khong o trong xe cay`TN!");
			return 1;
		}
		CP[playerid] = 41;
		DisablePlayerCheckpoint(playerid);
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SetPlayerCheckpoint(playerid,-548.5396,-1329.0653,19.6210,3.0);
	}
	else if(CP[playerid] == 41)
	{
		if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 531)
		{
			SendClientMessage(playerid, COLOR_GREY, "   Ban khong o trong xe cay`TN!");
			return 1;
		}
		CP[playerid] = 51;
		DisablePlayerCheckpoint(playerid);
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SetPlayerCheckpoint(playerid,-370.9486,-1281.1089,29.8698,3.0);
 	}
	else if(CP[playerid] == 51)
	{
		if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 531)
		{
			SendClientMessage(playerid, COLOR_GREY, "   Ban khong o trong xe cay`TN!");
			return 1;
		}
		CP[playerid] = 61;
		DisablePlayerCheckpoint(playerid);
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SetPlayerCheckpoint(playerid,-258.3272,-1387.9211,10.1292,3.0);
	}
	else if(CP[playerid] == 61)
	{
		if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 531)
		{
			SendClientMessage(playerid, COLOR_GREY, "   Ban khong o trong xe cay`TN!");
			return 1;
		}
		CP[playerid] = 71;
		DisablePlayerCheckpoint(playerid);
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SetPlayerCheckpoint(playerid,-288.8517,-1385.0117,9.8957,3.0);
	}
	else if(CP[playerid] == 71)
	{
		if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 531)
		{
			SendClientMessage(playerid, COLOR_GREY, "   Ban khong o trong xe cay`TN!");
			return 1;
		}
		CP[playerid] = 81;
		DisablePlayerCheckpoint(playerid);
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SetPlayerCheckpoint(playerid,-283.1325,-1338.2822,7.4280,3.0);
	}
	else if(CP[playerid] == 81)
	{
		if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 531)
		{
			SendClientMessage(playerid, COLOR_GREY, "   Ban khong o trong xe cay`TN!");
			return 1;
		}
		CP[playerid] = 91;
		DisablePlayerCheckpoint(playerid);
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SetPlayerCheckpoint(playerid,-224.5992,-1509.1902,7.4473,3.0);
	}
	else if(CP[playerid] == 91)
	{
		if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 531)
		{
			SendClientMessage(playerid, COLOR_GREY, "   Ban khong o trong xe cay`TN!");
			return 1;
		}
		CP[playerid] = 101;
		DisablePlayerCheckpoint(playerid);
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SetPlayerCheckpoint(playerid,-247.2859,-1528.8744,6.5904,3.0);
	}
	else if(CP[playerid] == 101)
	{
		if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 531)
		{
			SendClientMessage(playerid, COLOR_GREY, "   Ban khong o trong xe cay`TN!");
			return 1;
		}
		CP[playerid] = 111;
		DisablePlayerCheckpoint(playerid);
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SetPlayerCheckpoint(playerid,-283.9610,-1549.7180,6.4975,3.0);
	}
	else if(CP[playerid] == 111)
	{
		if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 531)
		{
			SendClientMessage(playerid, COLOR_GREY, "   Ban khong o trong xe cay`TN!");
			return 1;
		}
		CP[playerid] = 121;
		DisablePlayerCheckpoint(playerid);
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SetPlayerCheckpoint(playerid,-431.6107,-1334.0961,28.6561,3.0);
	}
	else if(CP[playerid] == 121)
	{
		if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 531)
		{
			SendClientMessage(playerid, COLOR_GREY, "   Ban khong o trong xe cay`TN!");
			return 1;
		}
		CP[playerid] = 131;
		DisablePlayerCheckpoint(playerid);
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SetPlayerCheckpoint(playerid,-476.4104,-1391.6769,20.4733,3.0);
	}
	else if(CP[playerid] == 131)
	{
		if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 531)
		{
			SendClientMessage(playerid, COLOR_GREY, "   Ban khong o trong xe cay` TN!");
			return 1;
		}
		CP[playerid] = 141;
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		DisablePlayerCheckpoint(playerid);
		SetPlayerCheckpoint(playerid,-376.7750,-1437.6874,25.7266,3.0);//-205.9348,-1332.2749,10.4056,3.0
	}
	else if(CP[playerid] == 141)
	{
	    new veh = GetPlayerVehicleID(playerid);
		if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 531)
		{
			SendClientMessage(playerid, COLOR_GREY, "   Ban khong o trong xe cay` TN!");
			return 1;
		}
		PlayerInfo[playerid][pNongdanTime] = 1800;
		SetVehicleToRespawn(veh);
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SendClientMessage(playerid, COLOR_GREY, "   Ban nhan duoc 2500$ va` 2 bot mi (/thongtin de kiem tra),hay~ doi vai` phut de? tiep tuc!");
		PlayerInfo[playerid][pCash] += 2500;
		PlayerInfo[playerid][pCookies] += 2;
		CP[playerid] = 0;
		DisablePlayerCheckpoint(playerid);
	}
 	else if(CP[playerid] == 6677)
	{
	    new veh = GetPlayerVehicleID(playerid);
		if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 455)
	 	{
	 		SendClientMessage(playerid, COLOR_GREY, "   Ban khong tren xe dia hinh` van chuyen vang`!");
		 	return 1;
	 	}
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SendClientMessage(playerid, COLOR_GREY, "   Ban da ban' 1 KG vang` va` nhan duoc 15000$!");
		PlayerInfo[playerid][pCash] += 15000;
		PlayerInfo[playerid][pVang] -= 1;
		SetVehicleToRespawn(veh);
		CP[playerid] = 0;
		DisablePlayerCheckpoint(playerid);
	}
	else if(CP[playerid] == 6678)
	{
	    new veh = GetPlayerVehicleID(playerid);
		if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 455)
	 	{
	 		SendClientMessage(playerid, COLOR_GREY, "   Ban khong tren xe dia hinh` van chuyen vang`!");
		 	return 1;
	 	}
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SendClientMessage(playerid, COLOR_GREY, "   Ban da ban' 10 KG vang` va` nhan duoc 150000$!");
		PlayerInfo[playerid][pCash] += 150000;
		PlayerInfo[playerid][pVang] -= 10;
		SetVehicleToRespawn(veh);
		CP[playerid] = 0;
		DisablePlayerCheckpoint(playerid);
	}
	else if(CP[playerid] == 6679)
	{
	    new veh = GetPlayerVehicleID(playerid);
		if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 455)
	 	{
	 		SendClientMessage(playerid, COLOR_GREY, "   Ban khong tren xe dia hinh` van chuyen vang`!");
		 	return 1;
	 	}
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SendClientMessage(playerid, COLOR_GREY, "   Ban da ban' 20 KG vang` va` nhan duoc 300000$!");
		PlayerInfo[playerid][pCash] += 300000;
		PlayerInfo[playerid][pVang] -= 20;
		SetVehicleToRespawn(veh);
		CP[playerid] = 0;
		DisablePlayerCheckpoint(playerid);
	}
 	else if(CP[playerid] == 6680)
	{
	    new veh = GetPlayerVehicleID(playerid);
		if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 524)
	 	{
	 		SendClientMessage(playerid, COLOR_GREY, "   Ban khong tren xe van chuyen dau!");
		 	return 1;
	 	}
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Ban da mang thung hang toi noi va nhan duoc 33000$.");
		PlayerInfo[playerid][pDau] -= 1;
		PlayerInfo[playerid][pCash] += 33000;
		SetVehicleToRespawn(veh);
		CP[playerid] = 0;
		DisablePlayerCheckpoint(playerid);
	}
	else if(CP[playerid] == 6682)
	{
	    new veh = GetPlayerVehicleID(playerid);
		if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 524)
	 	{
	 		SendClientMessage(playerid, COLOR_GREY, "   Ban khong tren xe van chuyen dau!");
		 	return 1;
	 	}
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Ban da mang thung hang toi noi va nhan duoc 330,000$.");
		PlayerInfo[playerid][pDau] -= 10;
		PlayerInfo[playerid][pCash] += 330000;
		SetVehicleToRespawn(veh);
		CP[playerid] = 0;
		DisablePlayerCheckpoint(playerid);
	}
	else if(CP[playerid] == 6683)
	{
	    new veh = GetPlayerVehicleID(playerid);
		if(GetVehicleModel(GetPlayerVehicleID(playerid)) != 524)
	 	{
	 		SendClientMessage(playerid, COLOR_GREY, "   Ban khong tren xe van chuyen dau!");
		 	return 1;
	 	}
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Ban da mang thung hang toi noi va nhan duoc 660,000$.");
		PlayerInfo[playerid][pDau] -= 20;
		PlayerInfo[playerid][pCash] += 660000;
		SetVehicleToRespawn(veh);
		CP[playerid] = 0;
		DisablePlayerCheckpoint(playerid);
	}
	else if(CP[playerid] == 80100)
 	{
 		if(GetPlayerState(playerid) != 1)
	 	{
	 		SendClientMessage(playerid, COLOR_GREY, "   Ban phai di bo!");
		 	return 1;
	 	}
	 	CP[playerid] = 80101;
	 	TogglePlayerControllable(playerid, false);
        GameTextForPlayer(playerid, "~w~Dang lay dau`", 4500,3);
	    Loaded[playerid] = 1;
	    SetTimer("LoadPlayer", 4500, false);
	    PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
	 	ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
	 	DisablePlayerCheckpoint(playerid);
	 	SetPlayerCheckpoint(playerid,490.94, 1308.34, 10.06,3.0);
 	}
	else if(CP[playerid] == 80101)
	{
		if(GetPlayerState(playerid) != 1)
	 	{
	 		SendClientMessage(playerid, COLOR_GREY, "   Ban phai di bo!");
		 	return 1;
	 	}
		CP[playerid] = 80102;
		TogglePlayerControllable(playerid, false);
        GameTextForPlayer(playerid, "~w~Dang lay dau`", 4500,3);
	    Loaded[playerid] = 1;
	    SetTimer("LoadPlayer", 4500, false);
		ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
		DisablePlayerCheckpoint(playerid);
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SetPlayerCheckpoint(playerid,434.68, 1269.13, 10.02,3.0);
	}
	else if(CP[playerid] == 80102)
	{
		if(GetPlayerState(playerid) != 1)
	 	{
	 		SendClientMessage(playerid, COLOR_GREY, "   Ban phai di bo!");
		 	return 1;
	 	}
		CP[playerid] = 80103;
		TogglePlayerControllable(playerid, false);
        GameTextForPlayer(playerid, "~w~Dang lay dau`", 4500,3);
	    Loaded[playerid] = 1;
	    SetTimer("LoadPlayer", 4500, false);
		ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
		DisablePlayerCheckpoint(playerid);
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SetPlayerCheckpoint(playerid,352.49, 1300.15, 13.36,3.0);
 	}
	else if(CP[playerid] == 80103)
	{
		if(GetPlayerState(playerid) != 1)
	 	{
	 		SendClientMessage(playerid, COLOR_GREY, "   Ban phai di bo!");
		 	return 1;
	 	}
		CP[playerid] = 80104;
		TogglePlayerControllable(playerid, false);
        GameTextForPlayer(playerid, "~w~Dang lay dau`", 4500,3);
	    Loaded[playerid] = 1;
	    SetTimer("LoadPlayer", 4500, false);
		ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
		DisablePlayerCheckpoint(playerid);
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SetPlayerCheckpoint(playerid,376.18, 1334.58, 11.54,3.0);
	}
	else if(CP[playerid] == 80104)
	{
		if(GetPlayerState(playerid) != 1)
	 	{
	 		SendClientMessage(playerid, COLOR_GREY, "   Ban phai di bo!");
		 	return 1;
	 	}
		CP[playerid] = 80105;
		TogglePlayerControllable(playerid, false);
        GameTextForPlayer(playerid, "~w~Dang lay dau`", 4500,3);
	    Loaded[playerid] = 1;
	    SetTimer("LoadPlayer", 4500, false);
		ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
		DisablePlayerCheckpoint(playerid);
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SetPlayerCheckpoint(playerid,418.54, 1409.47, 8.56,3.0);
	}
	else if(CP[playerid] == 80105)
	{
		if(GetPlayerState(playerid) != 1)
	 	{
	 		SendClientMessage(playerid, COLOR_GREY, "   Ban phai di bo!");
		 	return 1;
	 	}
		CP[playerid] = 80106;
		TogglePlayerControllable(playerid, false);
        GameTextForPlayer(playerid, "~w~Dang lay dau`", 4500,3);
	    Loaded[playerid] = 1;
	    SetTimer("LoadPlayer", 4500, false);
		ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
		DisablePlayerCheckpoint(playerid);
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SetPlayerCheckpoint(playerid,405.83, 1462.42, 8.19,3.0);
	}
	else if(CP[playerid] == 80106)
	{
		if(GetPlayerState(playerid) != 1)
	 	{
	 		SendClientMessage(playerid, COLOR_GREY, "   Ban phai di bo!");
		 	return 1;
	 	}
		CP[playerid] = 80107;
		TogglePlayerControllable(playerid, false);
        GameTextForPlayer(playerid, "~w~Dang lay dau`", 4500,3);
	    Loaded[playerid] = 1;
	    SetTimer("LoadPlayer", 4500, false);
		ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
		DisablePlayerCheckpoint(playerid);
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SetPlayerCheckpoint(playerid,422.31, 1512.72, 12.04,3.0);
	}
	else if(CP[playerid] == 80107)
	{
		if(GetPlayerState(playerid) != 1)
	 	{
	 		SendClientMessage(playerid, COLOR_GREY, "   Ban phai di bo!");
		 	return 1;
	 	}
		CP[playerid] = 80108;
		TogglePlayerControllable(playerid, false);
        GameTextForPlayer(playerid, "~w~Dang lay dau`", 4500,3);
	    Loaded[playerid] = 1;
	    SetTimer("LoadPlayer", 4500, false);
		ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
		DisablePlayerCheckpoint(playerid);
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SetPlayerCheckpoint(playerid,433.74, 1564.09, 12.78,3.0);
	}
	else if(CP[playerid] == 80108)
	{
		if(GetPlayerState(playerid) != 1)
	 	{
	 		SendClientMessage(playerid, COLOR_GREY, "   Ban phai di bo!");
		 	return 1;
	 	}
		CP[playerid] = 80109;
		TogglePlayerControllable(playerid, false);
        GameTextForPlayer(playerid, "~w~Dang lay dau`", 4500,3);
	    Loaded[playerid] = 1;
	    SetTimer("LoadPlayer", 4500, false);
		ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
		DisablePlayerCheckpoint(playerid);
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SetPlayerCheckpoint(playerid,486.68, 1527.76, 1.45,3.0);
	}
	else if(CP[playerid] == 80109)
	{
		if(GetPlayerState(playerid) != 1)
	 	{
	 		SendClientMessage(playerid, COLOR_GREY, "   Ban phai di bo!");
		 	return 1;
	 	}
		CP[playerid] = 80110;
		TogglePlayerControllable(playerid, false);
        GameTextForPlayer(playerid, "~w~Dang lay dau`", 4500,3);
	    Loaded[playerid] = 1;
	    SetTimer("LoadPlayer", 4500, false);
		ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
		DisablePlayerCheckpoint(playerid);
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SetPlayerCheckpoint(playerid,534.08, 1469.46, 5.60,3.0);
	}
	else if(CP[playerid] == 80110)
	{
		if(GetPlayerState(playerid) != 1)
	 	{
	 		SendClientMessage(playerid, COLOR_GREY, "   Ban phai di bo!");
		 	return 1;
	 	}
		CP[playerid] = 80111;
		TogglePlayerControllable(playerid, false);
        GameTextForPlayer(playerid, "~w~Dang lay dau`", 4500,3);
	    Loaded[playerid] = 1;
	    SetTimer("LoadPlayer", 4500, false);
		ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
		DisablePlayerCheckpoint(playerid);
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SetPlayerCheckpoint(playerid,600.79, 1497.81, 9.05,3.0);
	}
	else if(CP[playerid] == 80111)
	{
		if(GetPlayerState(playerid) != 1)
	 	{
	 		SendClientMessage(playerid, COLOR_GREY, "   Ban phai di bo!");
		 	return 1;
	 	}
		CP[playerid] = 80112;
		TogglePlayerControllable(playerid, false);
        GameTextForPlayer(playerid, "~w~Dang lay dau`", 4500,3);
	    Loaded[playerid] = 1;
	    SetTimer("LoadPlayer", 4500, false);
		ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
		DisablePlayerCheckpoint(playerid);
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SetPlayerCheckpoint(playerid,578.67, 1422.22, 12.33,3.0);
	}
	else if(CP[playerid] == 80112)
	{
		if(GetPlayerState(playerid) != 1)
	 	{
	 		SendClientMessage(playerid, COLOR_GREY, "   Ban phai di bo!");
		 	return 1;
	 	}
		CP[playerid] = 80113;
		TogglePlayerControllable(playerid, false);
        GameTextForPlayer(playerid, "~w~Dang lay dau`", 4500,3);
	    Loaded[playerid] = 1;
	    SetTimer("LoadPlayer", 4500, false);
		ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
		DisablePlayerCheckpoint(playerid);
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SetPlayerCheckpoint(playerid,627.45, 1352.44, 13.18,3.0);
	}
	else if(CP[playerid] == 80113)
	{
		if(GetPlayerState(playerid) != 1)
	 	{
	 		SendClientMessage(playerid, COLOR_GREY, "   Ban phai di bo!");
		 	return 1;
	 	}
		CP[playerid] = 80114;
		TogglePlayerControllable(playerid, false);
        GameTextForPlayer(playerid, "~w~Dang lay dau`", 4500,3);
	    Loaded[playerid] = 1;
	    SetTimer("LoadPlayer", 4500, false);
		ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
		DisablePlayerCheckpoint(playerid);
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SetPlayerCheckpoint(playerid,587.24, 1340.74, 11.18,3.0);
	}
	else if(CP[playerid] == 80114)
	{
		if(GetPlayerState(playerid) != 1)
	 	{
	 		SendClientMessage(playerid, COLOR_GREY, "   Ban phai di bo!");
		 	return 1;
	 	}
		CP[playerid] = 80115;
		TogglePlayerControllable(playerid, false);
        GameTextForPlayer(playerid, "~w~Dang lay dau`", 4500,3);
	    Loaded[playerid] = 1;
	    SetTimer("LoadPlayer", 4500, false);
		ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
		DisablePlayerCheckpoint(playerid);
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SetPlayerCheckpoint(playerid,498.98, 1389.22, 4.89,3.0);
	}
	else if(CP[playerid] == 80115)
	{
		if(GetPlayerState(playerid) != 1)
	 	{
	 		SendClientMessage(playerid, COLOR_GREY, "   Ban phai di bo!");
		 	return 1;
	 	}
		CP[playerid] = 80116;
		TogglePlayerControllable(playerid, false);
        GameTextForPlayer(playerid, "~w~Dang lay dau`", 4500,3);
	    Loaded[playerid] = 1;
	    SetTimer("LoadPlayer", 4500, false);
		ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
		DisablePlayerCheckpoint(playerid);
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SetPlayerCheckpoint(playerid,570.21, 1219.84, 11.71,3.0);
	}
	else if(CP[playerid] == 80116)
	{
		if(GetPlayerState(playerid) != 1)
	 	{
	 		SendClientMessage(playerid, COLOR_GREY, "   Ban phai di bo!");
		 	return 1;
	 	}
		PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
		SendClientMessage(playerid, COLOR_GREY, "   Ban da lay duoc 1 lit dau,Hay len xe truck va mang thung hang di giao hang!");
		PlayerInfo[playerid][pDau] += 1;
		CP[playerid] = 0;
		DisablePlayerCheckpoint(playerid);
	}
	if(GetPVarInt(playerid,"TrackCar") != 0)
	{
	    PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
	    DisablePlayerCheckpoint(playerid);
		DeletePVar(playerid, "TrackCar");
		return 1;
	}
	if(GetPVarInt(playerid,"igps") != 0)
	{
	    PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
	    DisablePlayerCheckpoint(playerid);
		DeletePVar(playerid, "igps");
		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;

 			if(PlayerInfo[playerid][pDoubleEXP] > 0)
		    {
				format(string, sizeof(string), "You have gained 2 smuggler skill points instead of 1. You have %d hours left on the Double EXP token.", PlayerInfo[playerid][pDoubleEXP]);
				SendClientMessageEx(playerid, COLOR_YELLOW, string);
   				PlayerInfo[playerid][pSmugSkill] += 2;
			}
			else
			{
  				PlayerInfo[playerid][pSmugSkill] += 1;
			}

			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)
				{
					TransferStorage(playerid, -1, -1, -1, 4, 375, -1, 2);
					SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* The factory gave you 375 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)
				{
				    TransferStorage(playerid, -1, -1, -1, 4, 500, -1, 2);
					SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* The factory gave you 500 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)
				{
				    TransferStorage(playerid, -1, -1, -1, 4, 625, -1, 2);
					SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* The factory gave you 625 materials for your 25 materials packages.");
					SendClientMessageEx(playerid, COLOR_YELLOW,"Platinum VIP: You received 2.5x more materials than normal.");

				}
				else
				{
    				TransferStorage(playerid, -1, -1, -1, 4, 250, -1, 2);
					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)
					{
				    	TransferStorage(playerid, -1, -1, -1, 4, 675, -1, 2);
						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)
					{
				    	TransferStorage(playerid, -1, -1, -1, 4, 900, -1, 2);
						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)
					{
				    	TransferStorage(playerid, -1, -1, -1, 4, 1125, -1, 2);
						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
					{
						TransferStorage(playerid, -1, -1, -1, 4, 450, -1, 2);
						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)
				{
				    TransferStorage(playerid, -1, -1, -1, 4, 450, -1, 2);
					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)
				{
				    TransferStorage(playerid, -1, -1, -1, 4, 600, -1, 2);
					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)
				{
				    TransferStorage(playerid, -1, -1, -1, 4, 750, -1, 2);
					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
				{
			    	TransferStorage(playerid, -1, -1, -1, 4, 300, -1, 2);
					SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* The factory gave you 300 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;
			}
		}
		else if(GetPVarInt(playerid, "MatDeliver") == 555 && IsPlayerInRangeOfPoint(playerid, 6.0, -688.7897, 966.1434, 12.1627))
		{
			if(GetPVarInt(playerid, "Packages") > 0)
			{
				if(PlayerInfo[playerid][pDonateRank] == 1)
				{
				    TransferStorage(playerid, -1, -1, -1, 4, 450, -1, 2);
					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)
				{
				    TransferStorage(playerid, -1, -1, -1, 4, 600, -1, 2);
					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)
				{
				    TransferStorage(playerid, -1, -1, -1, 4, 750, -1, 2);
					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
				{
			    	TransferStorage(playerid, -1, -1, -1, 4, 300, -1, 2);
					SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* The factory gave you 300 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, "Ban khong phai la nguoi Van Chuyen hang hoa!");
	        return 1;
	    }
	    if(TruckUsed[playerid] != INVALID_VEHICLE_ID && vehicleid != TruckUsed[playerid])
	    {
	        SendClientMessageEx(playerid, COLOR_WHITE, "Day khong phai la Xe Tai cua ban va hang hoa cua ban de cung cap!");
	        return 1;
	    }

		if(!IsAtTruckDeliveryPoint(playerid))
 		{// In the case the person finds a way to exploit the checkpoint to different location
			CancelTruckDelivery(playerid);
			SendClientMessageEx(playerid, COLOR_REALRED, "ERROR: Sai dia diem. Chiec xe cho hang cua ban da bi huy.");
			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, "* Ban da giao Vat lieu bat hop phap, quay tro lai San Fierro Docks de nhan tien hang.");
		}
		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: Quay ve San Fierro Docks nhan tien hang (xem dia diem tren 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[1024];
		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);
	    	//format(string, sizeof(string),"HeThong: %s da bi tu dong Khoa tai khoan Vinh Vien, ly do: Hack Dich Chuyen Pizza\n\nNeu day la mot nham lan tai khoan xin hay lien he voi BQT de khieu nai\nVui long khong Spamming/Buzz khi ban lien he BQT NGRP\nWebsite Site: Ng-Gaming.Net\t\t\t\tEmail: b0ykut3.l0ve_f0r3v3r@yahoo.com",GetPlayerNameEx(playerid));
	    	//ShowPlayerDialog(playerid,DIALOG_CANHBAO,DIALOG_STYLE_MSGBOX,"Canh bao",string,"Thoat","");
	    	//PlayerInfo[playerid][pPermaBanned] = 3;
			//new ip[32];
			//GetPlayerIp(playerid,ip,sizeof(ip));
			//AddBan(ip);
			//SetTimerEx("KickNguoiChoi",500,false,"i",playerid);
		}
		format(string, sizeof(string), "Ban da giao pizza den dich! Ban da nhan duoc $%d.", (GetPVarInt(playerid, "pizzaTimer") * 70));
		Tax -= (GetPVarInt(playerid, "pizzaTimer") * 70);
		Misc_Save();
		GivePlayerCash(playerid, floatround((GetPVarInt(playerid, "pizzaTimer") * 70), floatround_round));
		SendClientMessageEx(playerid, COLOR_WHITE, string);
		DeletePVar(playerid, "Pizza");
		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] != INVALID_PLAYER_ID)
	{
		TaxiAccepted[playerid] = INVALID_PLAYER_ID;
		GameTextForPlayer(playerid, "~w~Reached destination", 5000, 1);
		TaxiCallTime[playerid] = 0;
		DisablePlayerCheckpoint(playerid);
	}
	else if(EMSCallTime[playerid] > 0 && EMSAccepted[playerid] != INVALID_PLAYER_ID)
	{
	    if(GetPVarInt(EMSAccepted[playerid], "Injured") == 1)
	    {
	    	SendEMSQueue(EMSAccepted[playerid],2);
	    	EMSAccepted[playerid] = INVALID_PLAYER_ID;
	    	GameTextForPlayer(playerid, "~w~Reached destination", 5000, 1);
	    	EMSCallTime[playerid] = 0;
	    	DisablePlayerCheckpoint(playerid);
		}
		else
		{
            EMSAccepted[playerid] = INVALID_PLAYER_ID;
		    GameTextForPlayer(playerid, "~r~Patient has died", 5000, 1);
		    EMSCallTime[playerid] = 0;
	    	DisablePlayerCheckpoint(playerid);
		}
	}
	else if(BusCallTime[playerid] > 0 && BusAccepted[playerid] != INVALID_PLAYER_ID)
	{
		BusAccepted[playerid] = INVALID_PLAYER_ID;
		GameTextForPlayer(playerid, "~w~Reached destination", 5000, 1);
		BusCallTime[playerid] = 0;
		DisablePlayerCheckpoint(playerid);
	}
	else if(MedicCallTime[playerid] > 0 && MedicAccepted[playerid] != INVALID_PLAYER_ID)
	{
		MedicAccepted[playerid] = INVALID_PLAYER_ID;
		GameTextForPlayer(playerid, "~w~Reached patient", 5000, 1);
		MedicCallTime[playerid] = 0;
		DisablePlayerCheckpoint(playerid);
	}
	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;
				SetPlayerInterior(playerid,HouseInfo[i][hHInteriorWorld]);
				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][pVW] = i+6000;
				SetPlayerVirtualWorld(playerid, i+6000);
				if(HouseInfo[i][hCustomInterior] == 1) Player_StreamPrep(playerid, HouseInfo[i][hInteriorX],HouseInfo[i][hInteriorY],HouseInfo[i][hInteriorZ], FREEZE_TIME);
				hInviteOffer[playerid] = INVALID_PLAYER_ID;
				hInviteHouse[playerid] = -1;
			}
			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 person 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;
				new truckdeliver = GetPVarInt(playerid, "TruckDeliver");
				TruckContents{vehicleid} = 0;

				if(truckdeliver >= 1 && truckdeliver <= 10)
				{
					Tax -= payment;
					Misc_Save();
					GivePlayerCash(playerid, payment);
					format(string, sizeof(string), "* You were paid $%d for delivering the goods and returning the truck.", payment);
				}
				else if(truckdeliver >= 11 && truckdeliver <= 25)
				{
					payment = floatround(payment * 1.5);
					Tax -= payment;
					Misc_Save();
					GivePlayerCash(playerid, payment);
	    			format(string, sizeof(string), "* You were paid $%d for delivering the goods and returning the truck.", payment);
	    			SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You received a 50 percent bonus for the additional risk from the cops.");

				}
			    SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);

				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 50 materials as a bonus for taking the risk of transporting illegal materials.");
					PlayerInfo[playerid][pMats] += 50;
				}
				else if(truckdeliver == 22)
				{
				    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 == 23)
				{
				    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;
				}
				else if(truckdeliver == 24)
				{
				    SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You were also given 300 materials as a bonus for taking the risk of transporting illegal materials.");
					PlayerInfo[playerid][pMats] += 300;
				}
				else if(truckdeliver == 25)
				{
				    SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "* You were also given 400 materials as a bonus for taking the risk of transporting illegal materials.");
					PlayerInfo[playerid][pMats] += 400;
				}


				if(PlayerInfo[playerid][pDoubleEXP] > 0)
				{
					format(string, sizeof(string), "You have gained 2 truck skill points instead of 1. You have %d hours left on the Double EXP token.", PlayerInfo[playerid][pDoubleEXP]);
					SendClientMessageEx(playerid, COLOR_YELLOW, string);
   					PlayerInfo[playerid][pTruckSkill] += 2;
				}
				else
				{
  					PlayerInfo[playerid][pTruckSkill] += 1;
				}

				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;
						Misc_Save();
						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, "  Nhan enter de vao trong HQ.");
			}
			case CHECKPOINT_HITMAN2:
			{
			    PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
			    DisablePlayerCheckpoint(playerid);
			    gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
			    SendClientMessageEx(playerid, COLOR_GRAD2, "  Nhan enter de vao trong HQ.");
			}
			case CHECKPOINT_HITMAN3:
			{
			    PlayerPlaySound(playerid, 1058, 0.0, 0.0, 0.0);
			    DisablePlayerCheckpoint(playerid);
			    gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
			    SendClientMessageEx(playerid, COLOR_GRAD2, "  Go~ /order de lay vu khi.");
			}
		}
	}
	return 1;
}
Reply
#2

uppppppppppppppppppppppppppppppppppppppppppppppppp pppp
Reply
#3

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Load crashdetect to your server. Goto pawno directory and create a file pawn.cfg
Open it and write in it:
pawn Код:
-d3
Save it and re-compile your scripts. Run your server (crashdetect musted be loaded) and when the server closes (crash) show us what it printed to console/server log.
Get the latest version of crashdetect and compile with debug mode. It might give the line caused the crash because there are a lot parts that may crashed and I cannot be sure.
Reply
#4

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Get the latest version of crashdetect and compile with debug mode. It might give the line caused the crash because there are a lot parts that may crashed and I cannot be sure.
You can give me crashdetect new version?
Reply
#5

It was on my above post. The second word "crashdetect" with blue color was a link. Anyways: https://github.com/Zeex/samp-plugin-...ases/tag/v4.12
Reply
#6

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
It was on my above post. The second word "crashdetect" with blue color was a link. Anyways: https://github.com/Zeex/samp-plugin-...ases/tag/v4.12
I test:
error in game server

Код:
17:47:44] [debug] Run time error 4: "Array index out of bounds"
[17:47:44] [debug]  Accessing element at negative index -1
[17:47:44] [debug] AMX backtrace:
[17:47:44] [debug] #0 00097c68 in ?? (0x00000000) from LS-RP.amx
[17:47:44] [debug] #1 00014a30 in public Streamer_OnPlayerEnterCP (0x00000000) from LS-RP.amx
[17:47:44] [debug] #2 native CallLocalFunction () [00471ef0] from samp-server.exe
[17:47:44] [debug] #3 000011c0 in public OnPlayerEnterCheckpoint (0x00000000) from LS-RP.amx
Reply
#7

Did you create the pawn.cfg file, write in it -d3 and re-compile LS-RP.pwn? If you did and it still did not give any lines, you'll need to debug it (I'll tell you how after posting if you did the above).
Reply
#8

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Did you create the pawn.cfg file, write in it -d3 and re-compile LS-RP.pwn? If you did and it still did not give any lines, you'll need to debug it (I'll tell you how after posting if you did the above).


I create the pawn.cfg file, write in it -d3 and re-compile, It did not give any lines.
Reply
#9

It show
Код:
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

Header size:          37232 bytes
Code size:          6942836 bytes
Data size:         21827256 bytes
Stack/heap size:   16000000 bytes; estimated max. usage: unknown, due to recursion
Total requirements:44807324 bytes
And then in gameserver
Код:
[17:56:18] [debug] Server crashed due to an unknown error
[17:56:18] [debug] Native backtrace:
[17:56:18] [debug] #0 660e8cb0 in ?? () from D:\LS-RP\plugins\crashdetect.DLL
[17:56:18] [debug] #1 660c66e4 in ?? () from D:\NG-RP\plugins\crashdetect.DLL
[17:56:18] [debug] #2 660e0b09 in ?? () from D:\NG-RP\plugins\crashdetect.DLL
[17:56:18] [debug] #3 660e612f in ?? () from D:\LS-RP\plugins\crashdetect.DLL
[17:56:18] [debug] #4 004690d5 in ?? () from D:\LS-RP\samp-server.exe
[17:56:18] [debug] #5 65646f6d in ?? () from D:\LS-RP\samp-server.exe
[17:56:18] [debug] #6 474e2f73 in ?? () from D:\LS-RP\samp-server.exe
[17:56:18] [debug] #7 645f5052 in ?? () from D:\LS-RP\samp-server.exe
[17:56:18] [debug] #8 612e7566 in ?? () from D:\LS-RP\samp-server.exe
Reply
#10

upppppppppppppppppppppppppppppppppppppp
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)