Advertisement
karatewalrus

Freedom SR for Gmod ttt

Jul 19th, 2019
538
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.22 KB | None | 0 0
  1. -- TTT Code --
  2.  
  3. SWEP.AutoSpawnable = true
  4.  
  5. SWEP.AmmoEnt = "item_ammo_357_ttt"
  6.  
  7. SWEP.Slot = 2 -- Slot in the weapon selection menu. Subtract 1, as this starts at 0.
  8.  
  9. SWEP.AllowDrop = true
  10. SWEP.Kind = WEAPON_HEAVY
  11.  
  12. if CLIENT then
  13.  
  14. SWEP.Icon = "vgui/hud/tfa_ins2_codol_free"
  15.  
  16. SWEP.EquipMenuData = {
  17. type = "Weapon",
  18. desc = "Freedom SR"
  19. };
  20. end
  21. if SERVER then
  22. resource.AddFile("materials/VGUI/hud/tfa_ins2_codol_free.vmt")
  23. end
  24. -- End of TTT Code --
  25.  
  26.  
  27. SWEP.Gun = ("codol_freedom") -- must be the name of your gun
  28. SWEP.Base = "tfa_gun_base"
  29. SWEP.Category = "TFA Insurgency for TTT" --The category. Please, just choose something generic or something I've already done if you plan on only doing like one swep..
  30. SWEP.Manufacturer = "Freedom" --Gun Manufactrer (e.g. Hoeckler and Koch )
  31. SWEP.Author = "TFA & Karate Walrus" --Author Tooltip
  32. SWEP.Contact = "http://steamcommunity.com/profiles/76561198161775645" --Contact Info Tooltip
  33. SWEP.Purpose = "" --Purpose Tooltip
  34. SWEP.Instructions = "" --Instructions Tooltip
  35. SWEP.Spawnable = true --Can you, as a normal user, spawn this?
  36. SWEP.AdminSpawnable = false --Can an adminstrator spawn this? Does not tie into your admin mod necessarily, unless its coded to allow for GMod's default ranks somewhere in its code. Evolve and ULX should work, but try to use weapon restriction rather than these.
  37. SWEP.DrawCrosshair = false -- Draw the crosshair?
  38. SWEP.DrawCrosshairIS = false --Draw the crosshair in ironsights?
  39. SWEP.PrintName = "Freedom SR" -- Weapon name (Shown on HUD)
  40. SWEP.SlotPos = 73 -- Position in the slot
  41. SWEP.AutoSwitchTo = false -- Auto switch to if we pick it up
  42. SWEP.AutoSwitchFrom = false -- Auto switch from if you pick up a better weapon
  43. SWEP.Weight = 0 -- This controls how "good" the weapon is for autopickup.
  44.  
  45. --[[WEAPON HANDLING]]--
  46. SWEP.Primary.Sound = Sound("TFA_INS2_CODOL_FREEDOM.1") -- This is the sound of the weapon, when you shoot.
  47. SWEP.Primary.SilencedSound = Sound("TFA_INS2_CODOL_FREEDOM.2") -- This is the sound of the weapon, when silenced.
  48. SWEP.Primary.PenetrationMultiplier = 1 --Change the amount of something this gun can penetrate through
  49. SWEP.Primary.Damage = 100 -- Damage, in standard damage points.
  50. SWEP.Primary.DamageTypeHandled = true --true will handle damagetype in base
  51. SWEP.Primary.DamageType = bit.bor(DMG_BULLET,DMG_AIRBOAT) --See DMG enum. This might be DMG_SHOCK, DMG_BURN, DMG_BULLET, etc. Leave nil to autodetect. DMG_AIRBOAT opens doors.
  52. SWEP.Primary.Force = nil --Force value, leave nil to autocalc
  53. SWEP.Primary.Knockback = nil --Autodetected if nil; this is the velocity kickback
  54. SWEP.Primary.HullSize = 0 --Big bullets, increase this value. They increase the hull size of the hitscan bullet.
  55. SWEP.Primary.NumShots = 1 --The number of shots the weapon fires. SWEP.Shotgun is NOT required for this to be >1.
  56. SWEP.Primary.Automatic = false -- Automatic/Semi Auto
  57. SWEP.Primary.RPM = 38 -- This is in Rounds Per Minute / RPM
  58. SWEP.Primary.RPM_Semi = nil -- RPM for semi-automatic or burst fire. This is in Rounds Per Minute / RPM
  59. SWEP.Primary.RPM_Burst = nil -- RPM for burst fire, overrides semi. This is in Rounds Per Minute / RPM
  60. SWEP.Primary.DryFireDelay = 0.3 --How long you have to wait after firing your last shot before a dryfire animation can play. Leave nil for full empty attack length. Can also use SWEP.StatusLength[ ACT_VM_BLABLA ]
  61. SWEP.Primary.BurstDelay = nil -- Delay between bursts, leave nil to autocalculate
  62. SWEP.FiresUnderwater = true
  63. --Miscelaneous Sounds
  64. SWEP.IronInSound = Sound("TFA_INS2.IronIn") --Sound to play when ironsighting in? nil for default
  65. SWEP.IronOutSound = Sound("TFA_INS2.IronOut") --Sound to play when ironsighting out? nil for default
  66. --Silencing
  67. SWEP.CanBeSilenced = false --Can we silence? Requires animations.
  68. SWEP.Silenced = false --Silenced by default?
  69. -- Selective Fire Stuff
  70. SWEP.SelectiveFire = false --Allow selecting your firemode?
  71. SWEP.DisableBurstFire = false --Only auto/single?
  72. SWEP.OnlyBurstFire = false --No auto, only burst/single?
  73. SWEP.DefaultFireMode = "" --Default to auto or whatev
  74. SWEP.FireModeName = nil --Change to a text value to override it
  75. --Ammo Related
  76. SWEP.Primary.ClipSize = 6 -- This is the size of a clip
  77. SWEP.Primary.DefaultClip = 6
  78. -- This is the number of bullets the gun gives you, counting a clip as defined directly above.
  79. SWEP.Primary.Ammo = "357" -- What kind of ammo. Options, besides custom, include pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, and AirboatGun.
  80. SWEP.Primary.AmmoConsumption = 1 --Ammo consumed per shot
  81. --Pistol, buckshot, and slam like to ricochet. Use AirboatGun for a light metal peircing shotgun pellets
  82. SWEP.DisableChambering = true --Disable round-in-the-chamber
  83. --Recoil Related
  84. SWEP.Primary.KickUp = 0.7 -- This is the maximum upwards recoil (rise)
  85. SWEP.Primary.KickDown = 0.5 -- This is the maximum downwards recoil (skeet)
  86. SWEP.Primary.KickHorizontal = 0.4 -- This is the maximum sideways recoil (no real term)
  87. SWEP.Primary.StaticRecoilFactor = 0.2 --Amount of recoil to directly apply to EyeAngles. Enter what fraction or percentage (in decimal form) you want. This is also affected by a convar that defaults to 0.5.
  88. --Firing Cone Related
  89. SWEP.Primary.Spread = .02 --This is hip-fire acuracy. Less is more (1 is horribly awful, .0001 is close to perfect)
  90. SWEP.Primary.IronAccuracy = .001 -- Ironsight accuracy, should be the same for shotguns
  91. --Unless you can do this manually, autodetect it. If you decide to manually do these, uncomment this block and remove this line.
  92. SWEP.Primary.SpreadMultiplierMax = 5--How far the spread can expand when you shoot. Example val: 2.5
  93. SWEP.Primary.SpreadIncrement = 1 --What percentage of the modifier is added on, per shot. Example val: 1/3.5
  94. SWEP.Primary.SpreadRecovery = 3--How much the spread recovers, per second. Example val: 3
  95. --Range Related
  96. SWEP.Primary.Range = 550 * 48 -- The distance the bullet can travel in source units. Set to -1 to autodetect based on damage/rpm.
  97. SWEP.Primary.RangeFalloff = 0.5 -- The percentage of the range the bullet damage starts to fall off at. Set to 0.8, for example, to start falling off after 80% of the range.
  98. --Penetration Related
  99. SWEP.MaxPenetrationCounter = 4 --The maximum number of ricochets. To prevent stack overflows.
  100. --Misc
  101. SWEP.IronRecoilMultiplier = 0.6 --Multiply recoil by this factor when we're in ironsights. This is proportional, not inversely.
  102. SWEP.CrouchAccuracyMultiplier = 0.5 --Less is more. Accuracy * 0.5 = Twice as accurate, Accuracy * 0.1 = Ten times as accurate
  103. --Movespeed
  104. SWEP.MoveSpeed = 0.85 --Multiply the player's movespeed by this.
  105. SWEP.IronSightsMoveSpeed = SWEP.MoveSpeed * 0.8 --Multiply the player's movespeed by this when sighting.
  106. --[[PROJECTILES]]--
  107. SWEP.ProjectileEntity = nil --Entity to shoot
  108. SWEP.ProjectileVelocity = 0 --Entity to shoot's velocity
  109. SWEP.ProjectileModel = nil --Entity to shoot's model
  110. --[[VIEWMODEL]]--
  111. SWEP.ViewModel = "models/weapons/tfa_ins2/c_codol_freedom.mdl" --Viewmodel path
  112. SWEP.ViewModelFOV = 56 -- This controls how big the viewmodel looks. Less is more.
  113. SWEP.ViewModelFlip = false -- Set this to true for CSS models, or false for everything else (with a righthanded viewmodel.)
  114. SWEP.UseHands = true --Use gmod c_arms system.
  115. SWEP.VMPos = Vector(0,0,0) --The viewmodel positional offset, constantly. Subtract this from any other modifications to viewmodel position.
  116. SWEP.VMAng = Vector(0,0,0) --The viewmodel angular offset, constantly. Subtract this from any other modifications to viewmodel angle.
  117. SWEP.VMPos_Additive = false --Set to false for an easier time using VMPos. If true, VMPos will act as a constant delta ON TOP OF ironsights, run, whateverelse
  118. SWEP.CenteredPos = nil --The viewmodel positional offset, used for centering. Leave nil to autodetect using ironsights.
  119. SWEP.CenteredAng = nil --The viewmodel angular offset, used for centering. Leave nil to autodetect using ironsights.
  120. SWEP.Bodygroups_V = nil --{
  121. --[0] = 1,
  122. --[1] = 4,
  123. --[2] = etc.
  124. --}
  125. --[[WORLDMODEL]]--
  126. SWEP.WorldModel = "models/weapons/tfa_ins2/w_codol_freedom.mdl" -- Weapon world model path
  127. SWEP.Bodygroups_W = nil --{
  128. --[0] = 1,
  129. --[1] = 4,
  130. --[2] = etc.
  131. --}
  132. SWEP.HoldType = "ar2" -- This is how others view you carrying the weapon. Options include:
  133. -- normal melee melee2 fist knife smg ar2 pistol rpg physgun grenade shotgun crossbow slam passive
  134. -- You're mostly going to use ar2, smg, shotgun or pistol. rpg and crossbow make for good sniper rifles
  135. SWEP.Offset = {
  136. Pos = {
  137. Up = -1,
  138. Right = 0.811,
  139. Forward = 4
  140. },
  141. Ang = {
  142. Up = 0,
  143. Right = -9.5,
  144. Forward = 180
  145. },
  146. Scale = 0.7
  147. } --Procedural world model animation, defaulted for CS:S purposes.
  148.  
  149. --Vector(4.637, 0.811, -0.454), angle = Angle(-12.523, 0, 180)
  150.  
  151. SWEP.ThirdPersonReloadDisable = false --Disable third person reload? True disables.
  152. --[[SCOPES]]--
  153. SWEP.IronSightsSensitivity = .3 --Useful for a RT scope. Change this to 0.25 for 25% sensitivity. This is if normal FOV compenstaion isn't your thing for whatever reason, so don't change it for normal scopes.
  154. SWEP.BoltAction = false --Unscope/sight after you shoot?
  155. SWEP.Scoped = false --Draw a scope overlay?
  156. SWEP.ScopeOverlayThreshold = 0.875 --Percentage you have to be sighted in to see the scope.
  157. SWEP.BoltTimerOffset = 0.25 --How long you stay sighted in after shooting, with a bolt action.
  158. SWEP.ScopeScale = 0.5 --Scale of the scope overlay
  159. SWEP.ReticleScale = 0.7 --Scale of the reticle overlay
  160.  
  161.  
  162. --[[SPRINTING]]--
  163. SWEP.RunSightsPos = Vector(0, 0, 0)
  164. SWEP.RunSightsAng = Vector(-11.869, 17.129, -16.056)
  165.  
  166. --[[IRONSIGHTS]]--
  167. SWEP.data = {}
  168. SWEP.data.ironsights = 1 --Enable Ironsights
  169. SWEP.Secondary.IronFOV = 75 -- How much you 'zoom' in. Less is more! Don't have this be <= 0. A good value for ironsights is like 70.
  170. SWEP.IronSightsPos = Vector(-3.806, -8, 1.222)
  171. SWEP.IronSightsAng = Vector(0, 0, 0)
  172.  
  173. --[[
  174. SWEP.IronSightsPos_Kobra = Vector(-3.89, -4, 0.944)
  175. SWEP.IronSightsAng_Kobra = Vector(0.1, -0.095, 0)
  176.  
  177. SWEP.IronSightsPos_EOTech = Vector(-3.888, -7, 0.66)
  178. SWEP.IronSightsAng_EOTech = Vector(0.1, -0.095, 0)
  179.  
  180. SWEP.IronSightsPos_RDS = Vector(-3.888, -7, 0.585)
  181. SWEP.IronSightsAng_RDS = Vector(0.1, -0.095, 0)
  182.  
  183. SWEP.IronSightsPos_2XRDS = Vector(-3.877, -7, 0.589)
  184. SWEP.IronSightsAng_2XRDS = Vector(0, 0, 0)
  185.  
  186. SWEP.IronSightsPos_C79 = Vector(-3.877, -5, 0.166)
  187. SWEP.IronSightsAng_C79 = Vector(0, 0, 0)
  188.  
  189. SWEP.IronSightsPos_PO4X = Vector(-3.79, -5, 0.825)
  190. SWEP.IronSightsAng_PO4X = Vector(0, 0, 0)
  191.  
  192. SWEP.IronSightsPos_Mosin = Vector(-3.85, -6, 1.126)
  193. SWEP.IronSightsAng_Mosin = Vector(0, 0, 0)
  194.  
  195. SWEP.IronSightsPos_MX4 = Vector(-3.89, -6, 0.817)
  196. SWEP.IronSightsAng_MX4 = Vector(0, 0, 0)
  197.  
  198. ]]--
  199.  
  200. --[[INSPECTION]]--
  201. SWEP.InspectPos = Vector(5, -5.619, -2.787)
  202. SWEP.InspectAng = Vector(22.386, 34.417, 5)
  203. --[[VIEWMODEL ANIMATION HANDLING]]--
  204. SWEP.AllowViewAttachment = true --Allow the view to sway based on weapon attachment while reloading or drawing, IF THE CLIENT HAS IT ENABLED IN THEIR CONVARS.
  205. --[[VIEWMODEL BLOWBACK]]--
  206. SWEP.BlowbackEnabled = false --Enable Blowback?
  207. SWEP.BlowbackVector = Vector(0,-1,0) --Vector to move bone <or root> relative to bone <or view> orientation.
  208. SWEP.BlowbackCurrentRoot = 0 --Amount of blowback currently, for root
  209. SWEP.BlowbackCurrent = 0 --Amount of blowback currently, for bones
  210. SWEP.BlowbackBoneMods = nil --Viewmodel bone mods via SWEP Creation Kit
  211. SWEP.Blowback_Only_Iron = true --Only do blowback on ironsights
  212. SWEP.Blowback_PistolMode = false --Do we recover from blowback when empty?
  213. SWEP.Blowback_Shell_Enabled = true --Shoot shells through blowback animations
  214. SWEP.Blowback_Shell_Effect = "RifleShellEject"--Which shell effect to use
  215. --[[VIEWMODEL PROCEDURAL ANIMATION]]--
  216. SWEP.DoProceduralReload = false--Animate first person reload using lua?
  217. SWEP.ProceduralReloadTime = 1 --Procedural reload time?
  218. --[[HOLDTYPES]]--
  219. SWEP.IronSightHoldTypeOverride = "" --This variable overrides the ironsights holdtype, choosing it instead of something from the above tables. Change it to "" to disable.
  220. SWEP.SprintHoldTypeOverride = "" --This variable overrides the sprint holdtype, choosing it instead of something from the above tables. Change it to "" to disable.
  221. --[[ANIMATION]]--
  222.  
  223. SWEP.StatusLengthOverride = {
  224. [ACT_VM_RELOAD] = 66 / 30,
  225. [ACT_VM_RELOAD_EMPTY] = 66 / 30,
  226. --["foregrip_reload"] = 66 / 30,
  227. --["foregrip_reload_empty"] = 66 / 30
  228. } --Changes the status delay of a given animation; only used on reloads. Otherwise, use SequenceLengthOverride or one of the others
  229. SWEP.SequenceLengthOverride = {} --Changes both the status delay and the nextprimaryfire of a given animation
  230. SWEP.SequenceRateOverride = {} --Like above but changes animation length to a target
  231. SWEP.SequenceRateOverrideScaled = {} --Like above but scales animation length rather than being absolute
  232.  
  233. SWEP.ProceduralHoslterEnabled = nil
  234. SWEP.ProceduralHolsterTime = 0.3
  235. SWEP.ProceduralHolsterPos = Vector(3, 0, -5)
  236. SWEP.ProceduralHolsterAng = Vector(-40, -30, 10)
  237.  
  238. SWEP.Sights_Mode = TFA.Enum.LOCOMOTION_HYBRID -- ANI = mdl, HYBRID = lua but continue idle, Lua = stop mdl animation
  239. SWEP.Sprint_Mode = TFA.Enum.LOCOMOTION_LUA -- ANI = mdl, HYBRID = ani + lua, Lua = lua only
  240. SWEP.SprintBobMult = 2
  241. SWEP.Idle_Mode = TFA.Enum.IDLE_BOTH --TFA.Enum.IDLE_DISABLED = no idle, TFA.Enum.IDLE_LUA = lua idle, TFA.Enum.IDLE_ANI = mdl idle, TFA.Enum.IDLE_BOTH = TFA.Enum.IDLE_ANI + TFA.Enum.IDLE_LUA
  242. SWEP.Idle_Blend = 0.25 --Start an idle this far early into the end of a transition
  243. SWEP.Idle_Smooth = 0.05 --Start an idle this far early into the end of another animation
  244. --MDL Animations Below
  245. SWEP.IronAnimation = {
  246. ["shoot"] = {
  247. ["type"] = TFA.Enum.ANIMATION_ACT, --Sequence or act
  248. ["value"] = ACT_VM_PRIMARYATTACK_1, --Number for act, String/Number for sequence
  249. ["value_empty"] = ACT_VM_PRIMARYATTACK_3
  250. } --What do you think
  251. }
  252.  
  253. SWEP.SprintAnimation = {
  254. ["loop"] = {
  255. ["type"] = TFA.Enum.ANIMATION_SEQ, --Sequence or act
  256. ["value"] = "base_sprint", --Number for act, String/Number for sequence
  257. ["is_idle"] = true
  258. }
  259. }
  260. --[[EFFECTS]]--
  261. --Attachments
  262. SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models
  263. SWEP.ShellAttachment = "2" -- Should be "2" for CSS models or "shell" for hl2 models
  264. SWEP.MuzzleFlashEnabled = true --Enable muzzle flash
  265. SWEP.MuzzleAttachmentRaw = nil --This will override whatever string you gave. This is the raw attachment number. This is overridden or created when a gun makes a muzzle event.
  266. SWEP.AutoDetectMuzzleAttachment = false --For multi-barrel weapons, detect the proper attachment?
  267. SWEP.MuzzleFlashEffect = "tfa_muzzleflash_sniper_energy" --Change to a string of your muzzle flash effect. Copy/paste one of the existing from the base.
  268. SWEP.SmokeParticle = nil --Smoke particle (ID within the PCF), defaults to something else based on holdtype; "" to disable
  269. SWEP.EjectionSmokeEnabled = false --Disable automatic ejection smoke
  270. --Shell eject override
  271. SWEP.LuaShellEject = false --Enable shell ejection through lua?
  272. SWEP.LuaShellEjectDelay = 0 --The delay to actually eject things
  273. SWEP.LuaShellEffect = "RifleShellEject" --The effect used for shell ejection; Defaults to that used for blowback
  274. --Tracer Stuff
  275. SWEP.TracerName = "tfa_tracer_gauss" --Change to a string of your tracer name. Can be custom. There is a nice example at https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/base/entities/effects/tooltracer.lua
  276. SWEP.TracerCount = 0 --0 disables, otherwise, 1 in X chance
  277. --Impact Effects
  278. SWEP.ImpactEffect = nil --Impact Effect
  279. SWEP.ImpactDecal = "FadingScorch"--Impact Decal
  280. --[[EVENT TABLE]]--
  281. --example:
  282. --SWEP.EventTable = {
  283. -- [ACT_VM_RELOAD] = {
  284. -- { ["time"] = 0.1, ["type"] = "lua", ["value"] = function( wep, viewmodel ) end, ["client"] = true, ["server"] = true},
  285. -- { ["time"] = 0.1, ["type"] = "sound", ["value"] = Sound("x") }
  286. -- }
  287. --}
  288. --[[RENDER TARGET]]--
  289. SWEP.RTMaterialOverride = nil -- Take the material you want out of print(LocalPlayer():GetViewModel():GetMaterials()), subtract 1 from its index, and set it to this.
  290. SWEP.RTOpaque = false -- Do you want your render target to be opaque?
  291. SWEP.RTCode = nil--function(self) return end --This is the function to draw onto your rendertarget
  292. --[[AKIMBO]]--
  293. SWEP.Akimbo = false --Akimbo gun? Alternates between primary and secondary attacks.
  294. SWEP.AnimCycle = 0 -- Start on the right
  295. --[[ATTACHMENTS]]--
  296.  
  297. SWEP.VElements = {
  298. ["sights_folded"] = { type = "Model", model = "models/weapons/tfa_ins2/upgrades/a_standard_codol_freedom.mdl", bone = "A_Optic", rel = "", pos = Vector(0, 0, 0), angle = Angle(0, 0, 0), size = Vector(0.5, 0.5, 0.5), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {}, active = true, bonemerge = true },
  299. --[[
  300. ["sight_kobra"] = { type = "Model", model = "models/weapons/tfa_ins2/upgrades/a_optic_kobra_l.mdl", bone = "A_Optic", rel = "", pos = Vector(0, 0, 0), angle = Angle(0, 0, 0), size = Vector(0.5, 0.5, 0.5), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {}, active = false, bonemerge = true },
  301. ["sight_kobra_lens"] = (TFA.INS2 and TFA.INS2.GetHoloSightReticle) and TFA.INS2.GetHoloSightReticle("sight_kobra") or nil,
  302. ["sight_eotech"] = { type = "Model", model = "models/weapons/tfa_ins2/upgrades/a_optic_eotech_l.mdl", bone = "A_Optic", rel = "", pos = Vector(0, 0, 0), angle = Angle(0, 0, 0), size = Vector(0.5, 0.5, 0.5), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {}, active = false, bonemerge = true },
  303. ["sight_eotech_lens"] = (TFA.INS2 and TFA.INS2.GetHoloSightReticle) and TFA.INS2.GetHoloSightReticle("sight_eotech") or nil,
  304. ["sight_rds"] = { type = "Model", model = "models/weapons/tfa_ins2/upgrades/a_optic_aimpoint_l.mdl", bone = "A_Optic", rel = "", pos = Vector(0, 0, 0), angle = Angle(0, 0, 0), size = Vector(0.5, 0.5, 0.5), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {}, active = false, bonemerge = true },
  305. ["sight_rds_lens"] = (TFA.INS2 and TFA.INS2.GetHoloSightReticle) and TFA.INS2.GetHoloSightReticle("sight_rds") or nil,
  306. ["scope_2xrds"] = { type = "Model", model = "models/weapons/tfa_ins2/upgrades/a_optic_aimp2x_l.mdl", bone = "A_Optic", rel = "", pos = Vector(0, 0, 0), angle = Angle(0, 0, 0), size = Vector(0.5, 0.5, 0.5), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {}, active = false, bonemerge = true },
  307. ["scope_2xrds_lens"] = { type = "Model", model = "models/rtcircle.mdl", bone = "Lense_RT", rel = "scope_2xrds", pos = Vector(0, 0, -0.108), angle = Angle(-90, 0, -90), size = Vector(0.3, 0.3, 0.3), color = Color(255, 255, 255, 255), surpresslightning = false, material = "!tfa_rtmaterial", skin = 0, bodygroup = {}, active = false },
  308. ["scope_c79"] = { type = "Model", model = "models/weapons/tfa_ins2/upgrades/a_optic_elcan_l.mdl", bone = "A_Optic", rel = "", pos = Vector(0, 0, 0), angle = Angle(0, 0, 0), size = Vector(0.5, 0.5, 0.5), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {}, active = false, bonemerge = true },
  309. ["scope_c79_lens"] = { type = "Model", model = "models/rtcircle.mdl", bone = "Lense_RT", rel = "scope_c79", pos = Vector(0, -0.08, 0), angle = Angle(0, 90, 0), size = Vector(0.5, 0.5, 0.5), color = Color(255, 255, 255, 255), surpresslightning = false, material = "!tfa_rtmaterial", skin = 0, bodygroup = {}, active = false },
  310. ["scope_po4x"] = { type = "Model", model = "models/weapons/tfa_ins2/upgrades/a_optic_po4x24_l.mdl", bone = "ValveBiped.Bip01_Spine4", rel = "", pos = Vector(0, 0, 0), angle = Angle(0, 0, 0), size = Vector(1, 1, 1), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {}, active = false, bonemerge = true },
  311. ["scope_po4x_lens"] = { type = "Model", model = "models/rtcircle.mdl", bone = "Lense_RT", rel = "scope_po4x", pos = Vector(0, 0, -1.6), angle = Angle(-90, 0, -90), size = Vector(0.3, 0.3, 0.3), color = Color(255, 255, 255, 255), surpresslightning = false, material = "!tfa_rtmaterial", skin = 0, bodygroup = {}, active = false },
  312. ["scope_mx4"] = { type = "Model", model = "models/weapons/tfa_ins2/upgrades/a_optic_m40_l.mdl", bone = "ValveBiped.Bip01_Spine4", rel = "", pos = Vector(0, 0, 0), angle = Angle(0, 0, 0), size = Vector(0.5, 0.5, 0.5), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {}, active = false, bonemerge = true },
  313. ["scope_mx4_lens"] = { type = "Model", model = "models/rtcircle.mdl", bone = "RT", rel = "scope_mx4", pos = Vector(0, -0.42, 0), angle = Angle(0, 90, 0), size = Vector(0.522, 0.522, 0.522), color = Color(255, 255, 255, 255), surpresslightning = false, material = "!tfa_rtmaterial", skin = 0, bodygroup = {}, bonemerge = false, active = false },
  314. ["scope_mosin"] = { type = "Model", model = "models/weapons/tfa_ins2/upgrades/a_optic_mosin_l.mdl", bone = "ValveBiped.Bip01_Spine4", rel = "", pos = Vector(0, 0, 0), angle = Angle(0, 0, 0), size = Vector(0.5, 0.5, 0.5), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {}, active = false, bonemerge = true },
  315. ["scope_mosin_lens"] = { type = "Model", model = "models/rtcircle.mdl", bone = "RT", rel = "scope_mosin", pos = Vector(0, -0.783, 0), angle = Angle(0, 90, 0), size = Vector(0.421, 0.421, 0.421), color = Color(255, 255, 255, 255), surpresslightning = false, material = "!tfa_rtmaterial", skin = 0, bodygroup = {}, bonemerge = false, active = false},
  316. ["suppressor"] = { type = "Model", model = "models/weapons/tfa_ins2/upgrades/a_suppressor_sterling.mdl", bone = "A_Suppressor", rel = "", pos = Vector(2, -25, 2), angle = Angle(0, -90, 0), size = Vector(0.7, 0.7, 0.7), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {} , bonemerge = false, active = false },
  317. ["foregrip"] = { type = "Model", model = "models/weapons/tfa_ins2/upgrades/a_foregrip_sec.mdl", bone = "A_Foregrip", rel = "", pos = Vector(0, -0.245, 0.159), angle = Angle(0, -90, 0), size = Vector(0.611, 0.611, 0.611), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {}, bonemerge = false, active = false},
  318. ["laser"] = { type = "Model", model = "models/weapons/tfa_ins2/upgrades/a_laser_band.mdl", bone = "A_Underbarrel", rel = "", pos = Vector(0.018, -0.87, 1.044), angle = Angle(0, 0, 90), size = Vector(1, 1, 1), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {}, bonemerge = false, active = false},
  319. ["laser_beam"] = { type = "Model", model = "models/tfa/lbeam.mdl", bone = "ValveBiped.Bip01_Spine4", rel = "laser", pos = Vector(0, 0, -2.085), angle = Angle(0, 0, 0), size = Vector(0.5, 0.5, 0.5), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {}, bonemerge = false, active = false}
  320. ]]--
  321. }
  322.  
  323. SWEP.WElements = {
  324. ["ref"] = { type = "Model", model = SWEP.WorldModel, bone = "oof", rel = "", pos = Vector(0, 0, 0), angle = Angle(0, 0, 0), size = Vector(1, 1, 1), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {}, bonemerge = true, active = false },
  325. --[[
  326. ["sight_eotech"] = { type = "Model", model = "models/weapons/tfa_ins2/upgrades/w_eotech.mdl", bone = "ATTACH_ModKit", rel = "ref", pos = Vector(0, 0, 0), angle = Angle(0, 0, 0), size = Vector(1, 1, 1), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {}, bonemerge = true, active = false },
  327. ["scope_po4x"] = { type = "Model", model = "models/weapons/tfa_ins2/upgrades/w_po.mdl", bone = "ATTACH_ModKit", rel = "ref", pos = Vector(0, 0, 0), angle = Angle(0, 0, 0), size = Vector(1, 1, 1), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {}, bonemerge = true, active = false },
  328. ["scope_c79"] = { type = "Model", model = "models/weapons/tfa_ins2/upgrades/w_elcan.mdl", bone = "ATTACH_ModKit", rel = "ref", pos = Vector(0, 0, 0), angle = Angle(0, 0, 0), size = Vector(1, 1, 1), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {}, bonemerge = true, active = false },
  329. ["scope_mosin"] = { type = "Model", model = "models/weapons/tfa_ins2/upgrades/w_scope_mosin.mdl", bone = "ATTACH_ModKit", rel = "ref", pos = Vector(0, 0, 0), angle = Angle(0, 0, 0), size = Vector(1, 1, 1), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {}, bonemerge = true, active = false },
  330. ["sight_kobra"] = { type = "Model", model = "models/weapons/tfa_ins2/upgrades/w_kobra.mdl", bone = "ATTACH_ModKit", rel = "ref", pos = Vector(0, 0, 0), angle = Angle(0, 0, 0), size = Vector(1, 1, 1), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {}, bonemerge = true, active = false },
  331. ["scope_mx4"] = { type = "Model", model = "models/weapons/tfa_ins2/upgrades/w_scope_m40.mdl", bone = "ATTACH_ModKit", rel = "ref", pos = Vector(0, 0, 0), angle = Angle(0, 0, 0), size = Vector(1, 1, 1), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {}, bonemerge = true, active = false },
  332. ["scope_2xrds"] = { type = "Model", model = "models/weapons/tfa_ins2/upgrades/w_magaim.mdl", bone = "ATTACH_ModKit", rel = "ref", pos = Vector(0, 0, 0), angle = Angle(0, 0, 0), size = Vector(1, 1, 1), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {}, bonemerge = true, active = false },
  333. ["sight_rds"] = { type = "Model", model = "models/weapons/tfa_ins2/upgrades/w_aimpoint.mdl", bone = "ATTACH_ModKit", rel = "ref", pos = Vector(0, 0, 0), angle = Angle(0, 0, 0), size = Vector(1, 1, 1), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {}, bonemerge = true, active = false },
  334. ["foregrip"] = { type = "Model", model = "models/weapons/tfa_ins2/upgrades/w_foregrip_sec1.mdl", bone = "ATTACH_Foregrip", rel = "ref", pos = Vector(0, 0, 0), angle = Angle(0, 0, 0), size = Vector(1, 1, 1), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {}, bonemerge = true, active = false },
  335. ]]--
  336. }
  337.  
  338.  
  339. --traitor check
  340.  
  341. --function SWEP:GetViewModelPosition(position, angle)
  342. --local owner = self.Owner;
  343.  
  344. --[[function SWEP:DrawHUD()
  345.  
  346. local client = LocalPlayer()
  347.  
  348. if client.IsTraitor and client:IsTraitor() then
  349.  
  350. print(client)
  351.  
  352. //weapon stat changes go here and remember to try and end this script after changes have been made - maybe start it again at start of new
  353. //round so it's not always running?
  354.  
  355. else
  356.  
  357. print("not traitor")
  358.  
  359. end
  360.  
  361. end]]--
  362.  
  363.  
  364. --[[
  365.  
  366. SWEP.Attachments = {
  367. --[1] = { offset = { 0, 0 }, atts = { "ins2_br_supp" }, order = 1 },
  368. --[7] = { offset = { 0, 0 }, atts = { "ins2_si_kobra", "ins2_si_eotech", "ins2_si_rds", "ins2_si_2xrds", "ins2_si_c79", "ins2_si_po4x", "ins2_si_mosin", "ins2_si_mx4" }, order = 2 },
  369. --[8] = { offset = { 0, 0 }, atts = { "ins2_fg_grip" }, order = 3 },
  370. --[9] = { offset = { 0, 0 }, atts = { "ins2_ub_laser" }, order = 4 },
  371. --[6] = { offset = { 0, 0 }, atts = { "codol_free_bg", "codol_free_ry", "codol_free_sf" }, order = 5 }
  372. }
  373.  
  374. ]]--
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381. --[[
  382. SWEP.AttachmentDependencies = {}--{["si_acog"] = {"bg_rail"}}
  383. SWEP.AttachmentExclusions = {}--{ ["si_iron"] = {"bg_heatshield"} }
  384.  
  385. SWEP.MuzzleAttachmentSilenced = 3
  386.  
  387. SWEP.LaserSightModAttachment = 1
  388. SWEP.LaserSightModAttachmentWorld = 1
  389.  
  390. SWEP.RTAttachment_2XRDS = 7
  391. SWEP.ScopeOverlayTransforms_2XRDS = {
  392. 0, -0.475
  393. }
  394. SWEP.ScopeDistanceRange_2XRDS = 16
  395. SWEP.ScopeDistanceMin_2XRDS = 8
  396.  
  397. SWEP.RTAttachment_C79 = 7
  398. SWEP.ScopeOverlayTransforms_C79 = {
  399. 0.00,-0.475
  400. }
  401. SWEP.ScopeDistanceRange_C79 = 14
  402. SWEP.ScopeDistanceMin_C79 = 10
  403.  
  404. SWEP.RTAttachment_PO4X = 7
  405. SWEP.ScopeOverlayTransforms_PO4X = {
  406. -0.008,-0.34
  407. }
  408. SWEP.ScopeDistanceRange_PO4X = 12
  409. SWEP.ScopeDistanceMin_PO4X = 10
  410.  
  411. SWEP.RTAttachment_Mosin = 7
  412. SWEP.ScopeOverlayTransforms_Mosin = {
  413. 0, -0.305
  414. }
  415. SWEP.ScopeDistanceRange_Mosin = 9
  416. SWEP.ScopeDistanceMin_Mosin = 8
  417.  
  418. SWEP.RTAttachment_MX4 = 7
  419. SWEP.ScopeOverlayTransforms_MX4 = {
  420. 0, -0.375
  421. }
  422. SWEP.ScopeDistanceRange_MX4 = 10
  423. SWEP.ScopeDistanceMin_MX4 = 9
  424. ]]--
  425. DEFINE_BASECLASS( SWEP.Base )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement