This plugin can change the default color of chat messages, now it is not available。
Код:
// AMXX 文字色彩转换器
// By: [C.H.M] BenZ
// 允许全部玩家改变输入文字色彩.
#include <amxmodx>
#include <amxmisc>
new g_nMenuPosition[33]
#define MAX_MENU 22 //This is the number of options you have
#define MAX_DISPLAY 8 //This is the number of Options per page (Dont change)
#define MAX_PAGES 3 //This is the number of pages (MAX_MENU / MAX_DISPLAY [if Remainder > 0 Then +1])
new g_szMenuBody[ MAX_MENU ][ ] = {
"默认",
"浅蓝",
"无色",
"黑色",
"蓝色",
"褐色",
"深绿",
"金黄",
"灰色",
"绿色",
"紫红",
"栗色",
"深蓝",
"橘色",
"粉红",
"紫色",
"红色",
"海绿",
"天蓝",
"牙色",
"白色",
"黄色"
}
new g_szOptions[ MAX_MENU ][ ] = {
"con_color 255+155+50",
"con_color 180+220+255",
"con_color 0+255+255",
"con_color 0+0+0",
"con_color 0+0+255",
"con_color 102+076+0",
"con_color 0+127+0",
"con_color 219+178+0",
"con_color 64+61+82",
"con_color 0+255+0",
"con_color 255+0+76",
"con_color 127+0+0",
"con_color 0+0+127",
"con_color 240+138+0",
"con_color 255+0+255",
"con_color 127+0+127",
"con_color 255+0+0",
"con_color 117+255+87",
"con_color 0+127+127",
"con_color 0+229+107",
"con_color 255+255+255",
"con_color 255+255+0"
}
/*****************Declare Text Color Changer*****************/
public plugin_init()
{
register_plugin("聊天信息颜色转换","v1.0","[BenZ] China")
register_menucmd(register_menuid("聊天信息颜色转换"),1023,"TextColorChoice")
register_concmd("TColor", "TColor", 0, "Brings up menu to change your text color.")
register_clcmd("TColor", "TColor",ADMIN_MENU,"- 显示菜单")
register_clcmd("say /TColor", "TColor")
register_clcmd("say_team /TColor", "TColor")
}
/*****************Function that calls Text Color Changer*****************/
public TColor(id)
{
ShowMenu( id, g_nMenuPosition[id] = 0 )
return PLUGIN_HANDLED
}
public TextColorChoice( id, key )
{
switch( key )
{
case 8: ShowMenu( id, ++g_nMenuPosition[id] )
case 9: ShowMenu( id, --g_nMenuPosition[id] )
default: client_cmd( id, g_szOptions[g_nMenuPosition[id] * 8 + key] )
}
return PLUGIN_HANDLED
}
public ShowMenu( id, pos )
{
if ( pos < 0 ) return
new i, j = 0
new nKeys, nStart, nEnd, nLen
new szMenuBody[512]
nStart = pos * 8
if ( nStart >= MAX_MENU )
nStart = pos = g_nMenuPosition[id] = 0
nLen = formatex( szMenuBody, 511, "聊天信息颜色 - [%d/%d]^n^n", pos + 1, MAX_PAGES )
nEnd = nStart + MAX_DISPLAY
nKeys = (1<<9)
if ( nEnd > MAX_MENU ) nEnd = MAX_MENU
for ( i = nStart; i < nEnd; i++ )
{
nKeys |= (1<<j++)
nLen += formatex( szMenuBody[nLen], (511-nLen), "%d. %s^n", j, g_szMenuBody[i] )
}
if ( nEnd != MAX_MENU )
{
formatex( szMenuBody[nLen], (511-nLen), "^n9. 更多...^n0. %s", pos ? "返回" : "退出" )
nKeys |= (1<<8)
}
else formatex( szMenuBody[nLen], (511-nLen), "^n0. %s", pos ? "返回" : "退出" )
show_menu( id, nKeys, szMenuBody, -1 )
}