Перейти к публикации
Поиск в
  • Дополнительно...
Искать результаты, содержащие...
Искать результаты в...
  • Нужна помощь?

    Создайте тему в соответствующем разделе
    Не нужно писать всё в чат!
  • Загляните на торговую площадку

    Там вы можете купить
    всё что касается игровых серверов
  • Не хотите бан?

    Пожалуйста, ознакомьтесь с нашими правилами
    Не нарушайте порядок!
  • Продаёте или покупаете?

    Пользуйтесь услугами гаранта
    Мы сделаем вашу сделку безопасной
  • 1
Eaqqi

Ошибка игрок не был создан на этом сервере dayz

Накатил локалку. прописал всё и всё норм кайф вроде бы. но захожу на сервак и вижу эту ошибку: Ошибка игрок не был создан на этом сервере. 

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


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

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

  • 0
27.02.2025 в 11:33, dark_kynep сказал:

 

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

Пожалуйста, Войдите или Зарегистрируйтесь, чтобы увидеть это: Вложение.

 

 

 

 

Попробуй мой вариант! Только свои сеты пропиши.

Приветствую. Не понял, объясни пожалуйста, для чего у тебя в sets дважды прописаны сеты? Первый раз в начале, второй раз после точек спавна.

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


Ссылка на сообщение
Поделиться на других сайтах
MagicByte MagicByte MagicByte
  • 0
26.02.2025 в 10:34, LEET сказал:

скинул, где брать фикс в ЛС

А мне а мне;)

 

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


Ссылка на сообщение
Поделиться на других сайтах
  • 0
05.03.2025 в 08:31, ArsNet сказал:

Вот мой код с Sets.c и default работает

