AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Green chat color blocks ALIVE/DEAD Chat? (https://forums.alliedmods.net/showthread.php?t=243616)

proffs 07-07-2014 09:06

Green chat color blocks ALIVE/DEAD Chat?
 
I've had servers for over 4 years.

Today, I've noticed something, whenever I have green chat color for admins etc the alive chat and dead chat doesn't work

with that I mean Dead can see Alive's chat and Alive can see deads chat. That doesn't work when I have green color...

I've had this problem with a lot of different plugins is this a cs bug or bad coded? I've tried a lot of plugins still same shit.

Code I use:
PHP Code:

#include < amxmodx >
#include < amxmisc >
#include < cstrike >

new g_iMsgID_SayText;

new 
g_iAdminChatFlag ADMIN_ALL;

new 
g_szTags[1][2];
new 
Trie:g_tSteamTagIndex;
new 
g_iPlayerTag[33]

public 
plugin_init( )
{
    
register_plugin("Chatt ranker""1.0""Fysiks")
    
register_clcmd"say""CmdSay" );
    
register_clcmd"say_team""CmdSayTeam" );
    
            
g_iAdminChatFlag iFlags;
            break;
        }
    }
    
    

    if( !
is_user_connectedid ) )
        return 
PLUGIN_HANDLED_MAIN;
    
    new 
szArgs194 ];
    
    if( !
IsValidMessageidfalseszArgscharsmaxszArgs ) ) )
        return 
PLUGIN_HANDLED_MAIN;
        
   
    new 
iAlive is_user_aliveid );
    new 
CsTeams:iTeam cs_get_user_teamid );
    
    new 
iPlayers32 ], iNum;
    
get_playersiPlayersiNum );
    
    new 
szName32
            
"^1*DEAD* ",
            
"^1*DEAD* ",
            
"^1*DEAD* ",
            
"^1*SPEC* "
        
},
        {
            
"",
            
"",
            
"",
            
""
        
}
    };
    
    new 
szMessage192 ];
    
formatexszMessagecharsmaxszMessage ), "^4%s ^1%s^3%s^1 :%s  %s"PrefixszPrefixesiAlive ][ iTeam ], szNameget_user_flags(id) & ADM
        
}
    
        
copy(Prefixcharsmax(Prefix), g_szTags[g_iPlayerTag[id]])

    if( !
is_user_connectedid ) )
        return 
PLUGIN_HANDLED_MAIN;
    
    new 
szArgs194 ];
    
    if( !
IsValidMessageidtrueszArgscharsmaxszArgs ) ) )
        return 
PLUGIN_HANDLED_MAIN;
    
    new 
iAlive is_user_aliveid );
    new 
CsTeams:iTeam CsTeams:( ( _:cs_get_user_teamid ) ) % );
    
    new 
iPlayers32 ], iNum;
    
get_playersiPlayersiNum );
    
    new 
szName32 ];
    
get_user_nameidszNamecharsmaxszName ) );
    
        },
        {
            
"(Spectator)",
            
"(Terrorist)",
            
"(Counter-Terrorist)",
            
""
essage );

    if( !
szMessage] )
        return 
false;
    
    new 
iPoscChari;
    while( ( 
cChar szMessageiPos ] ) == '@' )
    {
        
i++;
        
iPos++;
    }

    if( 
)
        return ( !( 
bTeamSay ? ( == ) : ( <= <= ) ) || !accessidg_iAdminChatFlag ) );


    while( 
< ( cChar szMessageiPos++ ] ) <= 255 )
        if( 
cChar ath));
    
add(szFilePathcharsmax(szFilePath), "/Admintags.ini");
    
    new 
fopen(szFilePath"rt");
    
    if( !
)
    {
        new 
szMessage[128];
        
formatex(szMessagecharsmax(szMessage), "Unable to open %s"szFilePath);
        
set_fail_state(szMessage);
    }
    
    new 
data[32], iTagCount;
    
        
        
    }
    
fclose(f)



Flick3rR 07-07-2014 12:21

Re: Green chat color blocks ALIVE/DEAD Chat?
 
Heheh, no, I don't think so. This is from the plugins. Currently it's from this line here:
PHP Code:

if( iTarget == id || ( iAlive || is_user_connectediTarget ) ) && is_user_aliveiTarget ) == iAlive 

Just remove:
PHP Code:

 && is_user_aliveiTarget ) == iAlive 

And the dead players could see alive player's message.

proffs 07-07-2014 16:40

Re: Green chat color blocks ALIVE/DEAD Chat?
 
Quote:

Originally Posted by Flick3rR (Post 2163451)
Heheh, no, I don't think so. This is from the plugins. Currently it's from this line here:
PHP Code:

if( iTarget == id || ( iAlive || is_user_connectediTarget ) ) && is_user_aliveiTarget ) == iAlive 

Just remove:
PHP Code:

 && is_user_aliveiTarget ) == iAlive 

And the dead players could see alive player's message.

Thanks!


All times are GMT -4. The time now is 21:17.

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