well, maybe the char are further away than "1" from the vehicle? Run the code in debug mode, and add the line
debuglog "distance:" + entitydistance(char,vehicle1)
also change your if to:
why? because entitydistance takes time - of course on a simple example it wouldn't matter, but if you do several calls on every loop, things will slow down.
So changing the If's you'll only check when the user press the apropriate key, instead of checking all the time...
debuglog "distance:" + entitydistance(char,vehicle1)
also change your if to:
If KeyDown(32) Then If EntityDistance (char,VEHICLE1)<1 then ; do your stuff here end if end if
why? because entitydistance takes time - of course on a simple example it wouldn't matter, but if you do several calls on every loop, things will slow down.
So changing the If's you'll only check when the user press the apropriate key, instead of checking all the time...