Yes, I saw the problem. It's cause because this variable 'prefix' already includes a check for player dead and makes the prefix *DEAD*. So I just added in the function, where this defines, another check to make the prefix *ALIVE*.
This should already work:
PHP Code:
public buildmsg( sndr, is_sndr_spec, is_team_msg, sndr_team, namecol, msgcol, str4[ ] )
{
new sndr_name[33]
get_user_name( sndr, sndr_name, 32 )
new prefix[30] = "^x01"
if( get_pcvar_num( p_hidestat ) == 0 )
{
if( is_sndr_spec ) prefix = "^x01*SPEC* "
else if( !is_user_alive( sndr ) ) prefix = "^x01*DEAD* "
else if( is_user_alive( sndr ) ) prefix = "^x01*ALIVE* "
}
if( is_team_msg )
{
if( is_sndr_spec ) prefix = "^x01(Spectator) "
else if( sndr_team == 1 ) add( prefix[strlen(prefix)-1], 29, "(Terrorist) " )
else if( sndr_team == 2 ) add( prefix[strlen(prefix)-1], 29, "(Counter-Terrorist) " )
}
format( msg, 199, "%s%s%s : %s%s",
strlen( prefix ) > 1 ? prefix : "",
COLCHAR[namecol], sndr_name, COLCHAR[msgcol], str4 )
return PLUGIN_HANDLED
}
Replace the whole function.
Or if you want to know what did I do, I just added
PHP Code:
else if( is_user_alive( sndr ) ) prefix = "^x01*ALIVE* "
In these lines:
PHP Code:
if( get_pcvar_num( p_hidestat ) == 0 )
{
if( is_sndr_spec ) prefix = "^x01*SPEC* "
else if( !is_user_alive( sndr ) ) prefix = "^x01*DEAD* "
}
__________________