Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would you use a data store to store information such as ranks?

Asked by 5 years ago
Edited 5 years ago

Hello! Im working on a project and need a way to allow the user to create multiple "ranks", then be able to edit them. I dont want to do it in plain code though, since changing code within a script isnt a thing (i dont think).

Id like to know how to do something like this

Data Store Ranks = {"Rank1", "Rank2", "Rank3""}

Data Store Permissions = {{"Rank1 perm1", "Rank1 perm2"}, {"Rank2 perm1", "Rank2 perm2"}, {"Rank3 perm1", "Rank3 perm2"}}

So i can detect a rank in the Ranks store, then detect its permissions list in the Permissions store. Basically the 1st rank store is rank1, and the first perm store is rank1's perms.

Rank1 Permissions: "Rank1 Perm1", "Rank1 Perm2"

then use this data to allow or disallow command usage, if Rank1 has the permission "tp" let continue with the code, else return.

I tried to do this before but it didnt work out, i could either do this or find a way to change code in a script and save it for a config system.

This isnt like other command systems, i dont want preset ranks. I want to allow the owner to make as many staff ranks as they want and to customize it as much as they want. This will be done through a gui.

Pretty much want to remake ULX for GMod in roblox lua.

Note: I know datastores dont work the way i wrote them here, i was just trying to show you what i meant.

Answer this question