Raised This Month: $ Target: $400
 0% 

How to set talk when he dead ?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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 20:30.


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