Help with arrays
#3

youll need to set it as 0 somewhere before it recognises it as a 0

for example (i know this isnt using an array but its the same method)

Code:
  totalon = 0;
  for(new i=0; i<MAX_PLAYERS; i++) {
    if(IsPlayerConnected(i)) {
      if(totalon == 0){
        totalon = 1;
      }
      else if (totalon > 0){
        totalon++;
      }
    }
  }
firstly i set it to 0 so that it can start from 0

so lets say that you need the array to be 0 at the game mode start

so run a loop that sets array[a] = 0 under OnGameModeInit()
Reply


Messages In This Thread
Help with arrays - by Gozerr - 28.02.2010, 08:23
Re: Help with arrays - by Gozerr - 28.02.2010, 09:06
Re: Help with arrays - by adsy - 28.02.2010, 10:36
Re: Help with arrays - by Gozerr - 28.02.2010, 13:07

Forum Jump:


Users browsing this thread: 1 Guest(s)