You can work with:
if (vec_dist(player.x,vector(x,y,z)) < dist)