AddCSLuaFile() SWEP.Base = "arc9_uplp_base" SWEP.Category = "ARC9 - Poly Arms" SWEP.Spawnable = true ---- FUNDAMENTALS SWEP.Slot = 1 -- Which slot the weapon is in; starts at 0 ---- Name, Description, Class, Category and Trivia SWEP.PrintName = ARC9:GetPhrase("uplp_weapon_mk23") SWEP.Description = ARC9:GetPhrase("uplp_weapon_mk23_desc") SWEP.Class = ARC9:GetPhrase("uplp_class_weapon_pistol") -- In the Customization Menu SWEP.SubCategory = ARC9:GetPhrase("uplp_category_weapon_pistol") -- In the Spawnmenu SWEP.Trivia = { [ ARC9:GetPhrase( "uplp_manufacturer" ) ] = ARC9:GetPhrase( "uplp_manufacturer_hk" ), [ ARC9:GetPhrase( "uplp_caliber" ) ] = ARC9:GetPhrase( "uplp_caliber_45acp"), [ ARC9:GetPhrase( "uplp_mechanism" ) ] = string.format( ARC9:GetPhrase("uplp_mechanism_2" ), ARC9:GetPhrase( "uplp_mechanism_shortrecoil" ), ARC9:GetPhrase( "uplp_mechanism_browning" ) ), [ ARC9:GetPhrase( "uplp_country" ) ] = ARC9:GetPhrase( "uplp_country_germany" ), [ ARC9:GetPhrase( "uplp_year" ) ] = string.format( ARC9:GetPhrase("uplp_year_present"), "1991" ), } SWEP.Credits = { [ ARC9:GetPhrase( "uplp_lua" ) ] = "Fesiug, Moka", [ ARC9:GetPhrase( "uplp_assets" ) ] = "notcplkerry", [ ARC9:GetPhrase( "uplp_animations" ) ] = "Partexedd", [ ARC9:GetPhrase( "uplp_sounds" ) ] = "rzen1th", [ ARC9:GetPhrase( "uplp_general" ) ] = "Fesiug, Darsu", } SWEP.StandardPresets = { -- "[Automatico]XQAAAQCYAAAAAAAAAAA9iIIiM7tuo1AtUBf3wUZrgNb6B3R4bFwQ7nSkIvgviT/8NKnMVxpEEP1d50kmmxsjmIfMQTGuafp5PTFICe4BHRjDVggtnGDC0S0YPEu4S9etBtEnkSk5nFxpbQA=" } ---- Muzzle Effects, Shell Effects, Camera SWEP.MuzzleParticle = "muzzleflash_1" SWEP.MuzzleEffectQCA = 1 SWEP.TracerNum = 1 SWEP.TracerSize = 1 SWEP.ShellModel = "models/weapons/arc9/uplp/shells/shell_919.mdl" SWEP.ShellScale = 1.2 SWEP.ShellPitch = 90 SWEP.CaseEffectQCA = 2 SWEP.CamQCA = 3 SWEP.CamOffsetAng = Angle(0, 0, 90) ---- View & Worldmodel SWEP.ViewModel = "models/weapons/arc9/c_uplp-f_mk23_5.mdl" SWEP.WorldModel = "models/weapons/arc9/w_uplp_beretta.mdl" SWEP.MirrorVMWM = true SWEP.NoTPIKVMPos = true SWEP.TPIKParentToSpine4 = true -- SWEP.WorldModelMirror = "models/weapons/arc9/c_uplp_deagle.mdl" SWEP.WorldModelOffset = { Pos = Vector(-8, 3, -4.5), Ang = Angle(0, 0, 180), TPIKPos = Vector(7, -7, -4), TPIKAng = Angle(-10, 65, 90), Scale = 1 } SWEP.ViewModelFOVBase = 75 SWEP.ActivePos = Vector(0.2, 0, -0.1) SWEP.ActiveAng = Angle(0, 0, -2) -- Looks neat. -- SWEP.ReloadPos = Vector(-1, 0, 0) -- SWEP.ReloadAng = Angle(0, 0, -15) SWEP.BobSettingsMove = {0.85, -0.45, 0.5, 0.9, -1.5, 1.15} SWEP.BobSettingsSpeed = {0.9, 1, 0.92, 1, 0.92, 0.8} SWEP.AnimShoot = ACT_HL2MP_GESTURE_RANGE_ATTACK_PISTOL SWEP.AnimReload = ACT_HL2MP_GESTURE_RELOAD_MAGIC ---- Weapon Stats and Behaviour -- Damage SWEP.DamageMax = 33 SWEP.DamageMin = 12 SWEP.DamageType = DMG_BULLET SWEP.BodyDamageMults = { [HITGROUP_HEAD] = 2, [HITGROUP_CHEST] = 1.25, [HITGROUP_STOMACH] = 1, [HITGROUP_LEFTARM] = 1, [HITGROUP_RIGHTARM] = 1, [HITGROUP_LEFTLEG] = 0.9, [HITGROUP_RIGHTLEG] = 0.9, } SWEP.Penetration = 12 -- Units of wood that can be penetrated SWEP.ImpactForce = 8 -- How much kick things will have when hit -- Range SWEP.RangeMin = 9 / ARC9.HUToM SWEP.RangeMax = 45 / ARC9.HUToM -- Physical Bullets SWEP.PhysBulletMuzzleVelocity = 625 * 39.37 SWEP.PhysBulletGravity = 1.5 SWEP.PhysBulletDrag = 1.5 -- Magazine Info SWEP.Ammo = "pistol" -- What ammo type this gun uses. SWEP.ChamberSize = 1 SWEP.ClipSize = 12 -- Recoil SWEP.Recoil = 1 SWEP.RecoilUp = 4.2 SWEP.RecoilSide = 2.1 SWEP.RecoilRandomUp = 0.25 SWEP.RecoilRandomSide = 0.75 SWEP.RecoilRise = 10 SWEP.MaxRecoilBlowback = 0 SWEP.RecoilPunch = 0 SWEP.RecoilAutoControl = 1.15 SWEP.RecoilMultSights = 0.95 SWEP.RecoilMultCrouch = 0.75 -- Visual Recoil SWEP.VisualRecoil = 0.75 SWEP.VisualRecoilMultSights = 1 SWEP.VisualRecoilCenter = Vector(2, 11, 2) SWEP.VisualRecoilUp = -7.15 -- Vertical tilt SWEP.VisualRecoilSide = 0 -- Horizontal tilt SWEP.VisualRecoilRoll = 130 -- Roll tilt SWEP.VisualRecoilPunch = 4.0 -- How far back visual recoil moves the gun SWEP.VisualRecoilDampingConst = 200 SWEP.VisualRecoilSpringMagnitude = 1.44 SWEP.VisualRecoilPositionBumpUp = 0.25 SWEP.VisualRecoilMultHipFire = 1 -- SWEP.VisualRecoilUpHipFire = 2 -- SWEP.VisualRecoilSideHipFire = -0.1 -- SWEP.VisualRecoilRollHipFire = 20 -- SWEP.VisualRecoilPunchHipFire = 2 -- SWEP.VisualRecoilDampingConstHipFire = 45 -- SWEP.VisualRecoilPositionBumpUpHipFire = .5 -- Accuracy and Spread SWEP.Spread = math.rad(4/60) SWEP.SpreadAddHipFire = 0.018 SWEP.SpreadAddRecoil = 0.02 SWEP.SpreadAddMove = 0.02 SWEP.SpreadAddMidAir = 0.05 SWEP.SpreadMultSights = 1 SWEP.SpreadMultMove = 1 SWEP.RecoilDissipationRate = 4 SWEP.RecoilResetTime = 0.01 SWEP.RecoilPerShot = 1 / 4 SWEP.RecoilModifierCap = 1 SWEP.RecoilMax = 1 -- Weapon handling SWEP.SpeedMult = 1 -- Walk speed multiplier SWEP.SpeedMultSights = 0.85 -- When aiming SWEP.AimDownSightsTime = 0.16 -- Time it takes to fully enter ADS SWEP.SprintToFireTime = 0.15 -- Time it takes to fully enter sprint -- Shooting and Firemodes SWEP.RPM = 280 -- How fast gun shoot SWEP.HeatCapacity = 60 -- For suppresors; how many shots for full heat With big silencer (Small silencers will make this number lower down to 70%) SWEP.Num = 1 -- How many bullets shot at oncew SWEP.Firemodes = { { Mode = 1 }, -- Semi } SWEP.ShootPitch = 90 SWEP.ShootVol = 110 -- HoldType Info SWEP.HoldType = "revolver" SWEP.HoldTypeSprint = "pistol" SWEP.HoldTypeHolstered = nil SWEP.HoldTypeSights = "revolver" SWEP.HoldTypeCustomize = "slam" SWEP.HoldTypeNPC = nil -- NPC Info SWEP.NPCWeaponType = "weapon_pistol" SWEP.NPCWeight = 60 -- Iron Sight and Sight Info SWEP.IronSights = { Pos = Vector(-1.92, -2, 0.49), Ang = Angle(0, 0.25, 0), Magnification = 1.1, ViewModelFOV = 70, } SWEP.PeekPos = Vector(0.1, 1, -2) SWEP.PeekAng = Angle(1, 0.5, -20) SWEP.PeekPosReloading = Vector(0.5, 0, -1) SWEP.PeekAngReloading = Angle(1, -5, 10) -- Customization Menu Info SWEP.CustomizePos = Vector(14, 30, 2.5) SWEP.CustomizeAng = Angle(90, 0, 0) SWEP.CustomizeRotateAnchor = Vector(14, -1.93, -3) SWEP.CustomizeSnapshotPos = Vector(0, 5, 0) SWEP.CustomizeSnapshotFOV = 70 -- Dropped Magazine SWEP.ShouldDropMag = true SWEP.ShouldDropMagEmpty = true SWEP.DropMagazineModel = "models/weapons/arc9/uplp/beretta_mag_std.mdl" SWEP.DropMagazineTime = 0.4 SWEP.DropMagazineQCA = 4 SWEP.DropMagazinePos = Vector(0, 0, 0) SWEP.DropMagazineAng = Angle(90, 90, 90) SWEP.DropMagazineVelocity = Vector(0, -40, 0) ---- Sounds -- local pathRZ = "uplp_rz/57/" -- urbna! local pathUT = "uplp_f/mk23/" local pathUTC = "uplp_urban_temp/common/" local path1911 = "uplp_urban_temp/1911/" local pathSCAR = "uplp_urban_temp/scar/" local pathDE = "uplp_urban_temp/deagle/" SWEP.ShootSound = { pathUT .. "fire-762-01.ogg", pathUT .. "fire-762-02.ogg", pathUT .. "fire-762-03.ogg", pathUT .. "fire-762-04.ogg", pathUT .. "fire-762-05.ogg", pathUT .. "fire-762-06.ogg", } SWEP.ShootSoundSilenced = { pathUT .. "fire-762-sup-02.ogg", pathUT .. "fire-762-sup-01.ogg", pathUT .. "fire-762-sup-03.ogg", pathUT .. "fire-762-sup-04.ogg", pathUT .. "fire-762-sup-05.ogg", pathUT .. "fire-762-sup-06.ogg", } SWEP.ShootSoundSilencedIndoor = SWEP.ShootSoundSilenced SWEP.DistantShootSound = { pathUTC .. "308tails/fire-dist-308-rif-ext-01.ogg", pathUTC .. "308tails/fire-dist-308-rif-ext-02.ogg", pathUTC .. "308tails/fire-dist-308-rif-ext-03.ogg", pathUTC .. "308tails/fire-dist-308-rif-ext-04.ogg", pathUTC .. "308tails/fire-dist-308-rif-ext-05.ogg", pathUTC .. "308tails/fire-dist-308-rif-ext-06.ogg" } SWEP.DistantShootSoundIndoor = { pathUTC .. "308tails/fire-dist-308-rif-int-01.ogg", pathUTC .. "308tails/fire-dist-308-rif-int-02.ogg", pathUTC .. "308tails/fire-dist-308-rif-int-03.ogg", pathUTC .. "308tails/fire-dist-308-rif-int-04.ogg", pathUTC .. "308tails/fire-dist-308-rif-int-05.ogg", pathUTC .. "308tails/fire-dist-308-rif-int-06.ogg" } SWEP.DistantShootSoundSilenced = { pathUTC .. "generictails/sup-tail-01.ogg", pathUTC .. "generictails/sup-tail-02.ogg", pathUTC .. "generictails/sup-tail-03.ogg", pathUTC .. "generictails/sup-tail-04.ogg", pathUTC .. "generictails/sup-tail-05.ogg", pathUTC .. "generictails/sup-tail-06.ogg", pathUTC .. "generictails/sup-tail-07.ogg", pathUTC .. "generictails/sup-tail-08.ogg", pathUTC .. "generictails/sup-tail-09.ogg", pathUTC .. "generictails/sup-tail-10.ogg" } SWEP.DistantShootSoundSilencedIndoor = { pathUTC .. "generictails/fire-dist-int-pistol-light-01.ogg", pathUTC .. "generictails/fire-dist-int-pistol-light-02.ogg", pathUTC .. "generictails/fire-dist-int-pistol-light-03.ogg", pathUTC .. "generictails/fire-dist-int-pistol-light-04.ogg", pathUTC .. "generictails/fire-dist-int-pistol-light-05.ogg", pathUTC .. "generictails/fire-dist-int-pistol-light-06.ogg", } SWEP.DropMagazineSounds = { pathUTC .. "smg_pistol_magdrop_1.ogg", pathUTC .. "smg_pistol_magdrop_2.ogg", pathUTC .. "smg_pistol_magdrop_3.ogg", pathUTC .. "smg_pistol_magdrop_4.ogg", } ---- Animations -- HideBones, BulletBones, etc. SWEP.BulletBones = { [1] = "bullet1", [2] = "bullet2", [3] = "bullet3", } -- SWEP.HideBones = { -- "magb", -- } SWEP.ReloadHideBoneTables = { [1] = { "mag", "bullet1", "bullet2", "bullet3", }, } local mechh = { pathDE .. "mech-01.ogg", pathDE .. "mech-02.ogg", pathDE .. "mech-03.ogg", pathDE .. "mech-04.ogg", pathDE .. "mech-05.ogg", pathDE .. "mech-06.ogg", } local UTCrattle = { pathUTC .. "pistol_rattle_1.ogg", pathUTC .. "pistol_rattle_2.ogg", pathUTC .. "pistol_rattle_3.ogg", pathUTC .. "pistol_rattle_4.ogg", } local thetoggle = {{ s = { "arc9/toggles/flashlight_laser_toggle_off_01.ogg", "arc9/toggles/flashlight_laser_toggle_off_02.ogg", "arc9/toggles/flashlight_laser_toggle_off_03.ogg", "arc9/toggles/flashlight_laser_toggle_on_01.ogg", "arc9/toggles/flashlight_laser_toggle_on_02.ogg", "arc9/toggles/flashlight_laser_toggle_on_03.ogg", }, t = 0 }} -- Animations SWEP.Animations = { ["idle"] = { Source = "idle", EventTable = { {hide = 1, t = 0}, }, IKTimeLine = { { t = 0, lhik = 1, rhik = 1 }, { t = 1, lhik = 1, rhik = 1 }, }, }, ["idle_empty"] = { Source = "idle_empty", EventTable = { {hide = 1, t = 0}, }, IKTimeLine = { { t = 0, lhik = 1, rhik = 1 }, { t = 1, lhik = 1, rhik = 1 }, }, }, ["ready"] = { Source = "ready", Mult = 1.1, EventTable = { { s = path1911 .. "draw.ogg", t = 0 / 60, c = ca, v = 0.8 }, { s = pathUT .. "slidepull.ogg", t = 5 / 60, c = ca, v = 0.8 }, { s = pathUT .. "sliderel.ogg", t = 15 / 60, c = ca, v = 0.8 }, {s = pathUTC .. "cloth_4.ogg", t = 22 / 60}, }, IKTimeLine = { { t = 0, lhik = 0, rhik = 0 }, { t = 0.9, lhik = 0, rhik = 0 }, { t = 1, lhik = 1, rhik = 1 }, }, }, ["draw"] = { Source = "draw", MinProgress = 0.75, FireASAP = true, EventTable = { { s = path1911 .. "draw.ogg", t = 0 / 60, c = ca, v = 0.8 }, }, IKTimeLine = { { t = 0, lhik = 1, rhik = 0 }, { t = 0.15, lhik = 0, rhik = 1 }, { t = 0.65, lhik = 1, rhik = 1 }, { t = 0.92, lhik = 1, rhik = 1 }, { t = 1, lhik = 1, rhik = 1 }, }, }, ["draw_empty"] = { Source = "draw_empty", MinProgress = 0.75, FireASAP = true, EventTable = { { s = path1911 .. "draw.ogg", t = 0 / 60, c = ca, v = 0.8 }, }, IKTimeLine = { { t = 0, lhik = 1, rhik = 0 }, { t = 0.15, lhik = 0, rhik = 1 }, { t = 0.65, lhik = 1, rhik = 1 }, { t = 0.92, lhik = 1, rhik = 1 }, { t = 1, lhik = 1, rhik = 1 }, }, }, ["holster"] = { Source = "holster", MinProgress = 0.5, EventTable = { {s = pathUTC .. "cloth_2.ogg", t = 0}, }, IKTimeLine = { { t = 0, lhik = 1, rhik = 1 }, { t = 0.05, lhik = 1, rhik = 1 }, { t = 0.25, lhik = 0, rhik = 0 }, }, }, ["holster_empty"] = { Source = "holster_empty", MinProgress = 0.5, EventTable = { {s = pathUTC .. "cloth_2.ogg", t = 0}, }, IKTimeLine = { { t = 0, lhik = 1, rhik = 1 }, { t = 0.05, lhik = 1, rhik = 1 }, { t = 0.25, lhik = 0, rhik = 0 }, }, }, ["fire"] = { Source = {"fire"}, -- Time = 1, ShellEjectAt = 0.01, EventTable = { { s = mechh, t = 0, v = 0.3 } }, IKTimeLine = { { t = 0, lhik = 0, rhik = 0 }, { t = 0.5, lhik = 0, rhik = 0 }, { t = 1, lhik = 1, rhik = 1 }, }, }, ["fire_empty"] = { Source = "fire_empty", -- Time = 1, ShellEjectAt = 0.01, EventTable = { { s = mechh, t = 0, v = 0.3 } }, }, -- Reloads -- ["reload"] = { Source = "reload", MinProgress = 0.95, PeekProgress = 0.825, RefillProgress = 0.675, FireASAP = true, Mult = 1.2, EventTable = { { s = pathUTC .. "pistol_rattle_2.ogg", t = 0 / 60, c = ca }, { s = pathDE .. "magout.ogg", t = 12.5 / 60, c = ca }, { s = pathUTC .. "magpouch_pull_small.ogg", t = 20 / 60, v = 0.3 }, { s = pathDE .. "magin.ogg", t = 42 / 60, c = ca }, { s = UTCrattle, t = 55 / 60, c = ca }, {hide = 0, t = 0}, {hide = 1, t = 0.4}, {hide = 0, t = 0.6}, }, IKTimeLine = { { t = 0, lhik = 1, rhik = 1 }, { t = 0.15, lhik = 0, rhik = 0 }, { t = 0.7, lhik = 0, rhik = 0 }, { t = 0.975, lhik = 1, rhik = 1 }, { t = 1, lhik = 1, rhik = 1 }, }, }, ["reload_empty"] = { Source = "reload_empty", MinProgress = 0.95, PeekProgress = 0.85, RefillProgress = 0.725, FireASAP = true, Mult = 1.2, EventTable = { { s = pathUTC .. "pistol_rattle_2.ogg", t = 0 / 60, c = ca }, { s = pathDE .. "magout.ogg", t = 10 / 60, c = ca }, { s = pathUTC .. "magpouch_pull_small.ogg", t = 20 / 60, v = 0.3 }, { s = pathDE .. "magin.ogg", t = 35 / 60, c = ca }, { s = pathDE .. "chamber.ogg", t = 60 / 60, c = ca }, { s = UTCrattle, t = 67.5 / 60, c = ca }, {hide = 0, t = 0}, {hide = 1, t = 0.4}, {hide = 0, t = 0.6}, }, IKTimeLine = { { t = 0, lhik = 1, rhik = 1 }, { t = 0.15, lhik = 0, rhik = 0 }, { t = 0.7, lhik = 0, rhik = 0 }, { t = 0.925, lhik = 1, rhik = 1 }, { t = 1, lhik = 1, rhik = 1 }, }, }, -- Inspecc -- ["inspect"] = { Source = "inspect", EventTable = { { s = pathUTC .. "cloth_2.ogg", t = 5 / 30, c = ca }, { s = pathUTC .. "movement-pistol-02.ogg", t = 52 / 30, c = ca }, { s = pathUTC .. "cloth_4.ogg", t = 56 / 30, c = ca, v = 0.5 }, { s = pathUTC .. "cloth_1.ogg", t = 92 / 30, c = ca }, }, IKTimeLine = { { t = 0, lhik = 1, rhik = 1 }, { t = 0.2, lhik = 0, rhik = 0 }, { t = 0.98, lhik = 0, rhik = 0 }, { t = 1, lhik = 1, rhik = 1 }, }, }, ["inspect_empty"] = { Source = "inspect_empty", EventTable = { { s = pathUTC .. "cloth_2.ogg", t = 5 / 30, c = ca }, { s = pathUTC .. "movement-pistol-02.ogg", t = 52 / 30, c = ca }, { s = pathUTC .. "cloth_4.ogg", t = 56 / 30, c = ca, v = 0.5 }, { s = pathUTC .. "cloth_1.ogg", t = 92 / 30, c = ca }, }, IKTimeLine = { { t = 0, lhik = 1, rhik = 1 }, { t = 0.2, lhik = 0, rhik = 0 }, { t = 0.95, lhik = 0, rhik = 0 }, { t = 1, lhik = 1, rhik = 1 }, }, }, ["toggle"] = { Source = "modeswitch", EventTable = thetoggle }, ["toggle_empty"] = { Source = "modeswitch_empty", EventTable = thetoggle }, ["switchsights"] = { Source = "modeswitch", EventTable = thetoggle }, ["switchsights_empty"] = { Source = "modeswitch_empty", EventTable = thetoggle }, } SWEP.AttachmentElements = { ["muzzle"] = { Bodygroups = { {1, 1} } } } local defatt = "arc9/def_att_icons/" local defatt2 = "entities/uplp_attachements/def/" SWEP.Attachments = { { PrintName = ARC9:GetPhrase("uplp_category_optic"), Category = {"uplp_optic_small"}, DefaultIcon = Material(defatt .. "optic.png", "mips smooth"), ExcludeElements = {"nooptic"}, Bone = "slide", Pos = Vector(0, -0.8, -1.8), ExtraSightDistance = 3, Ang = Angle(90, 90, 180), }, { PrintName = ARC9:GetPhrase("uplp_category_muzzle"), Category = {"uplp_muzzle_pistol"}, ExcludeElements = {"nomuz"}, InstalledElements = {"muzzle"}, Bone = "body", Pos = Vector(0, -2.465, 8.53), Ang = Angle(90, 90, 180), }, { PrintName = ARC9:GetPhrase("uplp_category_tactical"), Category = {"uplp_tac_pistol"}, Bone = "body", Pos = Vector(0, -1.25, 6.7), Ang = Angle(90, 90, 0), Scale = 1.3334, }, -- Cosmetic shit { PrintName = ARC9:GetPhrase("uplp_category_sticker") .. " A", StickerModel = "models/weapons/arc9/uplp/stickers/beretta_1.mdl", Category = "stickers", Bone = "body", Pos = Vector(0.5, -0.5, 0.5), Ang = Angle(90, 0, -90), }, { PrintName = ARC9:GetPhrase("uplp_category_sticker") .. " B", StickerModel = "models/weapons/arc9/uplp/stickers/beretta_2.mdl", Category = "stickers", Bone = "body", Pos = Vector(0.5, 1, 0.25), Ang = Angle(90, 0, -90), }, { PrintName = ARC9:GetPhrase("uplp_category_charm"), Category = "charm", Bone = "slide", Pos = Vector(0.625, 0.1, 3.7), Ang = Angle(90, 0, -90), }, }