Raised This Month: $ Target: $400
 0% 

*DEAD*


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hugz`
Veteran Member
Join Date: Jul 2007
Location: In a house
Old 01-04-2008 , 00:46   *DEAD*
Reply With Quote #1

Is it possible for dead players not to see other dead people's '*DEAD* tag?
Here's the code, I already have it so alive people don't see '*DEAD*', I need the same for non living, that also includes team chat when dead.

PHP Code:
#include <amxmodx>

#define FLAG ADMIN_RESERVATION
#define VERSION "1.1"

new COLCHAR[3][2] = { "^x03"/*team col*/"^x04"/*green*/"^x01"/*white*/ }

//cvar pointers
new p_allchatp_namecolp_msgcolp_alltalkp_hidestatp_teamchat

//vars to check if message has already been duplicated
new alv_sndralv_str2[26], alv_str4[101]
new 
msg[200]

public 
col_changermsg_idmsg_destrcvr )
{
    new 
str2[26]
    
get_msg_arg_string2str225 )
    if( 
equalstr2"#Cstrike_Chat"13 ) )
    {
        new 
str3[22]
        
get_msg_arg_string3str321 )
        
        if( !
strlenstr3 ) )
        {
            new 
str4[101]
            
get_msg_arg_string4str4100 )
            new 
sndr get_msg_arg_int)
            
            new 
bool:is_team_msg = !bool:equalstr2"#Cstrike_Chat_All"17 )
            
            new 
sndr_team get_user_teamsndr )
            new 
bool:is_sndr_spec = !bool:( sndr_team )
            
            new 
namecol clampget_pcvar_num(p_namecol), 0)
            new 
msgcol clampget_pcvar_num(p_msgcol), 0)
            
            new 
bool:same_as_last bool:( alv_sndr == sndr && equalalv_str2str2 ) && equalalv_str4str4) )
            
            if( !
same_as_last )
            {
//Duplicate message once
                
new allchat clampget_pcvar_nump_allchat ), 0)
                if( 
allchat == || ( allchat == && clampget_pcvar_nump_alltalk ), 0) == ) )
                {
                    if( !( 
is_team_msg && ( is_sndr_spec || is_team_msg && get_pcvar_nump_teamchat ) == ) ) )
                    {
//Don't duplicate if it's a spectator team message
                        
new flags[5], team[10]
                        if( 
is_user_alivesndr ) ) flags "bch"
                        
else flags "ach"
                        
                        
if( is_team_msg )
                        {
                            
addflags[strlenflags )], 4"e" )
                            if( 
sndr_team == team "TERRORIST"
                            
else team "CT"
                        
}
                        
                        new 
players[32], num
                        get_players
playersnumflagsteam )

                        if( 
get_user_flagssndr ) & FLAG )
                            
buildmsgsndris_sndr_specis_team_msgsndr_teamnamecolmsgcolstr4 //admin colored, by cvars
                        
else buildmsgsndris_sndr_specis_team_msgsndr_team02str4 //normal colors
                        
                        
for( new i=0numi++ )
                        {
                            
message_beginMSG_ONEget_user_msgid"SayText" ), _players[i] )
                            
write_bytesndr )
                            
write_stringmsg )
                            
message_end()
                        }
                        
                    }
    
                    
alv_sndr sndr
                    alv_str2 
str2
                    alv_str4 
str4
                    
if( task_exists411 ) ) remove_task411 )
                    
set_task0.1"task_clear_antiloop_vars"411 )
                }
            }
            
            if( 
get_user_flagssndr ) & FLAG && ( namecol != || msgcol != ) )
            {
//execute if sndr is admin and cols are not set to engine defaults
                
if( !same_as_last buildmsgsndris_sndr_specis_team_msgsndr_teamnamecolmsgcolstr4 )

                
set_msg_arg_string2msg )
                
set_msg_arg_string4"" )
            }
        }
    }
    return 
PLUGIN_CONTINUE
}

public 
buildmsgsndris_sndr_specis_team_msgsndr_teamnamecolmsgcolstr4[ ] )
{
    new 
sndr_name[33]
    
get_user_namesndrsndr_name32 )
    
    new 
prefix[30] = "^x01"
    
if( get_pcvar_nump_hidestat ) == )
    {
        if( 
is_sndr_spec prefix "^x01*SPEC* "
        
else if( !is_user_alivesndr ) ) prefix "^x01*DEAD* "
    
}
    
    if( 
is_team_msg )
    {
        if( 
is_sndr_spec prefix "^x01(Spectator) "
        
else if( sndr_team == addprefix[strlen(prefix)-1], 29"(Terrorist) " )
        else if( 
sndr_team == addprefix[strlen(prefix)-1], 29"(Counter-Terrorist) " )
    }
    
    
formatmsg199"%s%s%s :  %s%s",\
        
strlenprefix ) > prefix "",\
        
COLCHAR[namecol], sndr_nameCOLCHAR[msgcol], str4 )
    return 
PLUGIN_HANDLED
}

public 
task_clear_antiloop_vars( )
{
    
alv_sndr 0
    alv_str2 
""
    
alv_str4 ""
    
return PLUGIN_HANDLED
}

public 
plugin_init( )
{
    
register_plugin("All Chat",VERSION,"Ian Cammarata")
    
register_cvar("allchat_version",VERSION,FCVAR_SERVER)
    
    
p_allchat register_cvar"sv_allchat""1" )
    
p_namecol register_cvar"ac_namecolor""0" )
    
p_msgcol register_cvar"ac_msgcolor""1" )
    
p_hidestat register_cvar"ac_hidestatus""0" )
    
p_teamchat register_cvar"ac_teamchat""0" )
    
    
p_alltalk get_cvar_pointer"sv_alltalk" )
    
    
register_messageget_user_msgid("SayText"), "col_changer" )
    return 
PLUGIN_CONTINUE

__________________

Last edited by hugz`; 01-05-2008 at 11:44.
hugz` is offline
Send a message via AIM to hugz`
hugz`
Veteran Member
Join Date: Jul 2007
Location: In a house
Old 01-05-2008 , 10:52   Re: *DEAD*
Reply With Quote #2

Anyone?
__________________
hugz` is offline
Send a message via AIM to hugz`
lolhax44
BANNED
Join Date: Jan 2008
Old 01-05-2008 , 11:33   Re: *DEAD*
Reply With Quote #3

IT is possible
Can you put ur code in [PHP] Tags its more eazyer to see then
PHP Code:
if( equalstr2"#Cstrike_Chat"13 ) ) 
I think it's
PHP Code:
if( equalstr2"#Cstrike_DEAD"13 ) ) 
lolhax44 is offline
hugz`
Veteran Member
Join Date: Jul 2007
Location: In a house
Old 01-05-2008 , 11:44   Re: *DEAD*
Reply With Quote #4

