Guest User

code

a guest
Jun 13th, 2020
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. oCtrlAdd
  2. Create Event --
  3. if os_type == os_android
  4. {
  5. app_id = "ca-app-pub-4337965814269841~8766033236";
  6. interstitial_id = "ca-app-pub-3940256099942544/8691691433";
  7. banner_id = "ca-app-pub-3202039677277756/8024372905";
  8.  
  9. }
  10. GoogleMobileAds_Init(interstitial_id, app_id);
  11. GoogleMobileAds_LoadInterstitial();
  12. interstitial_loaded = false;
  13.  
  14. GoogleMobileAds_UseTestAds(true, "E3DAE5ACB5072BA36197B94E287927C9");
  15.  
  16. //banner vars
  17. var _bw = GoogleMobileAds_BannerGetWidth();
  18. var _bh = GoogleMobileAds_BannerGetHeight();
  19. var _hh = display_get_height();
  20. var _ww = display_get_width();
  21.  
  22. //add banner @ location
  23. GoogleMobileAds_AddBannerAt(banner_id,GoogleMobileAds_Banner,(_ww / 2) - (_bw / 2), _hh - _bh);
  24.  
  25. Step Event
  26. if interstitial_loaded == true
  27. {
  28. interstitial_loaded = false;
  29. GoogleMobileAds_ShowInterstitial();
  30. }
  31.  
  32. if room = room0
  33. {
  34. alarm[0] = 240;
  35. }
  36.  
  37. Alarm
  38. /// @description Insert description here
  39. // You can write your code in this editor
  40. GoogleMobileAds_ShowBanner();
  41.  
  42. Async
  43. /// @description Insert description here
  44. // You can write your code in this editor
  45. var _id = async_load[? "id"];
  46. if _id == GoogleMobileAds_ASyncEvent
  47. {
  48. var ident = async_load[? "type"];
  49. switch (ident)
  50. {
  51. case "banner_load":
  52. if async_load[? "loaded"] == 1
  53. {
  54. var _bw = GoogleMobileAds_BannerGetWidth();
  55. var _bh = GoogleMobileAds_BannerGetHeight();
  56. var _hh = display_get_height();
  57. var _ww = display_get_width();
  58. GoogleMobileAds_MoveBanner((_ww / 2) - (_bw / 2), _hh - _bh);
  59. }
  60. break;
  61. }
  62. }
Add Comment
Please, Sign In to add comment