Get the player coords Vector3 pCoords, calculate the relative distance to the Vector3 origin, get the Vector3 result and play the sound. Of course this should be used at last resort when internal game sounds are not sufficient and I can imagine the mayhem it would be if everyone starts initiating their own sound engine in every mod...

Forgot to say, I'm out of thermal paste and can't risk starting GTA V to try this out.