Defining Citizen Genders?

Hey all.
Is the some sort of way to make a citizen model edit (in this case, my personal skin), use gender specific sounds, instead of male and female?

Are we talking about NPC’s here?

Yes.

I’m not sure you can stop them from talking and then use different sounds. The NPC library has a few sound methods, but the pages haven’t been written for them so I’m not sure if these help:

[editline]01:26PM[/editline]

You could check out the library and see if anything there is useful.

If it’s one of the default citizen models just re-skinned it would still have the gender in the filename so maybe use something like this.

[lua]
– Get the gender, returns female or male
function _R.Player:Gender()
if( string.match(self:GetModel(), “female”) ) then
return “female”;
end
return “male”;
end

– Play a sound based on gender.
function _R.Player:Pain() – just an example.
self:EmitSound(“vo/npc/”…tostring(self:Gender())…“01/pain0”…math.random(1,9)…".wav")
end
[/lua]

[editline]04:01AM[/editline]

If it’s one of the default citizen models just re-skinned it would still have the gender in the filename so maybe use something like this.

[lua]
– Get the gender, returns female or male
function ENT:Gender() – or NPC?
if( string.match(self:GetModel(), “female”) ) then
return “female”;
end
return “male”;
end

– Play a sound based on gender.
function ENT:Pain() – or NPC?
self:EmitSound(“vo/npc/”…tostring(self:Gender())…“01/pain0”…math.random(1,9)…".wav")
end
[/lua]

instead of end you should put else, else you’re returning two genders.

No it wouldnt, as soon as you use return everything behind it will not be called.

It’s a slight remodel of a citizen.

No it’s not, if it’s female it will return female and then stop because i “returned” it. If it’s not female it simple returns male and stops.