diff -r 009784b8e659 -r c7e7450fa6be scripting/dm_equipment.sp --- a/scripting/dm_equipment.sp Wed Nov 14 07:46:34 2007 +0000 +++ b/scripting/dm_equipment.sp Wed Nov 14 08:01:10 2007 +0000 @@ -104,7 +104,7 @@ g_NVOffset = FindSendPropOffs("CCSPlayer", "m_bHasNightVision"); g_HealthOffset = FindSendPropOffs("CCSPlayer", "m_iHealth"); - g_hEquipMenu = CreateMenu(Menu_EquipHandler, MenuAction_DrawItem); + g_hEquipMenu = CreateMenu(Menu_EquipHandler, MenuAction_DrawItem|MenuAction_DisplayItem); SetMenuTitle(g_hEquipMenu, "Weapon Options:"); SetMenuExitButton(g_hEquipMenu, false); AddMenuItem(g_hEquipMenu, "", "New weapons"); @@ -438,6 +438,21 @@ } g_GunMenuAvailable[param1] = false; } + else if (action == MenuAction_DisplayItem) + { + decl style; + decl String:info[12], String:lang_phrase[32]; + + if (!GetMenuItem(menu, param2, info, sizeof(info), style, lang_phrase, sizeof(lang_phrase))) + { + return 0; + } + + decl String:t_phrase[64]; + Format(t_phrase, sizeof(t_phrase), "%T", lang_phrase, param1); + + return RedrawMenuItem(t_phrase); + } return 0; } @@ -457,6 +472,15 @@ { GivePrimary(param1, param2); } + else if (action == MenuAction_Display) + { + new Handle:hPanel = Handle:param2; + decl String:title[128]; + + Format(title, sizeof(title), "%T:", "Primary weapon", param1); + + SetPanelTitle(hPanel, title); + } return 0; } @@ -488,6 +512,15 @@ DisplayMenu(g_hPrimaryMenu, param1, MENU_TIME_FOREVER); } } + else if (action == MenuAction_Display) + { + new Handle:hPanel = Handle:param2; + decl String:title[128]; + + Format(title, sizeof(title), "%T:", "Secondary weapon", param1); + + SetPanelTitle(hPanel, title); + } return 0; } @@ -798,7 +831,7 @@ { CloseHandle(g_hPrimaryMenu); } - g_hPrimaryMenu = CreateMenu(Menu_PrimaryHandler, MenuAction_DrawItem); + g_hPrimaryMenu = CreateMenu(Menu_PrimaryHandler, MenuAction_DrawItem|MenuAction_Display); SetMenuTitle(g_hPrimaryMenu, "Primary weapon:"); for (new i=0; i