Raised This Month: $ Target: $400
 0% 

Voice chat control


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Elusive138
Senior Member
Join Date: Dec 2010
Old 11-13-2011 , 02:15   Voice chat control
Reply With Quote #1

I have the following code (yes, this is for a jailbreak mod), based on something Exolent posted:

PHP Code:
// Thanks Exolent > https://forums.alliedmods.net/showpost.php?p=760466&postcount=2
#pragma semicolon 1
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <cstrike>

public plugin_init() {
    
register_plugin("Voice Control""1.0D""Elusive");
    
    
register_forward(FM_Voice_SetClientListening"FwdSetClientListening");
}

public 
FwdSetClientListening(receiversenderbool:listen) {
    if (!
is_user_connected(receiver) || !is_user_connected(sender))
        return 
FMRES_IGNORED;
    
    if (!
is_user_admin(sender) && (!is_user_alive(sender) || cs_get_user_team(sender) != CS_TEAM_CT)) {
        
engfunc(EngFunc_SetClientListeningreceiversenderfalse);
        return 
FMRES_SUPERCEDE;
    }
    
    return 
FMRES_IGNORED;

But for some reason it does not want to work. I wish to block everyone except admins and alive CTs from using voice chat, but everyone should be able to hear those selected groups. As it is, with a two player test neither of us could hear each other - he was a normal player in T, I was an admin in CT. Worse, he gets reliable channel overflows, possibly something to do with SetClientListening being false when he spawns, on the map jail_sanctuary.

I have tried variations, especially one ending with
PHP Code:
        engfunc(EngFunc_SetClientListeningreceiversendertrue);
        return 
FMRES_SUPERCEDE
instead of
PHP Code:
        return FMRES_IGNORED
which seems to work but:
  • Why do I have to add that, when Exolent did not (see above for link)
  • There are still reliable channel overflows
Any help or explanations would be appreciated.

Thanks.

Last edited by Elusive138; 12-07-2011 at 03:46.
Elusive138 is offline
Elusive138
Senior Member
Join Date: Dec 2010
Old 12-06-2011 , 06:58   Re: Voice chat control
Reply With Quote #2

Bump?
Elusive138 is offline
Elusive138
Senior Member
Join Date: Dec 2010
Old 01-17-2012 , 03:30   Re: Voice chat control
Reply With Quote #3

Bump - Anyone?

A plugin by shadow.hk, which uses the same general method (also from Exolent), did not work either.
Elusive138 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:26.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode