---WARNING---
First-time swep
I did this mainly as a test to see how well it would work out. I compiled a few sounds together so that the bolt sounds were audible and the reload sounds were that of the actual intervention and not that of those crappy CSS sounds.
Credits:
-Zeej for the awesomeness animations
-Yves for making the red tiger camo
-Me for coding and compiling the sounds
-Worshipper for Mad Cows base
-Irkalla for reminding me about shit and fixing bugs!
[url=http://www.garrysmod.org/downloads/?a=view&id=95485][img]http://www.garrysmod.org/img/?t=dll&id=95485[/img][/url]
There is a link on the bottom of your download page, here:
[noparse][url=http://www.garrysmod.org/downloads/?a=view&id=95151][img]http://www.garrysmod.org/img/?t=dll&id=95151[/img][/url][/noparse]
Just paste this into your post.
[QUOTE=MakeR;21159689]There is a link on the bottom of your download page, here:
[noparse][url=http://www.garrysmod.org/downloads/?a=view&id=95151][img]http://www.garrysmod.org/img/?t=dll&id=95151[/img][/url][/noparse]
Just paste this into your post.[/QUOTE]
thanks alots.
[QUOTE=Flubadoo;21159354] If someone can tell me how to make the reload sound not play unless you are actually reloading, please tell!
[/QUOTE]
[lua]SWEP.ReloadSound = "weapons/weapon_intervention/mw2_intervention_reload.wav"[/lua]
[QUOTE=JamesFoil;21160194][lua]SWEP.ReloadSound = "weapons/weapon_intervention/mw2_intervention_reload.wav"[/lua][/QUOTE]
lol thanks
W00t no one is flamin' me!
YOU SUCK!
Just Kidding!
But, whenever I Install this, I Get 1000 Lua Errors :L
Nice, I'll be sure to download this.
Doesn't work, only lua error spam of this:
[code]
SWEP (weapon_mad_base_sniper) is derived from non existant SWEP (weapon_mad_base) - Expect errors!
weapons\weapon_mad_base_sniper\shared.lua:39: attempt to call method 'SetWeaponHoldType' (a nil value)
weapons\weapon_mad_base_sniper\shared.lua:306: attempt to call method 'SecondThink' (a nil value)
[/code]
I think you need Mad cows for this to work.
[QUOTE=Assault_Trooper;21162738]Doesn't work, only lua error spam of this:
[code]
SWEP (weapon_mad_base_sniper) is derived from non existant SWEP (weapon_mad_base) - Expect errors!
weapons\weapon_mad_base_sniper\shared.lua:39: attempt to call method 'SetWeaponHoldType' (a nil value)
weapons\weapon_mad_base_sniper\shared.lua:306: attempt to call method 'SecondThink' (a nil value)
[/code][/QUOTE]
You need Mad Cows weapon base.
hmmm... i included the mad cows base
shieet i forgot the _base! I only included the _sniper_base.
stupidness on my part.
This is how the SWEP looks like to me:
[URL=http://www.cubeupload.com/img/19d400inter.jpg][IMG]http://www.cubeupload.com/files/thumbs/th.19d400inter.jpg[/IMG][/URL]
[QUOTE=JamesFoil;21160194][lua]SWEP.ReloadSound = "weapons/weapon_intervention/mw2_intervention_reload.wav"[/lua][/QUOTE]
just tested and it didn't change the holdin "r" glitch
wtf do you guys have red tiger camo?
@assaulttrooper
im gonna upload a new version with all the bases included, but only once I find out how to fix the reloading
in the meantime, just download mad cows base by worshipper.
[editline]05:16PM[/editline]
quick fix uploaded
[editline]05:39PM[/editline]
Once I fix the bugs on this, I'm going to begin coding an OVER 9000! thing.
Why am i not in Credits >=o
[QUOTE=JamesFoil;21163544]Why am i not in Credits >=o[/QUOTE]
Why should you be?
[QUOTE=Flubadoo;21163749]Why should you be?[/QUOTE]
[lua] function SWEP:Reload()
self.Weapon:DefaultReload( ACT_VM_RELOAD );
self:SetIronsights( false )
end [/lua]
That Should stop the reload stop the reload sound going on.
Havnt tested, but if it doesnt work, ill think if something.
[QUOTE=JamesFoil;21163888][lua] function SWEP:Reload()
self.Weapon:DefaultReload( ACT_VM_RELOAD );
self:SetIronsights( false )
end [/lua]
That Should stop the reload stop the reload sound going on.
Havnt tested, but if it doesnt work, ill think if something.[/QUOTE]
Just tested that with the emit:sound with it. Didn't work. Thanks though.
Works perfect for me save it the reload sounds when I hold down R. But thats why I dont hold down r.
[lua] Unbind r [/lua]
PROBLEM SOLVED! :]
[QUOTE=JamesFoil;21165603][lua] Unbind r [/lua]
PROBLEM SOLVED! :][/QUOTE]
Lol, where do i put it?
You should credit Zeej for Ripping, Animating and Compiling. And of course Infinity Ward for the model. I hate when guys just take a model and a animation and dont even credit them. You know how hard work it is to create animations?
If you did it right, you would have modified the base and kept the necessary files in the download.
This is good for a first time SWEP, keep it up. :)
[QUOTE=murphy7;21165831]You should credit Zeej for Ripping, Animating and Compiling. And of course Infinity Ward for the model. I hate when guys just take a model and a animation and dont even credit them. You know how hard work it is to create animations?[/QUOTE]
lol i didn't know it was him who did the anims.
You need some logic to prevent your weapon from trying to reload even if it's full. Big duh when you read this. I duh'd my first time I thought about it too.
[lua]
if !( ( self.Weapon:Clip1() ) < ( self.Primary.ClipSize ) ) then return end -- Put this at the very top of your Reload hook.
[/lua]
This should stop the reload sound from trying to play on a full clip. It will also stop any OTHER parts of reloading from happening as well when you've got a full clip.
Basically, it says if the weapon's ammo in the primary clip isn't less than the clipsize, then return. Return is just your way to tell GMod Lua to not run anymore code in a function.
I'm not the best Lua scripter in the world, but I'm going to tell you this: Before you do ANYTHING, make sure that you have conditions laid in place to have something happen ONLY when it needs to happen. Prevent it from happening any other time. Check for an entities validity always, make sure it's what you think it is, all kinds of stuff. You'll learn soon enough though.
[QUOTE=Irkalla;21182107]You need some logic to prevent your weapon from trying to reload even if it's full. Big duh when you read this. I duh'd my first time I thought about it too.
[lua]
if !( ( self.Weapon:Clip1() ) < ( self.Primary.ClipSize ) ) then return end -- Put this at the very top of your Reload hook.
[/lua]
This should stop the reload sound from trying to play on a full clip. It will also stop any OTHER parts of reloading from happening as well when you've got a full clip.
Basically, it says if the weapon's ammo in the primary clip isn't less than the clipsize, then return. Return is just your way to tell GMod Lua to not run anymore code in a function.
I'm not the best Lua scripter in the world, but I'm going to tell you this: Before you do ANYTHING, make sure that you have conditions laid in place to have something happen ONLY when it needs to happen. Prevent it from happening any other time. Check for an entities validity always, make sure it's what you think it is, all kinds of stuff. You'll learn soon enough though.[/QUOTE]
Lol thanks alot! I didn't read up that much on returns in the lua tutorial series. btw, where is there an exclamation mark?
[editline]05:41PM[/editline]
new version up with skin choices, and complete bug fix thanks to the allmighty Irkalla
[editline]05:48PM[/editline]
Should I add a VGUI thingy?
Almighty, heh. Tell some of the Laugodz about it, they'll find it quite funny.
[QUOTE=Irkalla;21262375]Almighty, heh. Tell some of the Laugodz about it, they'll find it quite funny.[/QUOTE]
What?
Basically what I'm saying is while I appreciate the comment... You should see some REAL almighty ones in action. :P
Sorry, you need to Log In to post a reply to this thread.