How To Make A Banland Gui

Hello everyone, I am sure many of you are all familiar with the HD Admin banland tab; if not then the banland tab is a tab in the HD Admin panel where you can view all players that are banned in a specific game. What I am trying to do is make a similar GUI that can display all players that are banned within a game.

What I have tried doing is storing all bans within one key of a datastore to loop through that one table and list all bans. The problem with this method is that when banning someone(calling the SetAsync() function) you will have to wait a 12 or so second interval to ban another player since it is under one key. With that being said, what I have tried doing is not a reliable nor efficient way to tackle what I am attempting to do.

I have been made aware that there is another type of datastore called an Ordered Data Store. I am not sure of the pros and cons of this type but I am wondering is it could do what I am trying to do.

To break things down: Can I use Ordered Data Stores to loop through all values in a datastore, if so; how?

1 Like

To elaborate on my knowledge of Ordered Data Stores, I watched a YT tutorial from TheDevKing covering this type of DataStore but I never caught on nor found a reason to do further research on how to use them.

Make a normal datastore. When you ban someone, create a key in the datastore with the player’s ID.

You know they’re banned because the key exists.

You can get a list of banned players by using ListKeysAsync.

You can unban people by deleting the key.

1 Like