# Source URL: https://dev.epicgames.com/documentation/en-us/fortnite/creating-items-and-offers-in-fortnite
# Local doc: epic-docs/documentation/en-us/fortnite/creating-items-and-offers-in-fortnite.md
# Section: Direct Prompts to Purchase
OnEvent(Agent:agent):void=
if (Player:= player[Agent]):
if (RestrictDirectPromptsToPurchase[Player]):
Print("Player is not allowed to receive direct purchase prompts.")
else:
Print("Player is allowed to receive direct purchase prompts.")
Verse Library
verse
12 Direct Prompts To Purchase
Checks if a player is restricted from direct purchase prompts and prints the status.
extracted-snippets/documentation/en-us/fortnite/creating-items-and-offers-in-fortnite/12-direct-prompts-to-purchase.verse