class StartSetsPlayersConfig { void StartSetsPlayer(PlayerBase player,int use_set_id) { EntityAI itemCreated = NULL; EntityAI itemCreated1 = NULL; ItemBase itemCasted = NULL; EntityAI itemClothing; EntityAI itemEnt; EntityAI itemBs; float rand; switch( use_set_id ) //Раздаем лут (можно использовать значения от 1 и выше, только не 0 и не -1) { case 1: //Set with number 1 (Сет с номером 1) { RemoveAllItems(player); // Чтобы удалить с персонажа уже имеющиеся стандартные стартовые шмотки раскомментировать строку itemCreated = player.GetInventory().CreateInInventory("FS_HuntBag_co"); // Выдаем рюкзак и записываем в переменную itemCreated if (itemCreated) { itemCreated.GetInventory().CreateInInventory("Battery9v"); itemCreated1 = itemCreated.GetInventory().CreateInInventory("Battery9v"); if (itemCreated1) { player.SetQuickBarEntityShortcut(itemCreated1, 4); } } itemCreated = NULL; itemCreated1 = NULL; itemCreated = player.GetInventory().CreateInInventory("DSS_Starosta"); // Выдаем игроку маску itemCreated = player.GetInventory().CreateInInventory("FS_ForestOldCap"); // Выдаем игроку перчатки itemCreated = player.GetInventory().CreateInInventory("XS_EQP_PANTS_Ironsightpants_naf"); // Выдаем игроку штаны itemCreated = player.GetInventory().CreateInInventory("SFP_SurvScav_Tors"); // Выдаем игроку обувь itemCreated = player.GetInventory().CreateInInventory("RusFlex_BeltUnloading_BAG"); // Выдаем игроку куртку itemCreated = player.GetInventory().CreateInInventory("RusFlex_MaskaFace_olive"); // Выдаем броню itemCreated = player.GetInventory().CreateInInventory("Headtorch_Grey"); // Выдаем ремень itemCreated = player.GetInventory().CreateInInventory("WoolGlovesFingerless_Green"); itemCreated = player.GetInventory().CreateInInventory("XS_EQP_SHOES_wolverineBoots"); itemCreated = player.GetInventory().CreateInInventory("Ammo_12gaPellets"); // Выдаем игроку магазины к AKM в любой свободный слот в инвентаре itemCreated = player.GetInventory().CreateInInventory("Ammo_12gaPellets"); itemCreated = player.GetInventory().CreateInInventory("Ammo_12gaPellets"); itemCreated = player.GetInventory().CreateInInventory("Ammo_12gaPellets"); itemCreated = player.GetInventory().CreateInInventory("Ammo_12gaPellets"); itemCreated = player.GetInventory().CreateInInventory("Ammo_12gaPellets"); itemCreated = player.GetInventory().CreateInInventory("Ammo_12gaPellets"); itemCreated = player.GetInventory().CreateInInventory("SFP_ArmyRadio169"); itemCreated = player.GetInventory().CreateInInventory("SFP_CantenUssr"); itemCreated = player.GetInventory().CreateInInventory("Justice_HuntingKnife"); itemCreated = NULL; itemCreated = player.GetInventory().CreateInInventory("St_W_BenelliM4"); if (itemCreated) // Проверяем, создался ли ремень. Если он создался, переменная itemCreated будет не пуста и проверка пройдет { itemCreated.GetInventory().CreateAttachment( "St_O_Holosight" ); // Выдаем игроку на AKM оптику ПСО 11 и крепим itemCreated.GetInventory().CreateAttachment( "anpeq_black" ); // Выдаем игроку на AKM цевье, приклад и глушитель, и крепим itemCreated.GetInventory().CreateAttachment( "St_M_Salvo12_Suppressor" ); itemCreated.GetInventory().CreateAttachment( "St_M_Salvo12_Suppressor" ); // Выдаем игроку на AKM цевье, приклад и глушитель, и крепим itemCreated.GetInventory().CreateAttachment( "Battery9v" ); itemCreated.GetInventory().CreateAttachment( "Battery9v" ); itemCreated.GetInventory().CreateAttachment( "Battery9v" ); itemCreated.GetInventory().CreateAttachment( "Battery9v" ); itemCreated.GetInventory().CreateAttachment( "Battery9v" ); itemCreated.GetInventory().CreateAttachment( "Battery9v" ); } itemCreated = NULL; itemCreated1 = NULL; //itemCasted = ItemBase.Cast(itemCreated); // Строка не нужна, закоментирована. используется для изменения класса EntityAI в ItemBase (чтобы нужные операции были доступны) itemCreated = player.GetInventory().CreateInInventory("PersonalRadio"); if (itemCreated) { player.SetQuickBarEntityShortcut(itemCreated, 6); itemCreated.GetInventory().CreateInInventory( "Battery9V" ); } itemCreated = NULL; itemCreated = player.GetInventory().CreateInInventory("FieldShovel"); if (itemCreated) { player.SetQuickBarEntityShortcut(itemCreated, 5); } itemCreated = NULL; break; } case 2: //Set with number 2 (Сет с номером 2) { RemoveAllItems(player); // Чтобы удалить с персонажа уже имеющиеся стандартные стартовые шмотки раскомментировать строку itemCreated = player.GetInventory().CreateInInventory("AssaultBag_Ttsko"); // Выдаем рюкзак и записываем в переменную itemCreated itemCreated = NULL; itemCreated1 = NULL; itemCreated = player.GetInventory().CreateInInventory("Mich2001Helmet"); // Выдаем игроку головной убор if (itemCreated) { itemCreated1 = itemCreated.GetInventory().CreateAttachment("NVGoggles"); if (itemCreated1) { itemCreated1.GetInventory().CreateInInventory( "Battery9V" ); } itemCreated1 = itemCreated.GetInventory().CreateAttachment("UniversalLight"); if (itemCreated1) { itemCreated1.GetInventory().CreateInInventory( "Battery9V" ); } } itemCreated = NULL; itemCreated1 = NULL; itemCreated = player.GetInventory().CreateInInventory("BalaclavaMask_Blackskull"); // Выдаем игроку маску itemCreated = player.GetInventory().CreateInInventory("TacticalGloves_Green"); // Выдаем игроку перчатки itemCreated = player.GetInventory().CreateInInventory("BDUPants"); // Выдаем игроку штаны itemCreated = player.GetInventory().CreateInInventory("MilitaryBoots_Black"); // Выдаем игроку обувь itemCreated = player.GetInventory().CreateInInventory("BDUJacket"); // Выдаем игроку куртку itemCreated = NULL; itemCreated = player.GetInventory().CreateInInventory("PlateCarrierVest_Camo"); // Выдаем броню if (itemCreated) // Проверяем, создаласи ли броня. Если он создался, переменная itemCreated будет не пуста и проверка пройдет { itemCreated.GetInventory().CreateAttachment( "PlateCarrierHolster_Camo" ); // Выдаем кобуру и крепим itemCreated.GetInventory().CreateAttachment( "PlateCarrierPouches_Camo" ); // Выдаем карманы и крепим itemCreated.GetInventory().CreateAttachment( "RGD5Grenade" ); // Выдаем карманы и крепим itemCreated.GetInventory().CreateAttachment( "RGD5Grenade" ); // Выдаем карманы и крепим itemCreated.GetInventory().CreateAttachment( "RGD5Grenade" ); // Выдаем карманы и крепим itemCreated.GetInventory().CreateAttachment( "RGD5Grenade" ); // Выдаем карманы и крепим } itemCreated = NULL; itemCreated = player.GetInventory().CreateInInventory("MilitaryBelt"); // Выдаем ремень if (itemCreated) // Проверяем, создался ли ремень. Если он создался, переменная itemCreated будет не пуста и проверка пройдет { itemCreated.GetInventory().CreateAttachment( "PlateCarrierHolster_Camo" ); // Выдаем кобуру и крепим if (itemCreated) { itemCreated1 = itemCreated.GetInventory().CreateInInventory ("MKII"); if (itemCreated1) { player.SetQuickBarEntityShortcut(itemCreated1, 2); } } itemCreated.GetInventory().CreateAttachment( "NylonKnifeSheath" ); // Выдаем ножны и крепим if (itemCreated) { itemCreated1 = itemCreated.GetInventory().CreateInInventory ("CombatKnife"); if (itemCreated1) { player.SetQuickBarEntityShortcut(itemCreated1, 3); } } } itemCreated = NULL; itemCreated1 = NULL; //itemCasted = ItemBase.Cast(itemCreated); // Строка не нужна, закоментирована. используется для изменения класса EntityAI в ItemBase (чтобы нужные операции были доступны) itemCreated = player.GetInventory().CreateInInventory("TacticalGoggles"); // Выдаем игроку магазины к MKII itemCreated = player.GetInventory().CreateInInventory("Mag_MKII_10Rnd"); // Выдаем игроку магазины к MKII itemCreated = player.GetInventory().CreateInInventory("Mag_MKII_10Rnd"); itemCreated = player.GetInventory().CreateInInventory("Mag_MKII_10Rnd"); // Выдаем игроку магазины к MKII itemCreated = player.GetInventory().CreateInInventory("Mag_SVD_10Rnd"); // Выдаем игроку магазины к AKM в любой свободный слот в инвентаре itemCreated = player.GetInventory().CreateInInventory("Mag_SVD_10Rnd"); // Выдаем игроку магазины к AKM в любой свободный слот в инвентаре itemCreated = player.GetInventory().CreateInInventory("Mag_SVD_10Rnd"); itemCreated = player.GetInventory().CreateInInventory("Mag_SVD_10Rnd"); // Выдаем игроку магазины к AKM в любой свободный слот в инвентаре itemCreated = player.GetInventory().CreateInInventory("Mag_Vikhr_30Rnd"); itemCreated = player.GetInventory().CreateInInventory("Mag_Vikhr_30Rnd"); itemCreated = player.GetInventory().CreateInInventory("Mag_Vikhr_30Rnd"); itemCreated = player.GetInventory().CreateInInventory("Mag_Vikhr_30Rnd"); itemCreated = player.GetInventory().CreateInInventory("AmmoBox_9x39AP_20Rnd"); itemCreated = player.GetInventory().CreateInInventory("AmmoBox_9x39AP_20Rnd"); itemCreated = player.GetInventory().CreateInInventory("AmmoBox_9x39AP_20Rnd"); itemCreated = player.GetInventory().CreateInInventory("AmmoBox_9x39AP_20Rnd"); itemCreated = player.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd"); itemCreated = player.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd"); itemCreated = player.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd"); itemCreated = player.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd"); itemCreated = player.GetInventory().CreateInInventory("AmmoBox_22_50Rnd"); itemCreated = player.GetInventory().CreateInInventory("AmmoBox_22_50Rnd"); itemCreated = NULL; itemCreated = player.GetInventory().CreateInInventory("SVD"); if (itemCreated) { player.SetQuickBarEntityShortcut(itemCreated, 1); itemCreated.GetInventory().CreateAttachment( "AK_Suppressor" ); itemCreated.GetInventory().CreateAttachment( "PSO1Optic" ); if (itemCreated) { itemCreated.GetInventory().CreateInInventory( "Battery9V" ); } } itemCreated = NULL; // Обнуляем значение переменной после работы с ней, нужно если мы будем использовать ее далее itemCreated = player.GetHumanInventory().CreateInHands("VSS"); // Выдаем игроку AKM в руки if (itemCreated) { player.SetQuickBarEntityShortcut(itemCreated, 0); itemCreated.GetInventory().CreateAttachment( "PSO11Optic" ); if (itemCreated) { itemCreated.GetInventory().CreateInInventory( "Battery9V" ); } } itemCreated = NULL; itemCreated1 = NULL; player.GetStatWater().Set(5000); player.GetStatEnergy().Set(19000); break; } case 3: //Set with number 3 (Сет с номером 3) { break; } case 4: //Set with number 4 (Сет с номером 4) { break; } case 5: //Set with number 5 (Сет с номером 5) { break; } case 6: //Set with number 6 (Сет с номером 6) { break; } default: //Default starting spawn set (Сет поумолчанию для всех игроков, если хотите назначить - добавляйте здесь!) { //My_Custom_Spawn_Parameters.RemoveAllItems(player); // Чтобы удалить с персонажа уже имеющиеся стандартные стартовые шмотки раскомментировать строку DefaultSets(player); // Для выдачи своих сетов по рандому всем игрокам, не прописанным в скрипте, раскомментировать эту строку RemoveAllItems(player); itemCreated = NULL; itemCreated = player.GetInventory().CreateInInventory("SFP_Stranik_Boots"); // Выдаем игроку обувь itemCreated = NULL; itemCreated = player.GetInventory().CreateInInventory("SFP_Stranik_Pants"); // Выдаем игроку Щтаны itemCreated = NULL; itemCreated = player.GetInventory().CreateInInventory("SFP_Stranik_Sweeter"); // Выдаем игроку свитер itemCreated = NULL; itemCreated = player.GetInventory().CreateInInventory("Roadflare"); // Выдаем игроку фальшфеер в любой свободный слот в инвентаре itemCreated = NULL; // Обнуляем значение переменной itemCreated = player.GetInventory().CreateInInventory("XS_FOOD_CANNED_bstew"); // Выдаем игроку банку тушенки itemCreated = NULL; itemCreated = player.GetInventory().CreateInInventory("SodaCan_cola"); // Выдаем игроку банку коллы itemCreated = NULL; itemCreated = player.GetInventory().CreateInInventory("CombatKnife"); // Выдаем игроку банку коллы itemCreated = NULL; itemCreated = player.GetInventory().CreateInInventory("Sawedoffizh18Shotgun"); // Выдаем игроку банку коллы itemCreated = NULL; itemCreated = player.GetInventory().CreateInInventory("Ammo_12gaPellets"); itemCreated = NULL; itemCreated = player.GetInventory().CreateInInventory("SFP_Makarom_Apoc"); itemCreated = NULL; itemCreated = player.GetInventory().CreateInInventory("Mag_IJ70_8Rnd"); itemCreated = NULL; itemCreated = player.GetInventory().CreateInInventory("Mag_IJ70_8Rnd"); itemCreated = NULL; itemCreated = player.GetInventory().CreateInInventory("AmmoBox_380_35rnd"); private array <vector> spawnpoints = {"4967.792969 104.242012 329.622406"}; private vector selected_spawnpoint = spawnpoints.GetRandomElement(); player.SetPosition(selected_spawnpoint); break; } } } void SetRandomHealthItem(EntityAI itemCreated) // Функция генерирует и применяет для предмета рандомное значение здоровья! { if ( itemCreated ) { private int rndHlt = Math.RandomInt(55,6); itemCreated.SetHealth("","",rndHlt); } } void DefaultSets(PlayerBase player) // Функция выдает сеты игрокам, не прописанным в конфигурации скрипта!!! { EntityAI itemCreated = NULL; EntityAI itemCreated1 = NULL; ItemBase itemCasted = NULL; private array <vector> spawnpoints = {"4967.792969 104.242012 329.622406"}; private vector selected_spawnpoint = spawnpoints.GetRandomElement(); player.SetPosition(selected_spawnpoint); } void RemoveAllItems(PlayerBase player) { array<EntityAI> itemsArray = new array<EntityAI>; ItemBase item; player.GetInventory().EnumerateInventory(InventoryTraversalType.PREORDER, itemsArray); for (int i = 0; i < itemsArray.Count(); i++) { Class.CastTo(item, itemsArray.Get(i)); if (item && !item.IsInherited(SurvivorBase)) { InventoryLocation il = new InventoryLocation(); if (item && item.GetInventory().GetCurrentInventoryLocation(il)) { player.GetInventory().LocalDestroyEntity(item); } } } } }




class StartSetsPlayersConfig
{
	
	
	void StartSetsPlayer(PlayerBase player,int use_set_id)
	{
		

		
		
		EntityAI itemCreated = NULL;
		EntityAI itemCreated1 = NULL;
		ItemBase itemCasted = NULL;
		EntityAI itemClothing;
		EntityAI itemEnt;
		EntityAI itemBs;
		float rand;
		
		switch( use_set_id ) //Раздаем лут (можно использовать значения от 1 и выше, только не 0 и не -1)
		{
			case 1: //Set with number 1 (Сет с номером 1)
			{
				RemoveAllItems(player); 												// Чтобы удалить с персонажа уже имеющиеся стандартные стартовые шмотки раскомментировать строку
				itemCreated = player.GetInventory().CreateInInventory("FS_HuntBag_co"); 	        // Выдаем рюкзак и записываем в переменную itemCreated
				if (itemCreated)															            
					{
						itemCreated.GetInventory().CreateInInventory("Battery9v");
						itemCreated1 = itemCreated.GetInventory().CreateInInventory("Battery9v");
						if (itemCreated1)
						{
							player.SetQuickBarEntityShortcut(itemCreated1, 4);
						}

					}
				itemCreated = NULL;
				itemCreated1 = NULL;
				
				itemCreated = player.GetInventory().CreateInInventory("DSS_Starosta");            	    // Выдаем игроку маску
			    itemCreated = player.GetInventory().CreateInInventory("FS_ForestOldCap");		        // Выдаем игроку перчатки
				itemCreated = player.GetInventory().CreateInInventory("XS_EQP_PANTS_Ironsightpants_naf");		    // Выдаем игроку штаны
				itemCreated = player.GetInventory().CreateInInventory("SFP_SurvScav_Tors");	            // Выдаем игроку обувь
				itemCreated = player.GetInventory().CreateInInventory("RusFlex_BeltUnloading_BAG");	        // Выдаем игроку куртку				
				itemCreated = player.GetInventory().CreateInInventory("RusFlex_MaskaFace_olive"); 	            // Выдаем броню
				itemCreated = player.GetInventory().CreateInInventory("Headtorch_Grey"); 	                // Выдаем ремень
				itemCreated = player.GetInventory().CreateInInventory("WoolGlovesFingerless_Green");
				itemCreated = player.GetInventory().CreateInInventory("XS_EQP_SHOES_wolverineBoots");				
				itemCreated = player.GetInventory().CreateInInventory("Ammo_12gaPellets");	            // Выдаем игроку магазины к AKM в любой свободный слот в инвентаре
				itemCreated = player.GetInventory().CreateInInventory("Ammo_12gaPellets");
				itemCreated = player.GetInventory().CreateInInventory("Ammo_12gaPellets");
				itemCreated = player.GetInventory().CreateInInventory("Ammo_12gaPellets");
				itemCreated = player.GetInventory().CreateInInventory("Ammo_12gaPellets");
				itemCreated = player.GetInventory().CreateInInventory("Ammo_12gaPellets");
				itemCreated = player.GetInventory().CreateInInventory("Ammo_12gaPellets");
				itemCreated = player.GetInventory().CreateInInventory("SFP_ArmyRadio169");
				itemCreated = player.GetInventory().CreateInInventory("SFP_CantenUssr");
				itemCreated = player.GetInventory().CreateInInventory("Justice_HuntingKnife");
				itemCreated = NULL;					
				
				itemCreated = player.GetInventory().CreateInInventory("St_W_BenelliM4");
				if (itemCreated)															            // Проверяем, создался ли ремень. Если он создался, переменная itemCreated будет не пуста и проверка пройдет
				{  	itemCreated.GetInventory().CreateAttachment( "St_O_Holosight" ); 				        // Выдаем игроку на AKM оптику ПСО 11 и крепим
					itemCreated.GetInventory().CreateAttachment( "anpeq_black" ); 			        // Выдаем игроку на AKM цевье, приклад и глушитель, и крепим
					itemCreated.GetInventory().CreateAttachment( "St_M_Salvo12_Suppressor" );
					itemCreated.GetInventory().CreateAttachment( "St_M_Salvo12_Suppressor" );					// Выдаем игроку на AKM цевье, приклад и глушитель, и крепим
					itemCreated.GetInventory().CreateAttachment( "Battery9v" );	
					itemCreated.GetInventory().CreateAttachment( "Battery9v" );	
					itemCreated.GetInventory().CreateAttachment( "Battery9v" );	
					itemCreated.GetInventory().CreateAttachment( "Battery9v" );	
					itemCreated.GetInventory().CreateAttachment( "Battery9v" );	
					itemCreated.GetInventory().CreateAttachment( "Battery9v" );	
				}
				itemCreated = NULL;
				itemCreated1 = NULL;
				//itemCasted = ItemBase.Cast(itemCreated);									            // Строка не нужна, закоментирована. используется для изменения класса EntityAI в ItemBase (чтобы нужные операции были доступны)

				
				
				itemCreated = player.GetInventory().CreateInInventory("PersonalRadio");
				if (itemCreated)
				{
					player.SetQuickBarEntityShortcut(itemCreated, 6);
					itemCreated.GetInventory().CreateInInventory( "Battery9V" );
				}
				itemCreated = NULL;
				
				itemCreated = player.GetInventory().CreateInInventory("FieldShovel");
				if (itemCreated)
				{
					player.SetQuickBarEntityShortcut(itemCreated, 5);
				}
				itemCreated = NULL;
				break;
			}
			
			case 2: //Set with number 2 (Сет с номером 2)
			{
				RemoveAllItems(player); 												// Чтобы удалить с персонажа уже имеющиеся стандартные стартовые шмотки раскомментировать строку
				itemCreated = player.GetInventory().CreateInInventory("AssaultBag_Ttsko"); 	        // Выдаем рюкзак и записываем в переменную itemCreated
				itemCreated = NULL;
				itemCreated1 = NULL;				

		        itemCreated = player.GetInventory().CreateInInventory("Mich2001Helmet");            	        // Выдаем игроку головной убор
				if (itemCreated)
				{
					itemCreated1 = itemCreated.GetInventory().CreateAttachment("NVGoggles");
					if (itemCreated1)
					{  			            
						itemCreated1.GetInventory().CreateInInventory( "Battery9V" );
					}
					itemCreated1 = itemCreated.GetInventory().CreateAttachment("UniversalLight");
					if (itemCreated1)
					{  			            
						itemCreated1.GetInventory().CreateInInventory( "Battery9V" );
					}					
				}
				itemCreated = NULL;
				itemCreated1 = NULL;
				
				itemCreated = player.GetInventory().CreateInInventory("BalaclavaMask_Blackskull");            	    // Выдаем игроку маску
			    itemCreated = player.GetInventory().CreateInInventory("TacticalGloves_Green");		        // Выдаем игроку перчатки
				itemCreated = player.GetInventory().CreateInInventory("BDUPants");		    // Выдаем игроку штаны
				itemCreated = player.GetInventory().CreateInInventory("MilitaryBoots_Black");	            // Выдаем игроку обувь
				itemCreated = player.GetInventory().CreateInInventory("BDUJacket");	        // Выдаем игроку куртку							
				itemCreated = NULL;
				
				itemCreated = player.GetInventory().CreateInInventory("PlateCarrierVest_Camo"); 	            // Выдаем броню
				if (itemCreated)															            // Проверяем, создаласи ли броня. Если он создался, переменная itemCreated будет не пуста и проверка пройдет
				{                                                                                       
					itemCreated.GetInventory().CreateAttachment( "PlateCarrierHolster_Camo" ); 			    // Выдаем кобуру и крепим
					itemCreated.GetInventory().CreateAttachment( "PlateCarrierPouches_Camo" ); 		        // Выдаем карманы и крепим
					itemCreated.GetInventory().CreateAttachment( "RGD5Grenade" ); 		        // Выдаем карманы и крепим
					itemCreated.GetInventory().CreateAttachment( "RGD5Grenade" ); 		        // Выдаем карманы и крепим
					itemCreated.GetInventory().CreateAttachment( "RGD5Grenade" ); 		        // Выдаем карманы и крепим
					itemCreated.GetInventory().CreateAttachment( "RGD5Grenade" ); 		        // Выдаем карманы и крепим
					
				}
				itemCreated = NULL;
				itemCreated = player.GetInventory().CreateInInventory("MilitaryBelt"); 	                // Выдаем ремень
				if (itemCreated)															            // Проверяем, создался ли ремень. Если он создался, переменная itemCreated будет не пуста и проверка пройдет
				{  
					itemCreated.GetInventory().CreateAttachment( "PlateCarrierHolster_Camo" ); 		        // Выдаем кобуру и крепим
					if (itemCreated)
					{
						itemCreated1 = itemCreated.GetInventory().CreateInInventory ("MKII");
						if (itemCreated1)
						{
							player.SetQuickBarEntityShortcut(itemCreated1, 2);
						}
					}
					itemCreated.GetInventory().CreateAttachment( "NylonKnifeSheath" ); 			        // Выдаем ножны и крепим
					if (itemCreated)
					{
						itemCreated1 = itemCreated.GetInventory().CreateInInventory ("CombatKnife");
						if (itemCreated1)
						{
							player.SetQuickBarEntityShortcut(itemCreated1, 3);
						}
					}
				}
				itemCreated = NULL;
				itemCreated1 = NULL;
				//itemCasted = ItemBase.Cast(itemCreated);									            // Строка не нужна, закоментирована. используется для изменения класса EntityAI в ItemBase (чтобы нужные операции были доступны)
				itemCreated = player.GetInventory().CreateInInventory("TacticalGoggles");	            // Выдаем игроку магазины к MKII
				itemCreated = player.GetInventory().CreateInInventory("Mag_MKII_10Rnd");	            // Выдаем игроку магазины к MKII
				itemCreated = player.GetInventory().CreateInInventory("Mag_MKII_10Rnd");
				itemCreated = player.GetInventory().CreateInInventory("Mag_MKII_10Rnd");	            // Выдаем игроку магазины к MKII
				itemCreated = player.GetInventory().CreateInInventory("Mag_SVD_10Rnd");		            // Выдаем игроку магазины к AKM в любой свободный слот в инвентаре
				itemCreated = player.GetInventory().CreateInInventory("Mag_SVD_10Rnd");		            // Выдаем игроку магазины к AKM в любой свободный слот в инвентаре
				itemCreated = player.GetInventory().CreateInInventory("Mag_SVD_10Rnd");
				itemCreated = player.GetInventory().CreateInInventory("Mag_SVD_10Rnd");				// Выдаем игроку магазины к AKM в любой свободный слот в инвентаре		
				itemCreated = player.GetInventory().CreateInInventory("Mag_Vikhr_30Rnd");
				itemCreated = player.GetInventory().CreateInInventory("Mag_Vikhr_30Rnd");
				itemCreated = player.GetInventory().CreateInInventory("Mag_Vikhr_30Rnd");
				itemCreated = player.GetInventory().CreateInInventory("Mag_Vikhr_30Rnd");

				itemCreated = player.GetInventory().CreateInInventory("AmmoBox_9x39AP_20Rnd");
				itemCreated = player.GetInventory().CreateInInventory("AmmoBox_9x39AP_20Rnd");
				itemCreated = player.GetInventory().CreateInInventory("AmmoBox_9x39AP_20Rnd");
				itemCreated = player.GetInventory().CreateInInventory("AmmoBox_9x39AP_20Rnd");

				itemCreated = player.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd");
				itemCreated = player.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd");
				itemCreated = player.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd");
				itemCreated = player.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd");

				itemCreated = player.GetInventory().CreateInInventory("AmmoBox_22_50Rnd");
				itemCreated = player.GetInventory().CreateInInventory("AmmoBox_22_50Rnd");
				
				itemCreated = NULL;

				itemCreated = player.GetInventory().CreateInInventory("SVD");
				if (itemCreated)
				{
					player.SetQuickBarEntityShortcut(itemCreated, 1);
					itemCreated.GetInventory().CreateAttachment( "AK_Suppressor" );
					itemCreated.GetInventory().CreateAttachment( "PSO1Optic" );
					if (itemCreated)
					{  			            
						itemCreated.GetInventory().CreateInInventory( "Battery9V" );
					} 			           
				}						
							
				itemCreated = NULL;															            // Обнуляем значение переменной после работы с ней, нужно если мы будем использовать ее далее
				itemCreated = player.GetHumanInventory().CreateInHands("VSS");				            // Выдаем игроку AKM в руки
				if (itemCreated)
				{
					player.SetQuickBarEntityShortcut(itemCreated, 0);
					itemCreated.GetInventory().CreateAttachment( "PSO11Optic" );
					if (itemCreated)
					{  			            
						itemCreated.GetInventory().CreateInInventory( "Battery9V" );
					} 			           
				}
				
				itemCreated = NULL;
				itemCreated1 = NULL;
				
				player.GetStatWater().Set(5000);
				player.GetStatEnergy().Set(19000);

					
				break;
			}
			
			case 3: //Set with number 3   (Сет с номером 3)
			{
				break;
			}
			
			case 4: //Set with number 4   (Сет с номером 4)
			{
				break;
			}
			
			case 5: //Set with number 5   (Сет с номером 5)
			{
				break;
			}
			
			case 6: //Set with number 6   (Сет с номером 6)
			{
				break;
			}
			
			default: //Default starting spawn set (Сет поумолчанию для всех игроков, если хотите назначить - добавляйте здесь!)
			{
				//My_Custom_Spawn_Parameters.RemoveAllItems(player); // Чтобы удалить с персонажа уже имеющиеся стандартные стартовые шмотки раскомментировать строку
				DefaultSets(player); // Для выдачи своих сетов по рандому всем игрокам, не прописанным в скрипте, раскомментировать эту строку
				RemoveAllItems(player); 
				itemCreated = NULL;															
				itemCreated = player.GetInventory().CreateInInventory("SFP_Stranik_Boots");	                // Выдаем игроку обувь
				itemCreated = NULL;															
				itemCreated = player.GetInventory().CreateInInventory("SFP_Stranik_Pants");		        // Выдаем игроку Щтаны
				itemCreated = NULL;
				itemCreated = player.GetInventory().CreateInInventory("SFP_Stranik_Sweeter");		        // Выдаем игроку свитер
				itemCreated = NULL;
				itemCreated = player.GetInventory().CreateInInventory("Roadflare");	                    // Выдаем игроку фальшфеер в любой свободный слот в инвентаре
				itemCreated = NULL;															            // Обнуляем значение переменной											
				itemCreated = player.GetInventory().CreateInInventory("XS_FOOD_CANNED_bstew");	                    // Выдаем игроку банку тушенки
				itemCreated = NULL;	
				itemCreated = player.GetInventory().CreateInInventory("SodaCan_cola");	                    // Выдаем игроку банку коллы
				itemCreated = NULL;
				itemCreated = player.GetInventory().CreateInInventory("CombatKnife");	                    // Выдаем игроку банку коллы
				itemCreated = NULL;
				itemCreated = player.GetInventory().CreateInInventory("Sawedoffizh18Shotgun");	                    // Выдаем игроку банку коллы
				itemCreated = NULL;
				itemCreated = player.GetInventory().CreateInInventory("Ammo_12gaPellets");
				itemCreated = NULL;
				itemCreated = player.GetInventory().CreateInInventory("SFP_Makarom_Apoc");
				itemCreated = NULL;
				itemCreated = player.GetInventory().CreateInInventory("Mag_IJ70_8Rnd");
				itemCreated = NULL;
				itemCreated = player.GetInventory().CreateInInventory("Mag_IJ70_8Rnd");
				itemCreated = NULL;
				itemCreated = player.GetInventory().CreateInInventory("AmmoBox_380_35rnd");
				
				private array <vector>  spawnpoints = {"4967.792969 104.242012 329.622406"};
				private vector selected_spawnpoint = spawnpoints.GetRandomElement();
				player.SetPosition(selected_spawnpoint);
				
				
				break;
			}
		}
	}
	
