Preciso saber como fazer isso no ultimo topico nao obtive sucesso por favor me ajudem obrigado
Código:
// Admin Menu
show_menu_admin(id)
{
static menu[250], len, userflags
len = 0
userflags = get_user_flags(id)
// Title
len += formatex(menu[len], charsmax(menu) - len, "\y%L^n^n", id, "MENU_ADMIN_TITLE")
// 1. Zombiefy/Humanize command
if (userflags & (g_access_flag[ACCESS_MODE_INFECTION] | g_access_flag[ACCESS_MAKE_ZOMBIE] | g_access_flag[ACCESS_MAKE_HUMAN]))
len += formatex(menu[len], charsmax(menu) - len, "\r1.\w %L^n", id, "MENU_ADMIN1")
else
len += formatex(menu[len], charsmax(menu) - len, "\d1. %L^n", id, "MENU_ADMIN1")
// 2. Nemesis command
if (userflags & (g_access_flag[ACCESS_MODE_NEMESIS] | g_access_flag[ACCESS_MAKE_NEMESIS]))
len += formatex(menu[len], charsmax(menu) - len, "\r2.\w %L^n", id, "MENU_ADMIN2")
else
len += formatex(menu[len], charsmax(menu) - len, "\d2. %L^n", id, "MENU_ADMIN2")
// 3. Assassin command
if (userflags & (g_access_flag[ACCESS_MODE_ASSASSIN] | g_access_flag[ACCESS_MAKE_ASSASSIN]))
len += formatex(menu[len], charsmax(menu) - len, "\r3.\w %L^n", id, "MENU_ADMIN3")
else
len += formatex(menu[len], charsmax(menu) - len, "\d3. %L^n", id, "MENU_ADMIN3")
// 4. Survivor command
if (userflags & (g_access_flag[ACCESS_MODE_SURVIVOR] | g_access_flag[ACCESS_MAKE_SURVIVOR]))
len += formatex(menu[len], charsmax(menu) - len, "\r4.\w %L^n", id, "MENU_ADMIN4")
else
len += formatex(menu[len], charsmax(menu) - len, "\d4. %L^n", id, "MENU_ADMIN4")
// 5. Sniper command
if (userflags & (g_access_flag[ACCESS_MODE_SNIPER] | g_access_flag[ACCESS_MAKE_SNIPER]))
len += formatex(menu[len], charsmax(menu) - len, "\r5.\w %L^n", id, "MENU_ADMIN5")
else
len += formatex(menu[len], charsmax(menu) - len, "\d5. %L^n", id, "MENU_ADMIN5")
// 6. Respawn command
if (userflags & g_access_flag[ACCESS_RESPAWN_PLAYERS])
len += formatex(menu[len], charsmax(menu) - len, "\r6.\w %L^n", id, "MENU_ADMIN6")
else
len += formatex(menu[len], charsmax(menu) - len, "\d6. %L^n", id, "MENU_ADMIN6")
// 7. Swarm mode command
if ((userflags & g_access_flag[ACCESS_MODE_SWARM]) && allowed_swarm())
len += formatex(menu[len], charsmax(menu) - len, "\r7.\w %L^n", id, "MENU_ADMIN7")
else
len += formatex(menu[len], charsmax(menu) - len, "\d7. %L^n", id, "MENU_ADMIN7")
// 8. Multi infection command
if ((userflags & g_access_flag[ACCESS_MODE_MULTI]) && allowed_multi())
len += formatex(menu[len], charsmax(menu) - len, "\r8.\w %L^n", id, "MENU_ADMIN8")
else
len += formatex(menu[len], charsmax(menu) - len, "\d8. %L^n", id, "MENU_ADMIN8")
// 9. Plague mode command
if ((userflags & g_access_flag[ACCESS_MODE_PLAGUE]) && allowed_plague())
len += formatex(menu[len], charsmax(menu) - len, "\r9.\w %L^n", id, "MENU_ADMIN9")
else
len += formatex(menu[len], charsmax(menu) - len, "\d9. %L^n", id, "MENU_ADMIN9")
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
menu_display(id, menu, 0)
}
Código:
// 0. Exit
len += formatex(menu[len], charsmax(menu) - len, "^n\r0.\w %L", id, "MENU_EXIT")
// Fix for AMXX custom menus
set_pdata_int(id, OFFSET_CSMENUCODE, 0)
show_menu(id, KEYSMENU, menu, -1, "Admin Menu")