Problem crash my server
#1

Hello, i have this problem with my server,

Код HTML:
[14:17:32] [debug] Run time error 4: "Array index out of bounds"
[14:17:32] [debug]  Accessing element at index 10 past array upper bound 9
[14:17:32] [debug] AMX backtrace:
[14:17:32] [debug] #0 00026718 in ?? (6, 16) from roleplay.amx
[14:17:32] [debug] #1 000a9c74 in public RL_OnPlayerKeyStateChange (6, 131072, 0) from roleplay.amx
[14:17:32] [debug] #2 native CallLocalFunction () from samp-server.exe
[14:17:32] [debug] #3 00013a94 in public OnPlayerKeyStateChange (6, 131072, 0) from roleplay.amx
[14:17:33] [debug] Run time error 4: "Array index out of bounds"
[14:17:33] [debug]  Accessing element at index 10 past array upper bound 9
[14:17:33] [debug] AMX backtrace:
[14:17:33] [debug] #0 00026718 in ?? (6, 16) from roleplay.amx
[14:17:33] [debug] #1 000a9c74 in public RL_OnPlayerKeyStateChange (6, 131072, 0) from roleplay.amx
[14:17:33] [debug] #2 native CallLocalFunction () from samp-server.exe
[14:17:33] [debug] #3 00013a94 in public OnPlayerKeyStateChange (6, 131072, 0) from roleplay.amx
[14:17:33] [debug] Run time error 4: "Array index out of bounds"
[14:17:33] [debug]  Accessing element at index 10 past array upper bound 9
[14:17:33] [debug] AMX backtrace:
[14:17:33] [debug] #0 00026718 in ?? (6, 16) from roleplay.amx
[14:17:33] [debug] #1 000a9c74 in public RL_OnPlayerKeyStateChange (6, 131072, 0) from roleplay.amx
[14:17:33] [debug] #2 native CallLocalFunction () from samp-server.exe
[14:17:33] [debug] #3 00013a94 in public OnPlayerKeyStateChange (6, 131072, 0) from roleplay.amx
[14:17:33] [debug] Run time error 4: "Array index out of bounds"
[14:17:33] [debug]  Accessing element at index 10 past array upper bound 9
[14:17:33] [debug] AMX backtrace:
[14:17:33] [debug] #0 00026718 in ?? (6, 16) from roleplay.amx
[14:17:33] [debug] #1 000a9c74 in public RL_OnPlayerKeyStateChange (6, 131072, 0) from roleplay.amx
[14:17:33] [debug] #2 native CallLocalFunction () from samp-server.exe
[14:17:33] [debug] #3 00013a94 in public OnPlayerKeyStateChange (6, 131072, 0) from roleplay.amx
[14:17:33] [debug] Run time error 4: "Array index out of bounds"
[14:17:33] [debug]  Accessing element at index 10 past array upper bound 9
[14:17:33] [debug] AMX backtrace:
[14:17:33] [debug] #0 00026718 in ?? (6, 16) from roleplay.amx
[14:17:33] [debug] #1 000a9c74 in public RL_OnPlayerKeyStateChange (6, 131072, 0) from roleplay.amx
[14:17:33] [debug] #2 native CallLocalFunction () from samp-server.exe
[14:17:33] [debug] #3 00013a94 in public OnPlayerKeyStateChange (6, 131072, 0) from roleplay.amx
[14:17:34] [debug] Run time error 4: "Array index out of bounds"
[14:17:34] [debug]  Accessing element at index 10 past array upper bound 9
[14:17:34] [debug] AMX backtrace:
[14:17:34] [debug] #0 00026718 in ?? (6, 16) from roleplay.amx
[14:17:34] [debug] #1 000a9c74 in public RL_OnPlayerKeyStateChange (6, 131072, 0) from roleplay.amx
[14:17:34] [debug] #2 native CallLocalFunction () from samp-server.exe
[14:17:34] [debug] #3 00013a94 in public OnPlayerKeyStateChange (6, 131072, 0) from roleplay.amx
and i dont, know what it is

my onplayerkeystate change lines

