04.06.2011, 15:30
pawn Code:
new Text:PlayerFadeText[MAX_PLAYERS][MAX_FADES] = {INVALID_TEXT_DRAW,...};
new Text:PlayerFadeText[MAX_PLAYERS][MAX_FADES] = {INVALID_TEXT_DRAW,...};
new Text: PlayerFadeText[MAX_PLAYERS * MAX_FADES] = {INVALID_TEXT_DRAW, ...};
#define PlayerFadeText[%0][%1] PlayerFadeText[(%0) + (MAX_PLAYERS * (%1))]
//could be [(MAX_FADES * (%0)) + (%1)] but %0 wont be an constant => no preprocess
//OnGameModeInit
for(new i, j; i != sizeof PlayerFadeText; ++i) {
for(j = 0; j != sizeof PlayerFadeText[]; ++j) {
PlayerFadeText[i][j] = INVALID_TEXT_DRAW;
}
}
//OnPlayerConnect
for(new i; i != sizeof PlayerFadeText[]; ++i) {
PlayerFadeText[playerid][i] = INVALID_TEXT_DRAW;
}