For clsConnectionc C:
InSim.Send_BTN_CreateButton(C.TotalDistance / 1000 + " KM", Flags.ButtonStyles.ISB_DARK, 5, 25, 12, 64, 20, C.UniqueID, 2, false);
For MSO_MessageOut:
InSim.Send_BTN_CreateButton(Connections[GetConnIdx(MSO.UCID)].TotalDistance / 1000 + " KM", Flags.ButtonStyles.ISB_DARK, 5, 25, 12, 64, 20, MSO.UCID, 40, false);
Say if u need this button in other classes. Remember, change 12 and 64 for positions.