	void SetRandomHealthItem(EntityAI itemCreated) // Функция генерирует и применяет для предмета рандомное значение здоровья!
	{
		if ( itemCreated )
		{
			private int rndHlt = Math.RandomInt(55,6);
			itemCreated.SetHealth("","",rndHlt);
		}
	}
	
	void DefaultSets(PlayerBase player) // Функция выдает сеты игрокам, не прописанным в конфигурации скрипта!!!
	{
		EntityAI itemCreated = NULL;
		EntityAI itemCreated1 = NULL;
		ItemBase itemCasted = NULL;
		
				private array <vector>  spawnpoints = {"4967.792969 104.242012 329.622406"};
				private vector selected_spawnpoint = spawnpoints.GetRandomElement();
				player.SetPosition(selected_spawnpoint);
		
		
	}
	void RemoveAllItems(PlayerBase player)
    {
        array<EntityAI> itemsArray = new array<EntityAI>;
        ItemBase item;
        player.GetInventory().EnumerateInventory(InventoryTraversalType.PREORDER, itemsArray);
        
        for (int i = 0; i < itemsArray.Count(); i++)
        {
            Class.CastTo(item, itemsArray.Get(i));
            if (item && !item.IsInherited(SurvivorBase))
            {
                InventoryLocation il = new InventoryLocation();
                if (item && item.GetInventory().GetCurrentInventoryLocation(il))
                {
                    player.GetInventory().LocalDestroyEntity(item);
                }
            }
        }
    }
}

 

А несколько сетов никак?

 

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


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

Делайте, прописывайте несколько сетов, в чем проблема? Я просто показал как дефолт робит для примера. А выше дефолта несколько прописанных сетов. 

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


Ссылка на сообщение
Поделиться на других сайтах
  • 0
26.02.2025 в 16:19, dark_kynep сказал:


Все заработало, спасибо! А как пофиксить этот момент? Хочется все же чтоб раздача лута работала...

 

Кто нибудь если найдет решение этой ошибки пните пжлст,не нужно готовые  файлы кидать) просто строчку где ошибка,спасибо)

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


