Unique number to represent a combination of 5 numbers 1-39
This can't be encoded into 16 bits.  The number of such hands is ${39 \choose 5} = 575757$ (is that a pretty number or what?), and $\lg(575757) \approx 19.1$, so a 5-card hand be encoded into 20 bits, but it can't be encoded in 16 bits.

You can use the methods shown there (1, 2) to construct an encoding into 20 bits.  Alternatively, if you want a coding-theory-based answer, analogous to Yuval's answer there (the accepted answer), you'll need to find a linear code of appropriate parameters.  16 bits isn't enough.  Even 20 bits won't be enough; you'll need a slightly longer encoding, as the coding-theory-based solutions are fast to compute but yield an encoding that is slightly-longer-than-optimal.