<?xml version="1.0" encoding="utf-8"?>
<!-- Generated on Fri, 05 Jun 2026 19:22:37 +0200 -->
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>GMod-Fan Inc. - Форум</title>
    <link>https://gmod-fan.com/forum/problems/topic-4375.html</link>
    <description>Последние ответы в теме: Вопрос-ответ по созданию/изменению аддонов.</description>
    <generator>LogicBoard</generator>
    <item>
      <title>Вопрос-ответ по созданию/изменению аддонов.</title>
      <description><![CDATA[<strong>YaGOOBian</strong>, Ладно, фиг с этой иконкой. Теперь проблема серьёзней.<br />Я изменил модель, на модель из CSS. Дак этот монитор разбивается. Конечно об бошку зомби мониторы бить это довольно весело, но из карты получается свалка! Удаляются только целые мониторы, а вот обломки нет! Плюс надпись об ошибке скрипта вылазит.<br />Как это исправить?]]></description>
      <link>https://gmod-fan.com/forum/problems/last/topic-4375.html</link>
      <pubDate>Mon, 29 Sep 2014 12:47:45 +0200</pubDate>
      <author>Shurik123</author>
      <guid isPermaLink="true"><![CDATA[https://gmod-fan.com/forum/problems/last/topic-4375.html]]></guid>
    </item>
    <item>
      <title>Вопрос-ответ по созданию/изменению аддонов.</title>
      <description><![CDATA[<strong>Shurik123</strong>, Нда, значит устарели мои знания с 10-го гдома :D Пора переучаться...]]></description>
      <link>https://gmod-fan.com/forum/problems/last/topic-4375.html</link>
      <pubDate>Fri, 05 Sep 2014 16:15:37 +0200</pubDate>
      <author>Alexander.S.V.</author>
      <guid isPermaLink="true"><![CDATA[https://gmod-fan.com/forum/problems/last/topic-4375.html]]></guid>
    </item>
    <item>
      <title>Вопрос-ответ по созданию/изменению аддонов.</title>
      <description><![CDATA[<strong>YaGOOBian</strong>, Ты немного не понял мой вопрос. Это иконка для меню спавна. Я и так знаю что тут делать.<br />А мне нужна иконка тут:<br /><!-- Small_img:http://img-fotki.yandex.ru/get/10/252254300.3/0_10dfb0_a653528_orig| --><center><a href='http://img-fotki.yandex.ru/get/10/252254300.3/0_10dfb0_a653528_orig' onclick="return hs.expand(this)"><img src='http://img-fotki.yandex.ru/get/10/252254300.3/0_10dfb0_a653528_orig' width='400' height='201' /></a></center><!--/Small_img --><br /><br />Но я проверил то что ты написал, не работает.]]></description>
      <link>https://gmod-fan.com/forum/problems/last/topic-4375.html</link>
      <pubDate>Fri, 05 Sep 2014 06:24:03 +0200</pubDate>
      <author>Shurik123</author>
      <guid isPermaLink="true"><![CDATA[https://gmod-fan.com/forum/problems/last/topic-4375.html]]></guid>
    </item>
    <item>
      <title>Вопрос-ответ по созданию/изменению аддонов.</title>
      <description><![CDATA[<strong>Shurik123</strong>, Я так смотрю код без базы , я на таком делал оружки на 10-й гмод , только вместо пропов брал пули.<br />А про иконки  , дело в том что название иконки надо писать в точности по названию луа кода в оружие , тоесть берешь название папки где твой свеп :<br /><!-- Small_img:https://pp.vk.me/c620724/v620724709/1550f/duPPp4EGsHE.jpg| --><center><a href='https://pp.vk.me/c620724/v620724709/1550f/duPPp4EGsHE.jpg' onclick="return hs.expand(this)"><img src='https://pp.vk.me/c620724/v620724709/1550f/duPPp4EGsHE.jpg' width='400' height='260' /></a></center><!--/Small_img --><br />А потом здесь создай свою иконку размером , как спрей , ну и вообщем вот : <br /><!-- Small_img:https://pp.vk.me/c620724/v620724709/15518/1fQt5vIKyk8.jpg| --><center><a href='https://pp.vk.me/c620724/v620724709/15518/1fQt5vIKyk8.jpg' onclick="return hs.expand(this)"><img src='https://pp.vk.me/c620724/v620724709/15518/1fQt5vIKyk8.jpg' width='400' height='239' /></a></center><!--/Small_img --><br />Думаю дальше сам разберешься :)]]></description>
      <link>https://gmod-fan.com/forum/problems/last/topic-4375.html</link>
      <pubDate>Thu, 04 Sep 2014 17:43:48 +0200</pubDate>
      <author>Alexander.S.V.</author>
      <guid isPermaLink="true"><![CDATA[https://gmod-fan.com/forum/problems/last/topic-4375.html]]></guid>
    </item>
    <item>
      <title>Вопрос-ответ по созданию/изменению аддонов.</title>
      <description><![CDATA[Довольно полезная тема думую его лучше закрепить.]]></description>
      <link>https://gmod-fan.com/forum/problems/last/topic-4375.html</link>
      <pubDate>Thu, 04 Sep 2014 17:21:37 +0200</pubDate>
      <author> Black_helicopter_245</author>
      <guid isPermaLink="true"><![CDATA[https://gmod-fan.com/forum/problems/last/topic-4375.html]]></guid>
    </item>
    <item>
      <title>Вопрос-ответ по созданию/изменению аддонов.</title>
      <description><![CDATA[Эта тема аналогична теме &quot;Вопрос-ответ&quot;, но вопросы будут не про гмод, а про аддоны. Точнее по их созданию и модернизации.<br />НЕЛЬЗЯ спрашивать про установку и вылеты аддонов которые вы скачали!<br />Не по теме: &quot;Я скачал ваир, а инструменты не работают!&quot;<br />По теме: &quot;Я хочу добавить в свой аддон иконку для меню спавна, но не могу понять как это сделать. Что нужно писать в луа? Или как это делают?&quot;<br />Если тема будет полезна, закрепите. Если нет, то можете удалить.<br /><br />Вот мой вопрос: Как добавить в оружие иконку, которая будет при выборе пушки (Например когда с физ гана на тул ган переключаешь)?<br />Пытался взять код из других аддонов, пушка ломалась.<br />Вот код луа:<br /><blockquote class="blockspoiler"><span class="titlespoiler"><a href='#' onclick="ShowAndHide('14fe3791d8d564d31c3627af22616002'); return false;">Спойлер [+]</a></span><div id='14fe3791d8d564d31c3627af22616002' style='display:none;' class="textspoiler"><div class="block_quote"><span class="block_titlequote">Цитата:</span><span class="block_textquote">resource.AddFile( &quot;models/weapons/v_pfinger.dx90.vtx&quot; )<br />resource.AddFile( &quot;models/weapons/v_pfinger.sw.vtx&quot; )<br /><br />resource.AddFile( &quot;models/weapons/w_pfinger.mdl&quot; )<br />resource.AddFile( &quot;models/weapons/w_pfinger.vvd&quot; )<br />resource.AddFile( &quot;models/weapons/w_pfinger.dx80.vtx&quot; )<br />resource.AddFile( &quot;models/weapons/w_pfinger.dx90.vtx&quot; )<br />resource.AddFile( &quot;models/weapons/w_pfinger.sw.vtx&quot; )<br /><br />SWEP.PrintName			= &quot;Kaspersky Gun Ver 2&quot;			<br />SWEP.Author				= &quot;Shurik1236&quot;<br />SWEP.Instructions		= &quot;ЛКМ: Короткие выстрелы по одному. ПКМ: ПУЛЕМЁТ!!!&quot;<br /><br />SWEP.Spawnable = true<br />SWEP.AdminOnly = true<br /><br />SWEP.Primary.ClipSize		= -1<br />SWEP.Primary.DefaultClip	= -1<br />SWEP.Primary.Automatic		= false<br />SWEP.Primary.Ammo			= &quot;none&quot;<br /><br />SWEP.Secondary.ClipSize		= -1<br />SWEP.Secondary.DefaultClip	= -1<br />SWEP.Secondary.Automatic	= true<br />SWEP.Secondary.Ammo			= &quot;none&quot;<br /><br />SWEP.Weight				= 5<br />SWEP.AutoSwitchTo		= false<br />SWEP.AutoSwitchFrom		= false<br /><br />SWEP.Slot				= 1<br />SWEP.SlotPos			= 2<br />SWEP.DrawAmmo			= false<br />SWEP.DrawCrosshair		= true<br /><br />SWEP.ViewModel			= &quot;models/weapons/v_pfinger.mdl&quot;<br />SWEP.WorldModel			= &quot;models/weapons/w_pfinger.mdl&quot;<br />SWEP.ViewModelFOV 		= 95<br /><br />local ShootSound = Sound( &quot;weapons/kaspersky/kaspersky.wav&quot; )<br />local ShootSound02 = Sound( &quot;weapons/kaspersky/kaspersky1.wav&quot; )<br /><br />--<br />-- Called when the left mouse button is pressed<br />--<br />function SWEP:PrimaryAttack()<br /><br />	-- This weapon is 'automatic'. This function call below defines<br />	-- the rate of fire. Here we set it to shoot every 0.5 seconds.<br />	self.Weapon:SetNextPrimaryFire( CurTime() + 2.5 )	<br /><br />	-- Call 'ThrowChair' on self with this model<br />	local ent = self:ThrowMonitor( &quot;models/Shurik1236models/kaspersky/kasperskylogo.mdl&quot; )<br /><br />end<br /> <br /><br />--<br />-- Called when the rightmouse button is pressed<br />--<br />function SWEP:SecondaryAttack()<br /><br />	-- Note we don't call SetNextSecondaryFire here because it's not<br />	-- automatic and so we let them fire as fast as they can click.	<br /><br />	-- Call 'ThrowChair' on self with this model<br />	local ent = self:ThrowChair( &quot;models/Shurik1236models/kaspersky/kasperskylogo.mdl&quot; )<br /><br />end<br /><br />--<br />-- A custom function we added. When you call this the player will fire a chair!<br />--<br />function SWEP:ThrowChair( model_file )<br /><br />	-- <br />	-- Play the shoot sound we precached earlier!<br />	--<br />	<br />	local Num = math.random(1,2)<br />	<br />	if Num == 1 then<br />		self:EmitSound( ShootSound )<br />	elseif Num == 2 then<br />		self:EmitSound( ShootSound02 )<br />	<br />	end<br /> <br />	--<br />	-- If we're the client ) then this is as much as we want to do.<br />	-- We play the sound above on the client due to prediction.<br />	-- ( if ( we didn't they would feel a ping delay during multiplayer )<br />	--<br />	if ( CLIENT ) then return end<br /><br />	--<br />	-- Create a prop_physics entity<br />	--<br />	local ent = ents.Create( &quot;prop_physics&quot; )<br /><br />	--<br />	-- Always make sure that created entities are actually created!<br />	--<br />	if (  !IsValid( ent ) ) then return end<br /><br />	--<br />	-- Set the entity's model to the passed in model<br />	--<br />	ent:SetModel( model_file )<br /> <br />	--<br />	-- Set the position to the player's eye position plus 16 units forward.<br />	-- Set the angles to the player'e eye angles. Then spawn it.<br />	--<br />	ent:SetPos( self.Owner:EyePos() + ( self.Owner:GetAimVector() * 16 ) )<br />	ent:SetAngles( self.Owner:EyeAngles() )<br />	ent:Spawn()<br /><br />	--<br />	-- Now get the physics object. Whenever we get a physics object<br />	-- we need to test to make sure its valid before using it.<br />	-- If it isn't ) then we'll remove the entity.<br />	--<br />	local phys = ent:GetPhysicsObject()<br />	if (  !IsValid( phys ) ) then ent:Remove() return end<br /> <br />	--<br />	-- Now we apply the force - so the chair actually throws instead <br />	-- of just falling to the ground. You can play with this value here<br />	-- to adjust how fast we throw it.<br />	--<br />	local velocity = self.Owner:GetAimVector()<br />	velocity = velocity * 3000<br />	velocity = velocity + ( VectorRand() * 2 ) -- a random element<br />	velocity = velocity * phys:GetMass()<br />	phys:ApplyForceCenter( velocity )<br /> <br />	--<br />	-- Assuming we're playing in Sandbox mode we want to add this<br />	-- entity to the cleanup and undo lists. This is done like so.<br />	--<br />	cleanup.Add( self.Owner, &quot;props&quot;, ent )<br /> <br />	undo.Create( &quot;Monitor&quot; )<br />		undo.AddEntity( ent )<br />		undo.SetPlayer( self.Owner )<br />	undo.Finish()<br />	<br />	timer.Simple(2.5, function() ent:Remove() end)	<br />	return ent<br />	<br />end<br /><br />	function SWEP:ThrowMonitor( model_file )<br /><br />	-- <br />	-- Play the shoot sound we precached earlier!<br />	--<br />	<br />	local Num = math.random(1,2)<br />	<br />	if Num == 1 then<br />		self:EmitSound( ShootSound )<br />	elseif Num == 2 then<br />		self:EmitSound( ShootSound02 )<br />	<br />	end<br /> <br />	--<br />	-- If we're the client ) then this is as much as we want to do.<br />	-- We play the sound above on the client due to prediction.<br />	-- ( if ( we didn't they would feel a ping delay during multiplayer )<br />	--<br />	if ( CLIENT ) then return end<br /><br />	--<br />	-- Create a prop_physics entity<br />	--<br />	local ent = ents.Create( &quot;prop_physics&quot; )<br /><br />	--<br />	-- Always make sure that created entities are actually created!<br />	--<br />	if (  !IsValid( ent ) ) then return end<br /><br />	--<br />	-- Set the entity's model to the passed in model<br />	--<br />	ent:SetModel( model_file )<br /> <br />	--<br />	-- Set the position to the player's eye position plus 16 units forward.<br />	-- Set the angles to the player'e eye angles. Then spawn it.<br />	--<br />	ent:SetPos( self.Owner:EyePos() + ( self.Owner:GetAimVector() * 16 ) )<br />	ent:SetAngles( self.Owner:EyeAngles() )<br />	ent:Spawn()<br /><br />	--<br />	-- Now get the physics object. Whenever we get a physics object<br />	-- we need to test to make sure its valid before using it.<br />	-- If it isn't ) then we'll remove the entity.<br />	--<br />	local phys = ent:GetPhysicsObject()<br />	if (  !IsValid( phys ) ) then ent:Remove() return end<br /> <br />	--<br />	-- Now we apply the force - so the chair actually throws instead <br />	-- of just falling to the ground. You can play with this value here<br />	-- to adjust how fast we throw it.<br />	--<br />	local velocity = self.Owner:GetAimVector()<br />	velocity = velocity * 3000<br />	velocity = velocity + ( VectorRand() * 2 ) -- a random element<br />	velocity = velocity * phys:GetMass()<br />	phys:ApplyForceCenter( velocity )<br /> <br />	--<br />	-- Assuming we're playing in Sandbox mode we want to add this<br />	-- entity to the cleanup and undo lists. This is done like so.<br />	--<br />	cleanup.Add( self.Owner, &quot;props&quot;, ent )<br /> <br />	undo.Create( &quot;Monitor&quot; )<br />		undo.AddEntity( ent )<br />		undo.SetPlayer( self.Owner )<br />	undo.Finish()<br />	<br />	timer.Simple(10.0, function() ent:Remove() end)	<br />	return ent<br />	<br />end<br /> //Shurik1236</span></div><!--quote --></div></blockquote><!--spoiler -->]]></description>
      <link>https://gmod-fan.com/forum/problems/last/topic-4375.html</link>
      <pubDate>Thu, 04 Sep 2014 17:01:55 +0200</pubDate>
      <author>Shurik123</author>
      <guid isPermaLink="true"><![CDATA[https://gmod-fan.com/forum/problems/last/topic-4375.html]]></guid>
    </item>
  </channel></rss>