How do I create an in game, disable ads button?

0 favourites
  • 4 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • I wanted to create an IAP that would turn off ads and have been trying to think about how to do this properly. There is no option with AdMob to disable ads, I can only hide one that is already showing.

    My current solution is to attach the AdMob code to a Global Variable. I placed the AdMob code under the variable 0 and anything else (1) has no AdMob code. When the user clicks the purchase button, it will set the GV to 1 and hide any current ads being shown. Am I on the right track or is there a better way to do this?

    Thanks!

  • You can stuff all your advertising events in a group.

    When purchase done, disable the group.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Shack You are on the right track. Just ensure that everytime you start you app and the Store, fetch the IAP Purchased status using "Has Purchase ("You Product Name"), Then set your Global Variable to 0 or 1.

    I am using the same method in my game. And It works well.

    You can checkout my game from the below link!

  • You can stuff all your advertising events in a group.

    When purchase done, disable the group.

    Thanks! I didn't know I could disable an entire group, I will check that later today.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)