Raised This Month: $ Target: $400
 0% 

Dead ALL Talk


Post New Thread Reply   
 
Thread Tools Display Modes
JusTGo
Veteran Member
Join Date: Mar 2013
Old 05-16-2017 , 09:35   Re: Dead ALL Talk
Reply With Quote #21

Quote:
Originally Posted by wickedd View Post
You can use Connor's plugin for this.
Take a look at this
he wants to print a message to the player when he try to talk as a spec/dead you can't do that with connor plugin.

Quote:
Originally Posted by fatal_nl View Post
From meta list:

ReAPI, v5.1.0.110-dev, 2017-05-02
VoiceTranscoder, v2017 RC2, 2017.02.03

I still have no clue how to start and stop these forwards. Does it need to be reset every round start?
Not tested.

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

#define PLUGIN "Voice"
#define AUTHOR "JustGo"
#define VERSION "0.0.1"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR);
    
    
register_forward(FM_Voice_SetClientListening"FakeMeta_Voice_SetListening"false);
    
    
set_cvar_num("sv_alltalk",1);
}

public 
FakeMeta_Voice_SetListening(iReceiveriSenderbool:bListen)
{
    if(
is_user_alive(iSender) || get_user_flags(iSender) & ADMIN_LEVEL_G)
    {
        
engfunc(EngFunc_SetClientListeningiReceiveriSendertrue);
        return 
FMRES_SUPERCEDE;
    }
    
engfunc(EngFunc_SetClientListeningiReceiveriSenderfalse);
    return 
FMRES_SUPERCEDE;
}

public 
VTC_OnClientStartSpeak(const index)
{
    if(!
is_user_alive(index))
    {
        
client_print(index,print_center,"Dead people can't use voice chat.")
    }

__________________

Last edited by JusTGo; 05-16-2017 at 09:44.
JusTGo is offline
fatal_nl
Member
Join Date: Apr 2017
Old 05-16-2017 , 10:48   Re: Dead ALL Talk
Reply With Quote #22

The message printing is unfortunately not working.

With the other code dead players and spectators can't hear alive players. (while they should be able to listen)

Edit: after searching for another hour I found a working code on this website (without the client_print part) that only mute dead or spectating players from speaking while they can still hear alive players. This part is done.
I'm still hoping there's a no ReAPI and VTC way to trigger the mic button press to client_print a message.

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

#define PLUGIN "No mic while dead"
#define AUTHOR "OnePL & JustGo"
#define VERSION "0.0.1"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR);
    
    
register_forward(FM_Voice_SetClientListening"VoiceSetListening");
    
    
set_cvar_num("sv_alltalk",1);
}

