AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Microphone heard change (https://forums.alliedmods.net/showthread.php?t=98885)

deLL 07-30-2009 12:34

Microphone heard change
 
Hi,

I search the plugin or please write the plugin.

Description:
Code:

CT says the microphone - heard each.

 TT says the microphone - heard only TT.



Sorry, I do not speak well in English.

Jon 07-30-2009 19:39

Re: Microphone heard change
 
PHP Code:

#include <amxmodx>
#include <fakemeta>
#include <cstrike>

public plugin_init()
{
    
register_plugin("CT can't hear Terrorist""1.0""Jon");
    
    
register_forward(FM_Voice_SetClientListening"fwdSetVoice");
}

public 
fwdSetVoice(receiversender)
{
    if( 
_:cs_get_user_team(sender) == CS_TEAM_T && _:cs_get_user_team(receiver) == CS_TEAM_CT )
    {
        
engfunc(EngFunc_SetClientListeningreceiversender0);
        return 
FMRES_SUPERCEDE;
    }
    
    return 
FMRES_IGNORED;


and sv_alltalk 1

deLL 08-01-2009 08:44

Re: Microphone heard change
 
Debug in log.

Code:

L 08/01/2009 - 14:42:29: [CSTRIKE] Invalid player 1
L 08/01/2009 - 14:42:29: [AMXX] Displaying debug trace (plugin "alltalk.amxx")
L 08/01/2009 - 14:42:29: [AMXX] Run time error 10: native error (native "cs_get_user_team")
L 08/01/2009 - 14:42:29: [AMXX]    [0] texthygzzk.sma::fwdSetVoice (line 14)
L 08/01/2009 - 14:42:29: [CSTRIKE] Invalid player 1

Module fakemeta & cstrike is enabled.


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

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