Ссылка на сообщение
Поделиться на других сайтах
  • 0
3 часа назад, Grom25rus сказал:

Кто нибудь если найдет решение этой ошибки пните пжлст,не нужно готовые  файлы кидать) просто строчку где ошибка,спасибо)

Ну так потрудитесь и найдите ошибку.
Есть не работающие файлы, есть работающие.

Нужно просто сравнить и исправить, как это сделал я.

 

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


Ссылка на сообщение
Поделиться на других сайтах
  • 0
9 часов назад, dark_kynep сказал:

Ну так потрудитесь и найдите ошибку.
Есть не работающие файлы, есть работающие.

Нужно просто сравнить и исправить, как это сделал я.

 

(Слово удалено системой) (Слово удалено системой) ты умный слушай) а че трудно людям помочь? раз нашел! или че ты такой умный что смог? я рад за тебя, найдем найдутся люди которые подскажут,(Слово удалено системой) ты тогда тут сидишь? как  нужна будет помощь надеюсь тебе так же помогут как и ты)

 

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


Ссылка на сообщение
Поделиться на других сайтах
  • 0
05.03.2025 в 14:31, ArsNet сказал:

Вот мой код с Sets.c и default работает

class StartSetsPlayersConfig { void StartSetsPlayer(PlayerBase player,int use_set_id) { EntityAI itemCreated = NULL; EntityAI itemCreated1 = NULL; ItemBase itemCasted = NULL; EntityAI itemClothing; EntityAI itemEnt; EntityAI itemBs; float rand; switch( use_set_id ) //Раздаем лут (можно использовать значения от 1 и выше, только не 0 и не -1) { case 1: //Set with number 1 (Сет с номером 1) { RemoveAllItems(player); // Чтобы удалить с персонажа уже имеющиеся стандартные стартовые шмотки раскомментировать строку itemCreated = player.GetInventory().CreateInInventory("FS_HuntBag_co"); // Выдаем рюкзак и записываем в переменную itemCreated if (itemCreated) { itemCreated.GetInventory().CreateInInventory("Battery9v"); itemCreated1 = itemCreated.GetInventory().CreateInInventory("Battery9v"); if (itemCreated1) { player.SetQuickBarEntityShortcut(itemCreated1, 4); } } itemCreated = NULL; itemCreated1 = NULL; itemCreated = player.GetInventory().CreateInInventory("DSS_Starosta"); // Выдаем игроку маску itemCreated = player.GetInventory().CreateInInventory("FS_ForestOldCap"); // Выдаем игроку перчатки itemCreated = player.GetInventory().CreateInInventory("XS_EQP_PANTS_Ironsightpants_naf"); // Выдаем игроку штаны itemCreated = player.GetInventory().CreateInInventory("SFP_SurvScav_Tors"); // Выдаем игроку обувь itemCreated = player.GetInventory().CreateInInventory("RusFlex_BeltUnloading_BAG"); // Выдаем игроку куртку itemCreated = player.GetInventory().CreateInInventory("RusFlex_MaskaFace_olive"); // Выдаем броню itemCreated = player.GetInventory().CreateInInventory("Headtorch_Grey"); // Выдаем ремень itemCreated = player.GetInventory().CreateInInventory("WoolGlovesFingerless_Green"); itemCreated = player.GetInventory().CreateInInventory("XS_EQP_SHOES_wolverineBoots"); itemCreated = player.GetInventory().CreateInInventory("Ammo_12gaPellets"); // Выдаем игроку магазины к AKM в любой свободный слот в инвентаре itemCreated = player.GetInventory().CreateInInventory("Ammo_12gaPellets"); itemCreated = player.GetInventory().CreateInInventory("Ammo_12gaPellets"); itemCreated = player.GetInventory().CreateInInventory("Ammo_12gaPellets"); itemCreated = player.GetInventory().CreateInInventory("Ammo_12gaPellets"); itemCreated = player.GetInventory().CreateInInventory("Ammo_12gaPellets"); itemCreated = player.GetInventory().CreateInInventory("Ammo_12gaPellets"); itemCreated = player.GetInventory().CreateInInventory("SFP_ArmyRadio169"); itemCreated = player.GetInventory().CreateInInventory("SFP_CantenUssr"); itemCreated = player.GetInventory().CreateInInventory("Justice_HuntingKnife"); itemCreated = NULL; itemCreated = player.GetInventory().CreateInInventory("St_W_BenelliM4"); if (itemCreated) // Проверяем, создался ли ремень. Если он создался, переменная itemCreated будет не пуста и проверка пройдет { itemCreated.GetInventory().CreateAttachment( "St_O_Holosight" ); // Выдаем игроку на AKM оптику ПСО 11 и крепим itemCreated.GetInventory().CreateAttachment( "anpeq_black" ); // Выдаем игроку на AKM цевье, приклад и глушитель, и крепим itemCreated.GetInventory().CreateAttachment( "St_M_Salvo12_Suppressor" ); itemCreated.GetInventory().CreateAttachment( "St_M_Salvo12_Suppressor" ); // Выдаем игроку на AKM цевье, приклад и глушитель, и крепим itemCreated.GetInventory().CreateAttachment( "Battery9v" ); itemCreated.GetInventory().CreateAttachment( "Battery9v" ); itemCreated.GetInventory().CreateAttachment( "Battery9v" ); itemCreated.GetInventory().CreateAttachment( "Battery9v" ); itemCreated.GetInventory().CreateAttachment( "Battery9v" ); itemCreated.GetInventory().CreateAttachment( "Battery9v" ); } itemCreated = NULL; itemCreated1 = NULL; //itemCasted = ItemBase.Cast(itemCreated); // Строка не нужна, закоментирована. используется для изменения класса EntityAI в ItemBase (чтобы нужные операции были доступны) itemCreated = player.GetInventory().CreateInInventory("PersonalRadio"); if (itemCreated) { player.SetQuickBarEntityShortcut(itemCreated, 6); itemCreated.GetInventory().CreateInInventory( "Battery9V" ); } itemCreated = NULL; itemCreated = player.GetInventory().CreateInInventory("FieldShovel"); if (itemCreated) { player.SetQuickBarEntityShortcut(itemCreated, 5); } itemCreated = NULL; break; } case 2: //Set with number 2 (Сет с номером 2) { RemoveAllItems(player); // Чтобы удалить с персонажа уже имеющиеся стандартные стартовые шмотки раскомментировать строку itemCreated = player.GetInventory().CreateInInventory("AssaultBag_Ttsko"); // Выдаем рюкзак и записываем в переменную itemCreated itemCreated = NULL; itemCreated1 = NULL; itemCreated = player.GetInventory().CreateInInventory("Mich2001Helmet"); // Выдаем игроку головной убор if (itemCreated) { itemCreated1 = itemCreated.GetInventory().CreateAttachment("NVGoggles"); if (itemCreated1) { itemCreated1.GetInventory().CreateInInventory( "Battery9V" ); } itemCreated1 = itemCreated.GetInventory().CreateAttachment("UniversalLight"); if (itemCreated1) { itemCreated1.GetInventory().CreateInInventory( "Battery9V" ); } } itemCreated = NULL; itemCreated1 = NULL; itemCreated = player.GetInventory().CreateInInventory("BalaclavaMask_Blackskull"); // Выдаем игроку маску itemCreated = player.GetInventory().CreateInInventory("TacticalGloves_Green"); // Выдаем игроку перчатки itemCreated = player.GetInventory().CreateInInventory("BDUPants"); // Выдаем игроку штаны itemCreated = player.GetInventory().CreateInInventory("MilitaryBoots_Black"); // Выдаем игроку обувь itemCreated = player.GetInventory().CreateInInventory("BDUJacket"); // Выдаем игроку куртку itemCreated = NULL; itemCreated = player.GetInventory().CreateInInventory("PlateCarrierVest_Camo"); // Выдаем броню if (itemCreated) // Проверяем, создаласи ли броня. Если он создался, переменная itemCreated будет не пуста и проверка пройдет { itemCreated.GetInventory().CreateAttachment( "PlateCarrierHolster_Camo" ); // Выдаем кобуру и крепим itemCreated.GetInventory().CreateAttachment( "PlateCarrierPouches_Camo" ); // Выдаем карманы и крепим itemCreated.GetInventory().CreateAttachment( "RGD5Grenade" ); // Выдаем карманы и крепим itemCreated.GetInventory().CreateAttachment( "RGD5Grenade" ); // Выдаем карманы и крепим itemCreated.GetInventory().CreateAttachment( "RGD5Grenade" ); // Выдаем карманы и крепим itemCreated.GetInventory().CreateAttachment( "RGD5Grenade" ); // Выдаем карманы и крепим } itemCreated = NULL; itemCreated = player.GetInventory().CreateInInventory("MilitaryBelt"); // Выдаем ремень if (itemCreated) // Проверяем, создался ли ремень. Если он создался, переменная itemCreated будет не пуста и проверка пройдет { itemCreated.GetInventory().CreateAttachment( "PlateCarrierHolster_Camo" ); // Выдаем кобуру и крепим if (itemCreated) { itemCreated1 = itemCreated.GetInventory().CreateInInventory ("MKII"); if (itemCreated1) { player.SetQuickBarEntityShortcut(itemCreated1, 2); } } itemCreated.GetInventory().CreateAttachment( "NylonKnifeSheath" ); // Выдаем ножны и крепим if (itemCreated) { itemCreated1 = itemCreated.GetInventory().CreateInInventory ("CombatKnife"); if (itemCreated1) { player.SetQuickBarEntityShortcut(itemCreated1, 3); } } } itemCreated = NULL; itemCreated1 = NULL; //itemCasted = ItemBase.Cast(itemCreated); // Строка не нужна, закоментирована. используется для изменения класса EntityAI в ItemBase (чтобы нужные операции были доступны) itemCreated = player.GetInventory().CreateInInventory("TacticalGoggles"); // Выдаем игроку магазины к MKII itemCreated = player.GetInventory().CreateInInventory("Mag_MKII_10Rnd"); // Выдаем игроку магазины к MKII itemCreated = player.GetInventory().CreateInInventory("Mag_MKII_10Rnd"); itemCreated = player.GetInventory().CreateInInventory("Mag_MKII_10Rnd"); // Выдаем игроку магазины к MKII itemCreated = player.GetInventory().CreateInInventory("Mag_SVD_10Rnd"); // Выдаем игроку магазины к AKM в любой свободный слот в инвентаре itemCreated = player.GetInventory().CreateInInventory("Mag_SVD_10Rnd"); // Выдаем игроку магазины к AKM в любой свободный слот в инвентаре itemCreated = player.GetInventory().CreateInInventory("Mag_SVD_10Rnd"); itemCreated = player.GetInventory().CreateInInventory("Mag_SVD_10Rnd"); // Выдаем игроку магазины к AKM в любой свободный слот в инвентаре itemCreated = player.GetInventory().CreateInInventory("Mag_Vikhr_30Rnd"); itemCreated = player.GetInventory().CreateInInventory("Mag_Vikhr_30Rnd"); itemCreated = player.GetInventory().CreateInInventory("Mag_Vikhr_30Rnd"); itemCreated = player.GetInventory().CreateInInventory("Mag_Vikhr_30Rnd"); itemCreated = player.GetInventory().CreateInInventory("AmmoBox_9x39AP_20Rnd"); itemCreated = player.GetInventory().CreateInInventory("AmmoBox_9x39AP_20Rnd"); itemCreated = player.GetInventory().CreateInInventory("AmmoBox_9x39AP_20Rnd"); itemCreated = player.GetInventory().CreateInInventory("AmmoBox_9x39AP_20Rnd"); itemCreated = player.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd"); itemCreated = player.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd"); itemCreated = player.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd"); itemCreated = player.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd"); itemCreated = player.GetInventory().CreateInInventory("AmmoBox_22_50Rnd"); itemCreated = player.GetInventory().CreateInInventory("AmmoBox_22_50Rnd"); itemCreated = NULL; itemCreated = player.GetInventory().CreateInInventory("SVD"); if (itemCreated) { player.SetQuickBarEntityShortcut(itemCreated, 1); itemCreated.GetInventory().CreateAttachment( "AK_Suppressor" ); itemCreated.GetInventory().CreateAttachment( "PSO1Optic" ); if (itemCreated) { itemCreated.GetInventory().CreateInInventory( "Battery9V" ); } } itemCreated = NULL; // Обнуляем значение переменной после работы с ней, нужно если мы будем использовать ее далее itemCreated = player.GetHumanInventory().CreateInHands("VSS"); // Выдаем игроку AKM в руки if (itemCreated) { player.SetQuickBarEntityShortcut(itemCreated, 0); itemCreated.GetInventory().CreateAttachment( "PSO11Optic" ); if (itemCreated) { itemCreated.GetInventory().CreateInInventory( "Battery9V" ); } } itemCreated = NULL; itemCreated1 = NULL; player.GetStatWater().Set(5000); player.GetStatEnergy().Set(19000); break; } case 3: //Set with number 3 (Сет с номером 3) { break; } case 4: //Set with number 4 (Сет с номером 4) { break; } case 5: //Set with number 5 (Сет с номером 5) { break; } case 6: //Set with number 6 (Сет с номером 6) { break; } default: //Default starting spawn set (Сет поумолчанию для всех игроков, если хотите назначить - добавляйте здесь!) { //My_Custom_Spawn_Parameters.RemoveAllItems(player); // Чтобы удалить с персонажа уже имеющиеся стандартные стартовые шмотки раскомментировать строку DefaultSets(player); // Для выдачи своих сетов по рандому всем игрокам, не прописанным в скрипте, раскомментировать эту строку RemoveAllItems(player); itemCreated = NULL; itemCreated = player.GetInventory().CreateInInventory("SFP_Stranik_Boots"); // Выдаем игроку обувь itemCreated = NULL; itemCreated = player.GetInventory().CreateInInventory("SFP_Stranik_Pants"); // Выдаем игроку Щтаны itemCreated = NULL; itemCreated = player.GetInventory().CreateInInventory("SFP_Stranik_Sweeter"); // Выдаем игроку свитер itemCreated = NULL; itemCreated = player.GetInventory().CreateInInventory("Roadflare"); // Выдаем игроку фальшфеер в любой свободный слот в инвентаре itemCreated = NULL; // Обнуляем значение переменной itemCreated = player.GetInventory().CreateInInventory("XS_FOOD_CANNED_bstew"); // Выдаем игроку банку тушенки itemCreated = NULL; itemCreated = player.GetInventory().CreateInInventory("SodaCan_cola"); // Выдаем игроку банку коллы itemCreated = NULL; itemCreated = player.GetInventory().CreateInInventory("CombatKnife"); // Выдаем игроку банку коллы itemCreated = NULL; itemCreated = player.GetInventory().CreateInInventory("Sawedoffizh18Shotgun"); // Выдаем игроку банку коллы itemCreated = NULL; itemCreated = player.GetInventory().CreateInInventory("Ammo_12gaPellets"); itemCreated = NULL; itemCreated = player.GetInventory().CreateInInventory("SFP_Makarom_Apoc"); itemCreated = NULL; itemCreated = player.GetInventory().CreateInInventory("Mag_IJ70_8Rnd"); itemCreated = NULL; itemCreated = player.GetInventory().CreateInInventory("Mag_IJ70_8Rnd"); itemCreated = NULL; itemCreated = player.GetInventory().CreateInInventory("AmmoBox_380_35rnd"); private array <vector> spawnpoints = {"4967.792969 104.242012 329.622406"}; private vector selected_spawnpoint = spawnpoints.GetRandomElement(); player.SetPosition(selected_spawnpoint); break; } } } void SetRandomHealthItem(EntityAI itemCreated) // Функция генерирует и применяет для предмета рандомное значение здоровья! { if ( itemCreated ) { private int rndHlt = Math.RandomInt(55,6); itemCreated.SetHealth("","",rndHlt); } } void DefaultSets(PlayerBase player) // Функция выдает сеты игрокам, не прописанным в конфигурации скрипта!!! { EntityAI itemCreated = NULL; EntityAI itemCreated1 = NULL; ItemBase itemCasted = NULL; private array <vector> spawnpoints = {"4967.792969 104.242012 329.622406"}; private vector selected_spawnpoint = spawnpoints.GetRandomElement(); player.SetPosition(selected_spawnpoint); } void RemoveAllItems(PlayerBase player) { array<EntityAI> itemsArray = new array<EntityAI>; ItemBase item; player.GetInventory().EnumerateInventory(InventoryTraversalType.PREORDER, itemsArray); for (int i = 0; i < itemsArray.Count(); i++) { Class.CastTo(item, itemsArray.Get(i)); if (item && !item.IsInherited(SurvivorBase)) { InventoryLocation il = new InventoryLocation(); if (item && item.GetInventory().GetCurrentInventoryLocation(il)) { player.GetInventory().LocalDestroyEntity(item); } } } } }




class StartSetsPlayersConfig
{
	
	
	void StartSetsPlayer(PlayerBase player,int use_set_id)
	{
		

		
		
		EntityAI itemCreated = NULL;
		EntityAI itemCreated1 = NULL;
		ItemBase itemCasted = NULL;
		EntityAI itemClothing;
		EntityAI itemEnt;
		EntityAI itemBs;
		float rand;
		
		switch( use_set_id ) //Раздаем лут (можно использовать значения от 1 и выше, только не 0 и не -1)
		{
			case 1: //Set with number 1 (Сет с номером 1)
			{
				RemoveAllItems(player); 												// Чтобы удалить с персонажа уже имеющиеся стандартные стартовые шмотки раскомментировать строку
				itemCreated = player.GetInventory().CreateInInventory("FS_HuntBag_co"); 	        // Выдаем рюкзак и записываем в переменную itemCreated
				if (itemCreated)															            
					{
						itemCreated.GetInventory().CreateInInventory("Battery9v");
						itemCreated1 = itemCreated.GetInventory().CreateInInventory("Battery9v");
						if (itemCreated1)
						{
							player.SetQuickBarEntityShortcut(itemCreated1, 4);
						}

					}
				itemCreated = NULL;
				itemCreated1 = NULL;
				
				itemCreated = player.GetInventory().CreateInInventory("DSS_Starosta");            	    // Выдаем игроку маску
			    itemCreated = player.GetInventory().CreateInInventory("FS_ForestOldCap");		        // Выдаем игроку перчатки
				itemCreated = player.GetInventory().CreateInInventory("XS_EQP_PANTS_Ironsightpants_naf");		    // Выдаем игроку штаны
				itemCreated = player.GetInventory().CreateInInventory("SFP_SurvScav_Tors");	            // Выдаем игроку обувь
				itemCreated = player.GetInventory().CreateInInventory("RusFlex_BeltUnloading_BAG");	        // Выдаем игроку куртку				
				itemCreated = player.GetInventory().CreateInInventory("RusFlex_MaskaFace_olive"); 	            // Выдаем броню
				itemCreated = player.GetInventory().CreateInInventory("Headtorch_Grey"); 	                // Выдаем ремень
				itemCreated = player.GetInventory().CreateInInventory("WoolGlovesFingerless_Green");
				itemCreated = player.GetInventory().CreateInInventory("XS_EQP_SHOES_wolverineBoots");				
				itemCreated = player.GetInventory().CreateInInventory("Ammo_12gaPellets");	            // Выдаем игроку магазины к AKM в любой свободный слот в инвентаре
				itemCreated = player.GetInventory().CreateInInventory("Ammo_12gaPellets");
				itemCreated = player.GetInventory().CreateInInventory("Ammo_12gaPellets");
				itemCreated = player.GetInventory().CreateInInventory("Ammo_12gaPellets");
				itemCreated = player.GetInventory().CreateInInventory("Ammo_12gaPellets");
				itemCreated = player.GetInventory().CreateInInventory("Ammo_12gaPellets");
				itemCreated = player.GetInventory().CreateInInventory("Ammo_12gaPellets");
				itemCreated = player.GetInventory().CreateInInventory("SFP_ArmyRadio169");
				itemCreated = player.GetInventory().CreateInInventory("SFP_CantenUssr");
				itemCreated = player.GetInventory().CreateInInventory("Justice_HuntingKnife");
				itemCreated = NULL;					
				
				itemCreated = player.GetInventory().CreateInInventory("St_W_BenelliM4");
				if (itemCreated)															            // Проверяем, создался ли ремень. Если он создался, переменная itemCreated будет не пуста и проверка пройдет
				{  	itemCreated.GetInventory().CreateAttachment( "St_O_Holosight" ); 				        // Выдаем игроку на AKM оптику ПСО 11 и крепим
					itemCreated.GetInventory().CreateAttachment( "anpeq_black" ); 			        // Выдаем игроку на AKM цевье, приклад и глушитель, и крепим
					itemCreated.GetInventory().CreateAttachment( "St_M_Salvo12_Suppressor" );
					itemCreated.GetInventory().CreateAttachment( "St_M_Salvo12_Suppressor" );					// Выдаем игроку на AKM цевье, приклад и глушитель, и крепим
					itemCreated.GetInventory().CreateAttachment( "Battery9v" );	
					itemCreated.GetInventory().CreateAttachment( "Battery9v" );	
					itemCreated.GetInventory().CreateAttachment( "Battery9v" );	
					itemCreated.GetInventory().CreateAttachment( "Battery9v" );	
					itemCreated.GetInventory().CreateAttachment( "Battery9v" );	
					itemCreated.GetInventory().CreateAttachment( "Battery9v" );	
				}
				itemCreated = NULL;
				itemCreated1 = NULL;
				//itemCasted = ItemBase.Cast(itemCreated);									            // Строка не нужна, закоментирована. используется для изменения класса EntityAI в ItemBase (чтобы нужные операции были доступны)

				
				
				itemCreated = player.GetInventory().CreateInInventory("PersonalRadio");
				if (itemCreated)
				{
					player.SetQuickBarEntityShortcut(itemCreated, 6);
					itemCreated.GetInventory().CreateInInventory( "Battery9V" );
				}
				itemCreated = NULL;
				
				itemCreated = player.GetInventory().CreateInInventory("FieldShovel");
				if (itemCreated)
				{
					player.SetQuickBarEntityShortcut(itemCreated, 5);
				}
				itemCreated = NULL;
				break;
			}
			
			case 2: //Set with number 2 (Сет с номером 2)
			{
				RemoveAllItems(player); 												// Чтобы удалить с персонажа уже имеющиеся стандартные стартовые шмотки раскомментировать строку
				itemCreated = player.GetInventory().CreateInInventory("AssaultBag_Ttsko"); 	        // Выдаем рюкзак и записываем в переменную itemCreated
				itemCreated = NULL;
				itemCreated1 = NULL;				

		        itemCreated = player.GetInventory().CreateInInventory("Mich2001Helmet");            	        // Выдаем игроку головной убор
				if (itemCreated)
				{
					itemCreated1 = itemCreated.GetInventory().CreateAttachment("NVGoggles");
					if (itemCreated1)
					{  			            
						itemCreated1.GetInventory().CreateInInventory( "Battery9V" );
					}
					itemCreated1 = itemCreated.GetInventory().CreateAttachment("UniversalLight");
					if (itemCreated1)
					{  			            
						itemCreated1.GetInventory().CreateInInventory( "Battery9V" );
					}					
				}
				itemCreated = NULL;
				itemCreated1 = NULL;
				
				itemCreated = player.GetInventory().CreateInInventory("BalaclavaMask_Blackskull");            	    // Выдаем игроку маску
			    itemCreated = player.GetInventory().CreateInInventory("TacticalGloves_Green");		        // Выдаем игроку перчатки
				itemCreated = player.GetInventory().CreateInInventory("BDUPants");		    // Выдаем игроку штаны
				itemCreated = player.GetInventory().CreateInInventory("MilitaryBoots_Black");	            // Выдаем игроку обувь
				itemCreated = player.GetInventory().CreateInInventory("BDUJacket");	        // Выдаем игроку куртку							
				itemCreated = NULL;
				
				itemCreated = player.GetInventory().CreateInInventory("PlateCarrierVest_Camo"); 	            // Выдаем броню
				if (itemCreated)															            // Проверяем, создаласи ли броня. Если он создался, переменная itemCreated будет не пуста и проверка пройдет
				{                                                                                       
					itemCreated.GetInventory().CreateAttachment( "PlateCarrierHolster_Camo" ); 			    // Выдаем кобуру и крепим
					itemCreated.GetInventory().CreateAttachment( "PlateCarrierPouches_Camo" ); 		        // Выдаем карманы и крепим
					itemCreated.GetInventory().CreateAttachment( "RGD5Grenade" ); 		        // Выдаем карманы и крепим
					itemCreated.GetInventory().CreateAttachment( "RGD5Grenade" ); 		        // Выдаем карманы и крепим
					itemCreated.GetInventory().CreateAttachment( "RGD5Grenade" ); 		        // Выдаем карманы и крепим
					itemCreated.GetInventory().CreateAttachment( "RGD5Grenade" ); 		        // Выдаем карманы и крепим
					
				}
				itemCreated = NULL;
				itemCreated = player.GetInventory().CreateInInventory("MilitaryBelt"); 	                // Выдаем ремень
				if (itemCreated)															            // Проверяем, создался ли ремень. Если он создался, переменная itemCreated будет не пуста и проверка пройдет
				{  
					itemCreated.GetInventory().CreateAttachment( "PlateCarrierHolster_Camo" ); 		        // Выдаем кобуру и крепим
					if (itemCreated)
					{
						itemCreated1 = itemCreated.GetInventory().CreateInInventory ("MKII");
						if (itemCreated1)
						{
							player.SetQuickBarEntityShortcut(itemCreated1, 2);
						}
					}
					itemCreated.GetInventory().CreateAttachment( "NylonKnifeSheath" ); 			        // Выдаем ножны и крепим
					if (itemCreated)
					{
						itemCreated1 = itemCreated.GetInventory().CreateInInventory ("CombatKnife");
						if (itemCreated1)
						{
							player.SetQuickBarEntityShortcut(itemCreated1, 3);
						}
					}
				}
				itemCreated = NULL;
				itemCreated1 = NULL;
				//itemCasted = ItemBase.Cast(itemCreated);									            // Строка не нужна, закоментирована. используется для изменения класса EntityAI в ItemBase (чтобы нужные операции были доступны)
				itemCreated = player.GetInventory().CreateInInventory("TacticalGoggles");	            // Выдаем игроку магазины к MKII
				itemCreated = player.GetInventory().CreateInInventory("Mag_MKII_10Rnd");	            // Выдаем игроку магазины к MKII
				itemCreated = player.GetInventory().CreateInInventory("Mag_MKII_10Rnd");
				itemCreated = player.GetInventory().CreateInInventory("Mag_MKII_10Rnd");	            // Выдаем игроку магазины к MKII
				itemCreated = player.GetInventory().CreateInInventory("Mag_SVD_10Rnd");		            // Выдаем игроку магазины к AKM в любой свободный слот в инвентаре
				itemCreated = player.GetInventory().CreateInInventory("Mag_SVD_10Rnd");		            // Выдаем игроку магазины к AKM в любой свободный слот в инвентаре
				itemCreated = player.GetInventory().CreateInInventory("Mag_SVD_10Rnd");
				itemCreated = player.GetInventory().CreateInInventory("Mag_SVD_10Rnd");				// Выдаем игроку магазины к AKM в любой свободный слот в инвентаре		
				itemCreated = player.GetInventory().CreateInInventory("Mag_Vikhr_30Rnd");
				itemCreated = player.GetInventory().CreateInInventory("Mag_Vikhr_30Rnd");
				itemCreated = player.GetInventory().CreateInInventory("Mag_Vikhr_30Rnd");
				itemCreated = player.GetInventory().CreateInInventory("Mag_Vikhr_30Rnd");

				itemCreated = player.GetInventory().CreateInInventory("AmmoBox_9x39AP_20Rnd");
				itemCreated = player.GetInventory().CreateInInventory("AmmoBox_9x39AP_20Rnd");
				itemCreated = player.GetInventory().CreateInInventory("AmmoBox_9x39AP_20Rnd");
				itemCreated = player.GetInventory().CreateInInventory("AmmoBox_9x39AP_20Rnd");

				itemCreated = player.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd");
				itemCreated = player.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd");
				itemCreated = player.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd");
				itemCreated = player.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd");

				itemCreated = player.GetInventory().CreateInInventory("AmmoBox_22_50Rnd");
				itemCreated = player.GetInventory().CreateInInventory("AmmoBox_22_50Rnd");
				
				itemCreated = NULL;

				itemCreated = player.GetInventory().CreateInInventory("SVD");
				if (itemCreated)
				{
					player.SetQuickBarEntityShortcut(itemCreated, 1);
					itemCreated.GetInventory().CreateAttachment( "AK_Suppressor" );
					itemCreated.GetInventory().CreateAttachment( "PSO1Optic" );
					if (itemCreated)
					{  			            
						itemCreated.GetInventory().CreateInInventory( "Battery9V" );
					} 			           
				}						
							
				itemCreated = NULL;															            // Обнуляем значение переменной после работы с ней, нужно если мы будем использовать ее далее
				itemCreated = player.GetHumanInventory().CreateInHands("VSS");				            // Выдаем игроку AKM в руки
				if (itemCreated)
				{
					player.SetQuickBarEntityShortcut(itemCreated, 0);
					itemCreated.GetInventory().CreateAttachment( "PSO11Optic" );
					if (itemCreated)
					{  			            
						itemCreated.GetInventory().CreateInInventory( "Battery9V" );
					} 			           
				}
				
				itemCreated = NULL;
				itemCreated1 = NULL;
				
				player.GetStatWater().Set(5000);
				player.GetStatEnergy().Set(19000);

					
				break;
			}
			
			case 3: //Set with number 3   (Сет с номером 3)
			{
				break;
			}
			
			case 4: //Set with number 4   (Сет с номером 4)
			{
				break;
			}
			
			case 5: //Set with number 5   (Сет с номером 5)
			{
				break;
			}
			
			case 6: //Set with number 6   (Сет с номером 6)
			{
				break;
			}
			
			default: //Default starting spawn set (Сет поумолчанию для всех игроков, если хотите назначить - добавляйте здесь!)
			{
				//My_Custom_Spawn_Parameters.RemoveAllItems(player); // Чтобы удалить с персонажа уже имеющиеся стандартные стартовые шмотки раскомментировать строку
				DefaultSets(player); // Для выдачи своих сетов по рандому всем игрокам, не прописанным в скрипте, раскомментировать эту строку
				RemoveAllItems(player); 
				itemCreated = NULL;															
				itemCreated = player.GetInventory().CreateInInventory("SFP_Stranik_Boots");	                // Выдаем игроку обувь
				itemCreated = NULL;															
				itemCreated = player.GetInventory().CreateInInventory("SFP_Stranik_Pants");		        // Выдаем игроку Щтаны
				itemCreated = NULL;
				itemCreated = player.GetInventory().CreateInInventory("SFP_Stranik_Sweeter");		        // Выдаем игроку свитер
				itemCreated = NULL;
				itemCreated = player.GetInventory().CreateInInventory("Roadflare");	                    // Выдаем игроку фальшфеер в любой свободный слот в инвентаре
				itemCreated = NULL;															            // Обнуляем значение переменной											
				itemCreated = player.GetInventory().CreateInInventory("XS_FOOD_CANNED_bstew");	                    // Выдаем игроку банку тушенки
				itemCreated = NULL;	
				itemCreated = player.GetInventory().CreateInInventory("SodaCan_cola");	                    // Выдаем игроку банку коллы
				itemCreated = NULL;
				itemCreated = player.GetInventory().CreateInInventory("CombatKnife");	                    // Выдаем игроку банку коллы
				itemCreated = NULL;
				itemCreated = player.GetInventory().CreateInInventory("Sawedoffizh18Shotgun");	                    // Выдаем игроку банку коллы
				itemCreated = NULL;
				itemCreated = player.GetInventory().CreateInInventory("Ammo_12gaPellets");
				itemCreated = NULL;
				itemCreated = player.GetInventory().CreateInInventory("SFP_Makarom_Apoc");
				itemCreated = NULL;
				itemCreated = player.GetInventory().CreateInInventory("Mag_IJ70_8Rnd");
				itemCreated = NULL;
				itemCreated = player.GetInventory().CreateInInventory("Mag_IJ70_8Rnd");
				itemCreated = NULL;
				itemCreated = player.GetInventory().CreateInInventory("AmmoBox_380_35rnd");
				
				private array <vector>  spawnpoints = {"4967.792969 104.242012 329.622406"};
				private vector selected_spawnpoint = spawnpoints.GetRandomElement();
				player.SetPosition(selected_spawnpoint);
				
				
				break;
			}
		}
	}
	
