There are four quantum numbers: the n, l, m and ms. When the orbital is 2p, it means that n=2 and l = 1. The n number takes the whole number before the sub-orbitals. Then, the designation for the p orbital is l=1. Now, the possible values if m is a range from -l to l. Hence, in this case, that would be: -1, 0, 1.