Verse Library verse

02 Additional Optional Restrictions On Purchases

Implements an entitlement offer class to restrict item purchases based on player region and age.

extracted-snippets/documentation/en-us/fortnite/in-island-transactions-restrictions-in-fortnite/02-additional-optional-restrictions-on-purchases.verse

# Source URL: https://dev.epicgames.com/documentation/en-us/fortnite/in-island-transactions-restrictions-in-fortnite
# Local doc:  epic-docs/documentation/en-us/fortnite/in-island-transactions-restrictions-in-fortnite.md
# Section:    Additional Optional Restrictions on Purchases
basic_sword_offer<public> := class(entitlement_offer):
# Offer name, description, etc...
EntitlementType<override>:concrete_subtype(entitlement) = Entitlements.basic_sword
GetMinPurchaseAge<override>(CountryCode:string, SubdivisionCode:string, PlatformFamily:string)<decides><computes>:int =
# A Hypothetical example where you only want to sell swords to people who don't live in Antarctica
CountryCode <> "AQ"
return 0

Comments

    Sign in to vote, comment, or suggest an edit. Sign in