[Ayuda] Menu's
#1

Bueno miren que tengo un problema, yo tenia 4 menu's, 2 en un FS y otros 2 en un GM, pero tuve que unir
los del GM al FS para poder poner una cosa, pero el problema es que en OnPlayerSelectedMenuRow, solo funcionan
los 2 primeros, no logro comprenderlo. Intente volteandolos y si, funcionaron los otros 2 primeros. Que puedo hacer? no lo eh podido solucionar.

Код:
public OnPlayerSelectedMenuRow(playerid, row)
{
  new Menu:CurrentMenu = GetPlayerMenu(playerid);

  if(CurrentMenu == menutele) //Este sera el menu principal
    {
  switch(row)
  {
    case 0:
    {
    new Float:health;
    GetPlayerHealth(playerid,health);
    if(health > 55) //RANK 3
	{
  	new string2[128], playername[MAX_PLAYER_NAME];
  	GetPlayerName(playerid, playername, sizeof(playername));
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid, -654.9000,2519.6060,427.2109);
    TogglePlayerControllable(playerid,0);
    TextDrawShowForPlayer(playerid,lbt);
    TextDrawShowForPlayer(playerid,lbb);
    TextDrawShowForPlayer(playerid,cargando);
    SetTimerEx("loaded",2000,0,"i",playerid);
    ResetPlayerWeapons(playerid);
    format(string2, sizeof(string2), "{FF0000}* %s {FFFFFF}se ha teletransportado al Salto. (/Tele)", playername);
	SendClientMessageToAll(AZUL_CLARO, string2);
	DisablePlayerCheckpoint(playerid);
	ResetPlayerWeapons(playerid);
	Duelo[playerid] = 0;
    }
    else
    {
    SendClientMessage(playerid, COLOR_ROJO, "* Necesitas curarte antes de teletransportarte al Salto!");
    }
    }
    case 1:
    {
    ShowMenuForPlayer(dificultad,playerid);
    }
    case 2:
    {
    new Float:health;
    GetPlayerHealth(playerid,health);
    if(health > 55) //RANK 3
	{
  	new string2[128], playername[MAX_PLAYER_NAME];
  	GetPlayerName(playerid, playername, sizeof(playername));
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid, 1317.7235,1263.2357,10.8203);
    TogglePlayerControllable(playerid,0);
    TextDrawShowForPlayer(playerid,lbt);
    TextDrawShowForPlayer(playerid,lbb);
    TextDrawShowForPlayer(playerid,cargando);
    SetTimerEx("loaded",2000,0,"i",playerid);
    ResetPlayerWeapons(playerid);
    format(string2, sizeof(string2), "{FF0000}* %s {FFFFFF}se ha teletransportado a Stunt Zone. (/Tele)", playername);
	SendClientMessageToAll(AZUL_CLARO, string2);
	DisablePlayerCheckpoint(playerid);
	Duelo[playerid] = 0;
    }
    else
    {
    SendClientMessage(playerid, COLOR_ROJO, "* Necesitas curarte antes de teletransportarte al Reto!");
    }
    }
    case 3:
    {
    new Float:health;
    GetPlayerHealth(playerid,health);
    if(health > 55) //RANK 3
	{
  	new string2[128], playername[MAX_PLAYER_NAME];
  	GetPlayerName(playerid, playername, sizeof(playername));
    SetPlayerInterior(playerid, 9);
    SetPlayerPos(playerid, 315.8235,973.4511,1961.5571);
    TogglePlayerControllable(playerid,0);
    TextDrawShowForPlayer(playerid,lbt);
    TextDrawShowForPlayer(playerid,lbb);
    TextDrawShowForPlayer(playerid,cargando);
    SetTimerEx("loaded",2000,0,"i",playerid);
    format(string2, sizeof(string2), "{FF0000}* %s {FFFFFF}se ha teletransportado al Avion. (/Tele)", playername);
	SendClientMessageToAll(AZUL_CLARO, string2);
	SetPlayerCheckpoint(playerid, 315.7849,1031.0007,1947.409, 8);
	SetTimerEx("Paracaidas",1000,0,"i",playerid);
	Duelo[playerid] = 0;
    }
    else
    {
    SendClientMessage(playerid, COLOR_ROJO, "* Necesitas curarte antes de teletransportarte al Avion!");
    }
    }
    case 4:
    {
    new Float:health;
    GetPlayerHealth(playerid,health);
    if(health > 55) //RANK 3
	{
  	new string2[128], playername[MAX_PLAYER_NAME];
  	GetPlayerName(playerid, playername, sizeof(playername));
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid, 1358.0405,-793.2532,399.4066);
    TogglePlayerControllable(playerid,0);
    TextDrawShowForPlayer(playerid,lbt);
    TextDrawShowForPlayer(playerid,lbb);
    TextDrawShowForPlayer(playerid,cargando);
    SetTimerEx("loaded",2000,0,"i",playerid);
    format(string2, sizeof(string2), "{FF0000}* %s {FFFFFF}se ha teletransportado a Race. (/Tele)", playername);
	SendClientMessageToAll(AZUL_CLARO, string2);
	SetPlayerFacingAngle(playerid, 0.0);
	Duelo[playerid] = 0;
    }
    else
    {
    SendClientMessage(playerid, COLOR_ROJO, "* Necesitas curarte antes de teletransportarte a Race!");
    }
    }
  }
  if(CurrentMenu == menuduelos) //Este sera el menu principal
    {
  switch(row)
  {
    case 0:
    {
    new Float:health;
    GetPlayerHealth(playerid,health);
    if(health > 55) //RANK 3
	{
  	new string2[128], playername[MAX_PLAYER_NAME];
  	GetPlayerName(playerid, playername, sizeof(playername));
   	new rand = random(sizeof(Duelo1));
	SetPlayerPos(playerid, Duelo1[rand][0], Duelo1[rand][1], Duelo1[rand][2]);
    format(string2, sizeof(string2), "{FF0000}* %s {FFFFFF}se ha teletransportado al duelo de Sawnoff y TEC9. (/Duelos)", playername);
	SendClientMessageToAll(AZUL_CLARO, string2);
	SetPlayerInterior(playerid, 0);
	SetPlayerArmour(playerid, 100);
	SetPlayerHealth(playerid, 100);
	Duelo[playerid] = 1;
	DisablePlayerCheckpoint(playerid);
	SetTimerEx("DueloSawnoff",1000,0,"i",playerid);
    }
    else
    {
    SendClientMessage(playerid, COLOR_ROJO, "* Necesitas curarte antes de entrar al Duelo !");
    }
    }
    case 1:
    {
    new Float:health;
    GetPlayerHealth(playerid,health);
    if(health > 55) //RANK 3
	{
  	new string2[128], playername[MAX_PLAYER_NAME];
  	GetPlayerName(playerid, playername, sizeof(playername));
   	new rand = random(sizeof(Duelo3));
	SetPlayerPos(playerid, Duelo3[rand][0], Duelo3[rand][1], Duelo3[rand][2]);
	SetPlayerInterior(playerid, 1);
    format(string2, sizeof(string2), "{FF0000}* %s {FFFFFF}se ha teletransportado al duelo de M4. (/Duelos)", playername);
	SendClientMessageToAll(AZUL_CLARO, string2);
	SetPlayerArmour(playerid, 100);
	SetPlayerHealth(playerid, 100);
	Duelo[playerid] = 1;
	DisablePlayerCheckpoint(playerid);
	SetTimerEx("DueloM4",1000,0,"i",playerid);
    }
    else
    {
    SendClientMessage(playerid, COLOR_ROJO, "* Necesitas curarte antes de entrar al Duelo !");
    }
    }
    case 2:
    {
    new Float:health;
    GetPlayerHealth(playerid,health);
    if(health > 55) //RANK 3
	{
  	new string2[128], playername[MAX_PLAYER_NAME];
  	GetPlayerName(playerid, playername, sizeof(playername));
   	new rand = random(sizeof(Duelo2));
	SetPlayerPos(playerid, Duelo2[rand][0], Duelo2[rand][1], Duelo2[rand][2]);
    SetPlayerInterior(playerid, 10);
    format(string2, sizeof(string2), "{FF0000}* %s {FFFFFF}se ha teletransportado al duelo de Deagle. (/Duelos)", playername);
	SendClientMessageToAll(AZUL_CLARO, string2);
	SetPlayerArmour(playerid, 100);
	SetPlayerHealth(playerid, 100);
	Duelo[playerid] = 1;
	DisablePlayerCheckpoint(playerid);
	SetTimerEx("DueloDeagle",1000,0,"i",playerid);
    }
    else
    {
    SendClientMessage(playerid, COLOR_ROJO, "* Necesitas curarte antes de entrar al Duelo !");
    }
    }
    case 3:
    {
    new Float:health;
    GetPlayerHealth(playerid,health);
    if(health > 55) //RANK 3
	{
  	new string2[128], playername[MAX_PLAYER_NAME];
  	GetPlayerName(playerid, playername, sizeof(playername));
   	new rand = random(sizeof(Duelo4));
	SetPlayerPos(playerid, Duelo4[rand][0], Duelo4[rand][1], Duelo4[rand][2]);
    format(string2, sizeof(string2), "{FF0000}* %s {FFFFFF}se ha teletransportado al duelo de SPAZ. (/Duelos)", playername);
	SendClientMessageToAll(AZUL_CLARO, string2);
	SetPlayerInterior(playerid, 0);
	SetPlayerArmour(playerid, 100);
	SetPlayerHealth(playerid, 100);
	Duelo[playerid] = 1;
	DisablePlayerCheckpoint(playerid);
	SetTimerEx("DueloSpaz",1000,0,"i",playerid);
    }
    else
    {
    SendClientMessage(playerid, COLOR_ROJO, "* Necesitas curarte antes de entrar al Duelo !");
    }
    }
    case 4:
    {
    new Float:health;
    GetPlayerHealth(playerid,health);
    if(health > 55) //RANK 3
	{
  	new string2[128], playername[MAX_PLAYER_NAME];
  	GetPlayerName(playerid, playername, sizeof(playername));
   	new rand = random(sizeof(Duelo5));
	SetPlayerPos(playerid, Duelo5[rand][0], Duelo5[rand][1], Duelo5[rand][2]);
    format(string2, sizeof(string2), "{FF0000}* %s {FFFFFF}se ha teletransportado al duelo de Lanzallamas. (/Duelos)", playername);
	SendClientMessageToAll(AZUL_CLARO, string2);
	SetPlayerInterior(playerid, 18);
	SetPlayerArmour(playerid, 100);
	SetPlayerHealth(playerid, 100);
	Duelo[playerid] = 1;
	DisablePlayerCheckpoint(playerid);
	SetTimerEx("DueloLanzallamas",1000,0,"i",playerid);
    }
    else
    {
    SendClientMessage(playerid, COLOR_ROJO, "* Necesitas curarte antes de entrar al Duelo !");
    }
    }
  }
  if(CurrentMenu == dificultad) //Este sera el menu principal
    {
  switch(row)
  {
    case 0: //facil
    {
    new Float:health;
    GetPlayerHealth(playerid,health);
    if(health > 55) //RANK 3
	{
  	new string2[128], playername[MAX_PLAYER_NAME];
  	GetPlayerName(playerid, playername, sizeof(playername));
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid, -2141.0166,2411.9585,457.4148);
    TogglePlayerControllable(playerid,0);
    TextDrawShowForPlayer(playerid,lbt);
    TextDrawShowForPlayer(playerid,lbb);
    TextDrawShowForPlayer(playerid,cargando);
    SetTimerEx("loaded",2000,0,"i",playerid);
    ResetPlayerWeapons(playerid);
    format(string2, sizeof(string2), "{FF0000}* %s {FFFFFF}se ha teletransportado al Reto en Facil. (/Tele)", playername);
	SendClientMessageToAll(AZUL_CLARO, string2);
	DisablePlayerCheckpoint(playerid);
	Duelo[playerid] = 0;
    }
    else
    {
    SendClientMessage(playerid, COLOR_ROJO, "* Necesitas curarte antes de teletransportarte al Reto!");
    }
    }
    case 1: //normal
    {
    new Float:health;
    GetPlayerHealth(playerid,health);
    if(health > 55) //RANK 3
	{
  	new string2[128], playername[MAX_PLAYER_NAME];
  	GetPlayerName(playerid, playername, sizeof(playername));
    SetPlayerInterior(playerid, 0);
    SendClientMessage(playerid, COLOR_GREY, "Proximamente...");
   	new rand = random(sizeof(Reto));
	SetPlayerPos(playerid, Reto[rand][0], Reto[rand][1], Reto[rand][2]);
    TogglePlayerControllable(playerid,0);
    TextDrawShowForPlayer(playerid,lbt);
    TextDrawShowForPlayer(playerid,lbb);
    TextDrawShowForPlayer(playerid,cargando);
    SetTimerEx("loaded",2000,0,"i",playerid);
    ResetPlayerWeapons(playerid);
    format(string2, sizeof(string2), "{FF0000}* %s {FFFFFF}se ha teletransportado al Reto en Normal. (/Tele)", playername);
	SendClientMessageToAll(AZUL_CLARO, string2);
	DisablePlayerCheckpoint(playerid);
	Duelo[playerid] = 0;
    }
    else
    {
    SendClientMessage(playerid, COLOR_ROJO, "* Necesitas curarte antes de teletransportarte al Reto!");
    }
	}
    case 2: //avanzado
    {
    new Float:health;
    GetPlayerHealth(playerid,health);
    if(health > 55) //RANK 3
	{
  	new string2[128], playername[MAX_PLAYER_NAME];
  	GetPlayerName(playerid, playername, sizeof(playername));
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid, 1784.1637,2140.6335,316.1240);
    TogglePlayerControllable(playerid,0);
    TextDrawShowForPlayer(playerid,lbt);
    TextDrawShowForPlayer(playerid,lbb);
    TextDrawShowForPlayer(playerid,cargando);
    SetTimerEx("loaded",2000,0,"i",playerid);
    ResetPlayerWeapons(playerid);
    format(string2, sizeof(string2), "{FF0000}* %s {FFFFFF}se ha teletransportado al Reto en Dificil. (/Tele)", playername);
	SendClientMessageToAll(AZUL_CLARO, string2);
	DisablePlayerCheckpoint(playerid);
	Duelo[playerid] = 0;
    }
    else
    {
    SendClientMessage(playerid, COLOR_ROJO, "* Necesitas curarte antes de teletransportarte al Reto!");
    }
    }
  }
    if(CurrentMenu == menu) //Este sera el menu principal
    {
  switch(row)
  {
    case 0:
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid, 297.9552,-1168.5767,80.9099);
    TogglePlayerControllable(playerid,1);
    }
    case 1:
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid, 2513.3230,-1671.5131,13.5197);
    TogglePlayerControllable(playerid,1);
    }
    case 2:
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid, 490.7168,-1494.9613,20.3475);
    TogglePlayerControllable(playerid,1);
    }
    case 3:
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid, 327.3844,-1795.3684,4.7619);
    TogglePlayerControllable(playerid,1);
    }
    case 4:
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid, 2861.6436,-2031.3605,10.9338);
    TogglePlayerControllable(playerid,1);
    }
    case 5:
    {
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid, 1541.0021,-1359.2114,329.4633);
    TogglePlayerControllable(playerid,1);
    }
  }
  }
  if(CurrentMenu == MenuOpciones) //Este sera el menu principal
    {
  switch(row)
  {
    case 0: //Estilos Pelea
    {
    ShowPlayerDialog(playerid, 125, DIALOG_STYLE_LIST, "Estilos de pelea", "Normal\nBoxeo\nKarate\nGrabkick\nCodazo", "Elegir", "Cancelar");
    }
    case 1: //Colores
    {
    ShowPlayerDialog(playerid, 126, DIALOG_STYLE_LIST, "Colores", "Azul\nAzul Oscuro\nRojo\nAnaranjado\nAmarillo\nVerde\nCafe\nNegro\nBlanco\nGris\nMorado\nRosa", "Elegir", "Cancelar");
    }
    case 2: //NO-MP
    {
	if(NoMP[playerid] == 0)
	{
	    SetPVarInt(playerid, "NoPM", 1);
		SendClientMessage(playerid, COLOUR_PM, "Mensajes Privados desactivados. Ahora no recibiras mas.");
		NoMP[playerid] = 1;
	}
	else if(NoMP[playerid] == 1)
	{
	    SetPVarInt(playerid, "NoPM", 0);
	    SendClientMessage(playerid, COLOUR_PM, "Mensajes Privados activados. Ahora puedes recibirlos.");
		NoMP[playerid] = 0;
	}
	}
    case 3: //StatBox
    {
    if(StatBox[playerid] == 1)
    {
        TextDrawHideForPlayer(playerid, Text:box[playerid]);
        TextDrawHideForPlayer(playerid, Text:Textdraw1[playerid]);
        TextDrawHideForPlayer(playerid, Text:Textdraw2[playerid]);
        TextDrawHideForPlayer(playerid, Text:Textdraw3[playerid]);
        TextDrawHideForPlayer(playerid, Text:Textdraw4[playerid]);
        TextDrawHideForPlayer(playerid, Text:Textdraw5[playerid]);
        TextDrawHideForPlayer(playerid, Text:Textdraw6[playerid]);
        StatBox[playerid] = 0;
        KillTimer(Stattimer[playerid]);
        SendClientMessage(playerid, COLOUR_PM, "Stats-Box Desactivada.");
    }
    else if(StatBox[playerid] == 0)
    {
        Stattimer[playerid] = SetTimerEx("STATSUpdate",1500,1,"i",playerid);
        SendClientMessage(playerid, COLOUR_PM, "Stats-Box Activada.");
        StatBox[playerid] = 1;
    }
    }
  }
  }
  }
  }
  }
  return 1;
}
Reply
#2

Revivo Post.

Entonces nadie encontro solucion?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)