GTA mod help required in generating directions

I am creating a mod for a project that requires to use the GPS location of the car in-game. I have found that the "GENERATE_DIRECTIONS_TO_COORD" does the work but I am not getting correct values from it.