Never came across this.
#1

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!
Reply
#2

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
Reply
#3

Awesome dude, great help!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)