[Ajuda] limitar maximo de premio
#3

Quote:
Originally Posted by PT
View Post
pawn Code:
if(Jackpot >= 500000)
    GivePlayerMoneyEx(i, 500000);
else GivePlayerMoneyEx(i, Jackpot);
agr adpte la.
Code:
public Lotto(number)
{
	new JackpotFallen = 0;
	format(gstring, sizeof(gstring), "Lotto: Hoje o nъmero Foi o {00FF00}%d{BFBFBF}.", number);
    OOCNews(0xBFBFBFAA, gstring);
    for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i))
		{
		    if(PlayerInfo[i][pLottoNr] > 0)
		    {
			    if(PlayerInfo[i][pLottoNr] == number)
			    {
			        JackpotFallen = 1;
					format(gstring, sizeof(gstring), "Lotto: %s recebeu %d$ com o seu TICKET.", PlayerName(i), Jackpot);
					OOCNews(0xC0C0C0AA, gstring);
					SendClientMessage(i, COLOR_YELLOW, gstring);
					ConsumingMoney[i] = 1;
					GivePlayerMoneyEx(i, 500000);
                                        else GivePlayerMoneyEx(i, Jackpot);
			    }
			}
			PlayerInfo[i][pLottoNr] = 0;
		}
	}
	if(Jackpot >= 500000)
	{
	    new rand = random(5000); rand += 5000;
	    Jackpot = rand;
	    SaveStuff();

		format(gstring, sizeof(gstring), "Lotto: Premio acumulado para {00FF00}%d{BFBFBF}.", Jackpot);
		OOCNews(0xBFBFBFAA, gstring);
	}
	else
	{
	    new rand = random(5000); rand += 5000;
	    Jackpot += rand;
	    SaveStuff();
	    format(gstring, sizeof(gstring), "Lotto: Premio acumulado para {00FF00}%d{BFBFBF}.", Jackpot);
		OOCNews(0xBFBFBFAA, gstring);
	}
	return 1;
}
assim?
Reply


Messages In This Thread
limitar maximo de premio - by AssasinoLM - 07.03.2014, 22:11
Re: limitar maximo de premio - by PT - 07.03.2014, 22:15
Re: limitar maximo de premio - by AssasinoLM - 07.03.2014, 22:58
Re: limitar maximo de premio - by AssasinoLM - 08.03.2014, 11:03
Re: limitar maximo de premio - by DannielCooper - 08.03.2014, 11:54
Re: limitar maximo de premio - by PT - 08.03.2014, 12:03
Re: limitar maximo de premio - by AssasinoLM - 08.03.2014, 12:26
Re: limitar maximo de premio - by GWMPT - 08.03.2014, 12:38
Re: limitar maximo de premio - by AssasinoLM - 08.03.2014, 12:42
Re: limitar maximo de premio - by PT - 08.03.2014, 14:14

Forum Jump:


Users browsing this thread: 1 Guest(s)