question

blackghostgamesofficial avatar image
blackghostgamesofficial asked

banning player from in-game

Hello,

I wanted to ask how I can code a realtime script when a player is in-game and he is banned during dessend then a pop up should come and say please log in again, how can I code something like that?

Player Datamultiplayer
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

·
Infer Wang avatar image
Infer Wang answered

Could you please tell me what does ”user is banned during dessend” mean? And as you ban a user, they cannot log in, so why do you want to show them ”please log in again”? If you want to ban players, you can just use BanUsers on server side.

6 comments
10 |1200

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

blackghostgamesofficial avatar image blackghostgamesofficial commented ·

The line "and he is banned during dessend" is probably accidental I took a there translator sorry for that, so I mean the whole ban thing goes but I mean if let's say I'm a cheater and I'm just in the game and play it and an admin bans me nothing happens it is only displayed when I leave the game and log in again I do want that if someone is banned that he is then kicked in-game directly to the login screen, you know what I mean?

0 Likes 0 ·
Infer Wang avatar image Infer Wang blackghostgamesofficial commented ·

What is the type of your game? If it is real-time multiplayer game, you can ban and disconnect the client at the same time on the server. If not, once the user is banned, any API call will return ("error": "AccountBanned"), then you can tell the user they’re banned and let the game go back to the login screen.

0 Likes 0 ·
blackghostgamesofficial avatar image blackghostgamesofficial commented ·

It's a mutliplayer FPS game and I have no idea how to do it

0 Likes 0 ·
Infer Wang avatar image Infer Wang blackghostgamesofficial commented ·

I don’t know your programming environment or framework. The disconnect feature ought to be implemented in your multiplayer server assets, so you may search the related document.

0 Likes 0 ·
blackghostgamesofficial avatar image blackghostgamesofficial Infer Wang commented ·

I looked in the document and found nothing neither docs nor other posts from Player

0 Likes 0 ·
Show more comments

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.