Hi first of all let me explain what i need: i want to add a prefix to certain players (example here flag t) and i want to make their chat color green (not yellow or color that players have set in their cs)
The plugins works good when the player is alive i can see chat prefix and green chat colors but i have found 2 major bugs:
1. When you are dead or when you are using team say chat color is not green it's yellow
2. Also another bug i've find is if a player with this specific prefix and chat color is alive when he says smth i can't see his prefix and chat color if i am dead (i am admin , also if i'm alive and he's dead prefix and chat color won't appear)
Here is the code
Thanks in advance
Код:
if(is_user_connected(id) && get_user_flags(id) & ADMIN_LEVEL_H){
new szTmp[256],
szTmp2[256];
get_msg_arg_string(2, szTmp, charsmax(szTmp));
new szPrefix[64] = "^x04[BlaBla]";
if(!equal(szTmp, "#Cstrike_Chat_All")){
add(szTmp2, charsmax(szTmp2), szPrefix);
add(szTmp2, charsmax(szTmp2), " ");
add(szTmp2, charsmax(szTmp2), szTmp);
}
else{
add(szTmp2, charsmax(szTmp2), szPrefix);
add(szTmp2, charsmax(szTmp2), "^x03 %s1^x01 : ^x04%s2");
}
set_msg_arg_string(2, szTmp2);
}
return PLUGIN_CONTINUE;
}