Player model sounds?

I have ragdoll mod installed, so everytime you go ragdoll your character makes a noise, or when they get hurt as a ragdoll you make a noise.
I was wondering what controls that, because I have zombine player models that each make a different noise set. I want them to make zombie noises, not human or combine.
Any clue how to go about this?

Anyone?

Get a list of sounds, define them in a table like so:



DeathSoundsModels = {
"zombiesound1.wav",
"zombiesound2.wav",
"zombiesound3.wav"
}


Make a list of models you want the sounds to play on:



ZombieModels = {
"zombiemodel1.mdl"
"zombiemodel2.mdl"
"zombiemodel3.mdl"
}


Then define it in the script somewhere:



if (ply:GetModel() == ZombieModels) then
self:EmitSound(DeathSoundsModels[math.random(1, #DeathSoundsModels)])
else
-- etc etc
end


Not entirely sure if that is how you get player models from a table, it probably isn’t. If no-one replies on how to properly call players models from a table, just use this (no matter how sloppy):



if (ply:GetModel() == "zombiemodel1" or ply:GetModel() == "zombiemodel2" or ply:GetModel() == "zombiemodel3") then
self:EmitSound(DeathSoundsModels[math.random(1, #DeathSoundsModels)])
else
-- etc etc
end


Remember, don’t add in .mdl on the end.

you would use **[Table.HasValue

http://wiki.garrysmod.com/favicon.ico](wiki.garrysmod.com/?title=Table.HasValue)** and you would have to defnine the whole model path for example “models/Zombie/classic.mdl” not sure if thats the path to the zombie model, but i think you get it

Sweet, thats what i was looking for Kamern!
Thank you!