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.
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.
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.