	void SetRandomHealthItem(EntityAI itemCreated) // Функция генерирует и применяет для предмета рандомное значение здоровья!
	{
		if ( itemCreated )
		{
			private int rndHlt = Math.RandomInt(55,6);
			itemCreated.SetHealth("","",rndHlt);
		}
	}
	
	void DefaultSets(PlayerBase player) // Функция выдает сеты игрокам, не прописанным в конфигурации скрипта!!!
	{
		EntityAI itemCreated = NULL;
		EntityAI itemCreated1 = NULL;
		ItemBase itemCasted = NULL;
		
				private array <vector>  spawnpoints = {"4967.792969 104.242012 329.622406"};
				private vector selected_spawnpoint = spawnpoints.GetRandomElement();
				player.SetPosition(selected_spawnpoint);
		
		
	}
	void RemoveAllItems(PlayerBase player)
    {
        array<EntityAI> itemsArray = new array<EntityAI>;
        ItemBase item;
        player.GetInventory().EnumerateInventory(InventoryTraversalType.PREORDER, itemsArray);
        
        for (int i = 0; i < itemsArray.Count(); i++)
        {
            Class.CastTo(item, itemsArray.Get(i));
            if (item && !item.IsInherited(SurvivorBase))
            {
                InventoryLocation il = new InventoryLocation();
                if (item && item.GetInventory().GetCurrentInventoryLocation(il))
                {
                    player.GetInventory().LocalDestroyEntity(item);
                }
            }
        }
    }
}

 

я дурак)

Изменено пользователем Grom25rus (история изменений)

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


Ссылка на сообщение
Поделиться на других сайтах
  • 0
06.03.2025 в 12:51, Лихой сказал:

Приветствую. Не понял, объясни пожалуйста, для чего у тебя в sets дважды прописаны сеты? Первый раз в начале, второй раз после точек спавна.

 

Потому что, нужно читать коментарии. И понимать, что написано.

Первый набор сетов - для персонажей прописаных в конфиге по ID.
Второй набор - дефолтные сеты. Которые выдаются персонажам, не прописаным по ID.

Но что-бы заработала дефолтная выдача, нужно сделать еще кое что... немного подумать и почитать внимательно коментарии. ?

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


Ссылка на сообщение
Поделиться на других сайтах
  • 0
03.03.2025 в 21:48, meltraid сказал:

подскажите как починить рандом сета, я скачал фикс сета которые я прописываю через айди работают а дефолт нет

 

Чтоб дефолт заработал, егу нужно включить. Как? Все написано в коментариях. ?

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


Ссылка на сообщение
Поделиться на других сайтах
  • 0
49 минут назад, dark_kynep сказал:

 

Потому что, нужно читать коментарии. И понимать, что написано.

Первый набор сетов - для персонажей прописаных в конфиге по ID.
Второй набор - дефолтные сеты. Которые выдаются персонажам, не прописаным по ID.

Но что-бы заработала дефолтная выдача, нужно сделать еще кое что... немного подумать и почитать внимательно коментарии. ?

ну ты же сам написал если что спрашивайте, теперь загадками пишешь),нормально объяснить нельзя)?

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


