[Pomoc] Lotto

Započeo LoOdaK, April 26, 2017, 22:45:50 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: UP:RP
Detaljan opis problema: Napravio sam sistem Lotta i stavio sam na payday da se pokrece public,ali lotto se pokrene 2 puta kada se desi payday,nekada cak i 3 puta ne razumijem sta je greska
Dio skripte:[pawn]forward Lotto(number);
public Lotto(number)
{
   new string[256];
   new winner;
   format(string,sizeof(string),"[LOTTO] Danasnji loto broj je: %d",number);
   SendClientMessageToAll(LOTTOUB, string);
    for(new i = 0; i < MAX_PLAYERS; i++)
   {
      if(IsPlayerConnected(i))
      {
          if(PlayerInfo[pLottoTiket] > 0)
          {
             if(PlayerInfo[pLottoTiket] == number)
             {
                 //GetPlayerName(i, winner, sizeof(winner));
               format(string,sizeof(string),"[LOTTO] Igrac %s je dobio na lutriji sa svojim listicem broj %d",GetName(i),PlayerInfo[pLottoTiket]);
               SendClientMessageToAll(LOTTOUB, string);
               format(string,sizeof(string),"[Lotto]: Vas loto listic broj: %d je dobitan.Cestitamo na dobitku",PlayerInfo[pLottoTiket]);
               SendClientMessage(i,-1,string);
               SendClientMessage(winner, -1,"[Lotto]: Da podignete vas dobitak,morate otici to lotto prodavnice");
                   PlayerInfo[pLottoDobio] += 1;
                   PlayerInfo[pLottoTiket] = 0;
                   SavePlayer(i);
             }
             else
             {
                SCM(i, -1,"[Lotto]: Nazalost vas loto listic nije dobitan,vise srece drugi put");
             }
         }
         PlayerInfo[pLottoTiket] = 0;
      }
   }
   return 1;
}[/pawn]
Neke slike/video za lakse dobivanje pomoci(neobavezno):
CitatElectric Power is everywhere present in unlimited quantities and can drive the world's machinery without the need of coal, oil, gas, or any other of the common fuels!



pošalji poziv na tu funkciju, tajmer, ili šta god je pokreće

"I choose to have faith, because without that, I have nothing."


Poziva se na kraju payday-a


[pawn]new rand = random(80);
   if(rand < 77) { rand += 3; }
   Lotto(rand);[/pawn]
CitatElectric Power is everywhere present in unlimited quantities and can drive the world's machinery without the need of coal, oil, gas, or any other of the common fuels!



Ja mislim da je se neÅ¡to pokvarilo...  8) :o

TIIIIIRRRRRRUUUUUU RIIIIIIIIIIIIIIIII RUUUUUUUUUUUUU

Citat: Faris ãƒ,, poslato April 26, 2017, 23:12:25 POSLE PODNE
Ja mislim da je se neÅ¡to pokvarilo...  8) :o
Ja mislim da se autobus pokvario! :D :D
CitatElectric Power is everywhere present in unlimited quantities and can drive the world's machinery without the need of coal, oil, gas, or any other of the common fuels!



zaÅ¡to ne probaÅ¡ da napraviÅ¡ varijablu npr new LottoPokrenut, bla bla, i pre poziva Lotto(rand); stavi LottoPokrenut = true,  i u publicu stavi ako je lotopokrenut = true da se ostatak funkcije uradi kako treba, i na kraju te funkcuje lottopokrenut = false, valjda si me razumeo ako nisi napiÅ¡i pa ću ti uraditi to u temi hah

"I choose to have faith, because without that, I have nothing."