Post by DeXTeR on Jan 11, 2018 10:35:11 GMT
A simple help to who wanted to make him ZP Menu Colored and Nice
First:
Find this code:
Secound:
Replace it by
First:
Find this code:
/*================================================================================
[Menus]
=================================================================================*/
// Game Menu
show_menu_game(id)
{
static menu[250], len, userflags
len = 0
userflags = get_user_flags(id)
// Title
len += formatex(menu[len], charsmax(menu) - len, "\y%s^n^n", g_modname)
// 1. Buy weapons
if (get_pcvar_num(cvar_buycustom))
len += formatex(menu[len], charsmax(menu) - len, "\r1.\w %L^n", id, "MENU_BUY")
else
len += formatex(menu[len], charsmax(menu) - len, "\d1. %L^n", id, "MENU_BUY")
// 2. Extra items
if (get_pcvar_num(cvar_extraitems) && g_isalive[id])
len += formatex(menu[len], charsmax(menu) - len, "\r2.\w %L^n", id, "MENU_EXTRABUY")
else
len += formatex(menu[len], charsmax(menu) - len, "\d2. %L^n", id, "MENU_EXTRABUY")
// 3. Zombie class
if (get_pcvar_num(cvar_zclasses))
len += formatex(menu[len], charsmax(menu) - len, "\r3.\w %L^n", id,"MENU_ZCLASS")
else
len += formatex(menu[len], charsmax(menu) - len, "\d3. %L^n", id,"MENU_ZCLASS")
// 4. Unstuck
if (g_isalive[id])
len += formatex(menu[len], charsmax(menu) - len, "\r4.\w %L^n", id, "MENU_UNSTUCK")
else
len += formatex(menu[len], charsmax(menu) - len, "\d4. %L^n", id, "MENU_UNSTUCK")
// 5. Help
len += formatex(menu[len], charsmax(menu) - len, "\r5.\w %L^n^n", id, "MENU_INFO")
// 6. Join spec
if (!g_isalive[id] || !get_pcvar_num(cvar_blocksuicide) || (userflags & g_access_flag[ACCESS_ADMIN_MENU]))
len += formatex(menu[len], charsmax(menu) - len, "\r6.\w %L^n^n", id, "MENU_SPECTATOR")
else
len += formatex(menu[len], charsmax(menu) - len, "\d6. %L^n^n", id, "MENU_SPECTATOR")
// 9. Admin menu
if (userflags & g_access_flag[ACCESS_ADMIN_MENU])
len += formatex(menu[len], charsmax(menu) - len, "\r9.\w %L", id, "MENU_ADMIN")
else
len += formatex(menu[len], charsmax(menu) - len, "\d9. %L", id, "MENU_ADMIN")
// 0. Exit
len += formatex(menu[len], charsmax(menu) - len, "^n^n\r0.\w %L", id, "MENU_EXIT")
show_menu(id, KEYSMENU, menu, -1, "Game Menu")
}
Secound:
Replace it by
/*================================================================================
[Menus]
=================================================================================*/
// Game Menu
show_menu_game(id)
{
static menu[512], len, userflags
len = 0
userflags = get_user_flags(id)
// Title
len += formatex(menu[len], charsmax(menu) - len, "\y-=\r[\w %s \r]\y=-^n^n", g_modname)
// 1. Buy weapons
if (get_pcvar_num(cvar_buycustom))
len += formatex(menu[len], charsmax(menu) - len, "\r1. \r-=[\y %L \r]=-^n", id, "MENU_BUY")
else
len += formatex(menu[len], charsmax(menu) - len, "\d1. -=[ %L ]=-^n", id, "MENU_BUY")
// 2. Extra items
if (get_pcvar_num(cvar_extraitems) && g_isalive[id])
len += formatex(menu[len], charsmax(menu) - len, "\r2. \r-=[\y %L \r]=-^n", id, "MENU_EXTRABUY")
else
len += formatex(menu[len], charsmax(menu) - len, "\d2. -=[ %L ]=-^n", id, "MENU_EXTRABUY")
// 3. Zombie class
if (get_pcvar_num(cvar_zclasses))
len += formatex(menu[len], charsmax(menu) - len, "\r3. \r-=[\y %L \r]=-^n", id,"MENU_ZCLASS")
else
len += formatex(menu[len], charsmax(menu) - len, "\d3. -=[ %L ]=-^n", id,"MENU_ZCLASS")
// 4. Unstuck
if (g_isalive[id])
len += formatex(menu[len], charsmax(menu) - len, "\r4. \r-=[\y %L \r]=-^n", id, "MENU_UNSTUCK")
else
len += formatex(menu[len], charsmax(menu) - len, "\d4. -=[ %L ]=-^n", id, "MENU_UNSTUCK")
// 5. Help
len += formatex(menu[len], charsmax(menu) - len, "\r5. \r-=[\w %L \r]=-^n^n", id, "MENU_INFO")
// 6. Join spec
if (!g_isalive[id] || !get_pcvar_num(cvar_blocksuicide) || (userflags & g_access_flag[ACCESS_ADMIN_MENU]))
len += formatex(menu[len], charsmax(menu) - len, "\r6. \r-=[\w %L \r]=-^n^n", id, "MENU_SPECTATOR")
else
len += formatex(menu[len], charsmax(menu) - len, "\d6. -=[ %L ]=-^n^n", id, "MENU_SPECTATOR")
// 9. Admin menu
if (userflags & g_access_flag[ACCESS_ADMIN_MENU])
len += formatex(menu[len], charsmax(menu) - len, "\r9. \r-=[\y %L \r]=-", id, "MENU_ADMIN")
else
len += formatex(menu[len], charsmax(menu) - len, "\d9. -=[ %L ]=-", id, "MENU_ADMIN")
// 0. Exit
len += formatex(menu[len], charsmax(menu) - len, "^n^n\r0. \r-=[\w %L \r]=-^n", id, "MENU_EXIT")^
show_menu(id, KEYSMENU, menu, -1, "Game Menu")
}