It's possible change the color? For this, 255 20 147 (deeppink)
If yes, where change?
Spoiler
#include <amxmodx>
#include <amxmisc>
// =========================================== CONFIG START ===========================================
#define CHATVIEWER_ACCESS (ADMIN_ADMIN|ADMIN_CHAT|ADMIN_SLAY) // access to chatviewer command
#define NO_ADMIN_VIEW // comment this line if you want admins to be able in seeing all chat
//#define ADMIN_TAG_C // uncomment this line if you want admins to have [ADMIN] tag in chat
//#define ADMIN_TAG_R // uncomment this line if you want admins to have [ADMIN] tag in radio messages
#define ADMIN_TAG "[ADMIN] " // translation for admin tag
#define ACTIVITY_ADMIN // comment this line if you want admin tag to be showned to all players
#define USE_RADIO_MSG // comment this line if you don't want to change radio msg text
#define RADIO_HE " [explosive]" // translation for explosive grenade in radio
#define RADIO_SG " [smokegren]" // translation for smoke grenade in radio
#define RADIO_FB " [flashbang]" // translation for flashbang grenade in radio
// ============================================ CONFIG END ============================================
#define print_chat_colored 5 // did you know about this? - well, I didn't
#if !defined NO_ADMIN_VIEW
#if !defined _numbamx_included
/**
* This is for advanced flag check
* for things like "get_user_flags(id) & (ADMIN_KICK|ADMIN_BAN|ADMIN_ADMIN)"
* so insted of making "get_user_flags(id)&ADMIN_KICK && get_user_flags(id)&ADMIN_BAN && is_user_admin(id)"
* use "check_flags(get_user_flags(id), ADMIN_KICK|ADMIN_BAN|ADMIN_ADMIN, true)!=0"
*
* NOTE: works only for worded flags (from 'a' like "ADMIN_IMMUNITY" to 'z' like "ADMIN_USER")
* else it will just return -1
*/
check_flags(main_flags, flags_to_check, bool:adminflags=false)
{
new __main_flags=main_flags, __flags_to_check=flags_to_check;
if (__main_flags < 0)
__main_flags = 0;
if (__flags_to_check < 0)
__flags_to_check = 0; // I don't wanna take the risk & see what will happen if not doing this...
if ((__main_flags == __flags_to_check) || !__flags_to_check)
return 1;
else if (!__main_flags)
return 0;
if (adminflags)
{
if (__flags_to_check&ADMIN_ADMIN)
{
if (__main_flags&ADMIN_USER)
return 0;
__flags_to_check-=ADMIN_ADMIN;
}
}
if ((__main_flags&__flags_to_check)==__flags_to_ check)
return 1;
return 0;
}
#endif
new bool:g_bManualChatViewer[33];
new bool:g_bUserChatViewEnabled[33];
new g_iMsgId_SayText;
new g_iChatViewerStrings[2][129];
new g_iMaxPlayers;
#endif
new g_iOldMessage[192];
new g_iLastMsg[192];
new g_iLastText[192];
#if defined ADMIN_TAG_C
new bool:g_bIsUserAdmin[33];
new g_iUserAdminName[33][44];
#else
#if defined ADMIN_TAG_R
new bool:g_bIsUserAdmin[33];
new g_iUserAdminName[33][44];
#endif
#endif
new g_iUserName[33][32];
public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
copy(g_iChatViewerStrings[0], 128, "* Chat viewer enabled. To disable type ^"/chatviewer^".");
copy(g_iChatViewerStrings[1], 128, "* Chat viewer disabled. To enable type ^"/chatviewer^".");
#if defined USE_RADIO_MSG
public Message_TextMsg(iMesgId, iMsgType, iPlrId) // I am a bit amazed, cuz didn't knew that we can use colorchat in TextMsg event
{
// arg1: int: print_type (print_notify=1; print_console=2; print_chat=3; print_center=4; print_chat_colored=5; anymore?)
// arg2: str: sender id [what on earth? why string?]
// arg3: str: message
// arg4: str: msg_arg1 (%s1 in message)
// arg5: str: msg_arg2 (%s2 in message)
// arg6: str: msg_arg3 (%s3 in message) [???not sure???] {isn't always sended - like in SayText}
s_bCheckMsg = false;
#endif
}
else
{
#if !defined NO_ADMIN_VIEW
s_bCheckMsg = true;
#endif
g_iLastMsg = s_iMessage; // this is much faster than "copy()"
g_iLastText = s_iText; // this is much faster than "copy()"
}
#if defined NO_ADMIN_VIEW
new iReturned;
iReturned = format_message(s_iMessage, 191, s_iText);
switch( replace_arguments(iReturned, s_iMessage) )
{
case PLUGIN_CONTINUE: return PLUGIN_CONTINUE;
case PLUGIN_HANDLED: return PLUGIN_HANDLED;
}
#else
static s_iReturned[3];
if( s_bCheckMsg ) // cuz "s_iReturned" var is static we don't need to check team and alive status again if message is the same
{
s_iReturned = format_message(s_iMessage, 191, s_iText);
switch( replace_arguments(s_iReturned[0], s_iMessage) )
{
case PLUGIN_CONTINUE: return PLUGIN_CONTINUE;
case PLUGIN_HANDLED: return PLUGIN_HANDLED;
}
}
#endif
#if defined ADMIN_TAG_C
if( g_bIsUserAdmin[s_iSenderId] )
{
#if defined ACTIVITY_ADMIN
if( g_bIsUserAdmin[iPlrId] )
set_msg_arg_string(3, g_iUserAdminName[s_iSenderId]);
else
set_msg_arg_string(3, g_iUserName[s_iSenderId]);
#else
set_msg_arg_string(3, g_iUserAdminName[s_iSenderId]);
#endif
}
else
set_msg_arg_string(3, g_iUserName[s_iSenderId]);
#else
set_msg_arg_string(3, g_iUserName[s_iSenderId]);
#endif
#if !defined NO_ADMIN_VIEW
if( s_iSenderId!=iPlrId )
return PLUGIN_CONTINUE;
new iAdminTeam;
for( new iAdmin=1; iAdmin<=g_iMaxPlayers; iAdmin++ )
{
if( iAdmin==s_iSenderId || !g_bUserChatViewEnabled[iAdmin] )
continue;
new iLen2 = (copy(iMessage[iLen], iMsgLen-iLen, iText)-1); // last symbol is 0x10 - dunno what it is, but it dose nothing
if( iLen2<=0 )
{
#if !defined NO_ADMIN_VIEW
iHandleReturn[0] = PLUGIN_HANDLED;
return iHandleReturn;
#else
return PLUGIN_HANDLED;
#endif
}