27/05/2023, 02:49 PM
le quiero dar a siguiente y se me cierra xd
Código PHP:
new g_selecionosurv[33]
enum _:MAX_SURVCLASES {
ALICE,
SNIPERSURV,
TACTICO,
URBANO,
SAS,
}
enum _:inf_survclass{
CLASE_NAME[30],
CLASE_INFO[250]
}
new const CLASES_SURVIVOR[MAX_SURVCLASES][inf_survclass] =
{
{"Alice", "\yArma:\w Vulcan M249"},
{"Sniper", "\yArma:\w M200"},
{"Tactico", "\yArma:\w M4A1S Tactical"},
{"Urbano", "\yArma:\w SPAS M3"},
{"Sas", "\yArma:\w MP5Navy Tactical"}
}
public show_menu_survclass(id)
{
new item[999], menu = menu_create("Clases Survivor", "hand_survclass")
for (new i = 0; i < sizeof CLASES_SURVIVOR; i++)
{
formatex(item, charsmax(item), "%s", CLASES_SURVIVOR[i][CLASE_NAME])
menu_additem(menu, item)
}
menu_display(id, menu, 0)
}
public hand_survclass(id, menu, item)
{
if (item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED;
}
g_selecionosurv[id] = item
ClasesSurvivors(id)
return PLUGIN_HANDLED;
}
// ESTE ES EL MENUE DEL PROBLEMA
public ClasesSurvivors(id)
{
new menu[999], len;
len = 0;
len += formatex(menu[len], sizeof menu - 1 - len, "\yMenu de clase survivor^n^n");
len += formatex(menu[len], sizeof menu - 1 - len, "\yNombre: \w%s^n", CLASES_SURVIVOR[g_selecionosurv[id]][CLASE_NAME])
len += formatex(menu[len], sizeof menu - 1 - len, "%s^n", CLASES_SURVIVOR[g_selecionosurv[id]][CLASE_INFO])
len += formatex(menu[len], sizeof menu - 1 - len, "^n^n^n\r1. \wSelecionar")
if (g_selecionosurv[id] > 0)
len += formatex(menu[len], sizeof menu - 1 - len, "^n^n^n\r8. \wAnterior")
else
len += formatex(menu[len], sizeof menu - 1 - len, "^n^n^n\d8. Anterior")
if (g_selecionosurv[id]+1 < sizeof CLASES_SURVIVOR)
len += formatex(menu[len], sizeof menu - 1 - len, "^n\r9. \wSiguiente")
else
len += formatex(menu[len], sizeof menu - 1 - len, "^n\d9. Siguiente")
len += formatex(menu[len], sizeof menu - 1 - len, "^n\r0. \wAtras")
show_menu(id, KEYSMENU, menu, -1, "Clases Survivors");
}
public hand_clases_survivors(id, selection) //los parametros deben ir en este orden
{
switch (selection){
case 7:
{
if (g_selecionosurv[id] > 0)
{
g_selecionosurv[id] --
}
ClasesSurvivors(id)
}
case 8:
{
if (g_selecionosurv[id]+1 < sizeof CLASES_SURVIVOR){
g_selecionosurv[id] ++
}
ClasesSurvivors(id)
}
case 9: ClasesSurvivors(id)
}
}
https://steamcommunity.com/id/adriancek1ng/
Aquellos que te critican quieren verte distinto,
Por que ven en ti lo que ellos no serán jamás.
Aquellos que te critican quieren verte distinto,
Por que ven en ti lo que ellos no serán jamás.