Ссылка на сообщение
Поделиться на других сайтах
  • 0
1 час назад, dark_kynep сказал:

Чтоб дефолт заработал, егу нужно включить. Как? Все написано в коментариях. ?

Да все нашел,я дурак)бывает,спасибо)

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


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

Да я уже разобрался, спасибо?

Но в карму плюсик)

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


Ссылка на сообщение
Поделиться на других сайтах
  • 0
12 часов назад, dark_kynep сказал:

 

Потому что, нужно читать коментарии. И понимать, что написано.

Первый набор сетов - для персонажей прописаных в конфиге по ID.
Второй набор - дефолтные сеты. Которые выдаются персонажам, не прописаным по ID.

Но что-бы заработала дефолтная выдача, нужно сделать еще кое что... немного подумать и почитать внимательно коментарии. ?

Да я уже разобрался, спасибо?

Но в карму плюсик)

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


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

Рандомный спавн для всех игроков не работает. спавнит на ванильных точках спавна (

Может есть у кого мысли что может быть не так?
использованы файлы из фикса. изменения жирным ниже.

Script.c
class CustomSpawnPlayerConfig
{
    private bool enabled_loading_custom_spawnpoints = true;
    private bool enabled_loading_custom_sets = true; 
    private bool enabled_loading_custom_skins = true; 

 

Sets.c
void DefaultSets(PlayerBase player) // Функция выдает сеты игрокам, не прописанным в конфигурации скрипта!!!
    {
        EntityAI itemCreated = NULL;
        EntityAI itemCreated1 = NULL;
        ItemBase itemCasted = NULL;
        
        // ниже пример, если вам нужно задать свои точки спавна для всех игроков. Этот код можно также использовать и для каждого сета индивидуально!
        // Код закомментирован, если это надо - раскомментируйте!
        // начало кода точек спавна игрока
        private array <vector>  spawnpoints = {"1126.96 142.73 4593.74",
            "1885.61 174.341 4318.58",
            "2493.98 232.993 4682.65",
            "2858.62 249.805 4715.15",
            "2241.1 312.947 6225.96",
            "1870.89 273.802 7599.06",
            "2178.58 343.878 7933.23"};
        private vector selected_spawnpoint = spawnpoints.GetRandomElement();
        player.SetPosition(selected_spawnpoint);

        // конец кода точек спавна игрока

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


Ссылка на сообщение
Поделиться на других сайтах
  • 0
27.02.2025 в 11:33, dark_kynep сказал:

 

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

Пожалуйста, Войдите или Зарегистрируйтесь, чтобы увидеть это: Вложение.

 

 

 

 

Попробуй мой вариант! Только свои сеты пропиши.

Можно пацанам в дискорде раздать?

 

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


Ссылка на сообщение
Поделиться на других сайтах
  • 0
27.03.2025 в 09:15, AshTray сказал:

Рандомный спавн для всех игроков не работает. спавнит на ванильных точках спавна (

Может есть у кого мысли что может быть не так?

 

Sets.c
void DefaultSets(PlayerBase player) // Функция выдает сеты игрокам, не прописанным в конфигурации скрипта!!!
  

 

 

Функция DefaultSets, по умолчанию отключена.

Ее нужно чуть выше, в предыдущей функции, в последней строке, раскоментить.

 

 

Изменено пользователем dark_kynep (история изменений)

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


Ссылка на сообщение
Поделиться на других сайтах
  • 0
13 часов назад, Darhi11 сказал:

Можно пацанам в дискорде раздать?

 

 

Можно.

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


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

Полностью рабочий CustomSpawnPlayerConfig под 1.28, оружие так же спавнится, крепятся атачменты и магазины теперь. Не благодарите.

 

Пожалуйста, Войдите или Зарегистрируйтесь, чтобы увидеть это: Вложение.

Изменено пользователем Krampus (история изменений)

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


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

Создайте аккаунт или войдите в него для комментирования

Вы должны быть пользователем, чтобы оставить комментарий

Создать аккаунт

Зарегистрируйтесь для получения аккаунта. Это просто!

Зарегистрировать аккаунт

Войти

Уже зарегистрированы? Войдите здесь.

Войти сейчас

×
×
  • Создать...

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

Используя этот сайт, вы автоматически обязуетесь соблюдать наши Правила и Политика конфиденциальности.
Чтобы сделать этот веб-сайт лучше, мы разместили cookies на вашем устройстве. Вы можете изменить свои настройки cookies, в противном случае мы будем считать, что вы согласны с этим.

Поддержка