The way i see doing this is by getting ur current x,y pos then waiting some time(not much) and then getting another x,y position and then calculating distance by using 0509. And at the begining you would just need condition if and check if player is in car then just set some variable thats gonna...