Advertisement
soriso

Garry's Mod SWEP

Feb 13th, 2016
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- Variables that are used on both client and server
  2. SWEP.Gun = ("sorisos_pistol") -- must be the name of your swep but NO CAPITALS!
  3. SWEP.Category               = "M1911" --Category where you will find your weapons
  4. SWEP.Author             = "Soriso"
  5. SWEP.Contact                = "matteusmatu@gmail.com"
  6. SWEP.Purpose                = "Killing, of course."
  7. SWEP.Instructions               = "Left click to shoot, Right click to aim."
  8. SWEP.PrintName              = "M1911"       -- Weapon name (Shown on HUD)  
  9. SWEP.Slot               = 1             -- Slot in the weapon selection menu
  10. SWEP.SlotPos                = 1         -- Position in the slot
  11. SWEP.DrawAmmo               = true      -- Should draw the default HL2 ammo counter
  12. SWEP.DrawWeaponInfoBox      = false     -- Should draw the weapon info box
  13. SWEP.BounceWeaponIcon       = false     -- Should the weapon icon bounce?
  14. SWEP.DrawCrosshair          = true      -- set false if you want no crosshair
  15. SWEP.Weight                 = 15        -- rank relative ot other weapons. bigger is better
  16. SWEP.AutoSwitchTo           = true      -- Auto switch to if we pick it up
  17. SWEP.AutoSwitchFrom         = false     -- Auto switch from if you pick up a better weapon
  18. SWEP.HoldType               = "pistol"      -- how others view you carrying the weapon
  19. -- normal melee melee2 fist knife smg ar2 pistol rpg physgun grenade shotgun crossbow slam passive
  20. -- you're mostly going to use ar2, smg, shotgun or pistol. rpg makes for good sniper rifles
  21.  
  22. SWEP.ViewModelFOV           = 70
  23. SWEP.ViewModelFlip          = true
  24. SWEP.ViewModel              = "models/weapons/v_pist_sori.mdl"  -- Weapon view model
  25. SWEP.WorldModel             = "models/weapons/w_Pist_p228.mdl"  -- Weapon world model
  26. SWEP.ShowWorldModel         = true
  27. SWEP.Base               = "sorisos_gun_base" --the Base this weapon will work on. PLEASE RENAME THE BASE!
  28. SWEP.Spawnable              = true
  29. SWEP.AdminSpawnable         = true
  30. SWEP.FiresUnderwater = true
  31.  
  32. SWEP.Primary.Sound          = Sound("sorisos_pistol")       -- Script that calls the primary fire sound
  33. SWEP.Primary.SilencedSound  = Sound("")     -- Sound if the weapon is silenced
  34. SWEP.Primary.RPM            = 500           -- This is in Rounds Per Minute
  35. SWEP.Primary.ClipSize           = 7     -- Size of a clip
  36. SWEP.Primary.DefaultClip        = 7     -- Bullets you start with
  37. SWEP.Primary.KickUp             = 0.4       -- Maximum up recoil (rise)
  38. SWEP.Primary.KickDown           = 0.4       -- Maximum down recoil (skeet)
  39. SWEP.Primary.KickHorizontal     = 0.3       -- Maximum up recoil (stock)
  40. SWEP.Primary.Automatic          = false     -- Automatic = true; Semi Auto = false
  41. SWEP.Primary.Ammo           = "pistol"          -- pistol, 357, smg1, ar2, buckshot, slam, SniperPenetratedRound, AirboatGun
  42. -- Pistol, buckshot, and slam always ricochet.
  43. --Use AirboatGun for a light metal peircing shotgun pellets
  44. SWEP.SelectiveFire      = true
  45. SWEP.CanBeSilenced      = false
  46.  
  47. SWEP.Secondary.IronFOV          = 55        -- How much you 'zoom' in. Less is more!    
  48.  
  49. SWEP.data               = {}                --The starting firemode
  50. SWEP.data.ironsights            = 1
  51.  
  52. SWEP.Primary.Damage     = 20    -- Base damage per bullet
  53. SWEP.Primary.Spread     = .02   -- Define from-the-hip accuracy 1 is terrible, .0001 is exact)
  54. SWEP.Primary.IronAccuracy = .001 -- Ironsight accuracy, should be the same for shotguns
  55.  
  56. -- Enter iron sight info and bone mod info below
  57. SWEP.IronSightsPos = Vector(2.4, 0, 1.24)
  58. SWEP.IronSightsAng = Vector(0.212, -0.083, 1)
  59. SWEP.RunSightsPos = Vector(-5.661, 0, -5.738)
  60. SWEP.RunSightsAng = Vector(24.405, 0, 0)
  61.  
  62. SWEP.VElements = {
  63.     ["part1"] = { type = "Model", model = "models/props_junk/terracotta01.mdl", bone = "Slide", rel = "", pos = Vector(1.72, 15.996, -5.205), angle = Angle(-90.159, 0.096, 0.004), size = Vector(0.061, 0.061, 0.061), color = Color(255, 255, 255, 255), surpresslightning = false, material = "metal6", skin = 0, bodygroup = {} },
  64.     ["part9"] = { type = "Model", model = "models/props_wasteland/gear01.mdl", bone = "Slide", rel = "", pos = Vector(2.19, 16.007, -5.147), angle = Angle(90, -90, 0), size = Vector(0.097, 0.097, 0.097), color = Color(255, 255, 255, 255), surpresslightning = false, material = "models/props_buildings/plasterwall021a", skin = 0, bodygroup = {} },
  65.     ["part6"] = { type = "Model", model = "models/props_rooftop/gutter_pipe_128.mdl", bone = "Slide", rel = "", pos = Vector(3.088, 17.693, -5.047), angle = Angle(-46.413, 0, 0), size = Vector(0.021, 0.021, 0.012), color = Color(255, 255, 255, 255), surpresslightning = false, material = "perftest/loader/crate02b", skin = 0, bodygroup = {} },
  66.     ["part3"] = { type = "Model", model = "models/props_rooftop/chimneytoppipe_cluster02a.mdl", bone = "Slide", rel = "", pos = Vector(2.417, 17.799, -5.705), angle = Angle(-44.8, -2.5, 2), size = Vector(0.019, 0.019, 0.019), color = Color(255, 255, 255, 255), surpresslightning = false, material = "metal2", skin = 0, bodygroup = {} },
  67.     ["part8"] = { type = "Model", model = "models/props_rooftop/gutter_pipe_128.mdl", bone = "Slide", rel = "", pos = Vector(3.109, 16.652, -5.088), angle = Angle(-46.156, 0, 0), size = Vector(0.021, 0.021, 0.012), color = Color(255, 255, 255, 255), surpresslightning = false, material = "perftest/loader/crate02b", skin = 0, bodygroup = {} },
  68.     ["part5"] = { type = "Model", model = "models/props_rooftop/gutter_pipe_128.mdl", bone = "Slide", rel = "", pos = Vector(3.081, 18.263, -5.06), angle = Angle(-46.163, 0, 0), size = Vector(0.021, 0.021, 0.012), color = Color(255, 255, 255, 255), surpresslightning = false, material = "perftest/loader/crate02b", skin = 0, bodygroup = {} },
  69.     ["part2"] = { type = "Model", model = "models/props_borealis/bluebarrel001.mdl", bone = "Slide", rel = "", pos = Vector(2.099, 16, -5.16), angle = Angle(-90, 0, 0), size = Vector(0.025, 0.025, 0.025), color = Color(255, 255, 255, 255), surpresslightning = false, material = "metal6", skin = 0, bodygroup = {} },
  70.     ["part7"] = { type = "Model", model = "models/props_rooftop/gutter_pipe_128.mdl", bone = "Slide", rel = "", pos = Vector(3.065, 17.242, -5.062), angle = Angle(-46.138, 0, 0), size = Vector(0.021, 0.021, 0.012), color = Color(255, 255, 255, 255), surpresslightning = false, material = "perftest/loader/crate02b", skin = 0, bodygroup = {} },
  71.     ["part4"] = { type = "Model", model = "models/props_rooftop/gutter_pipe_128.mdl", bone = "Slide", rel = "", pos = Vector(3.091, 18.75, -5.058), angle = Angle(-46.936, 0.001, 0.001), size = Vector(0.021, 0.021, 0.012), color = Color(255, 255, 255, 255), surpresslightning = false, material = "perftest/loader/crate02b", skin = 0, bodygroup = {} }
  72. }
  73.  
  74. SWEP.WElements = {
  75.     ["part1"] = { type = "Model", model = "models/props_junk/terracotta01.mdl", bone = "ValveBiped.Bip01_R_Hand", rel = "", pos = Vector(4.177, 3.338, -3.184), angle = Angle(-89.693, 90.737, 0.25), size = Vector(0.143, 0.143, 0.143), color = Color(255, 255, 255, 255), surpresslightning = false, material = "metal6", skin = 0, bodygroup = {} },
  76.     ["part9"] = { type = "Model", model = "models/props_wasteland/gear01.mdl", bone = "ValveBiped.Bip01_R_Hand", rel = "", pos = Vector(4.179, 2.269, -3.304), angle = Angle(6.981, -2.731, -9.325), size = Vector(0.188, 0.188, 0.188), color = Color(255, 255, 255, 255), surpresslightning = false, material = "models/props_buildings/plasterwall021a", skin = 0, bodygroup = {} },
  77.     ["part6"] = { type = "Model", model = "models/props_rooftop/gutter_pipe_128.mdl", bone = "ValveBiped.Bip01_R_Hand", rel = "", pos = Vector(7.13, 1.601, -3.339), angle = Angle(0, -2.188, -29.577), size = Vector(0.054, 0.054, 0.014), color = Color(255, 255, 255, 255), surpresslightning = false, material = "perftest/loader/crate02b", skin = 0, bodygroup = {} },
  78.     ["part3"] = { type = "Model", model = "models/props_rooftop/chimneytoppipe_cluster02a.mdl", bone = "ValveBiped.Bip01_R_Hand", rel = "", pos = Vector(7.046, 2.038, -4.086), angle = Angle(51.352, -94.668, -0.853), size = Vector(0.041, 0.041, 0.041), color = Color(255, 255, 255, 255), surpresslightning = false, material = "metal2", skin = 0, bodygroup = {} },
  79.     ["part8"] = { type = "Model", model = "models/props_rooftop/gutter_pipe_128.mdl", bone = "ValveBiped.Bip01_R_Hand", rel = "", pos = Vector(9.211, 1.873, -3.379), angle = Angle(0.196, -2.056, -29.649), size = Vector(0.054, 0.054, 0.014), color = Color(255, 255, 255, 255), surpresslightning = false, material = "perftest/loader/crate02b", skin = 0, bodygroup = {} },
  80.     ["part5"] = { type = "Model", model = "models/props_rooftop/gutter_pipe_128.mdl", bone = "ValveBiped.Bip01_R_Hand", rel = "", pos = Vector(5.88, 1.531, -3.322), angle = Angle(0, -2.106, -29.538), size = Vector(0.054, 0.054, 0.014), color = Color(255, 255, 255, 255), surpresslightning = false, material = "perftest/loader/crate02b", skin = 0, bodygroup = {} },
  81.     ["part2"] = { type = "Model", model = "models/props_borealis/bluebarrel001.mdl", bone = "ValveBiped.Bip01_R_Hand", rel = "", pos = Vector(4.142, 2.329, -3.083), angle = Angle(-90, 90, 0), size = Vector(0.057, 0.057, 0.057), color = Color(255, 255, 255, 255), surpresslightning = false, material = "metal6", skin = 0, bodygroup = {} },
  82.     ["part7"] = { type = "Model", model = "models/props_rooftop/gutter_pipe_128.mdl", bone = "ValveBiped.Bip01_R_Hand", rel = "", pos = Vector(7.94, 1.496, -3.317), angle = Angle(0, -2.178, -29.469), size = Vector(0.054, 0.054, 0.014), color = Color(255, 255, 255, 255), surpresslightning = false, material = "perftest/loader/crate02b", skin = 0, bodygroup = {} },
  83.     ["part4"] = { type = "Model", model = "models/props_rooftop/gutter_pipe_128.mdl", bone = "ValveBiped.Bip01_R_Hand", rel = "", pos = Vector(4.834, 1.304, -3.233), angle = Angle(0, -2.118, -29.556), size = Vector(0.054, 0.054, 0.014), color = Color(255, 255, 255, 255), surpresslightning = false, material = "perftest/loader/crate02b", skin = 0, bodygroup = {} }
  84. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement