Нужно изменить цвет цифр нумерации в ZP 4.3 с обычного \r1. на \r[1] в меню Extra Items Menu и Zombie Class Menu
Как именно я могу изменить значения menu_additem, setprop?
Код:
// Extra Items Menu
show_menu_extras(id)
{
// Player dead?
if (!g_isalive[id])
return;
static menuid, menu[128], item, team, buffer[32]
// Title
formatex(menu, charsmax(menu), "%L [%L]\r", id, "MENU_EXTRA_TITLE", id, g_zombie[id] ? g_nemesis[id] ? "CLASS_NEMESIS" : "CLASS_ZOMBIE" : g_survivor[id] ? "CLASS_SURVIVOR" : "CLASS_HUMAN")
menuid = menu_create(menu, "menu_extras")
// Item List
for (item = 0; item < g_extraitem_i; item++)
{
// Retrieve item's team
team = ArrayGetCell(g_extraitem_team, item)
// Item not available to player's team/class
if ((g_zombie[id] && !g_nemesis[id] && !(team & ZP_TEAM_ZOMBIE)) || (!g_zombie[id] && !g_survivor[id] && !(team & ZP_TEAM_HUMAN)) || (g_nemesis[id] && !(team & ZP_TEAM_NEMESIS)) || (g_survivor[id] && !(team & ZP_TEAM_SURVIVOR)))
continue;
// Check if it's one of the hardcoded items, check availability, set translated caption
switch (item)
{
case EXTRA_NVISION:
{
if (!get_pcvar_num(cvar_extranvision)) continue;
formatex(buffer, charsmax(buffer), "%L", id, "MENU_EXTRA1")
}
case EXTRA_ANTIDOTE:
{
if (!get_pcvar_num(cvar_extraantidote) || g_antidotecounter >= get_pcvar_num(cvar_antidotelimit)) continue;
formatex(buffer, charsmax(buffer), "%L", id, "MENU_EXTRA2")
}
case EXTRA_MADNESS:
{
if (!get_pcvar_num(cvar_extramadness) || g_madnesscounter >= get_pcvar_num(cvar_madnesslimit)) continue;
formatex(buffer, charsmax(buffer), "%L", id, "MENU_EXTRA3")
}
case EXTRA_INFBOMB:
{
if (!get_pcvar_num(cvar_extrainfbomb) || g_infbombcounter >= get_pcvar_num(cvar_infbomblimit)) continue;
formatex(buffer, charsmax(buffer), "%L", id, "MENU_EXTRA4")
}
default:
{
if (item >= EXTRA_WEAPONS_STARTID && item <= EXTRAS_CUSTOM_STARTID-1 && !get_pcvar_num(cvar_extraweapons)) continue;
ArrayGetString(g_extraitem_name, item, buffer, charsmax(buffer))
}
}
// Add Item Name and Cost
formatex(menu, charsmax(menu), "%s \y%d %L", buffer, ArrayGetCell(g_extraitem_cost, item), id, "AMMO_PACKS2")
buffer[0] = item
buffer[1] = 0
menu_additem(menuid, menu, buffer)
}
// No items to display?
if (menu_items(menuid) <= 0)
{
zp_colored_print(id, "^x01[^04ZE^01] %L", id ,"CMD_NOT_EXTRAS")
menu_destroy(menuid)
return;
}
// Back - Next - Exit
formatex(menu, charsmax(menu), "%L", id, "MENU_BACK")
menu_setprop(menuid, MPROP_BACKNAME, menu)
formatex(menu, charsmax(menu), "%L", id, "MENU_NEXT")
menu_setprop(menuid, MPROP_NEXTNAME, menu)
formatex(menu, charsmax(menu), "%L", id, "MENU_EXIT")
menu_setprop(menuid, MPROP_EXITNAME, menu)
// If remembered page is greater than number of pages, clamp down the value
MENU_PAGE_EXTRAS = min(MENU_PAGE_EXTRAS, menu_pages(menuid)-1)
// Fix for AMXX custom menus
if (pev_valid(id) == PDATA_SAFE)
set_pdata_int(id, OFFSET_CSMENUCODE, 0, OFFSET_LINUX)
menu_display(id, menuid, MENU_PAGE_EXTRAS)
}
// Zombie Class Menu
public show_menu_zclass(id)
{
// Player disconnected
if (!g_isconnected[id])
return;
// Bots pick their zombie class randomly
if (g_isbot[id])
{
g_zombieclassnext[id] = random_num(0, g_zclass_i - 1)
return;
}
static menuid, menu[128], class, buffer[32], buffer2[32]
// Title
formatex(menu, charsmax(menu), "%L\r", id, "MENU_ZCLASS_TITLE")
menuid = menu_create(menu, "menu_zclass")
// Class List
for (class = 0; class < g_zclass_i; class++)
{
// Retrieve name and info
ArrayGetString(g_zclass_name, class, buffer, charsmax(buffer))
ArrayGetString(g_zclass_info, class, buffer2, charsmax(buffer2))
// Add to menu
if (class == g_zombieclassnext[id])
formatex(menu, charsmax(menu), "\d%s %s", buffer, buffer2)
else
formatex(menu, charsmax(menu), "\w%s \y%s", buffer, buffer2)
buffer[0] = class
buffer[1] = 0
menu_additem(menuid, menu, buffer)
}
// Back - Next - Exit
formatex(menu, charsmax(menu), "%L", id, "MENU_BACK")
menu_setprop(menuid, MPROP_BACKNAME, menu)
formatex(menu, charsmax(menu), "%L", id, "MENU_NEXT")
menu_setprop(menuid, MPROP_NEXTNAME, menu)
formatex(menu, charsmax(menu), "%L", id, "MENU_EXIT")
menu_setprop(menuid, MPROP_EXITNAME, menu)
// If remembered page is greater than number of pages, clamp down the value
MENU_PAGE_ZCLASS = min(MENU_PAGE_ZCLASS, menu_pages(menuid)-1)
// Fix for AMXX custom menus
if (pev_valid(id) == PDATA_SAFE)
set_pdata_int(id, OFFSET_CSMENUCODE, 0, OFFSET_LINUX)
menu_display(id, menuid, MENU_PAGE_ZCLASS)
}