If player are on teams then they can hear each other

If player is on team 1 and team 2 then they can hear each other. Teams 3 and 4 can hear each other.

Try using sv_alltalk 0 and post back with results please.

Va-Boosh
That’s the sound of my hand hitting my forehead.

Lol

You could try **[Gamemode.PlayerCanHearPlayersVoice

http://wiki.garrysmod.com/favicon.ico](wiki.garrysmod.com/?title=Gamemode.PlayerCanHearPlayersVoice)**

I personally havent used this function yet, So i cant give a example :smiley:

[Lua]
function GM:PlayerCanHearPlayersVoice( plo, plt )
if (plt:Team() == 1 or 2) and (plo:Team() == 1 or 2) then
return true, true
elseif (plt:Team() == 3 or 4) and (plo:Team() == 3 or 4) then
return true, true
else
return false
end
end
[/Lua]

Give it a try, make sure alltalk is off.

A question, for using this in my scripts, is it
[lua]
return true, true
[/lua]
because it needs to return true for both players? Otherwise why?

It’s a nice little effect for 3D sound I learnt.

You can have one true if you want.