Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.73 KB | None | 0 0
  1. AddCSLuaFile()
  2. AddCSLuaFile("sh_sounds.lua")
  3. include("sh_sounds.lua")
  4.  
  5. SWEP.magType = "srMag"
  6.  
  7. if CLIENT then
  8. SWEP.DrawCrosshair = false
  9. SWEP.PrintName = "Orsis T-5000"
  10. SWEP.CSMuzzleFlashes = true
  11.  
  12. SWEP.IconLetter = "w"
  13. killicon.Add( "khr_t5000", "icons/killicons/khr_t5000", Color(255, 80, 0, 150))
  14. SWEP.SelectIcon = surface.GetTextureID("icons/killicons/khr_t5000")
  15.  
  16. SWEP.MuzzleEffect = "muzzleflash_g3"
  17. SWEP.PosBasedMuz = true
  18. SWEP.NoDistance = true
  19. SWEP.BipodFireAnim = false
  20. SWEP.CrosshairEnabled = false
  21. SWEP.ShellScale = 0.65
  22. SWEP.ShellDelay = .55
  23. SWEP.ShellOffsetMul = 1
  24. SWEP.ShellPosOffset = {x = -2, y = -2, z = 0}
  25. SWEP.SightWithRail = false
  26. SWEP.DisableSprintViewSimulation = false
  27. SWEP.SnapToIdlePostReload = true
  28. SWEP.ReticleInactivityPostFire = 1.3
  29.  
  30. SWEP.IronsightPos = Vector(-3.151, -2, 0.529)
  31. SWEP.IronsightAng = Vector(0.95, 0.02, 0)
  32.  
  33. SWEP.SprintPos = Vector(1.929, -1.407, -1.04)
  34. SWEP.SprintAng = Vector(-14.775, 25.326, -8.443)
  35.  
  36. SWEP.MicroT1Pos = Vector(-3.14, -3, 0.66)
  37. SWEP.MicroT1Ang = Vector(0, 0, 0)
  38.  
  39. SWEP.EoTech553Pos = Vector(-3.145, -3, 0.405)
  40. SWEP.EoTech553Ang = Vector(0, 0, 0)
  41.  
  42. SWEP.KR_CMOREPos = Vector(-3.13, -3, 0.48)
  43. SWEP.KR_CMOREAng = Vector(0, 0, 0)
  44.  
  45. SWEP.FAS2AimpointPos = Vector(-3.135, -3, 0.735)
  46. SWEP.FAS2AimpointAng = Vector(0, 0, 0)
  47.  
  48. SWEP.CSGOACOGPos = Vector(-3.13, -2, 0.507)
  49. SWEP.CSGOACOGAng = Vector(0, 0, 0)
  50.  
  51. SWEP.NXSPos = Vector(-3.1456, -2, 0.5592)
  52. SWEP.NXSAng = Vector(0, 0, 0)
  53.  
  54. SWEP.ShortDotPos = Vector(-3.14, -2, 0.5733)
  55. SWEP.ShortDotAng = Vector(0, 0, 0)
  56.  
  57. SWEP.CustomizePos = Vector(3.72, 0, -0.801)
  58. SWEP.CustomizeAng = Vector(13.366, 22.513, 14.069)
  59.  
  60. SWEP.AlternativePos = Vector(-.2, 0, -0.2)
  61. SWEP.AlternativeAng = Vector(0, 0, 0)
  62.  
  63. SWEP.CustomizationMenuScale = 0.03
  64. SWEP.ViewModelMovementScale = 1
  65.  
  66. SWEP.AttachmentModelsVM = {
  67.  
  68. ["md_uecw_csgo_acog"] = { type = "Model", model = "models/gmod4phun/csgo/eq_optic_acog.mdl", bone = "base", rel = "", pos = Vector(0.045, -3, -0.357), angle = Angle(0, -90, 0), size = Vector(0.8, 0.8, 0.8), color = Color(255, 255, 255, 0), surpresslightning = false, material = "", skin = 0, bodygroup = {} },
  69. ["md_nxs"] = { type = "Model", model = "models/cw2/attachments/l96_scope.mdl", bone = "base", rel = "", pos = Vector(-0.11, 4.675, 4.32), angle = Angle(0, -90, 0), size = Vector(1, 1, 1), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {} },
  70. ["md_fas2_aimpoint"] = { type = "Model", model = "models/c_fas2_aimpoint.mdl", bone = "base", rel = "", pos = Vector(0, 5.3, 2.569), angle = Angle(0, -90, 0), size = Vector(1, 1, 1), color = Color(255, 255, 255, 0), surpresslightning = false, material = "", skin = 0, bodygroup = {} },
  71. ["odec3d_cmore_kry"] = { type = "Model", model = "models/weapons/krycek/sights/odec3d_cmore_reddot.mdl", bone = "base", rel = "", pos = Vector(-0.08, 3.299, 3.349), angle = Angle(0, -90, 0), size = Vector(0.27, 0.27, 0.27), color = Color(255, 255, 255, 0), surpresslightning = false, material = "", skin = 0, bodygroup = {} },
  72. ["md_microt1kh"] = { type = "Model", model = "models/cw2/attachments/microt1.mdl", bone = "base", rel = "", pos = Vector(0, 2.599, 3.4), angle = Angle(0, 180, 0), size = Vector(0.379, 0.379, 0.379), color = Color(255, 255, 255, 0), surpresslightning = false, material = "", skin = 0, bodygroup = {} },
  73. ["md_shortdot"] = { type = "Model", model = "models/cw2/attachments/schmidt.mdl", bone = "base", rel = "", pos = Vector(-0.341, -1.8, -1.88), angle = Angle(0, -90, 0), size = Vector(0.899, 0.899, 0.899), color = Color(255, 255, 255, 0), surpresslightning = false, material = "", skin = 0, bodygroup = {} },
  74. ["md_fas2_eotech"] = { type = "Model", model = "models/c_fas2_eotech.mdl", bone = "base", rel = "", pos = Vector(0, 5.9, 2.799), angle = Angle(0, -90, 0), size = Vector(1, 1, 1), color = Color(255, 255, 255, 0), surpresslightning = false, material = "", skin = 0, bodygroup = {} },
  75. ["rearsight"] = { type = "Model", model = "models/bunneh/rearsight.mdl", bone = "base", rel = "", pos = Vector(-2.271, -4.566, 4.375), angle = Angle(0, -90, 0), size = Vector(1, 1, 1), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {} },
  76. ["frontsight"] = { type = "Model", model = "models/bunneh/frontsight.mdl", bone = "base", rel = "", pos = Vector(2.2, 32.338, 3.9), angle = Angle(0, 90, 0), size = Vector(1, 1, 1), color = Color(255, 255, 255, 255), surpresslightning = false, material = "", skin = 0, bodygroup = {} }
  77. }
  78.  
  79.  
  80. SWEP.ACOGAxisAlign = {right = 0, up = 0, forward = 0}
  81. SWEP.NXSAlign = {right = 0, up = 0, forward = 0}
  82. SWEP.SchmidtShortDotAxisAlign = {right = 0, up = 0, forward = 0}
  83.  
  84.  
  85. function SWEP:RenderTargetFunc()
  86.  
  87.  
  88. if self.AimPos != self.IronsightPos then -- if we have a sight/scope equiped, hide the front and rar sights
  89. self.AttachmentModelsVM.frontsight.active = false
  90. self.AttachmentModelsVM.rearsight.active = false
  91. else
  92. self.AttachmentModelsVM.frontsight.active = true
  93. self.AttachmentModelsVM.rearsight.active = true
  94. end
  95.  
  96. end
  97.  
  98. end
  99.  
  100. SWEP.MuzzleVelocity = 920 -- in meter/s
  101.  
  102. SWEP.LuaViewmodelRecoil = true
  103. SWEP.FullAimViewmodelRecoil = false
  104. SWEP.LuaViewmodelRecoilOverride = true
  105. SWEP.CanRestOnObjects = true
  106. SWEP.BipodFireAnim = true
  107. SWEP.Chamberable = false
  108. SWEP.ADSFireAnim = true
  109.  
  110. SWEP.BipodBGs = {main = 1, on = 1, off = 0}
  111.  
  112. SWEP.Attachments = {[2] = {header = "Optic", offset = {400, -400}, atts = {"md_microt1kh","odec3d_cmore_kry","md_fas2_eotech","md_fas2_aimpoint","md_shortdot","md_uecw_csgo_acog","md_nxs"}},
  113. [1] = {header = "Bipod", offset = {-600, -200}, atts = {"bg_bipod"}},
  114. ["+reload"] = {header = "Ammo", offset = {-250, 250}, atts = {"am_magnum","am_matchgrade"}}}
  115.  
  116. SWEP.Animations = {fire = {"fire"},
  117. reload = "reload",
  118. idle = "idle",
  119. draw = "draw"}
  120.  
  121. SWEP.Sounds = { fire = {[1] = {time = .4, sound = "T50.BOLTUP"},
  122. [2] = {time = .5, sound = "T50.BOLTB"},
  123. [3] = {time = .72, sound = "T50.BOLTF"},
  124. [4] = {time = .82, sound = "T50.BOLTDOWN"}},
  125.  
  126. draw = {[1] = {time = 0, sound = "T50.DRAW"}},
  127.  
  128. reload = {[1] = {time = .05, sound = "T50.BOLTUP"},
  129. [2] = {time = .2, sound = "T50.BOLTB"},
  130. [3] = {time = .95, sound = "T50.MAGOUT"},
  131. [4] = {time = 2.15, sound = "T50.MAGIN"},
  132. [5] = {time = 2.9, sound = "T50.BOLTF"},
  133. [6] = {time = 3.05, sound = "T50.BOLTDOWN"}}}
  134.  
  135. SWEP.LuaVMRecoilAxisMod = {vert = 1.5, hor = 3.5, roll = .25, forward = .5, pitch = 1.5}
  136.  
  137. SWEP.SpeedDec = 40
  138.  
  139. SWEP.Slot = 4
  140. SWEP.SlotPos = 0
  141. SWEP.OverallMouseSens = .8
  142. SWEP.NormalHoldType = "ar2"
  143. SWEP.RunHoldType = "passive"
  144. SWEP.FireModes = {"bolt"}
  145. SWEP.Base = "cw_base"
  146. SWEP.Category = "CW 2.0 - Khris"
  147.  
  148. SWEP.Author = "Khris"
  149. SWEP.Contact = ""
  150. SWEP.Purpose = ""
  151. SWEP.Instructions = ""
  152.  
  153. SWEP.ViewModelFOV = 75
  154. SWEP.AimViewModelFOV = 65
  155. SWEP.ViewModelFlip = false
  156. SWEP.ViewModel = "models/khrcw2/v_khri_t50.mdl"
  157. SWEP.WorldModel = "models/khrcw2/w_khri_t50.mdl"
  158.  
  159. SWEP.Spawnable = true
  160. SWEP.AdminSpawnable = true
  161.  
  162. SWEP.Primary.ClipSize = 5
  163. SWEP.Primary.DefaultClip = 5
  164. SWEP.Primary.Automatic = false
  165. SWEP.Primary.Ammo = ".338 Lapua"
  166.  
  167. SWEP.FireDelay = 1.3
  168. SWEP.FireSound = "T50.FIRE"
  169. SWEP.Recoil = 3
  170.  
  171. SWEP.HipSpread = 0.12
  172. SWEP.AimSpread = 0.0003
  173. SWEP.VelocitySensitivity = 2
  174. SWEP.MaxSpreadInc = 0.6
  175. SWEP.SpreadPerShot = 0.08
  176. SWEP.SpreadCooldown = 0.2
  177. SWEP.Shots = 1
  178. SWEP.Damage = 80
  179. SWEP.DeployTime = .6
  180.  
  181. SWEP.ReloadSpeed = 1.1
  182. SWEP.ReloadTime = 3.5
  183. SWEP.ReloadTime_Empty = 3.5
  184. SWEP.ReloadHalt = 3.5
  185. SWEP.ReloadHalt_Empty = 3.5
  186.  
  187.  
  188. SWEP.Offset = {
  189. Pos = {
  190. Up = -.9,
  191. Right = 0,
  192. Forward = 0,
  193. },
  194. Ang = {
  195. Up = 0,
  196. Right = -10,
  197. Forward = 180,
  198. }
  199. }
  200.  
  201. function SWEP:DrawWorldModel( )
  202. local hand, offset, rotate
  203.  
  204. local pl = self:GetOwner()
  205.  
  206. if IsValid( pl ) then
  207. local boneIndex = pl:LookupBone( "ValveBiped.Bip01_R_Hand" )
  208. if boneIndex then
  209. local pos, ang = pl:GetBonePosition( boneIndex )
  210. pos = pos + ang:Forward() * self.Offset.Pos.Forward + ang:Right() * self.Offset.Pos.Right + ang:Up() * self.Offset.Pos.Up
  211.  
  212. ang:RotateAroundAxis( ang:Up(), self.Offset.Ang.Up)
  213. ang:RotateAroundAxis( ang:Right(), self.Offset.Ang.Right )
  214. ang:RotateAroundAxis( ang:Forward(), self.Offset.Ang.Forward )
  215.  
  216. self:SetRenderOrigin( pos )
  217. self:SetRenderAngles( ang )
  218. self:DrawModel()
  219. end
  220. else
  221. self:SetRenderOrigin( nil )
  222. self:SetRenderAngles( nil )
  223. self:DrawModel()
  224. end
  225. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement