14.12.2009, 18:29
Use this:
That should work.
pawn Код:
//global
new gPrevVehicle[ MAX_PLAYERS ];
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid)
{
gPrevVehicle[ playerid ] = vehicleid;
return true;
}
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate) //If this code doesn't work, use the next code
{
if( oldstate == PLAYER_STATE DRIVER && newstate == PLAYER_STATE_ONFOOT )
PutPlayerInVehicle( playerid, gPrevVehicle[ playerid ], 0 );
return true;
}

