[PROB] Dialog
#1

Pessoal to com um problema no dialog, as licenзas nгo compram, o dialog aparece mais quando clica em comprar nгo aparece nada.

Код:
 (Comando)
	if (strcmp(cmd, "/adqlicencas", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
           ShowPlayerDialog(playerid,62,DIALOG_STYLE_LIST,"Adquirir Licenзa","1. Licenзa de Motorista\r\n2. Licenзa de Vфo\r\n3. Licenзa de Navegaзгo\r\n4. Licenзa de Pesca","Comprar", "Cancelar");
		}
		return 1;
	}
Код:
		if(dialogid == 62)
		{
		    if(response)
		    {
      			switch(listitem) 
            	{
		            case 0:
		            {
     	if(IsPlayerConnected(playerid))
       	{
			if(PlayerToPoint(3.0,playerid,2048.352,-1900.153,13.5538))
          	{
            	if(PlayerInfo[playerid][pCarLic] == 0)
				{
				    if(GetPlayerMoney(playerid) < 1999)
				    {
             			SendClientMessage(playerid, COLOR_GREY, "Vocк nгo tem Dinheiro o Suficiente (Precisa de 2.000)");
             			return 1;
					}
					else
					{
             			SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vocк comprou a Licenзa de Motorista por 2,000");
             			SafeGivePlayerMoney(playerid, - 2000);
             			PlayerInfo[playerid][pCarLic] = 1;
             			OnPlayerUpdate(playerid);
					}
				}
				else
				{
					SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vocк jб tem essa Licenзa");
					return 1;
				}
			}
		}
		}
		
		case 1:
		{
		if(IsPlayerConnected(playerid))
       	{
			if(PlayerToPoint(3.0,playerid,1588.291,-2641.629,13.54688))
          	{
            	if(PlayerInfo[playerid][pFlyLic] == 0)
				{
				    if(GetPlayerMoney(playerid) < 65000)
				    {
             		    SendClientMessage(playerid, COLOR_GREY, "Vocк nгo tem Dinheiro o Suficiente (Precisa de 65.000)");
             		    return 1;
             		}
             		else
             		{
             			SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vocк comprou a Licenзa de Vфo por $65,000");
             			SafeGivePlayerMoney(playerid, - 65000);
             			PlayerInfo[playerid][pFlyLic] = 1;
             			OnPlayerUpdate(playerid);
             		}
				}
				else
				{
					SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vocк jб tem essa Licenзa");
					return 1;
				}
			}
		}
		}
		
		case 2:
		{
		if(IsPlayerConnected(playerid))
       	{
			if(PlayerToPoint(3.0,playerid,397.2415,-1804.371,7.829849))
          	{
            	if(PlayerInfo[playerid][pBoatLic] == 0)
				{
				    if(GetPlayerMoney(playerid) < 15000)
				    {
				        SendClientMessage(playerid, COLOR_GREY, "Vocк nгo tem Dinheiro o Suficiente (Precisa de 15.000)");
				        return 1;
				    }
				    else
				    {
             			SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vocк comprou a Licenзa de Navegaзгo por $15, 000");
             			SafeGivePlayerMoney(playerid, - 15000);
             			PlayerInfo[playerid][pBoatLic] = 1;
             			OnPlayerUpdate(playerid);
             		}
				}
				else
				{
					SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vocк jб tem essa Licenзa");
					return 1;
				}
			}
		}
		}
		
		case 3:
		{
		if(IsPlayerConnected(playerid))
       	{
			if(PlayerToPoint(3.0,playerid,396.2429,-2074.728,7.835938))
          	{
            	if(PlayerInfo[playerid][pFishLic] == 0)
				{
				    if(GetPlayerMoney(playerid) < 5000)
				    {
				        SendClientMessage(playerid, COLOR_GREY, "Vocк nгo tem Dinheiro o Suficiente (Precisa de 5.000)");
				        return 1;
				    }
				    else
				    {
             			SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vocк comprou a Licenзa de Pesca por $5, 000");
             			SafeGivePlayerMoney(playerid, - 5000);
             			PlayerInfo[playerid][pFishLic] = 1;
             			OnPlayerUpdate(playerid);
             		}
				}
				else
				{
					SendClientMessage(playerid, COLOR_LIGHTBLUE, "Vocк jб tem essa Licenзa");
					return 1;
				}
			}
		}
	}
	}
		}
	}
	return 1;
}
Reply


Messages In This Thread
[PROB] Dialog - by GuikBretas - 21.12.2010, 20:04
AW: [PROB] Dialog - by Xapita_Halls - 21.12.2010, 20:10
Re: [PROB] Dialog - by GuikBretas - 21.12.2010, 20:48
Re: [PROB] Dialog - by Chavequinho - 21.12.2010, 20:58
AW: [PROB] Dialog - by Xapita_Halls - 21.12.2010, 22:52
Re: [PROB] Dialog - by GuikBretas - 22.12.2010, 09:40
Re: [PROB] Dialog - by Chavequinho - 22.12.2010, 10:48
Re: [PROB] Dialog - by diretor7 - 22.12.2010, 11:14
Re: [PROB] Dialog - by GuikBretas - 22.12.2010, 11:28
Re: [PROB] Dialog - by diretor7 - 22.12.2010, 11:31

Forum Jump:


Users browsing this thread: 3 Guest(s)