I have created limit values in Player Internal Data(permission : Private). I always call my CloudScript right after a player finished a level to compare his current level score with the limit values in Player Internal Data. If the player's level score is above the limit value, then I know that the player is cheating because it's not possible to achieve a higher score than the limit value.
How can I automatically create a report in CloudScript if a player is cheating?
How can I find out if a report was created? Is it possible to get notified if a report was created?
I use this CloudScript to check if the player is cheating or not, but I don't know how to create the report.
function CompareNumbers(result, numberkey, numbervalue) { var resultdatacompare = server.GetUserInternalData({ PlayFabId: currentPlayerId, Keys: [numberkey] }); if (resultdatacompare.Data.hasOwnProperty(numberkey)) { if ((resultdatacompare.Data[numberkey].Value != null) && (resultdatacompare.Data[numberkey].Value != "")) { if (resultdatacompare.Data[numberkey].Value >= numbervalue) { log.info("Player is not cheating" + numberkey + numbervalue); return { currentkey: numberkey, addvalue: true }; } else { log.info("Player is cheating, create a report" + numberkey + numbervalue); return { currentkey: numberkey, addvalue: false }; } } else return { currentkey: "", addvalue: false }; } else return { currentkey: "", addvalue: false }; }