This plugin doesn't work in amxmodx 1.10, can you fix it? I don't have the ability to fix it, thanks

Сообщения
40
Реакции
3
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 )
}
 
Сообщения
1,082
Реакции
58
Помог
11 раз(а)
/del
 
Последнее редактирование:
Сообщения
1,082
Реакции
58
Помог
11 раз(а)
all85100, язык на форуме допускается, либо английский, либо русский
 
Сообщения
40
Реакции
3
Code_0xABC, There is some Chinese in the code, and I will now use the software to translate it
10 Июн 2024
Код:
#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 ][ ] = {
"default",
"Light Blue",
"colorless",
"Black",
"Blue",
"Brown",
"Dark Green",
"Golden",

"Gray",
"Green",
"Fuchsian",
"Maroon",
"Navy",
"Orange",
"Pink",
"Purple",

"Red",
"Sea Green",
"Sky Blue",
"Tooth color",
"White",
"Yellow"

}

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("Chat message color conversion","v1.0","[BenZ] China")
    register_menucmd(register_menuid("Chat message color conversion"),1023,"TextColorChoice")
    register_concmd("TColor", "TColor", 0, "Brings up menu to change your text color.")
    register_clcmd("TColor", "TColor",ADMIN_MENU,"- The menu is displayed")
    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, "Chat message color - [%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. more...^n0. %s", pos ? "Back" : "Exit" )
        nKeys |= (1<<8)
    }
    else formatex( szMenuBody[nLen], (511-nLen), "^n0. %s", pos ? "Back" : "Exit" )
    show_menu( id, nKeys, szMenuBody, -1 )
}
10 Июн 2024
This plugin can be compiled successfully in amxmodx 1.10, but it does not take effect after running
 
Сообщения
1,082
Реакции
58
Помог
11 раз(а)
/del
 
Последнее редактирование:
Сообщения
857
Реакции
532
Помог
13 раз(а)
because this plugin is using slowhacking and now almost of all clients are using protect code for this
10 Июн 2024
PHP:
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"
}
PHP:
default: client_cmd( id, g_szOptions[g_nMenuPosition[id] * 8 + key] )
 
Сообщения
264
Реакции
132
Помог
13 раз(а)
В steam клиенте можно попробовать cl_filterstuffcmd 0
 
Сообщения
40
Реакции
3
murlemur, Typing cl_filterstuffcmd 0 in the console still has no effect
10 Июн 2024
If the code of this plugin is banned by the Steam client, is there a plugin with the same function that can be used?
 
Сообщения
264
Реакции
132
Помог
13 раз(а)
Try :

Код:
-show_menu( id, nKeys, szMenuBody, -1 )
+show_menu( id, nKeys, szMenuBody, -1, "Chat message color conversion")
 

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу