Posts: 178
Threads: 37
Joined: Oct 2011
How i can make from 1 playable lotto number up to six,like,you can play with 1 number( 31 ex.),and i want to raise it to 6 numbers.
Lines:
pawn Код:
if(BizzInfo[24][bLocked] != 1)
{
new rand = 1 + random(49);
Lotto(rand);
}
Posts: 178
Threads: 37
Joined: Oct 2011
pawn Код:
public Lotto(number)
{
new JackpotFallen = 0;
new string[256];
new winner[MAX_PLAYER_NAME];
format(string, sizeof(string), "LOTERIA 6/49: Numarul castigator de astazi este: %d.", number);
OOCOff(COLOR_WHITE, string);
new premiu = BizzInfo[24][bTill] / 4;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pLottoNr] > 0)
{
if(PlayerInfo[i][pLottoNr] == number)
{
JackpotFallen = 1;
GetPlayerName(i, winner, sizeof(winner));
format(string, sizeof(string), "LOTERIE 6/49: %s a castigat premiul de %d RON.", winner, premiu);
OOCOff(COLOR_DBLUE, string);
format(string, sizeof(string), "* Ai castigat %d RON Cu biletul tau.", premiu);
SendClientMessage(i, COLOR_YELLOW, string);
//ConsumingMoney[i] = 1;
SafeGivePlayerMoney(i, premiu);
BizzInfo[24][bTill] -= premiu;
}
else
{
SendClientMessage(i, COLOR_WHITE, "* Biletul tau loto nu a fost castigator.");
}
}
PlayerInfo[i][pLottoNr] = 0;
}
}
if(JackpotFallen)
{
OnPropUpdate();
format(string, sizeof(string), "LOTERIA 6/49: Noul premiu incepe de la %d RON. (Cumparati bilete pentru a creste premiul,Intrarea este gratis!)", premiu);
OOCOff(COLOR_WHITE, string);
}
else
{
OnPropUpdate();
format(string, sizeof(string), "LOTERIA 6/49: Premiul este de %d RON. (Cumparati bilete pentru a creste premiul,Intrarea este gratis!)", premiu);
OOCOff(COLOR_DBLUE, string);
}
return 1;
}
pawn Код:
public SyncTime()
{
//new string[64];
new tmphour;
new tmpminute;
new tmpsecond;
gettime(tmphour, tmpminute, tmpsecond);
FixHour(tmphour);
tmphour = shifthour;
if ((tmphour > ghour) || (tmphour == 0 && ghour == 23))
{
/*format(string, sizeof(string), "SERVER: The time is now %d:00 hours",tmphour);
BroadCast(COLOR_WHITE,string);*/
ghour = tmphour;
PayDay();
if(BizzInfo[24][bLocked] != 1)
{
new rand = 1 + random(49);
Lotto(rand);
}
Posts: 178
Threads: 37
Joined: Oct 2011
A little help? I want to transform the system from 1 number to six numbers
Posts: 5,314
Threads: 12
Joined: Aug 2010
Reputation:
0
You use an array with 6 integers, and make the same thing with all them