28.07.2015, 18:23
Quote:
so this works
pawn Код:
pawn Код:
|
pawn Код:
new blabla[max_blas][max_blas] = { { -1, 0, 1 }, { -1, 0, 1 } ...};
so this works
pawn Код:
pawn Код:
|
new blabla[max_blas][max_blas] = { { -1, 0, 1 }, { -1, 0, 1 } ...};
Something like this, I believe:
pawn Код:
|
enum E_BlaBla {
enumerator1,
enumerator2,
enumerator3
};
new BlaBla[][E_BlaBla] = {
{ value1, value2, value3 },
{ value1, value2, value3 },
{ value1, value2, value3 }
};
That was an example to give you an idea how it works. Consider the following:
PHP код:
|
new something[MAX_PLAYERS][MAX_PLAYERS];
I'm trying to assign a default value to variables when making them
pawn Код:
|
new BlaBla[][] = {
{ index0, index2, index3 }, // Index '0' in the first dimension
{ index1, index2, index3 }, // Index '1' in the first dimension
{ index1, index2, index3 } // Index '2' in the first dimension
};
// Replace the index's with your values.
BlaBla[0][2] // Will have the value of index3 in index '0' in the first dimension.
new Text3D: test = INVALID_3DTEXT_ID;
new Text3D: test = Text3D: INVALID_3DTEXT_ID;
GetPlayerPos(playerid, x, y, z);//Is there a way to get only the "z" and skip getting the x, y ?
Float:returnYPos(playerid)
{
new Float: x, Float: y, Float: z;
GetPlayerPos(playerid, x, y, z);
return y;
}
Why not just store all the positions? This won't hurt the server's performance at all, it's just a bit more memory which is not noticeable at all.
You can also try something such as this to return just the Y: pawn Код:
|
That won't work because the function doesn't have a default value. It will give a "argument does not have a default value" error and will refuse to compile.
|