<?xml version="1.0" encoding="utf-8"?>
<!-- Generated on Thu, 04 Jun 2026 08:13:55 +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-6624.html</link>
    <description>Последние ответы в теме: как добавить прицелв свой swep</description>
    <generator>LogicBoard</generator>
    <item>
      <title>как добавить прицелв свой swep</title>
      <description><![CDATA[как добавить прицелв свой swep так, чтобы при нажатии правой кнопки fow уменьшывался и по средине появлялся прицел<!--br--><br />структура :<!--br--><br />---------------------------------------------------------------------------------<br />-------------------------------|<!--br--><br />--Buzzofwar-- Please do not steal or copy this! I  put much effort and time into perfecting it to make it simple|<!--br--><br />---------------------------------------------------------------------------------<br />-------------------------------|<!--br--><br />//General Settings \\<!--br--><br />SWEP.AdminSpawnable    = true                                -- Is the swep spawnable for admin.<!--br--><br />SWEP.ViewModelFOV       = 65                                 -- How much of the weapon do u see.<!--br--><br />SWEP.ViewModel          = &quot;models/weapons/Payday2/v_rif_famas2.mdl&quot;                             -- The viewModel, the model you se when you are holding it.<!--br--><br />SWEP.WorldModel       = &quot;models/weapons/w_smg_tmp.mdl&quot;                              -- The worlmodel, The model yu when it's down on the ground.<!--br--><br />SWEP.ViewModelFlip       = true                           -- If the model should be fliped when you see it.<!--br--><br />SWEP.UseHands         = false                           -- Weather the player model should use its hands.<!--br--><br />SWEP.AutoSwitchTo       = true                                 -- when someone walks over the swep, chould i automatectly change to your swep.<!--br--><br />SWEP.Slot             = 1                                    -- Deside wich slot you want your swep do be in.<!--br--><br />SWEP.HoldType          = &quot;ar2&quot;                                  -- How the swep is hold Pistol smg greanade melee.<!--br--><br />SWEP.PrintName          = &quot;Para&quot;                                  -- your sweps name.<!--br--><br />SWEP.Author          = &quot;Buzzofwar&quot;                           -- Your name.<!--br--><br />SWEP.Spawnable          = true                                  -- Can everybody spawn this swep.<!--br--><br />SWEP.AutoSwitchFrom    = false                               -- Does the weapon get changed by other sweps if you pick them up.<!--br--><br />SWEP.FiresUnderwater    = true                                -- Does your swep fire under water.<!--br--><br />SWEP.Weight          = 4                                      -- Chose the weight of the Swep.<!--br--><br />SWEP.DrawCrosshair       = true                                 -- Do you want it to have a crosshair.<!--br--><br />SWEP.Category          = &quot;Payday 2 Sweps&quot;                               -- Make your own catogory for the swep.<!--br--><br />SWEP.SlotPos          = 1                                       -- Deside wich slot you want your swep do be in.<!--br--><br />SWEP.DrawAmmo          = true                                    -- Does the ammo show up when you are using it.<!--br--><br />SWEP.ReloadSound       = &quot;&quot;                                -- Reload sound.<!--br--><br />SWEP.Instructions       = &quot;&quot;                                -- How do pepole use your swep.<!--br--><br />SWEP.Contact          = &quot;Buzzofawr&quot;                           -- How Pepole chould contact you.<!--br--><br />SWEP.Purpose          = &quot;&quot;                               -- What is the purpose with this.<!--br--><br />SWEP.base             = &quot;swep_ironsight_base&quot;               -- What base should the swep be based on.<!--br--><br />SWEP.SwayScale         = .1                     <!--br--><br />SWEP.BobScale         = .1<!--br--><br />//General settings\\<!--br--><br />--------------------------------------------------------------------------------|<br /><!--br--><br />SWEP.Base                  = &quot;swep_ironsight_base&quot;<!--br--><br />SWEP.Primary.Ammo               = &quot;smg1&quot;<!--br--><br />SWEP.Primary.Sound             = &quot;pay/Para Fire.wav&quot; <!--br--><br />SWEP.Primary.TakeAmmo          = 1<!--br--><br />SWEP.Primary.Recoil            = .5<!--br--><br />SWEP.Primary.Spread          = .24   <!--br--><br />SWEP.Primary.Damage            = 20<!--br--><br />SWEP.Primary.ClipSize         = 25<!--br--><br />SWEP.Primary.DefaultClip      = 25<!--br--><br />SWEP.Primary.NumberofShots       = 1 <!--br--><br />SWEP.Primary.Delay             = .15<!--br--><br />SWEP.Primary.Force             = 15 <!--br--><br />SWEP.Primary.Automatic         = true<!--br--><br />SWEP.Primary.BulletShot       = true;<!--br--><br />--------------------------------------------------------------------------------|<br /><!--br--><br />SWEP.Secondary.ClipSize         = -1<!--br--><br />SWEP.Secondary.DefaultClip      = -1<!--br--><br />SWEP.Secondary.Automatic      = false<!--br--><br />SWEP.Secondary.Ammo            = &quot;none&quot;<!--br--><br />--------------------------------------------------------------------------------|<br /><!--br--><br />SWEP.IronSightsPos             = Vector(3.5, -3, -.1)<!--br--><br />SWEP.IronSightsAng             = Vector( 0, 0, 0 )<!--br--><br />--------------------------------------------------------------------------------|<br /><!--br--><br />function SWEP:Initialize()  <!--br--><br />      self:SetWeaponHoldType( self.HoldType )<!--br--><br />end <!--br--><br />--------------------------------------------------------------------------------|<br /><!--br--><br />function SWEP:Precache()<!--br--><br />util.PrecacheSound(&quot;&quot;)<!--br--><br />end<!--br--><br />--------------------------------------------------------------------------------|<br /><!--br--><br />function SWEP:Think()   <!--br--><br />end<!--br--><br />--------------------------------------------------------------------------------|<br /><!--br--><br />function SWEP:PrimaryAttack()<!--br--><br />   if ( !self:CanPrimaryAttack() ) then return<!--br--><br />    end<!--br--><br />    local tr = self.Owner:GetEyeTrace();<!--br--><br />   if ( self.Primary.BulletShot ) then<!--br--><br />   local bullet = {} <!--br--><br />   <!--br--><br />      bullet.Num = self.Primary.NumberofShots //The number of shots fired<!--br--><br />      bullet.Src = self.Owner:GetShootPos() //Gets where the bullet comes from<!--br--><br />      bullet.Dir = self.Owner:GetAimVector() //Gets where you're aiming<!--br--><br />      bullet.Spread = Vector( self.Primary.Spread * 0.1 , self.Primary.Spread * 0.1, 0)<!--br--><br />      bullet.Tracer = 1 <!--br--><br />      bullet.Force = self.Primary.Force <!--br--><br />      bullet.Damage = self.Primary.Damage <!--br--><br />      bullet.AmmoType = self.Primary.Ammo <!--br--><br />      self.Owner:FireBullets( bullet );<!--br--><br />   end<!--br--><br />   <!--br--><br />   local rnda = self.Primary.Recoil * -1 <!--br--><br />   local rndb = self.Primary.Recoil * math.random(-1, 1) <!--br--><br />      self:TakePrimaryAmmo(self.Primary.TakeAmmo) <!--br--><br />      self:ShootEffects()<!--br--><br />      self.Weapon:MuzzleFlash()   <!--br--><br />      self:EmitSound(Sound(self.Primary.Sound)) <!--br--><br />      self.Owner:ViewPunch( Angle( rnda,rndb,rnda ) ) <!--br--><br />      self.Weapon:SendWeaponAnim(ACT_VM_PRIMARYATTACK)<!--br--><br />      self.Owner:SetAnimation( PLAYER_ATTACK1 );<!--br--><br />      self:SetNextPrimaryFire( CurTime() + self.Primary.Delay )<!--br--><br />end<!--br--><br />--------------------------------------------------------------------------------|<br /><!--br--><br />function SWEP:Deploy()<!--br--><br />   self.Weapon:SendWeaponAnim(ACT_VM_DRAW);<!--br--><br />   self.Weapon:EmitSound &quot;pay/Para Foley.wav&quot;<!--br--><br />      timer.Simple(.2      ,function() self.Weapon:EmitSound(&quot;pay/Para Pull.wav&quot;       ) end)<!--br--><br />   return true<!--br--><br />end<!--br--><br />--------------------------------------------------------------------------------|<br /><!--br--><br />function SWEP:Holster()<!--br--><br />   self.Weapon:EmitSound &quot;pay/Para Foley.wav&quot;<!--br--><br />   return true<!--br--><br />end<!--br--><br />--------------------------------------------------------------------------------|<br /><!--br--><br />function SWEP:Reload()<!--br--><br />   self:SetNextPrimaryFire( CurTime() + 1.8)<!--br--><br />   if ( self.Weapon:GetNetworkedBool( &quot;reloading&quot;, false ) ) then return end<!--br--><br />   if ( self.Weapon:Clip1() &lt; self.Primary.ClipSize &amp;&amp; self.Owner:GetAmmoCount( self.Primary.Ammo ) &gt; 0 ) then<!--br--><br />      self.Weapon:SetNetworkedBool( &quot;reloading&quot;, true )<!--br--><br />      self.Weapon:SetVar( &quot;reloadtimer&quot;, CurTime() + 0.6 )<!--br--><br />      self.Weapon:SendWeaponAnim(ACT_VM_RELOAD)<!--br--><br />   end<!--br--><br />   end<!--br--><br />--------------------------------------------------------------------------------|<br /><!--br--><br />local Time = CurTime()<!--br--><br />--------------------------------------------------------------------------------|<br /><!--br--><br />function SWEP:Reload()<!--br--><br />   if ( self.Weapon:Ammo1() &lt;= 0 ) then return end<!--br--><br />   if ( self.Weapon:Clip1() &gt;= self.Primary.ClipSize ) then return end<!--br--><br />   if (CurTime() &lt; Time + 0.5) then return end <!--br--><br />   Time = CurTime()<!--br--><br />   <!--br--><br />   timer.Simple(1.5      ,function() self.Weapon:EmitSound(&quot;pay/Para Mag In.wav&quot;       ) end)<!--br--><br />   timer.Simple(.5      ,function() self.Weapon:EmitSound(&quot;pay/Para Mag Out.wav&quot;         ) end)<!--br--><br />   timer.Simple(2.5      ,function() self.Weapon:EmitSound(&quot;pay/Para Mag Click.wav&quot;         ) end)<!--br--><br />   <!--br--><br />   self.Owner:SetAnimation(PLAYER_RELOAD)<!--br--><br />   self.Weapon:DefaultReload(ACT_VM_RELOAD)<!--br--><br />end <!--br--><br />---------------------------------------------------------------------------------<br />-------------------------------|]]></description>
      <link>https://gmod-fan.com/forum/problems/last/topic-6624.html</link>
      <pubDate>Sat, 14 Apr 2018 18:13:09 +0200</pubDate>
      <author>SWAG_FNAF1</author>
      <guid isPermaLink="true"><![CDATA[https://gmod-fan.com/forum/problems/last/topic-6624.html]]></guid>
    </item>
  </channel></rss>