Admin mod

Hello everyone, I am currently working on an admin mod and I need some help with it. Does the users.txt file get overwritten when an addon has it’s own setting/user.txt? If so does Player:SetUserGroup(“group”) change the players group and write to the file as well? or do I have to write to the file manually?

I tried it once, but it didn’t seem like it wrote the player into the group.

That’s what I thought, I’m using a console command to write to the users.txt and I’m trying to get Player.IsUserGroup("") working but for some reason it’s returning false for my custom groups.

Networked strings for a player are temporary. Once they leave it gets set to nil. PData is permanent, or at least until you remove it.

As you can see, SetUserGroup uses SetNWString. If you want to make it permanent, just override the IsUserGroup() and SetUserGroup() functions.

Use custom MySQL/SQLite/textfile saving to save admin status, this way users can tell if someone is an admin or not if they are hacking.