28.02.2010, 10:36
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)
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()
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++; } } }
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()