|
Senior Member
Join Date: Mar 2014
Location: middle east
|

03-29-2014
, 02:18
Re: [ZP] Zombie VIP 1.7.2
|
#1249
|
i got some problem with add VIP menu to main Zombie plague menu
PHP Code:
// 1. Buy menu
if (LibraryExists(LIBRARY_BUYMENUS, LibType_Library) && (get_pcvar_num(cvar_buy_custom_primary)
|| get_pcvar_num(cvar_buy_custom_secondary) || get_pcvar_num(cvar_buy_custom_grenades)) && is_user_alive(id))
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 (LibraryExists(LIBRARY_ITEMS, LibType_Library) && is_user_alive(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 (LibraryExists(LIBRARY_ZOMBIECLASSES, LibType_Library) && zp_class_zombie_get_count() > 1)
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. Human class
if (LibraryExists(LIBRARY_HUMANCLASSES, LibType_Library) && zp_class_human_get_count() > 1)
len += formatex(menu[len], charsmax(menu) - len, "\r4.\w %L^n", id, "MENU_HCLASS")
else
len += formatex(menu[len], charsmax(menu) - len, "\d4. %L^n", id, "MENU_HCLASS")
// 5. Unstuck
if (LibraryExists(LIBRARY_RANDOMSPAWN, LibType_Library) && is_user_alive(id))
len += formatex(menu[len], charsmax(menu) - len, "\r5.\w %L^n", id, "MENU_UNSTUCK")
else
len += formatex(menu[len], charsmax(menu) - len, "\d5. %L^n", id, "MENU_UNSTUCK")
// 6. Help
len += formatex(menu[len], charsmax(menu) - len, "\r6.\w %L^n^n", id, "MENU_INFO")
// 7. Choose Team
len += formatex(menu[len], charsmax(menu) - len, "\r7.\w %L^n^n", id, "MENU_CHOOSE_TEAM")
// 9. Admin menu
if (LibraryExists(LIBRARY_ADMIN_MENU, LibType_Library) && is_user_admin(id))
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")
and more
PHP Code:
case 1: // Extra Items
{
// Items enabled?
if (LibraryExists(LIBRARY_ITEMS, LibType_Library))
{
// Check whether the player is able to buy anything
if (is_user_alive(id))
zp_items_show_menu(id)
else
zp_colored_print(id, "%L", id, "CANT_BUY_ITEMS_DEAD")
}
else
zp_colored_print(id, "%L", id, "CMD_NOT_EXTRAS")
}
case 2: // Zombie Classes
{
if (LibraryExists(LIBRARY_ZOMBIECLASSES, LibType_Library) && zp_class_zombie_get_count() > 1)
zp_class_zombie_show_menu(id)
else
zp_colored_print(id, "%L", id, "CMD_NOT_ZCLASSES")
}
case 3: // Human Classes
{
if (LibraryExists(LIBRARY_HUMANCLASSES, LibType_Library) && zp_class_human_get_count() > 1)
zp_class_human_show_menu(id)
else
zp_colored_print(id, "%L", id, "CMD_NOT_HCLASSES")
}
case 4:
{
// Check if player is stuck
if (LibraryExists(LIBRARY_RANDOMSPAWN, LibType_Library) && is_user_alive(id))
{
if (is_player_stuck(id))
{
// Move to an initial spawn
if (get_pcvar_num(cvar_random_spawning))
zp_random_spawn_do(id, true) // random spawn (including CSDM)
else
zp_random_spawn_do(id, false) // regular spawn
}
else
zp_colored_print(id, "%L", id, "CMD_NOT_STUCK")
}
else
zp_colored_print(id, "%L", id, "CMD_NOT")
}
case 5: // Help Menu
{
show_help(id)
}
case 6: // Menu override
{
flag_unset(g_ChooseTeamOverrideActive, id)
client_cmd(id, "chooseteam")
}
case 8: // Admin Menu
{
if (LibraryExists(LIBRARY_ADMIN_MENU, LibType_Library) && is_user_admin(id))
zp_admin_menu_show(id)
else
zp_colored_print(id, "%L", id, "NO_ADMIN_MENU")
}
}
return PLUGIN_HANDLED;
}
pleas some one add vip menu code to this codes
thank !
|
|