25.04.2011, 21:04
There are two different array sizes in the array inside the array: the name is another array with a size of about 20 cells, but the three numbers only have one cell.
But you don't have to use a second variable, it's better to use an enum here, for example:
And, array indices start with 0, so there is no index 4 here:
But you don't have to use a second variable, it's better to use an enum here, for example:
pawn Код:
enum Map
{
mapName[32],
mapNum1, // TODO: change variable names
mapNum2,
mapNum3
}
new MapNames[][Map]
{
{ "Name of map #1", 0, 0, 0 },
{ "Name of map #2", 1, 1, 1 }
};
pawn Код:
SetPlayerPos(MapNames[DefaultMap][2],MapNames[DefaultMap][3],MapNames[DefaultMap][4]);