Checking if no one's player-specific variable is equal to value
#2

Code:
for (new i = 0; i != MAX_PLAYERS; i ++)
{
      if (LottoNumber[i] != LottoNum) {
          SendClientMessage(i, COLOR_WHITE, "{FFFF00}LOTTO: Unfortunately you haven't won the lottery. Good luck next time!");
          continue;
      }
      // award player here
      break; // break here if you only want 1 lottery winner
}
I haven't slept so I'm just making this off the top of my head but this should be about right.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)