if(uniqueZeit[0] >= 7 && uniqueZeit[0] <= 22 && !PI[p][pLotto] && GetTickCount() > TimeoutLotto)
{
if(uniqueZeit[1] == 0 && uniqueZeit[2] == 0)
{
SendClientMessageToAll(cGrey,"In 3 Minuten startet die näschte runde Lotto. (/lotto [1-49])");
TimeoutLotto = GetTickCount() + 1000;
}
else if(uniqueZeit[1] == 1 && uniqueZeit[2] == 0)
{
SendClientMessageToAll(cGrey,"In 2 Minuten startet die näschte runde Lotto. (/lotto [1-49])");
TimeoutLotto = GetTickCount() + 1000;
}
else if(uniqueZeit[1] == 2 && uniqueZeit[2] == 0)
{
SendClientMessageToAll(cGrey,"In 1 Minute startet die näschte runde Lotto. (/lotto [1-49])");
TimeoutLotto = GetTickCount() + 1000;
}
else if(uniqueZeit[1] == 3 && uniqueZeit[2] == 0)
{
TimeoutLotto = GetTickCount() + 1000;
new zahl=1+random(48);
new gewinn=random(100000);
format(string,sizeof string,"Die heutige Zahl lautet: %d",zahl);
SendClientMessageToAll(cGrey,string);
if(PI[p][pLotto]==zahl)
{
format(string,sizeof string,"%s hat den Jackpot geknackt und bekam %d$",PlayerName(p),gewinn);
SendClientMessageToAll(cGrey,string);
GiveCash(p,gewinn);
}
PI[p][pLotto]=0;
}
}
So ist der Aufbau schon mal etwas logischer und sauberer.
Wird diese Abfrage
else if(uniqueZeit[1] == 3 && uniqueZeit[2] == 0)
überhaupt erfüllt?


