Нужна помощь?
Создайте тему в соответствующем разделе
Не нужно писать всё в чат!Загляните на торговую площадку
Там вы можете купить
всё что касается игровых серверовНе хотите бан?
Пожалуйста, ознакомьтесь с нашими правилами
Не нарушайте порядок!Продаёте или покупаете?
Пользуйтесь услугами гаранта
Мы сделаем вашу сделку безопасной
Таблица лидеров
Популярные публикации
Отображаются публикации с наибольшей репутацией на 11/10/25 в Сообщения
-
1 балл
Мод. оружие. Фантомный глушитель
vlad_vostok отреагировал на Dima198901 за сообщение в теме
Название слота должно быть одинаковым, ну и название прокси твоего называется не так как сама модель, если у тебя weaponMuzzleSniper ну так прокси должна так же называться -
1 баллВот мой код с 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); } } } } }
-
1 балл
Ошибка игрок не был создан на этом сервере dayz
Andromy отреагировал на dark_kynep за сообщение в теме
Дефолт надо прописывать в init.c. Пока решения я не нашел. Может укого-то будет время и желание, этим заняться. -
1 баллoWpn.SpawnAttachedMagazine( "Mag_STANAG_60Rnd" );
-
1 баллВот я абсолютно нулевой в программировании. Но у меня получилось решить этот вопрос. Изначально я установил скрипт по гайду с этой темы на форуме: Большая ему благодарность! Archon7th ,тоже респект человеку ? Далее в файле sets.c я изменил немного код. по этим фрагментам можно понять где это примерно находится: там где выдача акм в руки (itemCreated = player.GetHumanInventory().CreateInHands("akm");): itemCreated = player.GetHumanInventory().CreateInHands("akm"); if (itemCreated) { Weapon_Base wpn1 = itemCreated; wpn1.FillChamber("Mag_AKM_Drum75Rnd_Black"); // Заряжает один патрон в патронник itemCreated.GetInventory().CreateAttachment( "Mag_AKM_Drum75Rnd_Black" ); // Выдаем игроку на AKM магазин и крепим itemCreated.GetInventory().CreateAttachment( "PSO11Optic" ); // Выдаем игроку на AKM оптику и крепим itemCreated.GetInventory().CreateAttachment( "AK_WoodBttstck" ); // itemCreated.GetInventory().CreateAttachment( "AK_WoodHndgrd" ); // itemCreated.GetInventory().CreateAttachment( "AK_Suppressor" ); // } второй вариан даю в руки скс, там нет магазина и патроны обычно надо каждый заряжать по очереди: itemCreated = player.GetHumanInventory().CreateInHands("SKS"); if (itemCreated) { Weapon_Base wpn2 = itemCreated; string ammoType = "Bullet_762x39"; wpn2.FillInnerMagazine(ammoType); itemCreated.GetInventory().CreateAttachment( "PUScopeOptic" ); //Крепим оптику на скс } Уверен, что это все можно сделать более грамотно, но пока есть и такое решение. Будем ждать более качественного подхода от модеров...
-
1 баллповерь, он не поймет что это и где это искать) максимум если найдет класс но что и куда вряд-ли)
-
Рассылка
