Can you use CS:S weapon skins with custom sounds/anims on GMod?

I enjoy playing TTT, and since all of them utilize CS:S weapons I wanted to try and see if I could use the same kind of custom skins I use on CS:S on GMod.

Short story I failed. Long story, I tried replacing the Deagle with a custom skin, just to try it out. That skin had both custom anims and sound, but when I used it, the sounds wouldn’t play properly. I think this might have to do with the game_sound_manifest file, because when I checked the one in the .rar file it had a completely different code in it than the one currently in my folder. Due to this, I didn’t replace my game_sound_manifest file with the one in the .rar file.

When I fired the weapon, it made a sound, but switching and reloading makes no sound at all. So I’m beginning to think that custom sounds and animations cannot work in GMod for CS:S weapons.

So, I attempted to try again, this time, changing the manifest file in my garrysmod folder to see if that was the problem. In order to ensure everything was working instead of simply replacing the file, I took the snippet of code that said something about “preload_file” “script/weapons/deagle.txt” and put it in my current manifest file to see if that would solve the issue.

Sadly, it didn’t.

When I closed GMod and rechecked it, BAM the line was GONE. I tried this 4 times, all with the same result. The line disappears, and I think it’s because GMod recreates/alters the manifest file. I dunno, I’m a dumbass.

So here I am on the facepunch forums, because what other forum could be able to answer this question? Certainly not the steam forums, that place is deserted.

Anyways, I was hoping you can help me solve my current problem. Can you use skins that have a custom sound and/or animation on GMod? If yes, what am I doing wrong? If no, then tell me, cause I really have no idea.

Thanks :stuck_out_tongue:

EDIT: I started to play around with the files, and found out something.

The cs_game_sounds_weapons file in script/sounds is the one that alters the sound of the weapons. So I took the code from the deagle.txt to alter that cs_game_sounds_weapons file , but as it turns out you CANNOT modify scripts in GMod. Everytime I do, they revert back to the original. So, no matter what, some sounds cannot be played. For example, sliderelease does not exist in the cs_game_sounds_weapons file, so therefore that sound can never be changed. The weapon sounds must be renamed, in my case, de_slideback or de_clipin to match the code.

As for the animation part, I think its apparent that it doesn’t work with GMod for these reasons:

  1. In the cs_game_sounds_weapons file, this kind of code shows up:

“Weapon_DEagle.Single”
{
“channel” “CHAN_WEAPON”
“volume” “1.0”
“CompatibilityAttenuation” “0.6”
“pitch” “PITCH_NORM”

"wave"			")weapons/DEagle/deagle-1.wav"

}

“Weapon_DEagle.Clipout”
{
“channel” “CHAN_ITEM”
“volume” “1.0”
“CompatibilityAttenuation” “1.0”
“pitch” “PITCH_NORM”

"wave"			"weapons/DEagle/de_clipout.wav"

}

“Weapon_DEagle.Clipin”
{
“channel” “CHAN_ITEM”
“volume” “1.0”
“CompatibilityAttenuation” “1.0”
“pitch” “PITCH_NORM”

"wave"			"weapons/DEagle/de_clipin.wav"

}

“Weapon_DEagle.Deploy”
{
“channel” “CHAN_ITEM”
“volume” “1.0”
“CompatibilityAttenuation” “1.0”
“pitch” “PITCH_NORM”

"wave"			"weapons/DEagle/de_deploy.wav"

}

“Weapon_DEagle.Slideback”
{
“channel” “CHAN_ITEM”
“volume” “1.0”
“CompatibilityAttenuation” “1.0”
“pitch” “PITCH_NORM”

"wave"			"weapons/DEagle/de_slideback.wav"

}

My guess is that when you have custom animations, it is no longer performing the actions listed, such as “Weapon_DEagle.Slideback”, but instead another animation, and since you cannot alter this file, it will not work unless you alter the animation/sound itself.

So I answered my own question. LOL!

You have to add this line to your games sound manifest file:
“preload_file” “scripts/weapons/(weaponofyourskin).txt”

I do this because I like to keep things clean. But you could add all of these lines so you won’t have to every time you get a new skin:

     "preload_file"      "scripts/weapons/ak47.txt" 
 "preload_file"      "scripts/weapons/aug.txt" 
 "preload_file"      "scripts/weapons/awp.txt" 
 "preload_file"      "scripts/weapons/c4.txt" 
 "preload_file"      "scripts/weapons/deagle.txt" 
 "preload_file"      "scripts/weapons/elites.txt" 
 "preload_file"      "scripts/weapons/famas.txt" 
     "preload_file"      "scripts/weapons/fiveseven.txt" 
	 "preload_file"      "scripts/weapons/flashbang.txt" 
 "preload_file"      "scripts/weapons/g3sg1.txt" 
 "preload_file"      "scripts/weapons/galil.txt" 
	 "preload_file"      "scripts/weapons/glock.txt" 
 "preload_file"      "scripts/weapons/hegrenade.txt" 
 "preload_file"      "scripts/weapons/knife.txt" 
 "preload_file"      "scripts/weapons/m249.txt" 
 "preload_file"      "scripts/weapons/m3.txt" 
	 "preload_file"      "scripts/weapons/m4a1.txt" 
 "preload_file"      "scripts/weapons/mac10.txt" 
	 "preload_file"      "scripts/weapons/mp5.txt" 
 "preload_file"      "scripts/weapons/p90.txt" 
 "preload_file"      "scripts/weapons/p228.txt" 
	 "preload_file"      "scripts/weapons/scout.txt" 
 "preload_file"      "scripts/weapons/sg550.txt" 
 "preload_file"      "scripts/weapons/sg552.txt" 
 "preload_file"      "scripts/weapons/smokegrenade.txt" 
 "preload_file"      "scripts/weapons/tmp.txt" 
 "preload_file"      "scripts/weapons/ump45.txt" 
 "preload_file"      "scripts/weapons/usp.txt" 
 "preload_file"      "scripts/weapons/xm1014.txt" 

MAKE SURE YOU SET THE FILE TO READ ONLY! Garry’s Mod resets the manifest every time you launch.