Код HTML:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if (PlayerData[playerid][pTutorial] || PlayerData[playerid][pHospital] != -1 || !IsPlayerSpawned(playerid) || PlayerData[playerid][pCuffed] || PlayerData[playerid][pInjured])
	    return 0;

    if (GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_CUFFED && newkeys & KEY_JUMP && !(oldkeys & KEY_JUMP))
		ApplyAnimation(playerid, "GYMNASIUM", "gym_jog_falloff", 4.0, 0, 1, 1, 0, 0, 1);

	if (newkeys & KEY_CROUCH && IsPlayerInAnyVehicle(playerid))
	{
		cmd_abrir(playerid, "\1");
	}
	if (newkeys & KEY_CROUCH && IsPlayerInRangeOfPoint(playerid, 1.5, -226.4219, 1408.4594, 26.7734) && PlayerData[playerid][pTutorialStage] == 1)
	{
	    DisablePlayerCheckpoint(playerid);

		PlayerData[playerid][pTutorialStage] = 2;
	    SendClientMessage(playerid, COLOR_SERVER, "Presiona N para para levantar la botella del suelo.");
	}
	if (newkeys & KEY_YES && IsPlayerSpawned(playerid))
	{
	    if (PlayerData[playerid][pJailTime] > 0)
			return SendErrorMessage(playerid, "Estas encarcelado, no puedes abrir tu inventario.");

		if (PlayerData[playerid][pCuffed] > 0 || GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_CARRY)
		    return SendErrorMessage(playerid, "No puedes abrir tu inventario.");

		OpenInventory(playerid);
	}
	if (newkeys & KEY_SPRINT && IsPlayerSpawned(playerid) && PlayerData[playerid][pLoopAnim])
	{
	    ClearAnimations(playerid);
		HidePlayerFooter(playerid);

	    PlayerData[playerid][pLoopAnim] = false;
	}
	if (newkeys & KEY_FIRE && PlayerData[playerid][pDrinking])
	{
	    if (GetPlayerAnimationIndex(playerid) != 15 && GetPlayerAnimationIndex(playerid) != 16 && !PlayerData[playerid][pDrinkTime])
     	{
		    if (GetProgressBarValue(PlayerData[playerid][pDrinkBar]) <= 0.0)
		    {
	    	    SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);

				DestroyProgressBar(PlayerData[playerid][pDrinkBar]);
				PlayerData[playerid][pDrinking] = 0;

				SendServerMessage(playerid, "La botella estб vacнa.");
		    }
	    	else
	    	{
	    	    PlayerData[playerid][pDrinkTime] = 2;

	    	    switch (PlayerData[playerid][pDrinking])
	    	    {
					case 1: PlayerData[playerid][pThirst] = (PlayerData[playerid][pThirst] + 5 >= 100) ? (100) : (PlayerData[playerid][pThirst] + 5);
                    case 2: PlayerData[playerid][pThirst] = (PlayerData[playerid][pThirst] + 5 >= 100) ? (100) : (PlayerData[playerid][pThirst] + 5);
				}
			    SetProgressBarValue(PlayerData[playerid][pDrinkBar], GetProgressBarValue(PlayerData[playerid][pDrinkBar]) - 10.0);
    		    UpdateProgressBar(PlayerData[playerid][pDrinkBar], playerid);
			}
		}
	}
	if (newkeys & KEY_FIRE && PlayerData[playerid][pMining] && IsPlayerNearMine(playerid))
	{
	    if (PlayerData[playerid][pMineTime] > 0 || PlayerData[playerid][pMinedRock])
	        return 1;

		new id = Job_NearestPoint(playerid);

		if (id != -1)
		{
		    PlayerData[playerid][pMineTime] = 1;
		    SetTimerEx("MineTime", 400, false, "d", playerid);

		    if (PlayerData[playerid][pMineCount] < 5)
	    	{
	    	    PlayerData[playerid][pMineCount]++;

	        	ApplyAnimation(playerid, "BASEBALL", "null", 4.0, 0, 1, 1, 0, 0, 1);
            	ApplyAnimation(playerid, "BASEBALL", "BAT_4", 4.0, 0, 1, 1, 0, 0, 1);
			}
			else
			{
			    PlayerData[playerid][pMinedRock] = 1;
			    PlayerData[playerid][pMineCount] = 0;

			    RemovePlayerAttachedObject(playerid, 4);

			    ApplyAnimation(playerid, "BSKTBALL", "null", 4.0, 0, 1, 1, 0, 0, 1);
            	ApplyAnimation(playerid, "BSKTBALL", "BBALL_pickup", 4.0, 0, 1, 1, 0, 0, 1);

			    SetPlayerAttachedObject(playerid, 4, 2936, 5, 0.044377, 0.029049, 0.161334, 265.922912, 9.904896, 21.765972, 0.500000, 0.500000, 0.500000);
				SendServerMessage(playerid, "Has encontrado picando una roca, entregala en el punto de entrega.");

				SetPlayerCheckpoint(playerid, JobData[id][jobDeliver][0], JobData[id][jobDeliver][1], JobData[id][jobDeliver][2], 2.5);
				SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
			}
	    }
	}
	else if (newkeys & KEY_CTRL_BACK)
	{
	    if (PlayerData[playerid][pUsedMagazine])
	    {
	        new weaponid = PlayerData[playerid][pHoldWeapon];

	        switch (weaponid)
	        {
			    case 22:
			    {
			        HoldWeapon(playerid, 0);
				    PlayerPlaySoundEx(playerid, 36401);

			        Inventory_Remove(playerid, "Colt 45");
					PlayReloadAnimation(playerid, weaponid);

					GiveWeaponToPlayer(playerid, weaponid, 17);
					SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "** %s agarra el arma y la sujeta.", ReturnName(playerid, 0));
				}
				case 24:
			    {
			        HoldWeapon(playerid, 0);
				    PlayerPlaySoundEx(playerid, 36401);

			        Inventory_Remove(playerid, "Desert Eagle");
					PlayReloadAnimation(playerid, weaponid);

					GiveWeaponToPlayer(playerid, weaponid, 7);
					SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "** %s agarra el arma y la sujeta.", ReturnName(playerid, 0));
				}
				case 25:
			    {
			        HoldWeapon(playerid, 0);
				    PlayerPlaySoundEx(playerid, 36401);

			        Inventory_Remove(playerid, "Shotgun");
					PlayReloadAnimation(playerid, weaponid);

					GiveWeaponToPlayer(playerid, weaponid, 8);
					SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "** %s agarra el arma y la sujeta.", ReturnName(playerid, 0));
				}
				case 28:
			    {
			        HoldWeapon(playerid, 0);
				    PlayerPlaySoundEx(playerid, 36401);

			        Inventory_Remove(playerid, "Micro SMG");
					PlayReloadAnimation(playerid, weaponid);

					GiveWeaponToPlayer(playerid, weaponid, 50);
					SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "** %s agarra el arma y la sujeta.", ReturnName(playerid, 0));
				}
				case 29:
       			{
			        HoldWeapon(playerid, 0);
				    PlayerPlaySoundEx(playerid, 36401);

			        Inventory_Remove(playerid, "MP5");
					PlayReloadAnimation(playerid, weaponid);

					GiveWeaponToPlayer(playerid, weaponid, 30);
					SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "** %s agarra el arma y la sujeta.", ReturnName(playerid, 0));
				}
				case 32:
			    {
			        HoldWeapon(playerid, 0);
				    PlayerPlaySoundEx(playerid, 36401);

			        Inventory_Remove(playerid, "Tec-9");
					PlayReloadAnimation(playerid, weaponid);

					GiveWeaponToPlayer(playerid, weaponid, 50);
					SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "** %s agarra el arma y la sujeta.", ReturnName(playerid, 0));
				}
				case 30:
			    {
			        HoldWeapon(playerid, 0);
				    PlayerPlaySoundEx(playerid, 36401);

			        Inventory_Remove(playerid, "AK-47");
					PlayReloadAnimation(playerid, weaponid);

					GiveWeaponToPlayer(playerid, weaponid, 30);
					SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "** %s agarra el arma y la sujeta.", ReturnName(playerid, 0));
				}
				case 33:
			    {
			        HoldWeapon(playerid, 0);
				    PlayerPlaySoundEx(playerid, 36401);

			        Inventory_Remove(playerid, "Rifle");
					PlayReloadAnimation(playerid, weaponid);

					GiveWeaponToPlayer(playerid, weaponid, 5);
					SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "** %s agarra el arma y la sujeta.", ReturnName(playerid, 0));
				}
		        case 34:
			    {
			        HoldWeapon(playerid, 0);
				    PlayerPlaySoundEx(playerid, 36401);

			        Inventory_Remove(playerid, "Sniper");
					PlayReloadAnimation(playerid, weaponid);

					GiveWeaponToPlayer(playerid, weaponid, 5);
					SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "** %s agarra el arma y la sujeta.", ReturnName(playerid, 0));
				}
			}
			return 1;
	    }
	}
	else if (newkeys & KEY_NO && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
	{
	    static
	        string[320];

		if (PlayerData[playerid][pTutorialStage] == 2 && IsPlayerInRangeOfPoint(playerid, 1.5, -226.4219, 1408.4594, 26.7734) && GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DUCK)
		{
		    Inventory_Add(playerid, "Demo Soda", 1543);
		    DestroyPlayerObject(playerid, PlayerData[playerid][pTutorialObject]);

            PlayerData[playerid][pTutorialStage] = 3;
 		    SendClientMessage(playerid, COLOR_SERVER, "Presiona la letra 'Y' para abrir el inventario y selecciona la botella.");
		    return 1;
		}
		if (PlayerData[playerid][pHoldWeapon] > 0)
		{
		    if (PlayerData[playerid][pUsedMagazine])
      			Inventory_Add(playerid, "Cargador", 2039);

		    HoldWeapon(playerid, 0);
		    return SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "** %s guarda su arma vacнa.", ReturnName(playerid, 0));
		}
		if (PlayerData[playerid][pLoadCrate])
		{
		    for (new i = 1; i != MAX_VEHICLES; i ++) if (IsPlayerNearBoot(playerid, i))
			{
			    if (!IsLoadableVehicle(i))
			        return SendErrorMessage(playerid, "No puedes meter el cargamento en este vehiculo.");

			    if (CoreVehicles[i][vehLoadType] != 0 && CoreVehicles[i][vehLoadType] != PlayerData[playerid][pLoadType])
			        return SendErrorMessage(playerid, "Este vehiculo esta cargado con otro tipo de cargamento.");

			    if (CoreVehicles[i][vehLoads] >= 6)
			        return SendErrorMessage(playerid, "No puedes meter mas de 6 paquetes.");

				CoreVehicles[i][vehLoads]++;
				CoreVehicles[i][vehLoadType] = PlayerData[playerid][pLoadType];

                ApplyAnimation(playerid, "CARRY", "putdwn", 4.0, 0, 0, 0, 0, 0);


                if (CoreVehicles[i][vehLoads] == 6)
                {
                    DisablePlayerCheckpoint(playerid);

					if (PlayerData[playerid][pShipment] != -1)
					{
					    PlayerData[playerid][pDeliverShipment] = 1;

					    SendServerMessage(playerid, "Has cargado el vehiculo. Llevalo a su destino y escribe /descargar.");
					    SetPlayerCheckpoint(playerid, BusinessData[PlayerData[playerid][pShipment]][bizDeliver][0], BusinessData[PlayerData[playerid][pShipment]][bizDeliver][1], BusinessData[PlayerData[playerid][pShipment]][bizDeliver][2], 3.0);
					}
					else switch (PlayerData[playerid][pLoadType])
                    {
                    	case 1: SendServerMessage(playerid, "Has cargado el vehiculo. Llevalo a su destino y escribe /descargar en una tienda de suministros.");
                        case 2: SendServerMessage(playerid, "Has cargado el vehiculo. Llevalo a su destino y escribe /descargar en una tienda de armas.");
                        case 3: SendServerMessage(playerid, "Has cargado el vehiculo. Llevalo a su destino y escribe /descargar en una tienda de ropa");
                        case 4: SendServerMessage(playerid, "Has cargado el vehiculo. Llevalo a su destino y escribe /descargar en un restaurante");
                        case 5: SendServerMessage(playerid, "Has cargado el vehiculo. Llevalo a su destino y escribe /descargar en una gasolinara");
                        case 6: SendServerMessage(playerid, "Has cargado el vehiculo. Llevalo a su destino y escribe /descargar en una tienda de muebles");
					}
					PlayerData[playerid][pLoading] = 0;
					PlayerData[playerid][pLoadType] = 0;
                }
                PlayerData[playerid][pLoadCrate] = 0;

				RemovePlayerAttachedObject(playerid, 4);
				SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);

				return 1;
			}
		}
		for (new i = 0; i != MAX_BACKPACKS; i ++) if (BackpackData[i][backpackExists] && !BackpackData[i][backpackPlayer] && IsPlayerInRangeOfPoint(playerid, 2.0, BackpackData[i][backpackPos][0], BackpackData[i][backpackPos][1], BackpackData[i][backpackPos][2])) {
		    return Backpack_Items(playerid, i);
		}
        if (PlayerData[playerid][pCarryTrash])
		{
			for (new i = 1; i != MAX_VEHICLES; i ++) if (GetVehicleModel(i) == 408 && IsPlayerNearBoot(playerid, i))
			{
			    if (CoreVehicles[i][vehTrash] >= 10)
			        return SendErrorMessage(playerid, "No puedes cargar mas basura (lнmite: 10).");

				CoreVehicles[i][vehTrash]++;

				RemovePlayerAttachedObject(playerid, 4);


				PlayerData[playerid][pCarryTrash] = 0;
				break;
			}
		}

		if (PlayerData[playerid][pCarryCrate] != -1)
		{
			for (new i = 1; i != MAX_VEHICLES; i ++) if (IsLoadableVehicle(i) && IsPlayerNearBoot(playerid, i))
			{
			    if (GetVehicleCrates(i) >= GetMaxCrates(i))
			        return SendErrorMessage(playerid, "No puedes cargar mas paquetes (lнmite: %d).", GetMaxCrates(i));

				CrateData[PlayerData[playerid][pCarryCrate]][crateVehicle] = i;
				SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);

				RemovePlayerAttachedObject(playerid, 4);
				SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "** %s ha cargado la caja en el %s.", ReturnName(playerid, 0), ReturnVehicleName(i));

				PlayerData[playerid][pCarryCrate] = -1;
				ApplyAnimation(playerid, "CARRY", "putdwn", 4.0, 0, 0, 0, 0, 0);
				break;
			}
		}
		else if (GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DUCK)
		{
		    new
				count = 0,
				id = Item_Nearest(playerid);

		    if (id != -1)
		    {
		        string = "";

		        for (new i = 0; i < MAX_DROPPED_ITEMS; i ++) if (count < MAX_LISTED_ITEMS && DroppedItems[i][droppedModel] && IsPlayerInRangeOfPoint(playerid, 1.5, DroppedItems[i][droppedPos][0], DroppedItems[i][droppedPos][1], DroppedItems[i][droppedPos][2]) && GetPlayerInterior(playerid) == DroppedItems[i][droppedInt] && GetPlayerVirtualWorld(playerid) == DroppedItems[i][droppedWorld]) {
		            NearestItems[playerid][count++] = i;

		            strcat(string, DroppedItems[i][droppedItem]);
		            strcat(string, "\n");
		        }
		        if (count == 1)
		        {
				    if (DroppedItems[id][droppedWeapon] != 0)
					{
				        if (PlayerData[playerid][pPlayingHours] < 2)
							return SendErrorMessage(playerid, "Debes de haber jugado como mнnimo dos horas.");

    	   				GiveWeaponToPlayer(playerid, DroppedItems[id][droppedWeapon], DroppedItems[id][droppedAmmo]);

    	                Item_Delete(id);

                        Log_Write("logs/droppick.txt", "[%s] %s picked up a %s.", ReturnDate(), ReturnName(playerid, 0), ReturnWeaponName(DroppedItems[id][droppedWeapon]));

					}
					else if (PickupItem(playerid, id))
					{
			    		format(string, sizeof(string), "~g~%s~w~ ha sido aсadido a tu inventario!", DroppedItems[id][droppedItem]);
			    		ShowPlayerFooter(playerid, string);

						Log_Write("logs/droppick.txt", "[%s] %s has picked up a \"%s\".", ReturnDate(), ReturnName(playerid, 0), DroppedItems[id][droppedItem]);
					}
					else
						SendErrorMessage(playerid, "No tienes espacio en tu inventario.");
				}
				else Dialog_Show(playerid, PickupItems, DIALOG_STYLE_LIST, "Recoger objetos", string, "Recoger", "Cancelar");
			}
		}
	}
	else if (newkeys & KEY_SECONDARY_ATTACK)
	{
		static
		    id = -1;

		if ((id = Vendor_Nearest(playerid)) != -1)
		{
		    switch (VendorData[id][vendorType])
		    {
		        case 1:
		        {
					if (GetMoney(playerid) < 3)
					    return SendErrorMessage(playerid, "Tienes que tener al menos 3$.");

					if (PlayerData[playerid][pVendorTime] > 0)
					    return SendErrorMessage(playerid, "Espera un poco para comprar de nuevo.");

					if (Inventory_Count(playerid, "Hamburguesa Cocinada") >= 5)
					    return SendErrorMessage(playerid, "Tienes muchas hamburguesas en tu inventario.");

					id = Inventory_Add(playerid, "Hamburguesa Cocinada", 2703);

					if (id != -1)
					{
					    PlayerData[playerid][pVendorTime] = 3;

					    GiveMoney(playerid, -3);
					    ApplyAnimation(playerid, "DEALER", "shop_pay", 4.0, 0, 0, 0, 0, 0);

					    SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "** %s ha comprado una hamburguesa por $3.", ReturnName(playerid, 0));
						ShowPlayerFooter(playerid, "Tu ~p~hamburguesa~w~ esta en tu inventario.");
					}
				}
				case 2:
		        {
					if (GetMoney(playerid) < 2)
					    return SendErrorMessage(playerid, "Tienes que tener al menos 2$.");

					if (PlayerData[playerid][pVendorTime] > 0)
					    return SendErrorMessage(playerid, "Espera un poco para comprar de nuevo.");

					if (Inventory_Count(playerid, "Soda") >= 10)
					    return SendErrorMessage(playerid, "Tienes muchas sodas en tu inventario");

					id = Inventory_Add(playerid, "Soda", 1543);

					if (id != -1)
					{
                        PlayerData[playerid][pVendorTime] = 3;

					    GiveMoney(playerid, -2);
					    ApplyAnimation(playerid, "VENDING", "VEND_USE", 4.0, 0, 0, 0, 0, 0);

					    SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "** %s ha comprado una soda por $2.", ReturnName(playerid, 0));
						ShowPlayerFooter(playerid, "La ~p~soda~w~ esta en tu inventario.");
					}
				}
			}
		}
		if (PlayerData[playerid][pRangeBooth] != -1)
		{
		    Booth_Leave(playerid);
		    SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "** %s ha abandonado la cabina de tiros.", ReturnName(playerid, 0));
		}
		else for (new i = 0; i < MAX_BOOTHS; i ++) if (!g_BoothUsed[i] && IsPlayerInRangeOfPoint(playerid, 1.5, arrBoothPositions[i][0], arrBoothPositions[i][1], arrBoothPositions[i][2]))
		{
		    g_BoothUsed[i] = true;
		    PlayerData[playerid][pRangeBooth] = i;

		    UpdateWeapons(playerid);
		    ResetPlayerWeapons(playerid);

		    GivePlayerWeapon(playerid, 24, 15000);

			Booth_Refresh(playerid);
			PlayerTextDrawSetString(playerid, PlayerData[playerid][pTextdraws][81], "~b~Blancos:~w~ 0/10");

			PlayerTextDrawShow(playerid, PlayerData[playerid][pTextdraws][81]);
			SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "** %s ha entrado en la cabina de disparo.", ReturnName(playerid, 0));
			return 1;
		}
		if (PlayerData[playerid][pTutorialStage] == 5 && IsPlayerInRangeOfPoint(playerid, 1.5, -228.8403, 1401.1831, 27.7656))
		{
		    for (new i = 0; i < 100; i ++) {
		        SendClientMessage(playerid, -1, "");
			}
		    SetDefaultSpawn(playerid);
            Dialog_Show(playerid, TutorialConfirm, DIALOG_STYLE_MSGBOX, "Tutorial", "їDeseas ver un breve tutorial?", "Si", "No");
		}
		if (IsPlayerInRangeOfPoint(playerid, 2.5, -204.5334, -1735.3131, 675.7687) && PlayerData[playerid][pHospitalInt] != -1)
		{
			SetPlayerPos(playerid, arrHospitalSpawns[PlayerData[playerid][pHospitalInt]][0], arrHospitalSpawns[PlayerData[playerid][pHospitalInt]][1], arrHospitalSpawns[PlayerData[playerid][pHospitalInt]][2]);
			SetPlayerFacingAngle(playerid, arrHospitalSpawns[PlayerData[playerid][pHospitalInt]][3]);

			SetPlayerInterior(playerid, 0);
			SetPlayerVirtualWorld(playerid, 0);

			SetCameraBehindPlayer(playerid);
			PlayerData[playerid][pHospitalInt] = -1;
		}
		else if (IsPlayerInRangeOfPoint(playerid, 2.5, 272.2939, 1388.8876, 11.1342))
		{
		    SetPlayerPosEx(playerid, 1206.8619, -1314.3546, 797.0880);
		    SetPlayerFacingAngle(playerid, 270.0000);

		    SetPlayerInterior(playerid, 5);
		    SetPlayerVirtualWorld(playerid, PRISON_WORLD);

		    SetCameraBehindPlayer(playerid);
		}
		else if (IsPlayerInRangeOfPoint(playerid, 2.5, 1206.8619, -1314.3546, 796.7880) && GetPlayerVirtualWorld(playerid) == PRISON_WORLD && !PlayerData[playerid][pJailTime])
		{
		    if (PlayerData[playerid][pFreeze])
			{
		        TogglePlayerControllable(playerid, 1);
		        KillTimer(PlayerData[playerid][pFreezeTimer]);
			}
		    SetPlayerPos(playerid, 272.2939, 1388.8876, 11.1342);
		    SetPlayerFacingAngle(playerid, 270.0000);

		    SetPlayerInterior(playerid, 0);
		    SetPlayerVirtualWorld(playerid, 0);

		    SetCameraBehindPlayer(playerid);
		}
		else if (IsPlayerInRangeOfPoint(playerid, 2.5, 1211.1923, -1354.3439, 796.7456) && GetPlayerVirtualWorld(playerid) == PRISON_WORLD)
		{
		    if (PlayerData[playerid][pFreeze])
			{
		        TogglePlayerControllable(playerid, 1);
		        KillTimer(PlayerData[playerid][pFreezeTimer]);
			}
		    SetPlayerPos(playerid, 201.8927, 1437.1788, 10.5950);
		    SetPlayerFacingAngle(playerid, 180.0000);

		    SetPlayerInterior(playerid, 0);
		    SetPlayerVirtualWorld(playerid, 0);

		    SetCameraBehindPlayer(playerid);
		}
		else if (IsPlayerInRangeOfPoint(playerid, 2.5, 201.8927, 1437.1788, 10.5950))
		{
		    SetPlayerPosEx(playerid, 1211.1923, -1354.3439, 797.0456);
		    SetPlayerFacingAngle(playerid, 0.0000);

		    SetPlayerInterior(playerid, 5);
		    SetPlayerVirtualWorld(playerid, PRISON_WORLD);

		    SetCameraBehindPlayer(playerid);
		}
		for (new i = 0; i < sizeof(arrHospitalSpawns); i ++) if (IsPlayerInRangeOfPoint(playerid, 3.0, arrHospitalSpawns[i][0], arrHospitalSpawns[i][1], arrHospitalSpawns[i][2]))
		{
			SetPlayerPos(playerid, -204.5648, -1736.1201, 675.7687);
			SetPlayerFacingAngle(playerid, 180.0000);

			SetPlayerInterior(playerid, 3);
			SetPlayerVirtualWorld(playerid, i + 5000);

			SetCameraBehindPlayer(playerid);
			PlayerData[playerid][pHospitalInt] = i;

		    return 1;
	    }
	    if ((id = Gate_Nearest(playerid)) != -1)
		{
		    cmd_abrir(playerid, "\1");
		}
	    if ((id = House_Nearest(playerid)) != -1)
	    {
	        if (HouseData[id][houseLocked] || HouseData[id][houseOwner] == 0)
	            return SendErrorMessage(playerid, "No puedes entrar en una casa cerrada.");

			SetPlayerPos(playerid, HouseData[id][houseInt][0], HouseData[id][houseInt][1], HouseData[id][houseInt][2]);
			SetPlayerFacingAngle(playerid, HouseData[id][houseInt][3]);

			SetPlayerInterior(playerid, HouseData[id][houseInterior]);
			SetPlayerVirtualWorld(playerid, HouseData[id][houseID] + 5000);

			SetCameraBehindPlayer(playerid);
			PlayerData[playerid][pHouse] = HouseData[id][houseID];
			return 1;
		}
		if ((id = House_Inside(playerid)) != -1 && IsPlayerInRangeOfPoint(playerid, 2.5, HouseData[id][houseInt][0], HouseData[id][houseInt][1], HouseData[id][houseInt][2]))
	    {
			SetPlayerPos(playerid, HouseData[id][housePos][0], HouseData[id][housePos][1], HouseData[id][housePos][2]);
			SetPlayerFacingAngle(playerid, HouseData[id][housePos][3] - 180.0);

			SetPlayerInterior(playerid, HouseData[id][houseExterior]);
			SetPlayerVirtualWorld(playerid, HouseData[id][houseExteriorVW]);

			SetCameraBehindPlayer(playerid);
			PlayerData[playerid][pHouse] = -1;
			return 1;
		}
        if ((id = Business_Nearest(playerid)) != -1)
	    {
	        if (BusinessData[id][bizLocked])
	            return SendErrorMessage(playerid, "Este negocio esta cerrado.");

			if (PlayerData[playerid][pTask] && !PlayerData[playerid][pStoreTask])
			{
			    PlayerData[playerid][pStoreTask] = 1;
			    Dialog_Show(playerid, ShowOnly, DIALOG_STYLE_MSGBOX, "Suministros", "Este negocio es una tienda de suministro. Puedes comprar cualquier objeto usando el comando /comprar.\nHay muchas cosas muy ъtiles que puedes comprar aqui.\n\nLa mбs util es el GPS, te ayuda a localizar sitios en la ciudad.\nPuedes salir del negocio usando la tecla F en la puerta.", "Cerrar", "");

			    if (IsTaskCompleted(playerid))
				{
    				PlayerData[playerid][pTask] = 0;
					ShowPlayerFooter(playerid, "ЎHas ~g~completado~w~ todos tus logros!");
				}
			}
			SetPlayerPos(playerid, BusinessData[id][bizInt][0], BusinessData[id][bizInt][1], BusinessData[id][bizInt][2]);
			SetPlayerFacingAngle(playerid, BusinessData[id][bizInt][3]);

			SetPlayerInterior(playerid, BusinessData[id][bizInterior]);
			SetPlayerVirtualWorld(playerid, BusinessData[id][bizID] + 6000);

			SetCameraBehindPlayer(playerid);
			PlayerData[playerid][pBusiness] = BusinessData[id][bizID];

			if (strlen(BusinessData[id][bizMessage]) && strcmp(BusinessData[id][bizMessage], "NULL", true)) {
			    SendClientMessage(playerid, COLOR_DARKBLUE, BusinessData[id][bizMessage]);
			}
			return 1;
		}
		if ((id = Business_Inside(playerid)) != -1 && IsPlayerInRangeOfPoint(playerid, 2.5, BusinessData[id][bizInt][0], BusinessData[id][bizInt][1], BusinessData[id][bizInt][2]))
	    {
			SetPlayerPos(playerid, BusinessData[id][bizPos][0], BusinessData[id][bizPos][1], BusinessData[id][bizPos][2]);
			SetPlayerFacingAngle(playerid, BusinessData[id][bizPos][3] - 180.0);

			SetPlayerInterior(playerid, BusinessData[id][bizExterior]);
			SetPlayerVirtualWorld(playerid, BusinessData[id][bizExteriorVW]);

			SetCameraBehindPlayer(playerid);
			PlayerData[playerid][pBusiness] = -1;
			return 1;
		}
		if ((id = Entrance_Nearest(playerid)) != -1)
	    {
	        if (EntranceData[id][entranceLocked])
	            return SendErrorMessage(playerid, "Esta entrada esta cerrada.");

            if (PlayerData[playerid][pTask])
			{
				if (EntranceData[id][entranceType] == 2 && !PlayerData[playerid][pBankTask])
				{
			    	PlayerData[playerid][pBankTask] = 1;
			    	Dialog_Show(playerid, ShowOnly, DIALOG_STYLE_MSGBOX, "Banco", "Este es el banco de San Andreas.\nAqui es donde depositas, sacas y manejas tu dinero.\n\nSolo tienes que escribir /banco dentro para manejar tu cuenta.\nSi estas cerca de un cajero puedes usar /atm para acceder a tu cuenta.", "Cerrar", "");

				    if (IsTaskCompleted(playerid))
					{
				        PlayerData[playerid][pTask] = 0;
						ShowPlayerFooter(playerid, "ЎHas ~g~completado~w~ todos tus logros!");
					}
				}
				else if (EntranceData[id][entranceType] == 1 && !PlayerData[playerid][pTestTask])
				{
			    	PlayerData[playerid][pTestTask] = 1;
			    	Dialog_Show(playerid, ShowOnly, DIALOG_STYLE_MSGBOX, "Auto-Escuela", "Aqui es donde te puedes sacar un carnet para conducir sin miedo en la ciudad.\nTienes que pasar un test prбctico y luego un test teуrico.\n\nLegalmente necesitas una licencia/carnet para poder conducir.\nConducir sin licencia conlleva grandes conflictos con la policнa.", "Cerrar", "");

				    if (IsTaskCompleted(playerid))
					{
				        PlayerData[playerid][pTask] = 0;
						ShowPlayerFooter(playerid, "ЎHas ~g~completado~w~ todos tus logros!");
					}
				}
			}
			if (EntranceData[id][entranceCustom])
				SetPlayerPosEx(playerid, EntranceData[id][entranceInt][0], EntranceData[id][entranceInt][1], EntranceData[id][entranceInt][2]);

			else
			    SetPlayerPos(playerid, EntranceData[id][entranceInt][0], EntranceData[id][entranceInt][1], EntranceData[id][entranceInt][2]);

			SetPlayerFacingAngle(playerid, EntranceData[id][entranceInt][3]);

			SetPlayerInterior(playerid, EntranceData[id][entranceInterior]);
			SetPlayerVirtualWorld(playerid, EntranceData[id][entranceWorld]);

			SetCameraBehindPlayer(playerid);
			PlayerData[playerid][pEntrance] = EntranceData[id][entranceID];
			return 1;
		}
		if ((id = Entrance_Inside(playerid)) != -1 && IsPlayerInRangeOfPoint(playerid, 2.5, EntranceData[id][entranceInt][0], EntranceData[id][entranceInt][1], EntranceData[id][entranceInt][2]))
	    {
	        if (EntranceData[id][entranceCustom])
				SetPlayerPosEx(playerid, EntranceData[id][entrancePos][0], EntranceData[id][entrancePos][1], EntranceData[id][entrancePos][2]);

			else
			    SetPlayerPosEx(playerid, EntranceData[id][entrancePos][0], EntranceData[id][entrancePos][1], EntranceData[id][entrancePos][2]);

			SetPlayerFacingAngle(playerid, EntranceData[id][entrancePos][3] - 180.0);

			SetPlayerInterior(playerid, EntranceData[id][entranceExterior]);
			SetPlayerVirtualWorld(playerid, EntranceData[id][entranceExteriorVW]);

			SetCameraBehindPlayer(playerid);
			PlayerData[playerid][pEntrance] = Entrance_GetLink(playerid);
			return 1;
		}
		if ((id = Crate_Nearest(playerid)) != -1 && PlayerData[playerid][pCarryCrate] == -1 && !IsCrateInUse(id))
		{
		    // If the crate is within a stack, this function below
		    // will get the highest crate on the stack.

		    if ((id = Crate_Highest(id)) == -1)
		        id = Crate_Nearest(playerid);

		    ApplyAnimation(playerid, "CARRY", "liftup", 4.1, 0, 0, 0, 0, 0, 1);

            PlayerData[playerid][pCarryCrate] = id;
            SetPlayerAttachedObject(playerid, 4, 964, 1, -0.157020, 0.413313, 0.000000, 0.000000, 88.000000, 180.000000, 0.500000, 0.500000, 0.500000);

			SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "** %s se agacha y recoge un paquete.", ReturnName(playerid, 0));
			SendServerMessage(playerid, "Has recogido un paquete, cargalo usando la tecla N.");

			DestroyDynamicObject(CrateData[id][crateObject]);
			DestroyDynamic3DTextLabel(CrateData[id][crateText3D]);

			SetPlayerSpecialAction(playerid, SPECIAL_ACTION_CARRY);
			CrateData[id][crateObject] = INVALID_OBJECT_ID;
			return 1;
		}
		if (PlayerData[playerid][pCarryCrate] != -1 && GetPlayerState(playerid) == PLAYER_STATE_ONFOOT && GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_CARRY && !PlayerData[playerid][pCrafting])
		{
		    ApplyAnimation(playerid, "CARRY", "null", 4.0, 0, 0, 0, 0, 0);
		    ApplyAnimation(playerid, "CARRY", "putdwn", 4.0, 0, 0, 0, 0, 0);

			Crate_Drop(playerid, 1.5);
			SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "** %s ha tirado el paquete.", ReturnName(playerid, 0));

			SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE);
			return 1;
		}
	}
	return 1;
}
Please help me i dont know how fix it
Reply
#2

Recompile the GM
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)