hey, hab nen lotto-problem
1.) Beim Lotto-System kommt immer 99 als Gewinnzahl.
LOTTO:
[pwn]forward AllTimer();
public AllTimer()
{
new hour, minute, second;
new randomnr = random(1) + 99;
new randomjackpot = random(5000) + 45000;
gettime(hour, minute, second);
if(minute == 03 && second == 20)
{
SendClientMessageToAll(color_white, "{FF0087}[LOTTO]: {FFFFFF}In 2 minutes lotto starts. (/lotto)");
}
if(minute == 04 && second == 20)
{
SendClientMessageToAll(color_white, "{FF0087}[LOTTO]: {FFFFFF}In 1 minute lotto starts. (/lotto)");
format(stringx, sizeof(stringx),"{FF0087}[LOTTO]: {FFFFFF}Today's jackpot: $%i.", randomjackpot);
SendClientMessageToAll(color_white, stringx);
}
if(minute == 05 && second == 20)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(SpielerInfo[pLottoNr] == randomnr)
{
format(stringx, sizeof(stringx), "{FF0087}[LOTTO]: {FFFFFF}The winner's name is .. %s.", SpielerName(i));
SendClientMessageToAll(color_white, stringx);
format(stringx, sizeof(stringx), "{FF0087}[LOTTO]: {FFFFFF}Congratulations, you won $%i.", randomjackpot);
GivePlayerMoney(i, randomjackpot);
SendClientMessage(i, color_yellow, "You have won lotto, have fun with the money.");
}
else
{
SendClientMessageToAll(color_white, "{FF0087}[LOTTO]: {FFFFFF}Nobody has won the lotto.");
format(stringx, sizeof(stringx), "{FF0087}[LOTTO]: {FFFFFF}The number was %i.", randomnr);
SendClientMessageToAll(color_white, stringx);
break;
}
}
}
if(minute == 05 && second == 30)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
SpielerInfo[i][pLottoNr] = 0;
}
}
return 1;
}[/pwn]
1.) Beim Lotto-System kommt immer 99 als Gewinnzahl.
LOTTO:
[pwn]forward AllTimer();
public AllTimer()
{
new hour, minute, second;
new randomnr = random(1) + 99;
new randomjackpot = random(5000) + 45000;
gettime(hour, minute, second);
if(minute == 03 && second == 20)
{
SendClientMessageToAll(color_white, "{FF0087}[LOTTO]: {FFFFFF}In 2 minutes lotto starts. (/lotto)");
}
if(minute == 04 && second == 20)
{
SendClientMessageToAll(color_white, "{FF0087}[LOTTO]: {FFFFFF}In 1 minute lotto starts. (/lotto)");
format(stringx, sizeof(stringx),"{FF0087}[LOTTO]: {FFFFFF}Today's jackpot: $%i.", randomjackpot);
SendClientMessageToAll(color_white, stringx);
}
if(minute == 05 && second == 20)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(SpielerInfo[pLottoNr] == randomnr)
{
format(stringx, sizeof(stringx), "{FF0087}[LOTTO]: {FFFFFF}The winner's name is .. %s.", SpielerName(i));
SendClientMessageToAll(color_white, stringx);
format(stringx, sizeof(stringx), "{FF0087}[LOTTO]: {FFFFFF}Congratulations, you won $%i.", randomjackpot);
GivePlayerMoney(i, randomjackpot);
SendClientMessage(i, color_yellow, "You have won lotto, have fun with the money.");
}
else
{
SendClientMessageToAll(color_white, "{FF0087}[LOTTO]: {FFFFFF}Nobody has won the lotto.");
format(stringx, sizeof(stringx), "{FF0087}[LOTTO]: {FFFFFF}The number was %i.", randomnr);
SendClientMessageToAll(color_white, stringx);
break;
}
}
}
if(minute == 05 && second == 30)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
SpielerInfo[i][pLottoNr] = 0;
}
}
return 1;
}[/pwn]
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von playerid ()