Auto Select a free number from 1 - 30
#7

Try this,

should work!


Код HTML:
                     for(new b=1; b < 30; b++)
				{
					number = b;
					for(new i=0,j=GetPlayerPoolSize() ; i <= j ; i++)
					{
						if(IsPlayerConnected(i) == 1)
						{
							if(PlayerInfo[i][pLottoNumber] == number)
							{
								numbertaken = 0; //true = 0
								break;
							}
							else
							{
								numbertaken = 1; //false = 1
								break;
							}
						}
					}
				} 

				if(numbertaken == 0)
				{
					SendClientMessage(playerid,COLOR_ERROR,"Sorry All Lottery Numbers Haven Been Booked Already.");
				}
				else
				{
					PlayerInfo[playerid][pLottoNumber] = number;
					format(string,sizeof(string),"You Have Successfully Taken Number "YELLOW"%d"WHITE", For Daily "GREEN"Lottery"WHITE" Draw At "YELLOW"18:00",number);
					SendClientMessage(playerid,COLOR_WHITE,string);
					GivePlayerCash(playerid,-500);
				}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)