Adding to TTT Easy Scoreboard

So the server I’m developing for runs the TTT Easy Scoreboard found here. We use this addon to handle all of the custom rank colors and titles for different levels of staff and donators. This is great but having to edit the file every time we want to give someone a custom rank is not idea. To get around this I’m looking to add another section to the right click menu that this addon adds for commands. It looks like the addon just stores all the ranks in a giant array so making a function to add to this array should be easy enough. My issue is trying to grab user input for the arguments. I’ve worked a bit in java and python but I’m by no means proficient and this is a major learning experience for me. Can someone point me in the right direction on grabbing user input for each of the arguments? I apologize profusely if this is not the correct place to ask for something like this.

Umm, not sure what you meant…
I think what you’re going for is the PlayerSay hook and string.find

You’re right about it storing it in an array, but if you want to have it be modified through in-game input, you’re also going to need to have it refer to a text file otherwise any changes you make while the game is running will just be reset on a map change.

Your process will basically be PlayerSay to read text chat input and string.find to search the text for the right string and splitting the args and then util.TableToJSON to serialize your table with file.Write to save your new serialized table.
Then you’re going to want to modify your scoreboard script to use file.Write to load your data file and util.JSONToTable to deserialize it back into a table that your script can use.

There could be a better way to do it, but that’s just the process I’d use. Make sure you use Player:IsAdmin or Player:IsSuperAdmin so that only people with the right permissions can mess with it.

You can also replace the PlayerSay and string.find by just making it a console command instead with concommand.Add.

Thank you, this seems like a good starting point for me.