04.03.2016, 20:25
I'd be careful doing it this way.
If you create variables that use "MAX_PLAYERS" as array size (which 99% of all scripts do), you are going create a variable with an array size of "0".
Either you have to define it as "new MAX_PLAYERS = 500;" or whichever value you would like to use, or easiest, just re-define MAX_PLAYERS hardcoded with your amount of max player slots
Example:
If you create variables that use "MAX_PLAYERS" as array size (which 99% of all scripts do), you are going create a variable with an array size of "0".
Either you have to define it as "new MAX_PLAYERS = 500;" or whichever value you would like to use, or easiest, just re-define MAX_PLAYERS hardcoded with your amount of max player slots
Example:
Код:
new MAX_PLAYERS; new PlayerLevel[MAX_PLAYERS]; //MAX_PLAYERS is = 0 at this point public OnGameModeInit() { MAX_PLAYERS = GetMaxPlayers(); //This will change the value assigned to 'MAX_PLAYERS' but it will not change the array dimension of 'PlayerLevel' return 1; }