Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • Need help?

    Create a topic in the appropriate section
    Don't write everything in the chat!
  • Take a look at the marketplace

    There you can buy
    everything related to game servers
  • Don't want a ban?

    Please read our rules
    Don't disturb the order!
  • Sell or buy?

    Use services of the guarantor
    We will make your deal safe
  • 0
Sign in to follow this  
adsl4678

DeathMatch: как выдать заряженное оружие?

Всем здравствуйте!

Очень интересует вопрос как заспавнить патрон в патроннике при выдаче стартового лута? Прикрепить магазин - не проблема, но без патрона в патроннике всё-равно приходится каждый раз нажимать "R". Также интересен вопрос применительно в винтовкам с встроенным магазином (напр., Winchester70 он же Tundra).

Достаточно много отечественного и зарубежного материала пересмотрел, но так и не нашёл ответ. Вопрос интересен в контексте ДМ для пострелушек с друзьями.
Подскажите, пожалуйста. Заранее благодарю!

Edited by adsl4678 (see edit history)

Share this post


Link to post
Share on other sites

10 answers to this question

Recommended Posts




  • 0

Up. Подскажите пожалуйста.

Говорить что нет абсолютно никакого решения трудно, ибо проблема была решена на некоторых ДМ.

Share this post


Link to post
Share on other sites
  • 0
20 минут назад, Serwor72rus сказал:

Поднимаю вопрос

Я подозреваю, что вопрос решается скриптом. Через некоторое время (как закончу работу над основным модпаком) вернусь к этом вопросу и возможно что-то напишу.

Share this post


Link to post
Share on other sites
  • 0
50 минут назад, Archon7th сказал:

Weapon_Base wpn = ...; string ammoType = "Bullet_762x39"; wpn.FillInnerMagazine(ammoType);


Weapon_Base wpn = ...;
string ammoType = "Bullet_762x39";
wpn.FillInnerMagazine(ammoType);

 

поверь, он не поймет что это и где это искать) максимум если найдет класс но что и куда вряд-ли)

Share this post


Link to post
Share on other sites
  • 0

Вот я  абсолютно нулевой в программировании. Но у меня получилось решить этот вопрос. Изначально я установил скрипт по гайду с этой темы на форуме: 

Большая ему благодарность!

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" ); 	//Крепим оптику на скс
																				
				}							
				

Уверен, что это все можно сделать более грамотно, но пока есть и такое решение.
Будем ждать более качественного подхода от модеров...

 

Edited by bbm_wot (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you automaticly agree to our Guidelines and Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.