SA-MP Forums Archive
Help with Arrays - 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: Help with Arrays (/showthread.php?tid=499358)



Help with Arrays - shulk - 07.03.2014

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 );



Re: Help with Arrays - Konstantinos - 07.03.2014

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 ] );



Re: Help with Arrays - shulk - 08.03.2014

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