There you go, didn't know how to =p
__________________
hugz` is offline
Send a message via AIM to hugz`
lolhax44
BANNED
Join Date: Jan 2008
Old 01-05-2008 , 16:16   Re: *DEAD*
Reply With Quote #5

There That should work
Attached Files
File Type: sma Get Plugin or Get Source (rmdc.sma - 638 views - 5.2 KB)
lolhax44 is offline
hugz`
Veteran Member
Join Date: Jul 2007
Location: In a house
Old 01-05-2008 , 16:41   Re: *DEAD*
Reply With Quote #6

Doesn't work.. =/ I can still see *DEAD*
__________________
hugz` is offline
Send a message via AIM to hugz`
lolhax44
BANNED
Join Date: Jan 2008
Old 01-05-2008 , 18:01   Re: *DEAD*
Reply With Quote #7

maybe it only works with #define FLAG ADMIN_RESERVATION and removes there Dead sign off
lolhax44 is offline
hugz`
Veteran Member
Join Date: Jul 2007
Location: In a house
Old 01-05-2008 , 19:19   Re: *DEAD*
Reply With Quote #8

I don't get it.. maybe you don't understood what I am trying to get rid off?

When I'm dead, I don't want to see *DEAD* tag when I or someone else says.
__________________
hugz` is offline
Send a message via AIM to hugz`
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 01-05-2008 , 20:23   Re: *DEAD*
Reply With Quote #9

hook saytext, remove dead from string, resend message, block original message
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow is offline
hugz`
Veteran Member
Join Date: Jul 2007
Location: In a house
Old 01-05-2008 , 22:25   Re: *DEAD*
Reply With Quote #10

Could you give me a hint on what line I should edit? Don't just post the code I'm trying to learn..

Or give me some links on how to hook say text, and all that.

Thanks.
__________________
hugz` is offline
Send a message via AIM to hugz`
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 11:04.


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