We are making a Multiplayer FPS game where players will level up after gaining some certain XP. Which method should I use to save that data in the server and how can I update it every time a player levels up.
We are making a Multiplayer FPS game where players will level up after gaining some certain XP. Which method should I use to save that data in the server and how can I update it every time a player levels up.
>> Which method should I use to save that data in the server
You could use the server API UpdateUserReadOnlyData or UpdatePlayerStatistics in your custom server or CloudScript to save the player’s level and XP in the Player’s readonly data or statistic.
>> how can I update it every time a player levels up
You can write a function in your custom server or CloudScript that checks if the player is really getting that level, do some cheat detection logic with it and then use those APIs to Update the level. In your client side, you can call this function when the player levels up. For more discussion about cheat prevention, you could refer to this thread: https://community.playfab.com/questions/44662/guidance-for-cheat-prevention.html
3 People are following this question.