Перейти к содержанию
Авторизация  
CRMPEN

Проблема с лутом

Рекомендуемые сообщения

CRMPEN

У меня такая проблема,вот я подбегаю беру лут,и рядом со мной еще есть лут,но я его сразу не могу взять,как будто есть какая то задержка..искал в моде не нашел,можете помочь ее убрать вот вам функция клавиши на которую беру лут 

if(newkeys == KEY_NO)
	{
	    new id = -1;
	    for (new i = 0; i < MAX_DYNAMIC_ITEMS; i ++)
		{
			if (ItemPosition[i][ItemExists] && IsPlayerInRangeOfPoint(playerid, 5.0, ItemPosition[i][ItemX], ItemPosition[i][ItemY], ItemPosition[i][ItemZ]))
			{
	  			id = i;
	     		break;
			}
		}
        if (id != -1 && IsPlayerInRangeOfPoint(playerid, 5.0, ItemPosition[id][ItemX], ItemPosition[id][ItemY], ItemPosition[id][ItemZ]))
	  	{
			if(CantUseSearch[playerid] == 0)
			{
				if(AccountInfo[playerid][pSlotsFree] == 20 && AccountInfo[playerid][pBackPack] == 0)
				{
	   				SendClientMessage(playerid, RED, "[?????????]{FFFFFF}  ? ????? ????????? ??? ?????");
				    return 1;
				}
				if(AccountInfo[playerid][pSlotsFree] == 50 && AccountInfo[playerid][pBackPack] == 1)
				{
	   				SendClientMessage(playerid, RED, "[?????????]{FFFFFF}  ? ????? ????????? ??? ?????");
				    return 1;
				}
				if(AccountInfo[playerid][pSlotsFree] == 100 && AccountInfo[playerid][pBackPack] == 2)
				{
	   				SendClientMessage(playerid, RED, "[?????????]{FFFFFF}  ? ????? ????????? ??? ?????");
				    return 1;
				}
				if(AccountInfo[playerid][pSlotsFree] == 150 && AccountInfo[playerid][pBackPack] == 3)
				{
				   SendClientMessage(playerid, RED, "[?????????]{FFFFFF} ? ????? ????????? ??? ?????");
				   return 1;
				}
	  			ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
				TogglePlayerControllable(playerid, 0);
	            CantUseSearch[playerid] = 1;
	   			SetPVarInt(playerid, "SearchItem", id + 1);
	  			SetTimerEx("CanUseSearch", 70000, false, "d", playerid);
				TogglePlayerControllable(playerid, 1);
				ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
				new message = random(20);
				if(message == 0 || message == 1 || message == 2)
				{
	  				GameTextForPlayer(playerid,"?????? ???????...",6000,5);
				}
				else if(message == 3)
				{
	 				GameTextForPlayer(playerid, "?? ????? ???????",6000,5);
					AccountInfo[playerid][pTent] += 1;
					AccountInfo[playerid][pSlotsFree] += 1;
				}
				else if(message == 4)
				{
	 				GameTextForPlayer(playerid, "?? ????? ?????????? ??????",6000,5);
					AccountInfo[playerid][pMissle] += 1;
					AccountInfo[playerid][pSlotsFree] += 1;
				}
				else if(message == 5)
				{
	 				GameTextForPlayer(playerid, "?? ????? ??????",6000,5);
					AccountInfo[playerid][pGuns][0] = 6;
     				AccountInfo[playerid][pAmmo][0] += 1;
					GivePlayerWeapon(playerid, 6, 1);
					AccountInfo[playerid][pSlotsFree] += 1;
				}
				else if(message == 6)
				{
	 				GameTextForPlayer(playerid, "?? ????? ???????",6000,5);
					AccountInfo[playerid][pWaterBottle] += 1;
					AccountInfo[playerid][pSlotsFree] += 1;
				}
				else if(message == 7)
				{
	   				GameTextForPlayer(playerid, "?? ????? ?????",6000,5);
			   		AccountInfo[playerid][pChips] += 1;
			   		AccountInfo[playerid][pSlotsFree] += 1;
				}
				else if(message == 8)
				{
	   				GameTextForPlayer(playerid, "?? ????? ??????",6000,5);
			 		AccountInfo[playerid][pFishingRod] += 1;
			 		AccountInfo[playerid][pSlotsFree] += 1;
				}
				else if(message == 9)
				{
				   GameTextForPlayer(playerid, "?? ????? ?????",6000,5);
				   AccountInfo[playerid][pBandage] += 1;
				   AccountInfo[playerid][pSlotsFree] += 1;
				}
				else if(message == 10)
				{
				   GameTextForPlayer(playerid, "????????? ???...",6000,5);
				   AccountInfo[playerid][pMatches] += 1;
				   AccountInfo[playerid][pSlotsFree] += 1;
				}
				else if(message == 11)
				{
					GameTextForPlayer(playerid, "?? ????? ???",6000,5);
     				AccountInfo[playerid][pGuns][0] = 4;
     				AccountInfo[playerid][pAmmo][0] += 1;
					GivePlayerWeapon(playerid, 4, 1);
					AccountInfo[playerid][pSlotsFree] += 1;
				}
				else if(message == 12)
				{
				 	GameTextForPlayer(playerid, "?? ????? ????????",6000,5);
					AccountInfo[playerid][pGuns][1] = 24;
					AccountInfo[playerid][pAmmo][1] += 50;
				 	GivePlayerWeapon(playerid, 24, 50);
				 	AccountInfo[playerid][pSlotsFree] += 1;
				}
				else if(message == 13)
				{
			 		GameTextForPlayer(playerid, "?? ????? ?????",6000,5);
			 		AccountInfo[playerid][pBloodBag] = 1;
		 			AccountInfo[playerid][pRadio] = 1;
					AccountInfo[playerid][pSlotsFree] += 1;
				}
				else if(message == 14)
				{
			 		if(AccountInfo[playerid][pBackPackType] == 0 || AccountInfo[playerid][pBackPackType] == 1)
			 		{
				 		SetPlayerAttachedObject(playerid, 1, 371, 1, 0, -0.14,0, 0, 90, 0,1,1,1);
						GameTextForPlayer(playerid, "????????? ??????",6000,5);
						AccountInfo[playerid][pSlots] = 50;
						AccountInfo[playerid][pBackPack] = 1;
						AccountInfo[playerid][pBackPackType] = 1;
					}
				}
				else if(message == 15)
				{
				 	if(AccountInfo[playerid][pBackPackType] == 0 || AccountInfo[playerid][pBackPackType] == 1)
				 	{
					 	SetPlayerAttachedObject(playerid, 1, 3026, 1, 0, -0.14,0, 0, 0, 0,1,1,1);
						GameTextForPlayer(playerid, "??????? ??????",6000,5);
						AccountInfo[playerid][pSlots] = 100;
						AccountInfo[playerid][pBackPack] = 2;
						AccountInfo[playerid][pBackPackType] = 2;
					}
				}
				else if(message == 16)
				{
			 		if(AccountInfo[playerid][pBackPackType] == 0 || AccountInfo[playerid][pBackPackType] == 1 || AccountInfo[playerid][pBackPackType] == 2 || AccountInfo[playerid][pBackPackType] == 3)
			 		{
					 	SetPlayerAttachedObject(playerid, 1, 1310, 1, 0, -0.14,0, 0, 90, 0,1,1,1);
						GameTextForPlayer(playerid, "???????? ??????",6000,5);
						AccountInfo[playerid][pSlots] = 150;
						AccountInfo[playerid][pBackPack] = 3;
						AccountInfo[playerid][pBackPackType] = 3;
					}
				}
				else if(message == 17)
				{
				 	GameTextForPlayer(playerid, "?? ????? ????????",6000,5);
     				AccountInfo[playerid][pGuns][2] = 25;
     				AccountInfo[playerid][pAmmo][2] += 21;
				 	GivePlayerWeapon(playerid, 25, 50);
				 	AccountInfo[playerid][pSlotsFree] += 1;
				}
				else if(message == 18)
				{
				 	GameTextForPlayer(playerid, "?? ????? M4",6000,5);
 					AccountInfo[playerid][pGuns][3] = 31;
 					AccountInfo[playerid][pAmmo][3] += 29;
				 	GivePlayerWeapon(playerid, 31, 50);
				 	AccountInfo[playerid][pSlotsFree] += 1;
				}
				else if(message == 19)
				{
				 	GameTextForPlayer(playerid, "?? ????? ????????",6000,5);
     				AccountInfo[playerid][pGuns][4] = 34;
     				AccountInfo[playerid][pAmmo][4] += 19;
				 	GivePlayerWeapon(playerid, 34, 60);
				 	AccountInfo[playerid][pSlotsFree] += 1;
				}
				DeleteItem(GetPVarInt(playerid, "SearchItem") - 1);
				DeletePVar(playerid, "SearchItem");
			}
		}
	}
	return 1;
}

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты
Exclusive

