[Ajuda] Lotto
#4

pawn Код:
public Lotto(number)
{
    new JackpotFallen = 0;
    format(gstring, sizeof(gstring), "Loterica: Hoje o numero sorteado foi o nє %d.", number);
    OOCNews(COLOR_WHITE, 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), "Loterica: %s ganhou R$%d com seu bilhete.", PlayerName(i), Jackpot);
                    OOCNews(COLOR_WHITE, gstring);
                    format(gstring, sizeof(gstring), "* Vocк ganhou R$%d com seu bilhete de loteria.", Jackpot);
                    SendClientMessage(i, COLOR_YELLOW, gstring);
                    ConsumingMoney[i] = 1;
                    GivePlayerMoney(i, Jackpot);
                }
                else
                {
                    SendClientMessage(i, COLOR_GREY, " Vocк nгo tem um bilhete.");
                }
            }
            PlayerInfo[i][pLottoNr] = 0;
        }
    }
    if(JackpotFallen)
    {
        new rand = random(15000); rand += 789;
        Jackpot = rand;
        SaveStuff();
        format(gstring, sizeof(gstring), "Notнcias da Loteria: Um novo sorteio comeзou com o prкmio de $%d.", Jackpot);
        OOCNews(COLOR_WHITE, gstring);
    }
    else
    {
        new rand = random(1500); rand += 158;
        Jackpot += rand;
        SaveStuff();
        format(gstring, sizeof(gstring), "Notнcias da Loteria: O prкmio acumulou para $%d.", Jackpot);
        OOCNews(COLOR_DBLUE, gstring);
    }
    return 1;
}
Ve se te ajda Bigode...
Reply


Messages In This Thread
[Ajuda] Lotto - by ' Bigode - 09.10.2011, 23:05
Re: [Duvida] Lotto - by Dolby - 09.10.2011, 23:06
Re: [Duvida] Lotto - by ' Bigode - 10.10.2011, 11:13
Re: [Duvida] Lotto - by MatriXBorn - 10.10.2011, 17:14

Forum Jump:


Users browsing this thread: 2 Guest(s)