Never came across this. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Never came across this. (
/showthread.php?tid=473383)
Never came across this. -
iGetty - 02.11.2013
Hey there. I'm just wondering, how does this work?
pawn Код:
new Float:DMVPositions[10][4] =
{
{1.1, 1.2, 1.3},
{1.1, 1.2, 1.3}
};
instead of having
pawn Код:
SetPlayerCheckpoint(playerid, 1.1, 1.2, 1.3);
//it will have
SetPlayerCheckpoint(playerid, DMVPositions[1][1], DMVPositions[1][2], DMVPositions[1][3]);
Lol. Thanks!
Re: Never came across this. -
Konstantinos - 02.11.2013
pawn Код:
new Float:DMVPositions[2][3] =
{
{1.1, 1.2, 1.3},
{1.4, 1.5, 1.6}
};
Think it such as DMVPositions[ rows ][ columns ]
so
pawn Код:
DMVPositions[0][0], DMVPositions[0][1], DMVPositions[0][2]
// it is 1.1, 1.2, 1.3 AND
DMVPositions[0][0], DMVPositions[0][1], DMVPositions[0][2]
// it's 1.4, 1.5, 1.6
DMVPositions[ some_row ][ 0 ] is X for some row
DMVPositions[ some_row ][ 1 ] is Y for some row
DMVPositions[ some_row ][ 2 ] is Z for some row
Re: Never came across this. -
iGetty - 02.11.2013
Awesome dude, great help!