• What's more efficient
    2 replies, posted
I am working on a cp test addon, basically new players have to take and pass the cp test before they are allowed to become government jobs and I was wondering what would be more efficient for saving the passed and failed steamIDs... Writing all the steamIDs and a true/false bool in a text file? Or creating a sqlite database for it.. I am using [URL="https://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index1732.html"]this[/URL] as a db tutorial but it is 6-7 years outdated... If creating a db for it is the way to go, are there any better tutorials out there? Or is this outdated tutorial still good?
I think the easiest, most simple way to save player-specific data like that is ply:SetPData(). It uses SQLite behind the scenes but the whole system is already written and it's very simple to implement. [url]http://wiki.garrysmod.com/page/Player/SetPData[/url] [url]http://wiki.garrysmod.com/page/Player/GetPData[/url] [url]http://wiki.garrysmod.com/page/Player/RemovePData[/url] [url]http://wiki.garrysmod.com/page/util/GetPData[/url] [url]http://wiki.garrysmod.com/page/util/SetPData[/url] [url]http://wiki.garrysmod.com/page/util/RemovePData[/url]
Ah, worked perfectly! Thanks for those!
Sorry, you need to Log In to post a reply to this thread.