Raised This Month: $32 Target: $400
 8% 

[request] rehls alltalk


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MAJESTIC_SZ
Senior Member
Join Date: Mar 2020
Location: Portugal
Old 04-19-2021 , 20:43   [request] rehls alltalk
Reply With Quote #1

Hello.
I want all dead players + spectators to speak freely.
I use REHLDS and i tested all sv_alltalk cvars but none can do what i want.

REHLS ALLTALK options:
// 0 - Dead does not listen alive
// 1 - Unrestricted
// 2 - Teammates hear teammates
// 3 - Same as 2, but spectators hear everyone
// 4 - Alive hear alive, dead hear dead and alive.

I want:
Alive players hear only alive teammates;
Dead players hear only dead players (CT +T) + Spectators
Spectators hear only dead players

Can anyone do this or know a plugin to help me?
Thank you in advance!
MAJESTIC_SZ is offline
tarsisd2
Veteran Member
Join Date: Feb 2016
Location: brazil
Old 04-19-2021 , 23:29   Re: [request] rehls alltalk
Reply With Quote #2

use this, you need to leave sv_alltalk 0 in order for the plugin to work

PHP Code:
#include <amxmodx>
#include <fakemeta>

new amx_deadtalk;

public 
plugin_init()
{
    
register_plugin("[CS] Dead Alltalk""1.0""Exolent");
    
    
register_forward(FM_Voice_SetClientListening"fwdSetVoice"false);
    
    
amx_deadtalk register_cvar("amx_deadtalk""1");
    
    return 
PLUGIN_CONTINUE;
}

public 
fwdSetVoice(receiversenderbool:bListen)
{
    if( !
get_pcvar_num(amx_deadtalk) || receiver == sender || !is_user_connected(receiver) || !is_user_connected(sender) )
    {
        return 
FMRES_IGNORED;
    }

    if( !
is_user_alive(receiver) && !is_user_alive(sender) && get_user_team(receiver) != get_user_team(sender) )
    {
        
engfunc(EngFunc_SetClientListeningreceiversender1);

        return 
FMRES_SUPERCEDE;
    }
    
    return 
FMRES_IGNORED;

tarsisd2 is offline
MAJESTIC_SZ
Senior Member
Join Date: Mar 2020
Location: Portugal
Old 04-20-2021 , 19:26   Re: [request] rehls alltalk
Reply With Quote #3

I was just readin about Exolent´s plugin before i saw your answer.
I will try, thanks.
MAJESTIC_SZ is offline
Reply


Thread Tools
Display Modes

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 18:34.


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