AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   To hear own voice (https://forums.alliedmods.net/showthread.php?t=262820)

FromTheFuture 05-13-2015 09:53

To hear own voice
 
In SV_ParseVoiceData have this check
PHP Code:

if (== iClient && !pDestClient->m_bLoopback)
            
nSendLength 0

How with using Orpheu/Okapi/Rage I can hear my voice?

JusTGo 05-13-2015 10:52

Re: To hear own voice
 
you don't need all this stuff, i guess all you need is to "voice_loopback 1" in your client console and you will be able to hear your voice prefectly.

FromTheFuture 05-13-2015 11:26

Re: To hear own voice
 
Quote:

Originally Posted by JusTGo (Post 2296230)
you don't need all this stuff, i guess all you need is to "voice_loopback 1" in your client console and you will be able to hear your voice prefectly.

Yes, but I need a way without cvar re-setting ;)

FromTheFuture 05-13-2015 11:42

Re: To hear own voice
 
I think I must change boolean value ( m_bLoopback ) but don't know him offset.

JusTGo 05-13-2015 12:25

Re: To hear own voice
 
why ? its easier to just do client_cmd(id,"voice_loopback 1")

FromTheFuture 05-13-2015 12:33

Re: To hear own voice
 
Quote:

Originally Posted by JusTGo (Post 2296273)
why ? its easier to just do client_cmd(id,"voice_loopback 1")

No. I no wanna change client cvar : )

Jhob94 05-13-2015 13:00

Re: To hear own voice
 
Quote:

Originally Posted by JusTGo (Post 2296273)
why ? its easier to just do client_cmd(id,"voice_loopback 1")

That's slowhack and is NOT allowed in this forum.

Not tested, but i guess it should work:
PHP Code:

#include <amxmodx>
#include <fakemeta>

public plugin_init()
{
    
register_forward(FM_Voice_SetClientListening"fwd_FM_Voice_SetClientListening");
}

public 
fwd_FM_Voice_SetClientListening(receiversenderbool:bListen)
{
    if(
receiver == sender && is_user_connected(receiver))
    {
        
engfunc(EngFunc_SetClientListeningreceiversendertrue);
        return 
FMRES_SUPERCEDE;
    }
    
     return 
FMRES_IGNORED;



aron9forever 05-13-2015 15:47

Re: To hear own voice
 
Quote:

Originally Posted by Jhob94 (Post 2296284)
That's slowhack and is NOT allowed in this forum.

Not tested, but i guess it should work:
PHP Code:

#include <amxmodx>
#include <fakemeta>

public plugin_init()
{
    
register_forward(FM_Voice_SetClientListening"fwd_FM_Voice_SetClientListening");
}

public 
fwd_FM_Voice_SetClientListening(receiversenderbool:bListen)
{
    if(
receiver == sender && is_user_connected(receiver))
    {
        
engfunc(EngFunc_SetClientListeningreceiversendertrue);
        return 
FMRES_SUPERCEDE;
    }
    
     return 
FMRES_IGNORED;



I am also very curious if this method works, because my judgement tells me the "listening" value is true for every other case you don't set as false ; the data does actually reach the client (so talker->server->talker) but the voice loopback cvar blocks it.

The reason I think this works like this is because you can notice a delay with voice_loopback 1 that seems to be affected by ping.

Jhob94 05-13-2015 17:53

Re: To hear own voice
 
Maybe you're right.

Also tried:
if(is_user_connected(sender))
engfunc(EngFunc_SetClientListening, sender, sender, true)
And it didn't worked.

I will try to take a look at cssdk, maybe there is the answer about this.

fysiks 05-13-2015 20:29

Re: To hear own voice
 
I'm certainly glad it's not possible. There is no good reason to have the server force a person to hear themselves talk. It would be an instant "never go back to this server" feature.


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

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