Member
Join Date: Nov 2014
Location: USA
|
10-20-2018
, 02:49
solved
|
#1
|
solved
Hey, I was trying to edit the extra items menu for zombie plague to change the color of the numbers that come before the extra items name. for example
1. Item 1
2. item 2
^ that number is the one i wanted to change, but i couldn't find it anywhere in the menu code. Did i miss it or is it really not there?
PHP Code:
show_items_menu(id) { static menu[128], name[32], desc[32], cost new menuid, index, itemdata[2] // Title formatex(menu, charsmax(menu), "%L:\y", id, "MENU_EXTRABUY") menuid = menu_create(menu, "menu_extraitems") // Item List for (index = 0; index < g_ItemCount; index++) { // Additional text to display g_AdditionalMenuText[0] = 0 // Execute item select attempt forward ExecuteForward(g_Forwards[FW_ITEM_SELECT_PRE], g_ForwardResult, id, index, 0) // Show item to player? if (g_ForwardResult >= ZP_ITEM_DONT_SHOW) continue; // Add Item Name and Cost ArrayGetString(g_ItemName, index, name, charsmax(name)) ArrayGetString(g_ItemDesc, index, desc, charsmax(desc)) cost = ArrayGetCell(g_ItemCost, index) // Item available to player? if (g_ForwardResult >= ZP_ITEM_NOT_AVAILABLE) formatex(menu, charsmax(menu), "\y%s \w(%s) \y%d %L \d%s", name, desc, cost, id, "MSG_AMMOPACKS", g_AdditionalMenuText) else formatex(menu, charsmax(menu), "\y%s \w(%s) \y%d %L \w%s", name, desc, cost, id, "MSG_AMMOPACKS", g_AdditionalMenuText) itemdata[0] = index itemdata[1] = 0 menu_additem(menuid, menu, itemdata) } // No items to display? if (menu_items(menuid) <= 0) { 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_ITEMS = min(MENU_PAGE_ITEMS, menu_pages(menuid)-1) // Fix for AMXX custom menus set_pdata_int(id, OFFSET_CSMENUCODE, 0) menu_display(id, menuid, MENU_PAGE_ITEMS) }
Last edited by shady101; 10-20-2018 at 03:58.
|
|