PHP Code:
// Admin Menu
show_menu_admin(id)
{
static menu[250], len
len = 0
// Title
len += formatex(menu[len], sizeof menu - 1 - len, "\r%L^n^n", id, "MENU_ADMIN_TITLE")
// 1. Zombiefy/Humanize command
if (!g_endround && !g_swarmround && !g_nemround && !g_survround && !g_plagueround && !task_exists(TASK_WELCOMEMSG))
len += formatex(menu[len], sizeof menu - 1 - len, "\r1.\y %L^n", id, "MENU_ADMIN1")
else
len += formatex(menu[len], sizeof menu - 1 - len, "\r1. %L^n", id, "MENU_ADMIN1")
// 2. Nemesis command
if (g_newround && !g_endround && get_pcvar_num(cvar_nem) && !task_exists(TASK_WELCOMEMSG))
len += formatex(menu[len], sizeof menu - 1 - len, "\r2.\y %L^n", id, "MENU_ADMIN2")
else
len += formatex(menu[len], sizeof menu - 1 - len, "\r2. %L^n", id, "MENU_ADMIN2")
// 3. Survivor command
if (g_newround && !g_endround && get_pcvar_num(cvar_surv) && !task_exists(TASK_WELCOMEMSG))
len += formatex(menu[len], sizeof menu - 1 - len, "\r3.\y %L^n", id, "MENU_ADMIN3")
else
len += formatex(menu[len], sizeof menu - 1 - len, "\r3. %L^n", id, "MENU_ADMIN3")
// 4. Respawn command
if (!g_endround && !g_survround && !g_swarmround && !g_nemround && !g_plagueround)
len += formatex(menu[len], sizeof menu - 1 - len, "\r4.\y %L^n", id, "MENU_ADMIN4")
else
len += formatex(menu[len], sizeof menu - 1 - len, "\r4. %L^n", id, "MENU_ADMIN4")
// 5. Swarm mode command
if (allowed_swarm())
len += formatex(menu[len], sizeof menu - 1 - len, "\r5.\y %L^n", id, "MENU_ADMIN5")
else
len += formatex(menu[len], sizeof menu - 1 - len, "\r5. %L^n", id, "MENU_ADMIN5")
// 6. Multi infection command
if (allowed_multi())
len += formatex(menu[len], sizeof menu - 1 - len, "\r6.\y %L^n", id, "MENU_ADMIN6")
else
len += formatex(menu[len], sizeof menu - 1 - len, "\r6. %L^n", id, "MENU_ADMIN6")
// 7. Plague mode command
if (allowed_plague())
len += formatex(menu[len], sizeof menu - 1 - len, "\r7.\y %L^n", id, "MENU_ADMIN7")
else
len += formatex(menu[len], sizeof menu - 1 - len, "\r7. %L^n", id, "MENU_ADMIN7")
// 8. Armagedon mode command
if (allowed_armagedon())
len += formatex(menu[len], sizeof menu - 1 - len, "\r8.\y %L^n", id, "MENU_ADMIN8")
else
len += formatex(menu[len], sizeof menu - 1 - len, "\r8. %L^n", id, "MENU_ADMIN8")
// 0. Exit
len += formatex(menu[len], sizeof menu - 1 - len, "^n\r0.\y %L", id, "MENU_EXIT")
show_menu(id, KEYSMENU, menu, -1, "Admin Menu")
}
pero al compilar salta un error