• GDCW Weapons
    1,394 replies, posted
  • Avatar of Generic Default
  • OK, so no new sounds. I tried a ton of stuff with burst fire modes in the last few days, and I know it seems easy but it's very glitchy...Post that burst code here! And yes, suppressed weapons will change rounds to non-tracers. I might lower the velocity of them too. I'm having a little bit of a problem with the animations for the silencers, for some reason they can get inverted even though the code is fine, like the animations themselves are screwed up. I'll keep working on it.
  • Avatar of G-Enigma
  • [QUOTE=Generic Default;35702464]OK, so no new sounds. I tried a ton of stuff with burst fire modes in the last few days, and I know it seems easy but it's very glitchy...Post that burst code here! And yes, suppressed weapons will change rounds to non-tracers. I might lower the velocity of them too. I'm having a little bit of a problem with the animations for the silencers, for some reason they can get inverted even though the code is fine, like the animations themselves are screwed up. I'll keep working on it.[/QUOTE] I have some relatively stable silencer code you could maybe use, I ran into that problem a few months ago and found a way to fix it (I forget what it was), but I figured ALT key to silence and e to change fire rate would be more usable. Ill put the essential parts of the burst code and silencer code up here, but you picked kinda the worst time, as the power just went out (on a pleasant sunny day too D: ) and this isn't my gaming computer, which has all the code. Might be tomorrow or 5 mins before power comes back on, idk. :tinfoil:
  • Avatar of Generic Default
  • Right now I have E to toggle semi/full auto and E + crouch to toggle the silencer. Here's a quick video to show it; [media]http://www.youtube.com/watch?v=EMptc_gELT4&context=C47f40c9ADvjVQa1PpcFNxwFTS4YA1kfMu419bON1X4C_SrWKOgNc=[/media]
  • Avatar of G-Enigma
  • [B][I][U]...SOME TIME LATER...[/U][/I][/B] The "non-redundant" parts of mah modified code for the GDCW base: "Bullet Chambering" (Replacing Relaod function): [CODE]function SWEP:Reload() self.Weapon:DefaultReload(ACT_VM_RELOAD) if ( self.Weapon:Clip1() == 0 ) then self.Primary.ClipSize = ( self.Primary.DefaultClip - 1) else self.Primary.ClipSize = ( self.Primary.DefaultClip + 0) end if !self.Owner:IsNPC() then self.ResetSights = CurTime() + self.Owner:GetViewModel():SequenceDuration() end if ( self.Weapon:Clip1() < self.Primary.ClipSize ) and !self.Owner:IsNPC() then -- When the current clip < full clip and the rest of your ammo > 0, then self.Owner:SetFOV( 0, 0.3 ) -- Zoom = 0 self:SetIronsights(false) -- Set the ironsight to false end end[/CODE] Ye see what I did thar? Good. Firerate toggle: This goes under SWEP.data.ironsights at the top of the file [CODE]SWEP.automode = true[/CODE] The rest goes under self.Ironsight in the think function(My version, I dun care what you shmucks do): [CODE]if self.Owner:KeyDown(IN_USE) and self.Owner:KeyPressed(IN_ATTACK2) then //[E] held down and [Right Click] pressed in then if self.automode == true then self.automode = false //self.Primary.RPM = 900 self.Primary.Automatic = false self.Owner:PrintMessage( HUD_PRINTCENTER, "Semi-Automatic" ) //end else self.automode = true //self.Primary.RPM = 280 self.Primary.Automatic = true self.Owner:PrintMessage( HUD_PRINTCENTER, "Full-Automatic" ) //end end end[/CODE] Now for the[B][I][U]GREAT AND ALMIGHTY BURST CODE MAUAAHAHA[/U][/I][/B] Just copy-paste this into a new shared file for the burst base, put all the M16s on it and enjoy! Credit to Nerdeboy here on Facepunch for the timer.simple layout, he doesn't know it but he made this possible! [CODE]// Variables that are used on both client and serverSWEP.Category = "Generic Default's Weapons" SWEP.Author = "Generic Default" SWEP.Contact = "" SWEP.Purpose = "" SWEP.Instructions = "" SWEP.MuzzleAttachment = "1" // Should be "1" for CSS models or "muzzle" for hl2 models SWEP.ShellEjectAttachment = "2" // Should be "2" for CSS models or "1" for hl2 models SWEP.DrawCrosshair = false // Hell no, crosshairs r 4 nubz! SWEP.ViewModelFOV = 65 // How big the gun will look SWEP.ViewModelFlip = true // True for CSS models, False for HL2 models SWEP.Spawnable = false SWEP.AdminSpawnable = false SWEP.Primary.Sound = Sound("") // Sound of the gun SWEP.Primary.Round = ("") // What kind of bullet? SWEP.Primary.Cone = 0.0 // This is the variable SWEP.Primary.ConeSpray = 2.0 // Hip fire accuracy SWEP.Primary.ConeIncrement = 1.0 // Rate of innacuracy SWEP.Primary.ConeMax = 4.0 // Maximum Innacuracy SWEP.Primary.ConeDecrement = 0.1 // Rate of accuracy SWEP.Primary.RPM = 0 // This is in Rounds Per Minute SWEP.Primary.ClipSize = 0 // Size of a clip SWEP.Primary.DefaultClip = 0 // Default number of bullets in a clip SWEP.Primary.KickUp = 0 // Maximum up recoil (rise) SWEP.Primary.KickDown = 0 // Maximum down recoil (skeet) SWEP.Primary.KickHorizontal = 0 // Maximum side recoil (koolaid) SWEP.Primary.Automatic = true // Automatic/Semi Auto SWEP.Primary.Ammo = "none" // What kind of ammo SWEP.Secondary.ClipSize = 0 // Size of a clip SWEP.Secondary.DefaultClip = 0 // Default number of bullets in a clip SWEP.Secondary.Automatic = false // Automatic/Semi Auto SWEP.Secondary.Ammo = "none" SWEP.Secondary.IronFOV = 0 // How much you 'zoom' in. Less is more! SWEP.immashootin = false SWEP.burstmode = true SWEP.data = {} -- The starting firemode SWEP.data.ironsights = 1 SWEP.Single = nil SWEP.IronSightsPos = Vector (2.4537, 1.0923, 0.2696) SWEP.IronSightsAng = Vector (0.0186, -0.0547, 0) function SWEP:Initialize() util.PrecacheSound(self.Primary.Sound) self.Reloadaftershoot = 0 -- Can't reload when firing if !self.Owner:IsNPC() then self:SetWeaponHoldType("ar2") -- Hold type style ("ar2" "pistol" "shotgun" "rpg" "normal" "melee" "grenade" "smg") end if SERVER and self.Owner:IsNPC() then self:SetWeaponHoldType("ar2") -- Hold type style ("ar2" "pistol" "shotgun" "rpg" "normal" "melee" "grenade" "smg") self:SetNPCMinBurst(3) self:SetNPCMaxBurst(10) // None of this really matters but you need it here anyway self:SetNPCFireRate(1/(self.Primary.RPM/60)) self:SetCurrentWeaponProficiency( WEAPON_PROFICIENCY_VERY_GOOD ) end end function SWEP:Deploy() if SinglePlayer() then self.Single=true else self.Single=false end self:SetWeaponHoldType("ar2") // Hold type styles; ar2 pistol shotgun rpg normal melee grenade smg slam fist melee2 passive knife self:SetIronsights(false, self.Owner) // Set the ironsight false self.Weapon:SendWeaponAnim( ACT_VM_DRAW ) if !self.Owner:IsNPC() then self.ResetSights = CurTime() + self.Owner:GetViewModel():SequenceDuration() end return true end function SWEP:Precache() util.PrecacheSound(self.Primary.Sound) util.PrecacheSound("Buttons.snd14") end function SWEP:PrimaryAttack() if self:CanPrimaryAttack() and self.immashootin == false then self:ShootBurst() //see below end if self.immashootin == false and self.Weapon:Clip1() == 1 or self.burstmode != true then self:Shoot() self.immashootin = false end if ( self.Weapon:Clip1() == 2 ) and self.immashootin == false and self.burstmode == true then //If ye've got 2 BULLITS and are in BOAURST MOUDE theyn self:Shoot() //BLAM FIRST SHOT TANGO DOWN local shot2 = .07 //WAIT timer.Simple(shot2, function() self:Shoot() //BLAM SECOND SHOT KILL CONFIRMED self.immashootin = false end ) end //MISSION COMPLETE, MOVING OUT //end end function SWEP:Shoot() //FIER ZE VEAPON!!! if self:CanPrimaryAttack() then self:FireRocket() self.immashootin = true self.Weapon:EmitSound(self.Primary.Sound) self.Weapon:TakePrimaryAmmo(1) self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK ) local fx = EffectData() fx:SetEntity(self.Weapon) fx:SetOrigin(self.Owner:GetShootPos()) fx:SetNormal(self.Owner:GetAimVector()) fx:SetAttachment(self.MuzzleAttachment) util.Effect("gdcw_muzzle",fx) //self.Owner:ViewPunch( Angle( math.Rand(-0.2,-0.1) * self.Primary.KickUp, math.Rand(-0.1,0.1) *self.Primary.KickUp, 0 ) ) self.Owner:SetAnimation( PLAYER_ATTACK1 ) self.Owner:MuzzleFlash() self.Weapon:SetNextPrimaryFire(CurTime()+1/(self.Primary.RPM/60)) end end function SWEP:ShootBurst() if self.Weapon:Clip1() >= 3 and self.burstmode == true then //More than three bullets in mag, burst mode on self.immashootin = true self:Shoot() //code to shoot 1 BULLIT local shottwo = .07 timer.Simple(shot
  • Avatar of Unkle Dada
  • Since you're getting rid of the Hold E to lower thing, can you keep it, but make it a toggle by pressing E+Mouse1 or something? It's really useful for roleplaying.
  • [QUOTE=Generic Default;35702464]OK, so no new sounds. I tried a ton of stuff with burst fire modes in the last few days, and I know it seems easy but it's very glitchy...Post that burst code here! And yes, suppressed weapons will change rounds to non-tracers. I might lower the velocity of them too. I'm having a little bit of a problem with the animations for the silencers, for some reason they can get inverted even though the code is fine, like the animations themselves are screwed up. I'll keep working on it.[/QUOTE] You sure you don't want me to get sounds from BF3? I've already recorded M16 sounds and they sound pretty good. (since there's no way to extract them straight from the game afaik)
  • Avatar of NuvaWii
  • [QUOTE=Uncle Bourbon;35710178]You sure you don't want me to get sounds from BF3? I've already recorded M16 sounds and they sound pretty good. (since there's no way to extract them straight from the game afaik)[/QUOTE] Saint1024 already made a BF3 soundpack, no need to record it anymore; [url]http://www.mediafire.com/?138yxotv5861m2k[/url] And, epic nice update, me likes.
  • [QUOTE=NuvaWii;35713790]Saint1024 already made a BF3 soundpack, no need to record it anymore; [url]http://www.mediafire.com/?138yxotv5861m2k[/url] And, epic nice update, me likes.[/QUOTE] Awesome.
  • [QUOTE=Generic Default;35703517]Right now I have E to toggle semi/full auto and E + crouch to toggle the silencer. Here's a quick video to show it; [media]http://www.youtube.com/watch?v=EMptc_gELT4&context=C47f40c9ADvjVQa1PpcFNxwFTS4YA1kfMu419bON1X4C_SrWKOgNc=[/media][/QUOTE] The muzzleflash shouldn't be visible when the suppressor is on.
  • Avatar of Xgamer921
  • I love the new features, and I think you should go with the Mortar idea someone suggested. I've never seen a mortar swep in Gmod.
  • Guys, Noob question i know and i have tried to fix the sounds error but it just won't, Can someone explain in more detail what to do please? [editline]1st May 2012[/editline] Sorry, Ignore my last post, I just copied the text files in the scripts/sounds file in the the .jar file not the whole scripts file -_-' [editline]1st May 2012[/editline] Actually that didnt work either, what do i do lol
  • Avatar of G-Enigma
  • [QUOTE=q1001000;35778419]We Need Shotguns! Like the Spas-12,AA-12,Saiga-12, Remington 870 and others![/QUOTE] [URL="http://www.gamebanana.com/css/skins/116300"]Spas-12[/URL],[URL="http://1.bp.blogspot.com/-BSYJk77ACOM/Tuj3-lbK_bI/AAAAAAAAA1k/Le3hfrRflXw/s1600/impossibru_50571449.jpg"]AA-12[/URL],[URL="http://chzderp.files.wordpress.com/2011/02/hurr-durr-derp-face-frankly-my-dear-i-dont-give-a-derp.jpg"]Saiga-12[/URL],[URL="http://cdg.net/forums/viewtopic.php?p=7424092&sid=3c6512639ec7ac662c89cd6c2fbcfa9c#p7424092"]Remington 870[/URL]?
  • Avatar of sentrygunman
  • [QUOTE=sproginator;35781937] Sorry, Ignore my last post, I just copied the text files in the scripts/sounds file in the the .jar file not the whole scripts file -_-' [/QUOTE] "in the the .jar file" this isnt minecraft
  • Avatar of sentrygunman
  • [QUOTE=smileykiller447;35788756]So........... whens that update coming out?[/QUOTE] when it comes out
  • [QUOTE=sentrygunman;35785726]"in the the .jar file" this isnt minecraft[/QUOTE] the .jar refers to the file types i use for winrar.....
  • Avatar of sentrygunman
  • [QUOTE=sproginator;35796999]the .jar refers to the file types i use for winrar.....[/QUOTE] this addon still doesnt come in .jar format and the most common format and the format used is .zip, so either way you're still wrong
  • Avatar of umega5
  • I have a weird problem with the gun sounds, all the simi-auto guns have full firing sound, but with the automatic weapons, if i manual single shoot then, the sound works fine, but if i fire them full-auto, the first bullet sounds and it does quit, still firing, and the final bullet sounds. that's it. yes i installed the sound scripts correctly
  • Avatar of Kaysick
  • The only problems that I have with this is that I can't hear any gun sounds (I did install the sound fix that came with the GDCW Explosives) and the scope aiming sensitivity is super high. I have to turn the dpi on my mouse down to even aim correctly. Other than that, its a really good SWEP pack. :D
  • Avatar of cardboardtheory
  • [QUOTE=Kaysick;35840463]The only problems that I have with this is that I can't hear any gun sounds (I did install the sound fix that came with the GDCW Explosives) and the scope aiming sensitivity is super high. I have to turn the dpi on my mouse down to even aim correctly. Other than that, its a really good SWEP pack. :D[/QUOTE] There should be a txt file in the SVN. Read that, it explains the mysteries of the universe.
  • Avatar of umega5
  • [QUOTE=cardboardtheory;35857086]There should be a txt file in the SVN. Read that, it explains the mysteries of the universe.[/QUOTE] I have done that when i first got GDCW, and i guess i should note they work whenever i use a bullet time effect.
  • Avatar of NuvaWii
  • [QUOTE=G-Enigma;35782176][URL="http://www.gamebanana.com/css/skins/116300"]Spas-12[/URL],[URL="http://1.bp.blogspot.com/-BSYJk77ACOM/Tuj3-lbK_bI/AAAAAAAAA1k/Le3hfrRflXw/s1600/impossibru_50571449.jpg"]AA-12[/URL],[URL="http://chzderp.files.wordpress.com/2011/02/hurr-durr-derp-face-frankly-my-dear-i-dont-give-a-derp.jpg"]Saiga-12[/URL],[URL="http://cdg.net/forums/viewtopic.php?p=7424092&sid=3c6512639ec7ac662c89cd6c2fbcfa9c#p7424092"]Remington 870[/URL]?[/QUOTE] Haha, lol'd. The only AA-12 for CS:S so far so good is the MW3 one, and I am fairly sure nobody wants that, haha. This does, however, need a PKM or PKP Pecheneg, would be awesome to see one of those in GDCW sometime.
  • Avatar of G-Enigma
  • [QUOTE=NuvaWii;35890501]Haha, lol'd. The only AA-12 for CS:S so far so good is the [B][URL="http://i1.kym-cdn.com/photos/images/newsfeed/000/161/719/t.png"]MW3[/URL][/B] one, and I am fairly sure nobody wants that, haha. This does, however, need a [URL="http://www.gamebanana.com/css/skins/82418"]PKM[/URL][B][I]<---- NO[/I][/B] or [B][URL="http://www.youtube.com/watch?v=bp4tpttf1xE"]PKP Pecheneg[/URL][/B], would be awesome to see one of those in GDCW sometime.[/QUOTE] That PKP won't decompile well btw
  • Avatar of NuvaWii
  • [QUOTE=G-Enigma;35892308]That PKP won't decompile well btw[/QUOTE] Just sayin', I hate the MW3 itself very much (bad sounds, horrific looking weapons, worst playerbase ever), all I like about it are very few of its weapon models (very, VERY few). However, the addition of a [url=http://gamebanana.com/css/skins/117118]Remington 870[/url] would be awesome.
  • Avatar of Xgamer921
  • Is it possible to make the guns jam every once in a while. Like where there is an option to enable it, and/or how easily you want it to jam. And a like cleaning option. Im not trying to ask for a ton which that is. I am just stating that would be cool.
  • Avatar of Generic Default
  • Sorry but I'm really busy now. I'm thinking it should be released between 2 and 3 weeks from now once I have time to finish it.
  • Avatar of sentrygunman
  • [QUOTE=Generic Default;35940874]Sorry but I'm really busy now. I'm thinking it should be released between 2 and 3 weeks from now once I have time to finish it.[/QUOTE] Hey Gen if you didn't read my comment on your profile I'm going to work on a small but detailed part of this pack that will make it look better. I'm going to make it so each bullet is actually a bullet instead of the led model. I'll pm you the changes when I'm done. WIP Pictures [img]http://gyazo.com/f0197c8dbd0150c3cc6a9d0ed86da04a.png[/img] More coming soon! Bullets 4.6x30 - done 5.7x28 - done 5.56x45 - done 7.62x51 - done 9x19 - done 10x22 - done 11x22 - done 12.7x99 - done .357 - done [img_thumb]http://cloud.steampowered.com/ugc/541801264310683324/8B530EBDC0AEA9F1A83390F7D4CCCC4D076B46B8/[/img_thumb]