Yo yo yo, waddup ma homies.
Ok, so I would like to change the primary fire sounds of the guns, but I don't know how to do this. I tired adding a .wav file, like:
[CODE]SWEP.Primary.Sound = Sound( "sound/weapons/m16laser.wav" )[/CODE]
However, this doesn't work. Instead, the m16 doesn't emit any sounds at all. Does anyone have a way of doing this? Thanks!
Also, I'd like to have it so that when a certain weapon is equipped a song loops, even when you primary fire the weapon, but then stops when you put the weapon away.
Anyone got any idea about that one? Extra brownie points if you can get it!
Thanks guys!
The sound path is already relative so just put the file path without the sound/
Edit: I'll look into the second question when I get home.
[QUOTE=MeagreMuffin;46233585]
However, this doesn't work. Instead, the m16 doesn't emit any sounds at all. Does anyone have a way of doing this? Thanks![/QUOTE]
Look into resource.AddFile() to add your wav file, if you check console you will likely see a red line of text when you shoot that says "failed to find whatever.wav"
[QUOTE=MeagreMuffin;46233585]
Also, I'd like to have it so that when a certain weapon is equipped a song loops, even when you primary fire the weapon, but then stops when you put the weapon away.
Anyone got any idea about that one? Extra brownie points if you can get it!
[/QUOTE]
Use [url]http://wiki.garrysmod.com/page/WEAPON/Deploy[/url] and [url]http://wiki.garrysmod.com/page/WEAPON/Holster[/url] to tell your weapon to loop the sound ONLY when the player is holding it.
[QUOTE=Exho;46233860]Look into resource.AddFile() to add your wav file, if you check console you will likely see a red line of text when you shoot that says "failed to find whatever.wav"
Use [url]http://wiki.garrysmod.com/page/WEAPON/Deploy[/url] and [url]http://wiki.garrysmod.com/page/WEAPON/Holster[/url] to tell your weapon to loop the sound ONLY when the player is holding it.[/QUOTE]
I already put the resource.AddFile in, but for some reason it didn't work... I put a space in a place there shouldn't have been a space because I'm a noob, so that's sorted, thank you!
This may be pushing it, but do you know how to change the style of the fired bullet? i.e. change the gun to fire lasers instead?
Thanks!
Alright, so a quick update: All of the sounds have downloaded on my server, and majority play, except for one. It's a .wav with 1411kbps bit rate, 10mb in size. In the server when I equip the weapon it says that it cannot play the sound because it cannot find it in the disk repository.
Any ideas?
Sorry, you need to Log In to post a reply to this thread.