[Ajuda] Lotto
#1

Queria saber como diminui a grana da lotto cada sorteio q sai da quase 290k ;\ se alguem souber fala ai pls
Reply
#2

Tem um Random na funзao,manda a funзao que Sorteia.
Reply
#3

PHP код:
    if(JackpotFallen)
    {
        new 
rand random(5000); rand += 789;
        
Jackpot rand;
        
SaveStuff();
        
format(stringsizeof(string), "Notнcias lotйricas: O sorteio se inicializou com R$ %d"Jackpot);
        
OOCOff(COLOR_WHITEstring);
    }
    else
    {
        new 
rand random(600); rand += 158;
        
Jackpot += rand;
        
SaveStuff();
        
format(stringsizeof(string), "Notнcias lotйricas: O prкmio acumulou e foi para R$ %d"Jackpot);
        
OOCOff(COLOR_WHITEstring);
    }
    return 
1;

Reply
#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


Forum Jump:


Users browsing this thread: 1 Guest(s)