PHP Code:
displayTelMenu(id, pos)
{
if (pos < 0)
return
get_players(g_menuPlayers[id], g_menuPlayersNum[id])
new menuBody[512]
new b = 0
new i
new name[32]
new start = pos * 6
new bool:blockMenu = (is_user_alive(id) && g_menuOption[id] < 1) ? true : false
if (start >= g_menuPlayersNum[id])
start = pos = g_menuPosition[id] = 0
new len = format(menuBody, 511, g_coloredMenus ? "\y%L\R%d/%d^n\w^n" : "%L %d/%d^n^n", id, "TELE_MENU", pos + 1, (g_menuPlayersNum[id] / 6 + ((g_menuPlayersNum[id] % 6) ? 1 : 0)))
new end = start + 6
new keys = MENU_KEY_0|MENU_KEY_8
if (end > g_menuPlayersNum[id])
end = g_menuPlayersNum[id]
for (new a = start; a < end; ++a)
{
i = g_menuPlayers[id][a]
get_user_name(i, name, 31)
if (blockMenu || !is_user_alive(i) || (id != i && get_user_flags(i) & ADMIN_IMMUNITY))
{
++b
if (g_coloredMenus)
len += format(menuBody[len], 511-len, "\d%d. %s^n\w", b, name)
else
len += format(menuBody[len], 511-len, "#. %s^n", name)
} else {
keys |= (1<<b)
if (is_user_admin(i))
len += format(menuBody[len], 511-len, g_coloredMenus ? "%d. %s \r*^n\w" : "%d. %s *^n", ++b, name)
else
len += format(menuBody[len], 511-len, "%d. %s^n", ++b, name)
}
}
if (g_menuOption[id] > 0) // 1
{
keys |= MENU_KEY_7
len += format(menuBody[len], 511-len, "^n7. To location: %d %d %d^n", g_menuOrgin[id][0], g_menuOrgin[id][1], g_menuOrgin[id][2])
}
else if (g_menuOption[id]) // -1
{
if (g_coloredMenus)
len += format(menuBody[len], 511-len, "^n\d7. %L^n\w", id, "CUR_LOC")
else
len += format(menuBody[len], 511-len, "^n#. %L^n", id, "CUR_LOC")
} else { // 0
keys |= MENU_KEY_7
len += format(menuBody[len], 511-len, "^n7. %L^n", id, "CUR_LOC")
}
len += format(menuBody[len], 511-len, "8. %L^n", id, "SAVE_LOC")
if (end != g_menuPlayersNum[id])
{
format(menuBody[len], 511-len, "^n9. %L...^n0. %L", id, "MORE", id, pos ? "BACK" : "EXIT")
keys |= MENU_KEY_9
}
else
format(menuBody[len], 511-len, "^n0. %L", id, pos ? "BACK" : "EXIT")
show_menu(id, keys, menuBody, -1, "Teleport Menu")
}
This is a part of teleport plugin. I'm tying to mix this plugin with mines.
It works perfectly but i dont' want to use a diccionari so y convert
SAVE_LOC
CUR_LOC
TELE_MENU
into variables but still shows ML_NOTFOUND
Hel Please