Help with Arrays
#1

I dont know the problem, when i put the simple coordinates all is good but when im using Array my position is some in the air...

pawn Код:
new
    Float:INTERIOR_SPAWN[][ 3 ] =
    {
    //-----------------------------[ 24 / 7's ]---------------------------------
        { -25.884498, 185.868988, 1003.546875 }
    }
;
pawn Код:
SetPlayerPos( playerid, INTERIOR_SPAWN[ 0 ][ 0 ], INTERIOR_SPAWN[ 0 ][ 1 ], INTERIOR_SPAWN[ 0 ][ 2 ] );

    SetPlayerInterior( playerid, 17 );
Reply
#2

The array and how you used it in the function is correct. The height is indeed high; thus it's an interior and sometimes setting the coordinates and then the interior will cause the player to fall before the ground is solid. Switch those two and try again:
pawn Код:
SetPlayerInterior( playerid, 17 );
SetPlayerPos( playerid, INTERIOR_SPAWN[ 0 ][ 0 ], INTERIOR_SPAWN[ 0 ][ 1 ], INTERIOR_SPAWN[ 0 ][ 2 ] );
Reply
#3

That is don't work when i put SetPlayerPos( playerid, -25.884498, 185.868988, 1003.546875 ); It's working...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)