question

mr22120237 avatar image
mr22120237 asked

Timer countdown in server

Hi

I am wondering what is the best way to set Timer in server.

Here is my request to implement now.

Rewarded-ad can be click every 20 min.

I have a local timer now but I want it to be calculated on server just like Recharge Virtual Currency . Then I will get value to update UI .

Is it good to set value in user read only data?

How could I countdown in server method?

Or any solution for this?

Thx.


q1.jpg (7.8 KiB)
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Seth Du avatar image
Seth Du answered
  • Store a timestamp at Player Read-Only data. Create a Rule and after reward is granted, execute the cloud Script to update the timestamp of next reward.
  • Virtual Currency should be able to handle this request as long as you convert the data to a countdown time. You may also create the Rule to reset the value.
  • However, since in Ad Placement configuration, there is a REWARD LIMITS settings, where we can define the limit counts with interval. When configured, you may call Client API GetAdPlacements and the PlacementViewsRemaining (counts) and PlacementViewsResetMinutes (time) will be contained in the callback result. This scenario is slight different from your requirement. For example, I set "Limit to 3 impressions Hourly", at 3 o'clock, the remaining count will be rest to 3. The same thing will happen at 4 o'clock, 5 o'clock... This method may not exactly match your requirement, but is the most convenient way.

Feel free to tell us if you have any other questions.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

mr22120237 avatar image mr22120237 commented ·

Thanks for your replying. I will try it !

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.