• Sign Up Login
  • Features
    • Game Services
    • Real-time Analytics
    • LiveOps
    • Add-ons
  • Game Services
  • Real-time Analytics
  • LiveOps
  • Add-ons
  • Games
  • Pricing
  • Blog
  • Support
    • Docs
    • Forums
    • Contact
  • Docs
  • Forums
  • Contact
  • Sign Up Login
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Ideas
    • Articles
    • Users
    • Badges
  • Home /
  • API and SDK Questions /
avatar image
Question by joehot200 · Apr 24, 2018 at 12:03 PM · Player DataIn-Game Economyphoton

How can I get Photon clients to see if another player is premium?

Hi,

So basically, I would like to create a paid cosmetics system. A player pays real money for a skin, and when they enter the game, I would like all other players to know and display that the player has got the skin.

My game uses Photon, so I would need to make this functionality secure, so that a player couldn't just fake their skin.

How would this be achieveable?

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Brendan · Apr 25, 2018 at 01:16 AM

If you mean Photon Realtime, that service does not enable server authoritative logic. What you can do is use Cloud Script to query for the truth about a player (have the Skin be an inventory item that you sell to the player).

Comment

People who like this

0 Show 6 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image joehot200 · Apr 25, 2018 at 09:34 AM 0
Share

Yes, I mean photon real-time. Is there a tutorial out there for this sort of functionality?

avatar image joehot200 · Apr 25, 2018 at 09:57 AM 0
Share

The tutorial at https://api.playfab.com/docs/tutorials/landing-tournaments/photon-unity is pretty useless at actually telling me how to make a client call a Photon web-hook to do what I'm looking for. It doesn't even actually inform me of how to do web hooks!

avatar image Brendan ♦♦ joehot200 · Apr 25, 2018 at 08:20 PM 0
Share

That's because the client doesn't make webhook calls. Webhook calls are made automatically when a player joins or leaves a room, changes a value on the room, etc. And the client doesn't get info back from that call - Photon only passes back data on error conditions. That's why I'm saying you would need to make a call from the client to Cloud Script, to confirm the info about the other player.

avatar image joehot200 · Apr 26, 2018 at 01:42 PM 0
Share

Ah, that makes sense. So how can I make a client ask a question about another player? How does the client know which player to ask PlayFab about? Is there any code examples that do something similar, in a Photon Realtime game?

avatar image Brendan ♦♦ joehot200 · Apr 27, 2018 at 01:01 AM 0
Share

Via Cloud Script: https://api.playfab.com/docs/tutorials/landing-automation/writing-custom-cloud-script.
In terms of knowing how to ask about another player, you could have the clients send their PlayFab IDs to each other via Photon, but I believe the Lobby/Room already hosts that information - @Hamza Lazaar can confirm.

avatar image Hamza Lazaar Brendan ♦♦ · Apr 27, 2018 at 05:25 PM 0
Share

if you use the PlayFab integration as we recommend the Photon UserId will match the PlayFabId.
The Photon UserId of other players can be gathered via Photon only inside rooms (created with PublishUserId set to true).
In the Lobby you need other ways to know who's connected or their UserIDs etc.
Outside of rooms, Photon can offer a way to know if someone is connected or not and to which room he/she's joined to if any via FindFriends.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    3 People are following this question.

    avatar image avatar image avatar image

    Related Questions

    want to Switch from Gamepsark to photon engine and playfab for data.,want to Switch from Gamepsark to photon engine and playfab for data 1 Answer

    Items can be consumed by count and/or time. Usage period must be more than 2 seconds. What does this mean? 2 Answers

    Server Side Virtual Currency (To avoid currency hackers) 1 Answer

    How would I handle a virtual currency online and offline?,Some questions about integration with PlayFab. 1 Answer

    I'm making a payment system using XSolla and playfab in unity, to get started, I have to use which facility? Pay Station or Store? 1 Answer

    • PlayFab

      • Features
      • Games
      • Pricing
      • Blog
    • Engineers

      • Documentation
      • Quickstarts
      • API Reference
      • SDKs
      • Usage Limits
    • Support

      • Forums
      • Videos
      • Contact
      • Service Health
      • Terms of Service
    • Social

      • Facebook
      • Twitter
      • LinkedIn
      • YouTube
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • About Microsoft
    • Jobs
    • Accessibility
    • Diversity & inclusion
    • Security
    • Company news
    • © Microsoft 2019
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Post an idea
    • Create an article
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Ideas
    • Articles
    • Users
    • Badges