Кхм..Для начала скопируй на русском языке

Изменено пользователем Koster™

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты
CRMPEN

, не знаю как тот пост изменить по этому вот 

if(newkeys == KEY_NO)
	{
	    new id = -1;
	    for (new i = 0; i < MAX_DYNAMIC_ITEMS; i ++)
		{
			if (ItemPosition[i][ItemExists] && IsPlayerInRangeOfPoint(playerid, 5.0, ItemPosition[i][ItemX], ItemPosition[i][ItemY], ItemPosition[i][ItemZ]))
			{
	  			id = i;
	     		break;
			}
		}
        if (id != -1 && IsPlayerInRangeOfPoint(playerid, 5.0, ItemPosition[id][ItemX], ItemPosition[id][ItemY], ItemPosition[id][ItemZ]))
	  	{
			if(CantUseSearch[playerid] == 0)
			{
				if(AccountInfo[playerid][pSlotsFree] == 20 && AccountInfo[playerid][pBackPack] == 0)
				{
	   				SendClientMessage(playerid, RED, "[Инвентарь]{FFFFFF}  В Вашем инвентаре нет места");
				    return 1;
				}
				if(AccountInfo[playerid][pSlotsFree] == 50 && AccountInfo[playerid][pBackPack] == 1)
				{
	   				SendClientMessage(playerid, RED, "[Инвентарь]{FFFFFF}  В Вашем инвентаре нет места");
				    return 1;
				}
				if(AccountInfo[playerid][pSlotsFree] == 100 && AccountInfo[playerid][pBackPack] == 2)
				{
	   				SendClientMessage(playerid, RED, "[Инвентарь]{FFFFFF}  В Вашем инвентаре нет места");
				    return 1;
				}
				if(AccountInfo[playerid][pSlotsFree] == 150 && AccountInfo[playerid][pBackPack] == 3)
				{
				   SendClientMessage(playerid, RED, "[Инвентарь]{FFFFFF} В Вашем инвентаре нет места");
				   return 1;
				}
	  			ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
				TogglePlayerControllable(playerid, 0);
	            CantUseSearch[playerid] = 1;
	   			SetPVarInt(playerid, "SearchItem", id + 1);
	  			SetTimerEx("CanUseSearch", 70000, false, "d", playerid);
				TogglePlayerControllable(playerid, 1);
				ApplyAnimation(playerid, "BOMBER", "BOM_Plant", 4.0, 0, 0, 0, 0, 0);
				new message = random(20);
				if(message == 0 || message == 1 || message == 2)
				{
	  				GameTextForPlayer(playerid,"Пустая коробка...",6000,5);
				}
				else if(message == 3)
				{
	 				GameTextForPlayer(playerid, "Вы нашли палатку",6000,5);
					AccountInfo[playerid][pTent] += 1;
					AccountInfo[playerid][pSlotsFree] += 1;
				}
				else if(message == 4)
				{
	 				GameTextForPlayer(playerid, "вы нагли сигнальную ракету",6000,5);
					AccountInfo[playerid][pMissle] += 1;
					AccountInfo[playerid][pSlotsFree] += 1;
				}
				else if(message == 5)
				{
	 				GameTextForPlayer(playerid, "Вы нашли лопату",6000,5);
					AccountInfo[playerid][pGuns][0] = 6;
     				AccountInfo[playerid][pAmmo][0] += 1;
					GivePlayerWeapon(playerid, 6, 1);
					AccountInfo[playerid][pSlotsFree] += 1;
				}
				else if(message == 6)
				{
	 				GameTextForPlayer(playerid, "Вы нашли бутылку",6000,5);
					AccountInfo[playerid][pWaterBottle] += 1;
					AccountInfo[playerid][pSlotsFree] += 1;
				}
				else if(message == 7)
				{
	   				GameTextForPlayer(playerid, "Вы нашли чипсы",6000,5);
			   		AccountInfo[playerid][pChips] += 1;
			   		AccountInfo[playerid][pSlotsFree] += 1;
				}
				else if(message == 8)
				{
	   				GameTextForPlayer(playerid, "Вы нашли удочку",6000,5);
			 		AccountInfo[playerid][pFishingRod] += 1;
			 		AccountInfo[playerid][pSlotsFree] += 1;
				}
				else if(message == 9)
				{
				   GameTextForPlayer(playerid, "Вы нашли бинты",6000,5);
				   AccountInfo[playerid][pBandage] += 1;
				   AccountInfo[playerid][pSlotsFree] += 1;
				}
				else if(message == 10)
				{
				   GameTextForPlayer(playerid, "Непонятно что...",6000,5);
				   AccountInfo[playerid][pMatches] += 1;
				   AccountInfo[playerid][pSlotsFree] += 1;
				}
				else if(message == 11)
				{
					GameTextForPlayer(playerid, "Вы нашли нож",6000,5);
     				AccountInfo[playerid][pGuns][0] = 4;
     				AccountInfo[playerid][pAmmo][0] += 1;
					GivePlayerWeapon(playerid, 4, 1);
					AccountInfo[playerid][pSlotsFree] += 1;
				}
				else if(message == 12)
				{
				 	GameTextForPlayer(playerid, "Вы нашли пистолет",6000,5);
					AccountInfo[playerid][pGuns][1] = 24;
					AccountInfo[playerid][pAmmo][1] += 50;
				 	GivePlayerWeapon(playerid, 24, 50);
				 	AccountInfo[playerid][pSlotsFree] += 1;
				}
				else if(message == 13)
				{
			 		GameTextForPlayer(playerid, "Вы нашли рацию",6000,5);
			 		AccountInfo[playerid][pBloodBag] = 1;
		 			AccountInfo[playerid][pRadio] = 1;
					AccountInfo[playerid][pSlotsFree] += 1;
				}
				else if(message == 14)
				{
			 		if(AccountInfo[playerid][pBackPackType] == 0 || AccountInfo[playerid][pBackPackType] == 1)
			 		{
				 		SetPlayerAttachedObject(playerid, 1, 371, 1, 0, -0.14,0, 0, 90, 0,1,1,1);
						GameTextForPlayer(playerid, "Маленький рюкзак",6000,5);
						AccountInfo[playerid][pSlots] = 50;
						AccountInfo[playerid][pBackPack] = 1;
						AccountInfo[playerid][pBackPackType] = 1;
					}
				}
				else if(message == 15)
				{
				 	if(AccountInfo[playerid][pBackPackType] == 0 || AccountInfo[playerid][pBackPackType] == 1)
				 	{
					 	SetPlayerAttachedObject(playerid, 1, 3026, 1, 0, -0.14,0, 0, 0, 0,1,1,1);
						GameTextForPlayer(playerid, "Большой рюкзак",6000,5);
						AccountInfo[playerid][pSlots] = 100;
						AccountInfo[playerid][pBackPack] = 2;
						AccountInfo[playerid][pBackPackType] = 2;
					}
				}
				else if(message == 16)
				{
			 		if(AccountInfo[playerid][pBackPackType] == 0 || AccountInfo[playerid][pBackPackType] == 1 || AccountInfo[playerid][pBackPackType] == 2 || AccountInfo[playerid][pBackPackType] == 3)
			 		{
					 	SetPlayerAttachedObject(playerid, 1, 1310, 1, 0, -0.14,0, 0, 90, 0,1,1,1);
						GameTextForPlayer(playerid, "Огромный рюкзак",6000,5);
						AccountInfo[playerid][pSlots] = 150;
						AccountInfo[playerid][pBackPack] = 3;
						AccountInfo[playerid][pBackPackType] = 3;
					}
				}
				else if(message == 17)
				{
				 	GameTextForPlayer(playerid, "Вы нашли дробовик",6000,5);
     				AccountInfo[playerid][pGuns][2] = 25;
     				AccountInfo[playerid][pAmmo][2] += 21;
				 	GivePlayerWeapon(playerid, 25, 50);
				 	AccountInfo[playerid][pSlotsFree] += 1;
				}
				else if(message == 18)
				{
				 	GameTextForPlayer(playerid, "Вы нашли M4",6000,5);
 					AccountInfo[playerid][pGuns][3] = 31;
 					AccountInfo[playerid][pAmmo][3] += 29;
				 	GivePlayerWeapon(playerid, 31, 50);
				 	AccountInfo[playerid][pSlotsFree] += 1;
				}
				else if(message == 19)
				{
				 	GameTextForPlayer(playerid, "Вы нашли винтовку",6000,5);
     				AccountInfo[playerid][pGuns][4] = 34;
     				AccountInfo[playerid][pAmmo][4] += 19;
				 	GivePlayerWeapon(playerid, 34, 60);
				 	AccountInfo[playerid][pSlotsFree] += 1;
				}
				DeleteItem(GetPVarInt(playerid, "SearchItem") - 1);
				DeletePVar(playerid, "SearchItem");
			}
		}
	}
	return 1;
}

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты
Emiliano

Я думаю, что у тебя проблема с анимациями. 

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты
Гость
Эта тема закрыта для публикации ответов.
Авторизация  

  • Последние посетители   0 пользователей онлайн

    Ни одного зарегистрированного пользователя не просматривает данную страницу

×

Важная информация

Мы разместили cookie-файлы на ваше устройство, чтобы помочь сделать этот сайт лучше. Вы можете изменить свои настройки cookie-файлов, или продолжить без изменения настроек.