First, youre using the event-system in a wrong way, I suggest to look it up in the manual again.
Second, just use vec_dist(my.x,player.x) for distance detection.


Teleschrott-Fan.