31.01.2013, 18:13
Save the player's position with GetPlayerPos using global variables.
On top:
Where ever you set the player's position:
You may now use
to get the player back to where he came from.
On top:
pawn Код:
new
g_pPos[ MAX_PLAYERS ][ 3 ] //First dimension to hold for each player, second dimension for X Y Z
;
pawn Код:
GetPlayerPos( playerid, g_pPos[ playerid ][ 0 ], g_pPos[ playerid ][ 1 ], g_pPos[ playerid ][ 2 ] );
pawn Код:
SetPlayerPos( playerid, g_pPos[ playerid ][ 0 ], g_pPos[ playerid ][ 1 ], g_pPos[ playerid ][ 2 ] + 0.5 );