Bueno, poray a muchos les de risa o algo asi, es qe me canse de convivir con este drama, bue la cosa viene asi es qe cuando hice los niveles, surgio de la nada el problema de qe recuerda el arma primari, pero no la secundaria (tocando el 8 para q recuerde la selccion), y en cada ronda me recuerda el arma primaria, pero la secundaria me la da para elejir de nuevo xD!, si alguno me ayuda a solucionar este drama, se lo agradesco mucho,
les dejo el code del bloqueo de los menu.
Buy Menu 1
PHP Code:
// Buy Primary Weapon
buy_primary_weapon(id, selection)
{
new required_lvl = g_levelprimary[selection]
if (g_level[id] >= required_lvl)
{
// Drop previous weapons
drop_weapons(id, 1)
drop_weapons(id, 2)
// Strip off from weapons
fm_strip_user_weapons(id)
fm_give_item(id, "weapon_knife")
// Get weapon index
static weaponid
weaponid = get_weaponid(g_primary_items[selection])
// Give the new weapon
fm_give_item(id, g_primary_items[selection])
fm_set_user_bpammo(id, weaponid, MAXBPAMMO[weaponid])
// Weapons bought
g_canbuy[id] = false
// Give additional items
static i
for (i = 0; i < sizeof g_additional_items; i++)
fm_give_item(id, g_additional_items[i])
// Show pistols menu
show_menu_buy2(id)
}
else
{
client_print(id, print_center, "No Tenes Nivel Suficiente Para usar esta Arma (Nivel Requerido %d)", g_levelprimary[selection])
show_menu_buy1(id)
}
}
Buy menu 2
PHP Code:
// Buy Menu 2
public menu_buy2(id, key)
{
// Zombies or survivors get no guns
if (g_zombie[id] || g_survivor[id] || !is_user_alive(id))
return PLUGIN_HANDLED;
// Special keys / weapon list exceeded
if (key >= sizeof g_secondary_items)
{
// Toggle autoselect
if (key == MENU_KEY_AUTOSELECT)
WPN_AUTO_ON = 1 - WPN_AUTO_ON
// Reshow menu unless user exited
if (key != MENU_KEY_EXIT)
show_menu_buy2(id)
return PLUGIN_HANDLED;
}
new required_lvl2 = g_levelsecundary[key]
if (g_level[id] >= required_lvl2)
{
// Store selected weapon
WPN_AUTO_SEC = key
// Drop secondary gun again, in case we picked another (bugfix)
drop_weapons(id, 2)
// Get weapon index
static weaponid
weaponid = get_weaponid(g_secondary_items[key])
// Give the new weapon with full ammo
fm_give_item(id, g_secondary_items[key])
fm_set_user_bpammo(id, weaponid, MAXBPAMMO[weaponid])
return PLUGIN_HANDLED;
}
else
{
client_print(id, print_center, "No Tenes Nivel Suficiente Para usar esta Arma (Nivel Requerido %d)", g_levelsecundary[key])
show_menu_buy2(id)
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE
}
Saludos !!!!
__________________