Raised This Month: $51 Target: $400
 12% 

How to set talk when he dead ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wangningyu
Member
Join Date: Dec 2011
Location: China.GuangDong
Old 12-20-2013 , 11:22   How to set talk when he dead ?
Reply With Quote #1

I found the sdk , there is fours option:
#define SPEAK_NORMAL 0
this is only talk when there alive , if team player death ,the dead player just listen without talk with team.

#define SPEAK_MUTED 1
this like shutup , he can't listen and talk with anybody.

#define SPEAK_ALL 2
this like sv_alltalk 1, it can say and listen with all player(T and CT)

#define SPEAK_LISTENALL 4
this just listen all player(T and CT)


I want just team talk each other when dead or alive , and the same team.

register_event("DeathMsg","death","a")
register_event("ResetHUD","alive","b")

public death()
{
// ....
}

public alive(id)
{
// ....
}

Is anybody can help me please.

Thanks for your reply !
__________________
One Code , One Dream !
wangningyu is offline
Don_Collione
BANNED
Join Date: Dec 2012
Location: Stockholm
Old 12-22-2013 , 22:13   Re: How to set talk when he dead ?
Reply With Quote #2

Try

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

new amx_deadtalk;

public 
plugin_init()
{
    
register_plugin("Dead Alltalk""0.1""Exolent");
    
    
register_forward(FM_Voice_SetClientListening"fwdSetVoice"0);
    
    
amx_deadtalk register_cvar("amx_deadtalk""1"00.0);
    
    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;

Don_Collione 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 03:08.


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