public 
VoiceSetListening(iReceiveriSender)
{
    if(
is_user_alive(iSender) || get_user_flags(iSender) & ADMIN_LEVEL_G) return 1;

    
engfunc(EngFunc_SetClientListeningiReceiveriSender0);
    return 
4;


Last edited by fatal_nl; 05-16-2017 at 11:16.
fatal_nl is offline
tarsisd2
Veteran Member
Join Date: Feb 2016
Location: brazil
Old 05-16-2017 , 16:42   Re: Dead ALL Talk
Reply With Quote #23

exolent plugin works fine for my server

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

new amx_deadtalk;

public 
plugin_init()
{
    
register_plugin("[CZ] Dead Alltalk""0.1""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
fatal_nl
Member
Join Date: Apr 2017
Old 05-16-2017 , 19:57   Re: Dead ALL Talk
Reply With Quote #24

VoiceSetListening didn't work without having a microphone plugged in. I think it's voice activated. Now it's working.

I also removed the admin immunity.

Some players don't get client_print messages (like they blocked it themselves). I changed it to a HUD message and added a sound to get their attention.

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

#define PLUGIN "No Dead Mic ReAPI"
#define AUTHOR "OnePL/JustGo/fatal"
#define VERSION "0.0.1"

public plugin_init()
{
    
register_plugin(PLUGIN,VERSION,AUTHOR);
    
    
register_forward(FM_Voice_SetClientListening,"VoiceSetListening");
    
    
set_cvar_num("sv_alltalk",1);
}

public 
VoiceSetListening(iReceiver,iSender)
{
    if(
is_user_alive(iSender)) return 1;

    
engfunc(EngFunc_SetClientListening,iReceiver,iSender0);
    return 
4;
}

public 
VTC_OnClientStartSpeak(const index)
{
    if(!
is_user_alive(index))
    {
        
set_hudmessage(02550, -1.00.3516.04.00.50.15, -1)
        
show_hudmessage(index"Dead people can't talk on mic.")
        
client_cmd(index,"spk fvox/blip.wav"
    }


Last edited by fatal_nl; 05-16-2017 at 19:59.
fatal_nl is offline
fatal_nl
Member
Join Date: Apr 2017
Old 05-17-2017 , 15:39   Re: Dead ALL Talk
Reply With Quote #25

I decided to add immunity for higher admins.

PHP Code:
if(is_user_alive(iSender) || get_user_flags(iSender) & ADMIN_PASSWORD) return 1
How do I prevent admins with above level getting the HUD message? This is the current if statement:

PHP Code:
if(!is_user_alive(index)) 
The plugin is also interfering with another plugin with inter-admin communication (triggered with +adminvoice). The intention is that lower admins still can talk to other admins no matter if they're dead or alive. Is it possible to not mute them if sender and receiver are both ADMIN_LEVEL_G?

Is it also possible to hide the HUD message for ADMIN_LEVEL_G when the receiver is also ADMIN_LEVEL_G?

Last edited by fatal_nl; 05-17-2017 at 15:40.
fatal_nl is offline
fatal_nl
Member
Join Date: Apr 2017
Old 05-19-2017 , 09:42   Re: Dead ALL Talk
Reply With Quote #26

This plugin still let me keep thinking. My previous idea when iSender and iReceiver are both admin they're also allowed to use regular voice (+voicerecord) to talk with each other. That's not the intention.

There's already another plugin on my server with +adminvoice (with admin flag access). That plugin doesn't work properly because dead admins arent allowed to talk now with the plugin described in this topic.

My new approach with the code in this topic:

Catch this +adminvoice. I only have no idea how.

PHP Code:
if(is_user_alive(iSender) || "when-user-is-using-adminvoice") return 1

Last edited by fatal_nl; 05-19-2017 at 09:43.
fatal_nl is offline
chaves
Senior Member
Join Date: Oct 2011
Old 05-19-2017 , 09:55   Re: Dead ALL Talk
Reply With Quote #27

Quote:
Originally Posted by Kitami View Post
I was wondering just like they have it in source, could their be a plugin created so that dead people can talk to each other using their mics? Without the alive people hearing them.

This way when your a DEAD CT you can talk to a DEAD T with your mic, BUT only when your dead, once you respawn everything is back to normal and you cant speak to the other team unless you use chat.
https://forums.alliedmods.net/showth...light=deadchat
chaves is offline
fatal_nl
Member
Join Date: Apr 2017
Old 05-19-2017 , 09:56   Re: Dead ALL Talk
Reply With Quote #28

Quote:
Originally Posted by chaves View Post
As previously mentioned: this plugin doesn't exactly do what I want.

Last edited by fatal_nl; 05-19-2017 at 09:56.
fatal_nl is offline
fatal_nl
Member
Join Date: Apr 2017
Old 05-19-2017 , 11:43   Re: Dead ALL Talk
Reply With Quote #29

The unfinished plugin with comments:

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

#define PLUGIN "No Dead Mic ReAPI"
#define AUTHOR "your name here?"
#define VERSION "0.0.1"

public plugin_init()
{
    
register_plugin(PLUGIN,VERSION,AUTHOR);
    
    
register_forward(FM_Voice_SetClientListening,"VoiceSetListening");
    
// The +adminvoice below is used by another plugin (there's no need to add the code in this plugin). AdminVoice needs to be used in VoiceSetListening and VTC_OnClientStartSpeak
    
register_clcmd("+adminvoice","AdminVoice",ADMIN_LEVEL_G);
    
    
set_cvar_num("sv_alltalk",1);
}

public 
VoiceSetListening(iReceiver,iSender)
{
    
// People who are allowed to use mic: alive users | dead admins with flag k | dead admins flag s using +adminvoice
    
if(is_user_alive(iSender) || get_user_flags(iSender) & ADMIN_PASSWORD || AdminVoice(id)) return 1;

    
engfunc(EngFunc_SetClientListening,iReceiver,iSender0);
    
// Everyone else gets muted
    
return 4;
}

public 
VTC_OnClientStartSpeak(const index)
{
    
// People who should NOT get the hud message: alive users | dead admins with flag k | dead admins flag s using +adminvoice
    
if(!is_user_alive(index) || !get_user_flags(iSender) & ADMIN_PASSWORD) || !AdminVoice(id))
    {
        
set_hudmessage(0,255,0,-1.0,0.35,1,6.0,4.0,0.5,0.15,-1)
        
show_hudmessage(index,"Dead people can't talk on mic.")
        
client_cmd(index,"spk fvox/blip.wav"
    }


Last edited by fatal_nl; 05-19-2017 at 12:18.
fatal_nl is offline
fatal_nl
Member
Join Date: Apr 2017
Old 06-03-2017 , 12:54   Re: Dead ALL Talk
Reply With Quote #30

Bump

What needs to be done: hook when a admin press a key with +adminvoice bind (used by another plugin). Giving immunity when pressing that key. (and not giving immunity set by user flag because then they're still able to use +voicerecord to talk to players when dead).

Last edited by fatal_nl; 06-03-2017 at 12:56.
fatal_nl 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 14:53.


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