Need help, voice chat needs to be allowed for certain people like for example, VIPS, admins, trusted/respected people

Hello,

i have no idea on how to script, but can anyone make a script that automaticly disables voice chat for everybody unless they are in a specific group?
for example only donators are allowed to speak using voice chat. Everyone can use text chat

thanks

[editline]9th May 2012[/editline]

move this to requests please

If you want only a couple specific usergroups that you want to be able to talk use this:

[lua]
function GM:PlayerCanHearPlayersVoice( listen, talk )
if talk:IsUserGroup( “Donator” ) then – List all of your other usergroups that can talk.
return true
else
return false
end
end
[/lua]

Otherwise, if you just want a couple groups NOT be able to talk, use this:

[lua]
function GM:PlayerCanHearPlayersVoice( listen, talk )
if !talk:IsUserGroup( “Guest” ) then – List all of your other usergroups that cannot talk.
return true
else
return false
end
end
[/lua]

they do not seem to work. does it matter what gamemode? Its a zombie survival. Zombies can only hear zombies and same for humen

The gamemode is probably editing that function so Zombies can only hear zombies. If you have Notepad++ you need to do ctrl+f -> Search in Files then put in “PlayerCanHearPlayersVoice” and search in the gamemode directory. Once you find the function “PlayerCanHearPlayersVoice” remove all the contents and add in what I gave you.

If you don’t have Notepad++ I’m sorry but if no one else does this for you, you’re going to have to look in every gamemode file that gamemode has. (You’ll need to supply the gamemode name in order for someone to be generous enough to find it for you)