question

Ozan Yilmaz avatar image
Ozan Yilmaz asked

How to automatically ban a player?

Hello,

I want to ban a player automatically. I'm thinking of making a ban meter for each player. When a function in cloudscript is called, I'll check some parameters to see if the player's cheated in the game. If so, I'll increase the ban meter and save it in the player internal data. My question is how can I read and check the ban meter automatically every 2-3 months?

There is an option called "Run actions on each player in a segment" in the scheduled tasks, but I can't select a cloudscript function. Maybe I can create a statistic and use it as a ban meter, so I can use segments; but does it make sense? Is there any other ways around to achieve this?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Citrus Yan avatar image
Citrus Yan answered

You can select a CloudScript function in Schedule Tasks, please make sure that the function is added in the “handlers” object and the revision with that function in it is deployed:

handlers.helloWorld = function (args, context) { 
//function helloWorld is added to the “handlers” object

return “Hello World”
}

And, it’s also a good idea to use segments to achieve this: when a player entered the segment where the ban meter is beyond a specific value, ban that player.

Another workaround is that after you updated a player’s ban meter, either in internal data or statistics, also check whether its ban meter is above the certain value, if so, then ban the player.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Pranil GC avatar image Pranil GC commented ·

Is there a way to revoke a player ban from script in playfab ?

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.