Dio skripte:
Prvo newovi
new LottoSeIzvlaci = 0;
new Number;
new Listic1 = 0;
new Listic2 = 0;
new Listic3 = 0;
new Listic4 = 0;
new Listic5 = 0;
new Listic6 = 0;SetTimer("LottoStart",300000,true);Ovaj timer nece da odradi msm hoce on al ovaj sljedeci nece
forward LottoStart();
public LottoStart()
{
MakeNumber();
SetTimer("LottoIzvlacenje", 1000, 0);
LottoSeIzvlaci = 1;
return 1;
}Kod LottoIzvlacenja
forward LottoIzvlacenje();
public LottoIzvlacenje()
{
new Winning;
foreach(Player, i)
{
for(new n = 0; n < 7; n++)
{
if(PlayerInfo == Number)
{
Winning++;
Listic1++;
}
if(PlayerInfo == Number)
{
Winning++;
Listic2++;
}
if(PlayerInfo == Number)
{
Winning++;
Listic3++;
}
if(PlayerInfo == Number)
{
Winning++;
Listic4++;
}
if(PlayerInfo == Number)
{
Winning++;
Listic5++;
}
if(PlayerInfo == Number)
{
Winning++;
Listic6++;
}
}
if(PlayerInfo > 0 && PlayerInfo > 0 && PlayerInfo > 0 && PlayerInfo > 0 && PlayerInfo > 0 && PlayerInfo > 0)
{
new lottostring1;
format(lottostring1, sizeof(lottostring1), ""GREENER"LOTTO "BELA"Vasa odigrana kombinacija: %d %d %d %d %d %d.", PlayerInfo,PlayerInfo,PlayerInfo,PlayerInfo,PlayerInfo,PlayerInfo);
SCM(i, -1, lottostring1);
new lottostring;
format(lottostring, sizeof(lottostring), ""GREENER"LOTTO "BELA"Dobitna kombinacija: %d %d %d %d %d %d.", Number, Number, Number, Number, Number, Number);
SCM(i, -1, lottostring);
lottostring = "\0";
Listic1 = 0;
Listic2 = 0;
Listic3 = 0;
Listic4 = 0;
Listic5 = 0;
Listic6 = 0;
if(Winning == 0)
{
SCM(i, -1, ""GREENER"LOTTO "BELA"Zao nam je,danas niste nista dobili,vise srece drugi put.");
}
if(Winning == 1)
{
SCM(i, -1, ""GREENER"LOTTO "BELA"Dobili ste 2000.");
g_NovacPlus(i, 2000);
}
if(Winning == 2)
{
SCM(i, -1, ""GREENER"LOTTO "BELA"Dobili ste 4000.");
g_NovacPlus(i, 4000);
}
if(Winning == 3)
{
SCM(i, -1, ""GREENER"LOTTO "BELA"Dobili ste 8000.");
g_NovacPlus(i, 8000);
}
if(Winning == 4)
{
SCM(i, -1, ""GREENER"LOTTO "BELA"Dobili ste 16000.");
g_NovacPlus(i, 16000);
}
if(Winning == 5)
{
SCM(i, -1, ""GREENER"LOTTO "BELA"Dobili ste 32000.");
g_NovacPlus(i, 32000);
}
if(Winning == 6)
{
SCM(i, -1, ""GREENER"LOTTO "BELA"Dobili ste 64000.");
g_NovacPlus(i, 64000);
}
}
PlayerInfo = 0;
PlayerInfo = 0;
PlayerInfo = 0;
PlayerInfo = 0;
PlayerInfo = 0;
PlayerInfo = 0;
PlayerInfo = 0;
}
LottoSeIzvlaci = 0;
new stringer;
format(stringer,sizeof(stringer),""GREENER"LOTTO "BELA"Zavrseno je lotto %d",LottoSeIzvlaci);
AdminGameMaster(-1, stringer);
}
stock MakeNumber()
{
for(new i = 0; i < 7; i++)
{
Number = Random_Number_Generator(i,1,39);
}
return (true);
}
stock Random_Number_Generator(curid,min,max)
{
new Num_Var_Index;
Num_Var_Index = randomExx(min, max); //randomEx
for(new i = 0; i < curid; i++)
{
if(Number == Num_Var_Index) return Random_Number_Generator(curid,min,max);
}
return Num_Var_Index;
}
stock randomEx(min,max)
{
return (min+random(max));
}
stock randomExx(const iMin, const iMax)
{
return random(iMax - iMin) + iMin;
}Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [ code ]vaš odgovor[ /code ]
Slika/video ingame problema(obavezno ako je ingame problem): Nece da odradi stavljao sam print u djelove i odradi ovaj LottoStart i ispise print ali stavljao sam i pod LottoIzvlacenje i nece!
