18.05.2015, 06:25
Quote:
[pawn]
// global: new Player_Box[2][MAX_PLAYERS]; // OnPlayerConnect: Player_Box[0][playerid] = Player_Box[1][playerid] = INVALID_OBJECT_ID; |
PHP код:
new Player_Box[2][MAX_PLAYERS] = {{INVALID_OBJECT_ID,...},{INVALID_OBJECT_ID,...}}; // initialize all the variables with the value 65535 instead of each assignment
PHP код:
#define foreach2(%1,%2) for(new %1; %1<%2; %1++)
main() {
new Player_Box[2][MAX_PLAYERS] = {{65535,...},{65535,...}};
foreach2(p, 1000) {
foreach2(i, 2) {
printf("player %d box[%d] value %d",p, i, Player_Box[i][p]);
}
}
}