Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if SERVER then
- AddCSLuaFile( "shared.lua" )
- end
- if CLIENT then
- SWEP.PrintName = "Magpul"
- SWEP.Slot = 2
- SWEP.Icon = "VGUI/ttt/icon_3g_magpul"
- end
- // Variables that are used on both client and server
- SWEP.Category = "OperatorX's Vitality Pack - Bonus Content"
- SWEP.Author = "OperatorX"
- SWEP.Contact = ""
- SWEP.Purpose = ""
- SWEP.Instructions = ""
- SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models
- SWEP.ShellEjectAttachment = "2" -- Should be "2" for CSS models or "1" for hl2 models
- SWEP.DrawCrosshair = false
- SWEP.ViewModelFOV = 65
- SWEP.ViewModelFlip = true
- SWEP.ViewModel = "models/weapons/v_ops_magp.mdl"
- SWEP.WorldModel = "models/weapons/w_ops_magp.mdl"
- SWEP.Base = "weapon_tttbase"
- SWEP.Spawnable = true
- SWEP.AdminSpawnable = true
- SWEP.Primary.Sound = Sound("opsrif_magp.single")
- SWEP.Primary.Round = ("gdcwa_5.56x45_tracer")
- SWEP.Primary.RPM = 800 // This is in Rounds Per Minute
- SWEP.Primary.ClipSize = 60 // Size of a clip
- SWEP.Primary.DefaultClip = 60 // Default number of bullets in a clip
- SWEP.Primary.ClipMax = 60
- SWEP.Primary.KickUp = 0.3 // Maximum up recoil (rise)
- SWEP.Primary.KickDown = 0.3 // Maximum down recoil (skeet)
- SWEP.Primary.KickHorizontal = 0.3 // Maximum up recoil (stock)
- SWEP.Primary.Automatic = true // Automatic/Semi Auto
- //ttt stuff
- SWEP.Kind = WEAPON_HEAVY
- SWEP.AmmoEnt = "item_ammo_pistol_ttt"
- SWEP.Icon = "VGUI/ttt/icon_3g_magpul"
- if SERVER then
- resource.AddFile("materials/VGUI/ttt/icon_3g_magpul.vmt")
- end
- SWEP.AllowDrop = true
- SWEP.IsSilent = false
- SWEP.NoSights = false
- SWEP.AutoSpawnable = true
- SWEP.data = {} -- The starting firemode
- SWEP.data.ironsights = 1
- SWEP.IronSightsPos = Vector (2.4651, 2.4751, 0.7767)
- SWEP.IronSightsAng = Vector (-2.5, 0, 0)
- SWEP.SightsPos = Vector (2.0034, -4.5619, 0.6593)
- SWEP.SightsAng = Vector (0.1738, -0.0839, 0)
- -- SWEP.SightsPos = Vector (2.003, -4.0193, 0.5892)
- -- SWEP.SightsAng = Vector (0.3668, -0.094, 0)
- SWEP.RunSightsPos = Vector (-3.0328, 0, 1.888)
- SWEP.RunSightsAng = Vector (-24.2146, -36.522, 10)
- -- Crotch gun fix starts below
- SWEP.Offset = {
- Pos = {
- Up = 0,
- Right = 0,
- Forward = 0,
- },
- Ang = {
- Up = 0,
- Right = 0,
- Forward = 0,
- }
- }
- function SWEP:DrawWorldModel( )
- local hand, offset, rotate
- if not ValidEntity( self.Owner ) then
- self:DrawModel( )
- return
- end
- if not self.Hand then
- self.Hand = self.Owner:LookupAttachment( "anim_attachment_rh" )
- end
- hand = self.Owner:GetAttachment( self.Hand )
- if not hand then
- self:DrawModel( )
- return
- end
- offset = hand.Ang:Right( ) * self.Offset.Pos.Right + hand.Ang:Forward( ) * self.Offset.Pos.Forward + hand.Ang:Up( ) * self.Offset.Pos.Up
- hand.Ang:RotateAroundAxis( hand.Ang:Right( ), self.Offset.Ang.Right )
- hand.Ang:RotateAroundAxis( hand.Ang:Forward( ), self.Offset.Ang.Forward )
- hand.Ang:RotateAroundAxis( hand.Ang:Up( ), self.Offset.Ang.Up )
- self:SetRenderOrigin( hand.Pos + offset )
- self:SetRenderAngles( hand.Ang )
- self:DrawModel( )
- end
Advertisement
Add Comment
Please, Sign In to add comment