if you want it independent from the resolution and to be scaled depending on distance, you might use draw_line() and some vector arithmetics.
That line will always be one pixel in size, you'll have to make it shorter and longer depending on the distance (vec_dist).