Skip to content

Commit

Permalink
Mute in game ads on the radio.
Browse files Browse the repository at this point in the history
  • Loading branch information
sahailee committed Nov 15, 2020
1 parent 2639f97 commit 87d0598
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion radio.cs
Original file line number Diff line number Diff line change
Expand Up @@ -251,12 +251,17 @@ private void displaySpotifyTrackOnRadio(string artist, string track)

}

public string getCurrentStationName()
private string getCurrentStationName()
{
var name = Function.Call<string>(GTA.Native.Hash.GET_PLAYER_RADIO_STATION_NAME);
return name;
}

private void disableRadioAds()
{
Function.Call(GTA.Native.Hash.SET_RADIO_STATION_MUSIC_ONLY, radioName, true);
}

private void setEngine(bool status)
{
if(obtainedSpotifyClient)
Expand Down Expand Up @@ -603,6 +608,7 @@ private void LoginToSpotInit()
{
GuaranteeLogin();
initialSpotifyRequests();
disableRadioAds();
}

private async void initialSpotifyRequests()
Expand Down

0 comments on commit 87d0598

Please sign in to comment.