Advertisement
Guest User

Untitled

a guest
Jul 20th, 2018
320
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.81 KB | None | 0 0
  1. SWEP.Base = "tfa_gun_base"
  2. SWEP.Category = "TFA Insurgency" --The category. Please, just choose something generic or something I've already done if you plan on only doing like one swep..
  3. SWEP.Manufacturer = "Izhevsk Mechanical Plant" --Gun Manufactrer (e.g. Hoeckler and Koch )
  4. SWEP.Author = "Cluelesshobo" --Author Tooltip
  5. SWEP.Contact = "" --Contact Info Tooltip
  6. SWEP.Purpose = "Russian standard military-issue side arm.." --Purpose Tooltip
  7. SWEP.Instructions = "M1: Attack M2: Aim R: Reload" --Instructions Tooltip
  8. SWEP.Spawnable = true --Can you, as a normal user, spawn this?
  9. SWEP.AdminSpawnable = true --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.
  10. SWEP.DrawCrosshair = true -- Draw the crosshair?
  11. SWEP.DrawCrosshairIS = false --Draw the crosshair in ironsights?
  12. SWEP.PrintName = "MP-443 Grach" -- Weapon name (Shown on HUD)
  13. SWEP.Slot = 1 -- Slot in the weapon selection menu. Subtract 1, as this starts at 0.
  14. SWEP.SlotPos = 73 -- Position in the slot
  15. SWEP.AutoSwitchTo = true -- Auto switch to if we pick it up
  16. SWEP.AutoSwitchFrom = true -- Auto switch from if you pick up a better weapon
  17. SWEP.Weight = 30 -- This controls how "good" the weapon is for autopickup.
  18. SWEP.Type = "9x19mm Semi Automatic Pistol"
  19.  
  20. --[[WEAPON HANDLING]]--
  21. SWEP.Primary.Sound = Sound("Weapon_MP443.1") -- This is the sound of the weapon, when you shoot.
  22. SWEP.Primary.PenetrationMultiplier = 1 --Change the amount of something this gun can penetrate through
  23. SWEP.Primary.Damage = 28 -- Damage, in standard damage points.
  24. SWEP.Primary.DamageTypeHandled = true --true will handle damagetype in base
  25. SWEP.Primary.DamageType = nil --See DMG enum. This might be DMG_SHOCK, DMG_BURN, DMG_BULLET, etc. Leave nil to autodetect. DMG_AIRBOAT opens doors.
  26. SWEP.Primary.Force = nil --Force value, leave nil to autocalc
  27. SWEP.Primary.Knockback = nil --Autodetected if nil; this is the velocity kickback
  28. SWEP.Primary.HullSize = 0 --Big bullets, increase this value. They increase the hull size of the hitscan bullet.
  29. SWEP.Primary.NumShots = 1 --The number of shots the weapon fires. SWEP.Shotgun is NOT required for this to be >1.
  30. SWEP.Primary.Automatic = false -- Automatic/Semi Auto
  31. SWEP.Primary.RPM = 550 -- This is in Rounds Per Minute / RPM
  32. SWEP.Primary.RPM_Semi = nil -- RPM for semi-automatic or burst fire. This is in Rounds Per Minute / RPM
  33. SWEP.Primary.RPM_Burst = nil -- RPM for burst fire, overrides semi. This is in Rounds Per Minute / RPM
  34. SWEP.Primary.BurstDelay = nil -- Delay between bursts, leave nil to autocalculate
  35. SWEP.FiresUnderwater = false
  36.  
  37. --Miscelaneous Sounds
  38. SWEP.IronInSound = Sound("Weapon_MP443.Handon") --Sound to play when ironsighting in? nil for default
  39. SWEP.IronOutSound = Sound("Weapon_MP443.Handoff") --Sound to play when ironsighting out? nil for default
  40. --Silencing
  41. SWEP.CanBeSilenced = false --Can we silence? Requires animations.
  42. SWEP.Silenced = false --Silenced by default?
  43. -- Selective Fire Stuff
  44. SWEP.SelectiveFire = false --Allow selecting your firemode?
  45. SWEP.DisableBurstFire = false --Only auto/single?
  46. SWEP.OnlyBurstFire = false --No auto, only burst/single?
  47. SWEP.DefaultFireMode = "" --Default to auto or whatev
  48. SWEP.FireModeName = nil --Change to a text value to override it
  49. --Ammo Related
  50. SWEP.Primary.ClipSize = 18 -- This is the size of a clip
  51. SWEP.Primary.DefaultClip = SWEP.Primary.ClipSize * 4 -- This is the number of bullets the gun gives you, counting a clip as defined directly above.
  52. SWEP.Primary.Ammo = "pistol" -- What kind of ammo. Options, besides custom, include pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, and AirboatGun.
  53. SWEP.Primary.AmmoConsumption = 1 --Ammo consumed per shot
  54. --Pistol, buckshot, and slam like to ricochet. Use AirboatGun for a light metal peircing shotgun pellets
  55. SWEP.DisableChambering = false --Disable round-in-the-chamber
  56. --Recoil Related
  57. SWEP.Primary.KickUp = 0.6 -- This is the maximum upwards recoil (rise)
  58. SWEP.Primary.KickDown = 0.4 -- This is the maximum downwards recoil (skeet)
  59. SWEP.Primary.KickHorizontal = 0.3 -- This is the maximum sideways recoil (no real term)
  60. SWEP.Primary.StaticRecoilFactor = 0.15 --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.
  61. --Firing Cone Related
  62. SWEP.Primary.Spread = .01 --This is hip-fire acuracy. Less is more (1 is horribly awful, .0001 is close to perfect)
  63. SWEP.Primary.IronAccuracy = .005 -- Ironsight accuracy, should be the same for shotguns
  64. --Unless you can do this manually, autodetect it. If you decide to manually do these, uncomment this block and remove this line.
  65. SWEP.Primary.SpreadMultiplierMax = 5--How far the spread can expand when you shoot. Example val: 2.5
  66. SWEP.Primary.SpreadIncrement = 1.5 --What percentage of the modifier is added on, per shot. Example val: 1/3.5
  67. SWEP.Primary.SpreadRecovery = 8--How much the spread recovers, per second. Example val: 3
  68. --Range Related
  69. SWEP.Primary.Range = 16 * 380 -- The distance the bullet can travel in source units. Set to -1 to autodetect based on damage/rpm.
  70. SWEP.Primary.RangeFalloff = 150 / 250 -- 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.
  71. --Penetration Related
  72. SWEP.MaxPenetrationCounter = 2 --The maximum number of ricochets. To prevent stack overflows.
  73. --Misc
  74. SWEP.IronRecoilMultiplier = 0.5 --Multiply recoil by this factor when we're in ironsights. This is proportional, not inversely.
  75. SWEP.CrouchAccuracyMultiplier = 0.5 --Less is more. Accuracy * 0.5 = Twice as accurate, Accuracy * 0.1 = Ten times as accurate
  76. --Movespeed
  77. SWEP.MoveSpeed = 1 --Multiply the player's movespeed by this.
  78. SWEP.IronSightsMoveSpeed = 0.8 --Multiply the player's movespeed by this when sighting.
  79. --[[PROJECTILES]]--
  80. SWEP.ProjectileEntity = nil --Entity to shoot
  81. SWEP.ProjectileVelocity = 0 --Entity to shoot's velocity
  82. SWEP.ProjectileModel = nil --Entity to shoot's model
  83. --[[VIEWMODEL]]--
  84. SWEP.ViewModel = "models/weapons/c_beretta.mdl" --Viewmodel path
  85. SWEP.ViewModelFOV = 65 -- This controls how big the viewmodel looks. Less is more.
  86. SWEP.ViewModelFlip = false -- Set this to true for CSS models, or false for everything else (with a righthanded viewmodel.)
  87. SWEP.UseHands = true --Use gmod c_arms system.
  88. SWEP.VMPos = Vector(0, 0, 0)
  89. SWEP.VMAng = Vector(0, 0, 0)
  90. 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
  91. SWEP.CenteredPos = nil --The viewmodel positional offset, used for centering. Leave nil to autodetect using ironsights.
  92. SWEP.CenteredAng = nil --The viewmodel angular offset, used for centering. Leave nil to autodetect using ironsights.
  93. SWEP.Bodygroups_V = nil --{
  94. --[0] = 1,
  95. --[1] = 4,
  96. --[2] = etc.
  97. --}
  98. --[[WORLDMODEL]]--
  99. SWEP.WorldModel = "models/weapons/tfa_ins2/mp443/w_mp443.mdl" -- Weapon world model path
  100. SWEP.Bodygroups_W = nil --{
  101. --[0] = 1,
  102. --[1] = 4,
  103. --[2] = etc.
  104. --}
  105. SWEP.HoldType = "pistol" -- This is how others view you carrying the weapon. Options include:
  106. -- normal melee melee2 fist knife smg ar2 pistol rpg physgun grenade shotgun crossbow slam passive
  107. -- You're mostly going to use ar2, smg, shotgun or pistol. rpg and crossbow make for good sniper rifles
  108. SWEP.Offset = {
  109. Pos = {
  110. Up = -1.5,
  111. Right = 1.5,
  112. Forward = 5.5
  113. },
  114. Ang = {
  115. Up = -1,
  116. Right = -5,
  117. Forward = 178
  118. },
  119. Scale = 1
  120. } --Procedural world model animation, defaulted for CS:S purposes.
  121. SWEP.ThirdPersonReloadDisable = false --Disable third person reload? True disables.
  122. --[[SCOPES]]--
  123. SWEP.IronSightsSensitivity = 1 --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.
  124. SWEP.BoltAction = false --Unscope/sight after you shoot?
  125. SWEP.Scoped = false --Draw a scope overlay?
  126. SWEP.ScopeOverlayThreshold = 0.875 --Percentage you have to be sighted in to see the scope.
  127. SWEP.BoltTimerOffset = 0.25 --How long you stay sighted in after shooting, with a bolt action.
  128. SWEP.ScopeScale = 0.5 --Scale of the scope overlay
  129. SWEP.ReticleScale = 0.7 --Scale of the reticle overlay
  130. --GDCW Overlay Options. Only choose one.
  131. SWEP.Secondary.UseACOG = false --Overlay option
  132. SWEP.Secondary.UseMilDot = false --Overlay option
  133. SWEP.Secondary.UseSVD = false --Overlay option
  134. SWEP.Secondary.UseParabolic = false --Overlay option
  135. SWEP.Secondary.UseElcan = false --Overlay option
  136. SWEP.Secondary.UseGreenDuplex = false --Overlay option
  137. if surface then
  138. SWEP.Secondary.ScopeTable = nil --[[
  139. {
  140. scopetex = surface.GetTextureID("scope/gdcw_closedsight"),
  141. reticletex = surface.GetTextureID("scope/gdcw_acogchevron"),
  142. dottex = surface.GetTextureID("scope/gdcw_acogcross")
  143. }
  144. ]]--
  145. end
  146. --[[SPRINTING]]--
  147. SWEP.RunSightsPos = Vector(10, 0, 0)
  148. SWEP.RunSightsAng = Vector(-8.474, 1.279, -9.547)
  149. --[[IRONSIGHTS]]--
  150. SWEP.data = {}
  151. SWEP.data.ironsights = 1 --Enable Ironsights
  152. SWEP.Secondary.IronFOV = 80 -- How much you 'zoom' in. Less is more! Don't have this be <= 0. A good value for ironsights is like 70.
  153.  
  154. SWEP.IronSightsPos = Vector(-2.55, 0, 0.88)
  155. SWEP.IronSightsAng = Vector(0, 0, 0)
  156. --[[INSPECTION]]--
  157. SWEP.InspectPos = Vector(7, -4, -1.5)--Vector(0,0,0) --Replace with a vector, in style of ironsights position, to be used for inspection
  158. SWEP.InspectAng = nil--Vector(0,0,0) --Replace with a vector, in style of ironsights angle, to be used for inspection
  159. --[[VIEWMODEL ANIMATION HANDLING]]--
  160. 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.
  161. --[[VIEWMODEL BLOWBACK]]--
  162. SWEP.BlowbackEnabled = false --Enable Blowback?
  163. SWEP.BlowbackVector = Vector(0,-3,0) --Vector to move bone <or root> relative to bone <or view> orientation.
  164. SWEP.BlowbackCurrentRoot = 0 --Amount of blowback currently, for root
  165. SWEP.BlowbackCurrent = 0 --Amount of blowback currently, for bones
  166. SWEP.BlowbackBoneMods = nil --Viewmodel bone mods via SWEP Creation Kit
  167. SWEP.Blowback_Only_Iron = true --Only do blowback on ironsights
  168. SWEP.Blowback_PistolMode = false --Do we recover from blowback when empty?
  169. SWEP.Blowback_Shell_Enabled = true --Shoot shells through blowback animations
  170. SWEP.Blowback_Shell_Effect = "ShellEject"--Which shell effect to use
  171. --[[VIEWMODEL PROCEDURAL ANIMATION]]--
  172. SWEP.DoProceduralReload = false--Animate first person reload using lua?
  173. SWEP.ProceduralReloadTime = 1 --Procedural reload time?
  174. --[[HOLDTYPES]]--
  175. SWEP.IronSightHoldTypeOverride = "" --This variable overrides the ironsights holdtype, choosing it instead of something from the above tables. Change it to "" to disable.
  176. SWEP.SprintHoldTypeOverride = "" --This variable overrides the sprint holdtype, choosing it instead of something from the above tables. Change it to "" to disable.
  177. --[[ANIMATION]]--
  178.  
  179. SWEP.StatusLengthOverride = {
  180. [ACT_VM_RELOAD] = 64 / 30,
  181. [ACT_VM_RELOAD_EMPTY] = 64 / 30
  182. } --Changes the status delay of a given animation; only used on reloads. Otherwise, use SequenceLengthOverride or one of the others
  183. SWEP.SequenceLengthOverride = {
  184. [ACT_VM_RELOAD] = 78 / 30,
  185. [ACT_VM_RELOAD_EMPTY] = 78 / 30
  186. } --Changes both the status delay and the nextprimaryfire of a given animation
  187. SWEP.SequenceRateOverride = {} --Like above but changes animation length to a target
  188. SWEP.SequenceRateOverrideScaled = {} --Like above but scales animation length rather than being absolute
  189. SWEP.Sights_Mode = TFA.Enum.LOCOMOTION_HYBRID -- ANI = mdl, HYBRID = lua but continue idle, Lua = stop mdl animation
  190. SWEP.Sprint_Mode = TFA.Enum.LOCOMOTION_ANI -- ANI = mdl, HYBRID = ani + lua, Lua = lua only
  191. 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
  192. SWEP.Idle_Blend = 0.25 --Start an idle this far early into the end of a transition
  193. SWEP.Idle_Smooth = 0.05 --Start an idle this far early into the end of another animation
  194. --MDL Animations Below
  195. SWEP.IronAnimation = {
  196. ["loop"] = {
  197. ["type"] = TFA.Enum.ANIMATION_SEQ, --Sequence or act
  198. ["value"] = "base_idle", --Number for act, String/Number for sequence
  199. ["value_empty"] = "iron_empty"
  200. },
  201. ["shoot"] = {
  202. ["type"] = TFA.Enum.ANIMATION_ACT, --Sequence or act
  203. ["value"] = ACT_VM_PRIMARYATTACK_1, --Number for act, String/Number for sequence
  204. ["value_last"] = ACT_VM_PRIMARYATTACK_2,
  205. ["value_empty"] = ACT_VM_PRIMARYATTACK_3
  206. } --What do you think
  207. }
  208.  
  209. SWEP.SprintAnimation = {
  210. ["loop"] = {
  211. ["type"] = TFA.Enum.ANIMATION_SEQ, --Sequence or act
  212. ["value"] = "base_sprint", --Number for act, String/Number for sequence
  213. ["value_empty"] = "empty_sprint",
  214. ["is_idle"] = true
  215. }
  216. }
  217. --[[EFFECTS]]--
  218. --Attachments
  219. SWEP.MuzzleAttachment = "1" -- Should be "1" for CSS models or "muzzle" for hl2 models
  220. SWEP.ShellAttachment = "shell" -- Should be "2" for CSS models or "shell" for hl2 models
  221. SWEP.MuzzleFlashEnabled = true --Enable muzzle flash
  222. SWEP.MuzzleAttachmentRaw = 1 --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.
  223. SWEP.AutoDetectMuzzleAttachment = false --For multi-barrel weapons, detect the proper attachment?
  224. SWEP.MuzzleFlashEffect = nil --Change to a string of your muzzle flash effect. Copy/paste one of the existing from the base.
  225. SWEP.SmokeParticle = nil --Smoke particle (ID within the PCF), defaults to something else based on holdtype; "" to disable
  226. SWEP.EjectionSmokeEnabled = false --Disable automatic ejection smoke
  227. --Shell eject override
  228. SWEP.LuaShellEject = true --Enable shell ejection through lua?
  229. SWEP.LuaShellEjectDelay = 0 --The delay to actually eject things
  230. SWEP.LuaShellEffect = "ShellEject" --The effect used for shell ejection; Defaults to that used for blowback
  231. SWEP.LuaShellModel = "models/eft/items/ammo/eft_9x19_shell.mdl"
  232. SWEP.LuaShellScale = .6
  233. --Tracer Stuff
  234. SWEP.TracerName = nil --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
  235. SWEP.TracerCount = 3 --0 disables, otherwise, 1 in X chance
  236. --Impact Effects
  237. SWEP.ImpactEffect = nil--Impact Effect
  238. SWEP.ImpactDecal = nil--Impact Decal
  239. --[[EVENT TABLE]]--
  240. SWEP.EventTable = {} --Event Table, used for custom events when an action is played. This can even do stuff like playing a pump animation after shooting.
  241. --example:
  242. --SWEP.EventTable = {
  243. -- [ACT_VM_RELOAD] = {
  244. -- { ["time"] = 0.1, ["type"] = "lua", ["value"] = function( wep, viewmodel ) end, ["client"] = true, ["server"] = true},
  245. -- { ["time"] = 0.1, ["type"] = "sound", ["value"] = Sound("x") }
  246. -- }
  247. --}
  248. --[[RENDER TARGET]]--
  249. SWEP.RTMaterialOverride = nil -- Take the material you want out of print(LocalPlayer():GetViewModel():GetMaterials()), subtract 1 from its index, and set it to this.
  250. SWEP.RTOpaque = false -- Do you want your render target to be opaque?
  251. SWEP.RTCode = nil--function(self) return end --This is the function to draw onto your rendertarget
  252. --[[AKIMBO]]--
  253. SWEP.Akimbo = false --Akimbo gun? Alternates between primary and secondary attacks.
  254. SWEP.AnimCycle = 0 -- Start on the right
  255. --[[ATTACHMENTS]]--
  256.  
  257. SWEP.ViewModelBoneMods = {
  258. ["A_Underbarrel"] = { scale = Vector(1, 1, 1), pos = Vector(0, 3, 0), angle = Angle(0, 0, 0) },
  259. }
  260.  
  261. SWEP.VElements = {
  262. ["laser"] = { type = "Model", model = "models/weapons/tfa_ins2/upgrades/a_laser_band.mdl", bone = "A_Underbarrel", rel = "", pos = Vector(0, 4.5, 0), angle = Angle(0, 90, -90), size = Vector(1, 1, 1), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {}, bonemerge = true, active = false },
  263. ["laser_beam"] = { type = "Model", model = "models/tfa/lbeam.mdl", bone = "A_Beam", rel = "laser", pos = Vector(0,0,-2), angle = Angle(0, 0, 0), size = Vector(2, 0.5, 0.5), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {}, bonemerge = true, active = false }
  264. }
  265. SWEP.Attachments = {
  266. [1] = { offset = { 0, 0 }, atts = { "mp443_b8" }, order = 1 },
  267. [2] = { offset = { 0, 0 }, atts = { "ins2_ub_laser" }, order = 2 },
  268. [3] = { offset = { 0, 0 }, atts = { "am_match", "am_magnum" }, order = 3 },
  269. }
  270. SWEP.AttachmentDependencies = { ["ins2_ub_laser"] = {"mp443_b8"} }--{["si_acog"] = {"bg_rail"}}
  271. SWEP.AttachmentExclusions = {}--{ ["si_iron"] = {"bg_heatshield"} }
  272.  
  273. SWEP.LaserSightModAttachment = 6
  274.  
  275. SWEP.RunSightsPos = Vector(1, -8, -9)
  276. SWEP.RunSightsAng = Vector(50, 0, 0)
  277.  
  278. DEFINE_BASECLASS( SWEP.Base )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement